Documentation ¶
Index ¶
- Constants
- func ShouldShutdown(esx *Host) bool
- func ShouldStart(node *v1.Node) bool
- type CheckParameters
- type Config
- type Credential
- type Host
- type HostInfo
- type Maintenance
- type Runnable
- func (r *Runnable) CheckMaintenance(ctx context.Context, vCenters *VCenters, esx *Host) error
- func (r *Runnable) NeedLeaderElection() bool
- func (r *Runnable) Reconcile(ctx context.Context)
- func (r *Runnable) ShutdownNodes(ctx context.Context, vCenters *VCenters, esx *Host, conf *Config) error
- func (r *Runnable) Start(ctx context.Context) error
- func (r *Runnable) StartNodes(ctx context.Context, vCenters *VCenters, esx *Host, conf *Config)
- type VCenters
Constants ¶
View Source
const AvailabilityZoneReplacer string = "$AZ"
Specifies the string in a vCenter URL, which is replaced by the availability zone.
Variables ¶
This section is empty.
Functions ¶
func ShouldShutdown ¶
Checks, if all Nodes on an ESX need maintenance and are allowed to be shutdown. If so the RebootInitated Annotation is set on the affected Nodes.
func ShouldStart ¶
Checks if the controller initiated the maintenance and the underlying ESX is not in maintenance.
Types ¶
type CheckParameters ¶
type Config ¶
type Config struct { Intervals struct { Check struct { Jitter float64 `config:"jitter" validate:"min=0.001"` Period time.Duration `config:"period" validate:"required"` } `config:"check" validate:"required"` PodDeletion struct { Period time.Duration Timeout time.Duration } `config:"podDeletion" validate:"required"` Stagger time.Duration `config:"stagger"` } `config:"intervals" validate:"required"` VCenters VCenters `config:"vCenters" validate:"required"` }
type Credential ¶
type Maintenance ¶
type Maintenance string
const InMaintenance Maintenance = "true"
const NoMaintenance Maintenance = "false"
const UnknownMaintenance Maintenance = "unknown"
func CheckForMaintenance ¶
func CheckForMaintenance(ctx context.Context, params CheckParameters) (Maintenance, error)
Performs a check for the specified host if allowed by timestamps.
type Runnable ¶
func (*Runnable) CheckMaintenance ¶
Checks the maintenance mode of the given ESX and attaches the according Maintenance label.
func (*Runnable) NeedLeaderElection ¶
type VCenters ¶
type VCenters struct { // URL to regional vCenters with the availability zone replaced by AvailabilityZoneReplacer. Template string `config:"templateUrl" validate:"required"` // If true the vCenters certificates are not validated. Insecure bool `config:"insecure"` // Pair of credentials per availability zone. Credentials map[string]Credential `config:"credentials" validate:"required"` // contains filtered or unexported fields }
VCenters contains connection information to regional vCenters.
func (*VCenters) ClearCache ¶
Click to show internal directories.
Click to hide internal directories.