Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnabledState ¶
type EnabledState string
EnabledState represents the desired enabled state of a module.
const ( Enabled EnabledState = "enabled" Disabled EnabledState = "disabled" )
type ExperimentalModuleError ¶
type ExperimentalModuleError struct {
ModuleName string
}
ExperimentalModuleError represents an error when trying to enable an experimental module.
func (*ExperimentalModuleError) Error ¶
func (e *ExperimentalModuleError) Error() string
type MaintenanceState ¶ added in v0.30.20
type MaintenanceState string
MaintenanceState represents the desired maintenance state of a module.
const ( // NoResourceReconciliation switches the module into maintenance mode. NoResourceReconciliation MaintenanceState = "NoResourceReconciliation" // DefaultReconciliation is the normal state; the spec.maintenance field is absent. DefaultReconciliation MaintenanceState = "" )
type Result ¶
type Result struct {
Status ResultStatus
}
Result contains the result of a SetEnabledState operation.
func SetEnabledState ¶
func SetEnabledState(dynamicClient dynamic.Interface, name string, state EnabledState) (*Result, error)
SetEnabledState sets the enabled state of a module via its ModuleConfig resource. If the ModuleConfig does not exist, it will be created.
func SetMaintenanceState ¶ added in v0.30.20
func SetMaintenanceState(dynamicClient dynamic.Interface, name string, state MaintenanceState) (*Result, error)
SetMaintenanceState sets the maintenance state of a module via its ModuleConfig resource. The ModuleConfig must already exist; if it does not, the underlying Kubernetes NotFound error is returned and can be detected by the caller with errors.IsNotFound.
type ResultStatus ¶
type ResultStatus int
ResultStatus represents the status of a SetEnabledState operation.
const ( // Changed indicates the module state was changed. Changed ResultStatus = iota // AlreadyInState indicates the module is already in the desired state. AlreadyInState )