Documentation
¶
Index ¶
- Constants
- Variables
- func EmojiHelpText() string
- func FormatContextName(prefix string, suffix string) string
- func GetAuthContext(kubeconfig string) (*auth.AuthContext, error)
- func WriteContexts(ctxs *Contexts) error
- type Context
- type Contexts
- type Issue
- type Issues
- type MachineIssues
- type MachineWithIssues
- type Version
Constants ¶
View Source
const ( Ambulance = "🚑" Exclamation = "❗" Bark = "🚧" Loop = "⭕" Lock = "🔒" Question = "❓" Skull = "💀" )
View Source
const CloudContext = "metalctl"
Variables ¶
View Source
var ( IssueNoPartition = Issue{ ShortName: "no-partition", Description: "machine with no partition", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#no-partition", } IssueLivelinessDead = Issue{ ShortName: "liveliness-dead", Description: "the machine is not sending events anymore", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#liveliness-dead", } IssueLivelinessUnknown = Issue{ ShortName: "liveliness-unknown", Description: "the machine is not sending LLDP alive messages anymore", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#liveliness-unknown", } IssueLivelinessNotAvailable = Issue{ ShortName: "liveliness-not-available", Description: "the machine liveliness is not available", } IssueFailedMachineReclaim = Issue{ ShortName: "failed-machine-reclaim", Description: "machine phones home but not allocated", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#failed-machine-reclaim", } IssueCrashLoop = Issue{ ShortName: "crashloop", Description: fmt.Sprintf("machine is in a provisioning crash loop (%s)", Loop), RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#crashloop", } IssueASNUniqueness = Issue{ ShortName: "asn-not-unique", Description: "The ASN is not unique (only impact on firewalls)", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#asn-not-unique", } IssueBMCWithoutMAC = Issue{ ShortName: "bmc-without-mac", Description: "BMC has no mac address", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#bmc-without-mac", } IssueBMCWithoutIP = Issue{ ShortName: "bmc-without-ip", Description: "BMC has no ip address", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#bmc-without-ip", } IssueNonDistinctBMCIP = Issue{ ShortName: "bmc-no-distinct-ip", Description: "BMC IP address is not distinct", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#bmc-no-distinct-ip", } IssueLastEventError = Issue{ ShortName: "last-event-error", Description: "the machine had an error during the provisioning lifecycle", RefURL: "https://docs.metal-stack.io/stable/installation/troubleshoot/#last-event-error", } AllIssues = Issues{ IssueNoPartition, IssueLivelinessDead, IssueLivelinessUnknown, IssueLivelinessNotAvailable, IssueFailedMachineReclaim, IssueCrashLoop, IssueASNUniqueness, IssueBMCWithoutMAC, IssueBMCWithoutIP, IssueNonDistinctBMCIP, IssueLastEventError, } )
Functions ¶
func EmojiHelpText ¶ added in v0.12.0
func EmojiHelpText() string
func FormatContextName ¶
formatContextName returns the contextName for the given suffix. suffix can be empty.
func GetAuthContext ¶
func GetAuthContext(kubeconfig string) (*auth.AuthContext, error)
getAuthContext reads AuthContext from given kubeconfig
func WriteContexts ¶
Types ¶
type Context ¶
type Context struct {
ApiURL string `yaml:"url"`
IssuerURL string `yaml:"issuer_url"`
IssuerType string `yaml:"issuer_type"`
CustomScopes string `yaml:"custom_scopes"`
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
HMAC *string `yaml:"hmac"`
}
Context configure metalctl behaviour
func MustDefaultContext ¶
func MustDefaultContext() Context
type Contexts ¶
type Contexts struct {
CurrentContext string `yaml:"current"`
PreviousContext string `yaml:"previous"`
Contexts map[string]Context
}
Contexts contains all configuration contexts of metalctl
func GetContexts ¶
type MachineIssues ¶
type MachineIssues []MachineWithIssues
MachineIssues is map of a machine response to a list of machine issues
type MachineWithIssues ¶
type MachineWithIssues struct {
Machine models.V1MachineIPMIResponse
Issues Issues
}
MachineWithIssues summarizes a machine with issues
type Version ¶
type Version struct {
Client string `json:"client" yaml:"client"`
Server *metalmodels.RestVersion `json:"server" yaml:"server,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.