Documentation ¶
Index ¶
- Constants
- func DefaultLastErrorThreshold() time.Duration
- 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 IssueASNUniqueness
- type IssueBMCWithoutIP
- type IssueBMCWithoutMAC
- type IssueConfig
- type IssueCrashLoop
- type IssueFailedMachineReclaim
- type IssueLastEventError
- type IssueLivelinessDead
- type IssueLivelinessNotAvailable
- type IssueLivelinessUnknown
- type IssueNoPartition
- type IssueNonDistinctBMCIP
- type IssueSeverity
- type IssueType
- type Issues
- type MachineIssues
- type MachineWithIssues
- type Version
Constants ¶
View Source
const ( Ambulance = "🚑" Exclamation = "❗" Bark = "🚧" Loop = "⭕" Lock = "🔒" Question = "❓" Skull = "💀" VPN = "🛡️ " )
View Source
const ( // IssueSeverityMinor is an issue that should be checked from time to time but has no bad effects for the user. IssueSeverityMinor IssueSeverity = "minor" // IssueSeverityMajor is an issue where user experience is affected or provider resources are wasted. // overall functionality is still maintained though. major issues should be resolved as soon as possible. IssueSeverityMajor IssueSeverity = "major" // IssueSeverityCritical is an issue that can lead to disfunction of the system and need to be handled as quickly as possible. IssueSeverityCritical IssueSeverity = "critical" IssueTypeNoPartition IssueType = "no-partition" IssueTypeLivelinessDead IssueType = "liveliness-dead" IssueTypeLivelinessUnknown IssueType = "liveliness-unknown" IssueTypeLivelinessNotAvailable IssueType = "liveliness-not-available" IssueTypeFailedMachineReclaim IssueType = "failed-machine-reclaim" IssueTypeCrashLoop IssueType = "crashloop" IssueTypeLastEventError IssueType = "last-event-error" IssueTypeBMCWithoutMAC IssueType = "bmc-without-mac" IssueTypeBMCWithoutIP IssueType = "bmc-without-ip" IssueTypeASNUniqueness IssueType = "asn-not-unique" IssueTypeNonDistinctBMCIP IssueType = "bmc-no-distinct-ip" )
View Source
const CloudContext = "metalctl"
Variables ¶
This section is empty.
Functions ¶
func DefaultLastErrorThreshold ¶ added in v0.12.6
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 `yaml:"contexts"` }
Contexts contains all configuration contexts of metalctl
func GetContexts ¶
type Issue ¶
type Issue struct { Type IssueType Severity IssueSeverity Description string RefURL string Details string }
Issue formulates an issue of a machine
type IssueASNUniqueness ¶
type IssueASNUniqueness struct {
// contains filtered or unexported fields
}
func (*IssueASNUniqueness) Details ¶ added in v0.12.6
func (i *IssueASNUniqueness) Details() string
func (*IssueASNUniqueness) Evaluate ¶ added in v0.12.6
func (i *IssueASNUniqueness) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueASNUniqueness) Spec ¶ added in v0.12.6
func (i *IssueASNUniqueness) Spec() *issueSpec
type IssueBMCWithoutIP ¶
type IssueBMCWithoutIP struct{}
func (*IssueBMCWithoutIP) Details ¶ added in v0.12.6
func (i *IssueBMCWithoutIP) Details() string
func (*IssueBMCWithoutIP) Evaluate ¶ added in v0.12.6
func (i *IssueBMCWithoutIP) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueBMCWithoutIP) Spec ¶ added in v0.12.6
func (i *IssueBMCWithoutIP) Spec() *issueSpec
type IssueBMCWithoutMAC ¶
type IssueBMCWithoutMAC struct{}
func (*IssueBMCWithoutMAC) Details ¶ added in v0.12.6
func (i *IssueBMCWithoutMAC) Details() string
func (*IssueBMCWithoutMAC) Evaluate ¶ added in v0.12.6
func (i *IssueBMCWithoutMAC) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueBMCWithoutMAC) Spec ¶ added in v0.12.6
func (i *IssueBMCWithoutMAC) Spec() *issueSpec
type IssueConfig ¶ added in v0.12.6
type IssueConfig struct { Machines []*models.V1MachineIPMIResponse Severity IssueSeverity Only []IssueType Omit []IssueType LastErrorThreshold time.Duration }
IssueConfig contains configuration parameters for finding machine issues
type IssueCrashLoop ¶ added in v0.12.0
type IssueCrashLoop struct{}
func (*IssueCrashLoop) Details ¶ added in v0.12.6
func (i *IssueCrashLoop) Details() string
func (*IssueCrashLoop) Evaluate ¶ added in v0.12.6
func (i *IssueCrashLoop) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueCrashLoop) Spec ¶ added in v0.12.6
func (i *IssueCrashLoop) Spec() *issueSpec
type IssueFailedMachineReclaim ¶
type IssueFailedMachineReclaim struct{}
func (*IssueFailedMachineReclaim) Details ¶ added in v0.12.6
func (i *IssueFailedMachineReclaim) Details() string
func (*IssueFailedMachineReclaim) Evaluate ¶ added in v0.12.6
func (i *IssueFailedMachineReclaim) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueFailedMachineReclaim) Spec ¶ added in v0.12.6
func (i *IssueFailedMachineReclaim) Spec() *issueSpec
type IssueLastEventError ¶ added in v0.12.0
type IssueLastEventError struct {
// contains filtered or unexported fields
}
func (*IssueLastEventError) Details ¶ added in v0.12.6
func (i *IssueLastEventError) Details() string
func (*IssueLastEventError) Evaluate ¶ added in v0.12.6
func (i *IssueLastEventError) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueLastEventError) Spec ¶ added in v0.12.6
func (i *IssueLastEventError) Spec() *issueSpec
type IssueLivelinessDead ¶
type IssueLivelinessDead struct{}
func (*IssueLivelinessDead) Details ¶ added in v0.12.6
func (i *IssueLivelinessDead) Details() string
func (*IssueLivelinessDead) Evaluate ¶ added in v0.12.6
func (i *IssueLivelinessDead) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueLivelinessDead) Spec ¶ added in v0.12.6
func (i *IssueLivelinessDead) Spec() *issueSpec
type IssueLivelinessNotAvailable ¶
type IssueLivelinessNotAvailable struct{}
func (*IssueLivelinessNotAvailable) Details ¶ added in v0.12.6
func (i *IssueLivelinessNotAvailable) Details() string
func (*IssueLivelinessNotAvailable) Evaluate ¶ added in v0.12.6
func (i *IssueLivelinessNotAvailable) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueLivelinessNotAvailable) Spec ¶ added in v0.12.6
func (i *IssueLivelinessNotAvailable) Spec() *issueSpec
type IssueLivelinessUnknown ¶
type IssueLivelinessUnknown struct{}
func (*IssueLivelinessUnknown) Details ¶ added in v0.12.6
func (i *IssueLivelinessUnknown) Details() string
func (*IssueLivelinessUnknown) Evaluate ¶ added in v0.12.6
func (i *IssueLivelinessUnknown) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueLivelinessUnknown) Spec ¶ added in v0.12.6
func (i *IssueLivelinessUnknown) Spec() *issueSpec
type IssueNoPartition ¶
type IssueNoPartition struct{}
func (*IssueNoPartition) Details ¶ added in v0.12.6
func (i *IssueNoPartition) Details() string
func (*IssueNoPartition) Evaluate ¶ added in v0.12.6
func (i *IssueNoPartition) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueNoPartition) Spec ¶ added in v0.12.6
func (i *IssueNoPartition) Spec() *issueSpec
type IssueNonDistinctBMCIP ¶
type IssueNonDistinctBMCIP struct {
// contains filtered or unexported fields
}
func (*IssueNonDistinctBMCIP) Details ¶ added in v0.12.6
func (i *IssueNonDistinctBMCIP) Details() string
func (*IssueNonDistinctBMCIP) Evaluate ¶ added in v0.12.6
func (i *IssueNonDistinctBMCIP) Evaluate(m *models.V1MachineIPMIResponse, c *IssueConfig) bool
func (*IssueNonDistinctBMCIP) Spec ¶ added in v0.12.6
func (i *IssueNonDistinctBMCIP) Spec() *issueSpec
type IssueSeverity ¶ added in v0.12.6
type IssueSeverity string
func AllSevereties ¶ added in v0.12.6
func AllSevereties() []IssueSeverity
func SeverityFromString ¶ added in v0.12.6
func SeverityFromString(input string) (IssueSeverity, error)
func (IssueSeverity) LowerThan ¶ added in v0.12.6
func (s IssueSeverity) LowerThan(o IssueSeverity) bool
type IssueType ¶ added in v0.12.6
type IssueType string
func AllIssueTypes ¶ added in v0.12.6
func AllIssueTypes() []IssueType
type MachineIssues ¶
type MachineIssues []*MachineWithIssues
MachineIssues is map of a machine response to a list of machine issues
func FindIssues ¶ added in v0.12.6
func FindIssues(c *IssueConfig) (MachineIssues, error)
func (MachineIssues) Get ¶ added in v0.12.6
func (mis MachineIssues) Get(id string) *MachineWithIssues
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.