Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the maintenance.nvidia.com v1alpha1 API group +kubebuilder:object:generate=true +groupName=maintenance.nvidia.com
Package v1alpha1 contains API Schema definitions for the maintenance v1alpha1 API group +kubebuilder:object:generate=true +groupName=maintenance.nvidia.com
Index ¶
- Constants
- Variables
- type DrainSpec
- type DrainStatus
- type MaintenanceOperatorConfig
- type MaintenanceOperatorConfigList
- type MaintenanceOperatorConfigSpec
- type NodeMaintenance
- type NodeMaintenanceList
- type NodeMaintenanceSpec
- type NodeMaintenanceStatus
- type OperatorLogLevel
- type PodEvictionFiterEntry
- type WaitForPodCompletionSpec
Constants ¶
const ( // ConditionTypeReady is the Ready Condition type for NodeMaintenance. // It is used to convey node readiness for maintenance operation by the requestor. ConditionTypeReady string = "Ready" // ConditionTypeRequestorFailed is the RequestorFailed Condition type for NodeMaintenance. // It is used to convey failure during node maintenance operation by the requestor. ConditionTypeRequestorFailed string = "RequestorFailed" )
const ( // ConditionReasonUninitialized means that Condition is unset for NodeMaintenance ConditionReasonUninitialized string = "" // ConditionReasonPending means that NodeMaintenance is in Pending state ConditionReasonPending string = "Pending" // ConditionReasonScheduled means that NodeMaintenance is in Scheduled state ConditionReasonScheduled string = "Scheduled" // ConditionReasonCordon means that NodeMaintenance is in Cordon state ConditionReasonCordon string = "Cordon" // ConditionReasonWaitForPodCompletion means that NodeMaintenance is in WaitForPodCompletion state ConditionReasonWaitForPodCompletion string = "WaitForPodCompletion" // ConditionReasonDraining means that NodeMaintenance is in Draining state ConditionReasonDraining string = "Draining" // ConditionReasonReady means that NodeMaintenance is in Ready state ConditionReasonReady string = "Ready" // ConditionReasonRequestorFailed means that NodeMaintenance operation by the requestor has failed // garbage collection will not occur if this reason is set. ConditionReasonRequestorFailed string = ConditionTypeRequestorFailed // ConditionReasonFailedMaintenance means that maintenance operation failed in a non-recoverable way ConditionReasonFailedMaintenance string = "FailedMaintenance" )
const (
// ConditionChangedEventType is an event type emitted when NodeMaintenance condition changes
ConditionChangedEventType = "ConditionChanged"
)
const (
// MaintenanceFinalizerName is the name of the finalizer being used by NodeMaintenance controllers
MaintenanceFinalizerName = "maintenance.nvidia.com/finalizer"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "maintenance.nvidia.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type DrainSpec ¶
type DrainSpec struct { // Force draining even if there are pods that do not declare a controller // +kubebuilder:validation:Optional // +kubebuilder:default:=false Force bool `json:"force,omitempty"` // PodSelector specifies a label selector to filter pods on the node that need to be drained // For more details on label selectors, see: // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // +kubebuilder:validation:Optional PodSelector string `json:"podSelector,omitempty"` // TimeoutSecond specifies the length of time in seconds to wait before giving up drain, zero means infinite // +kubebuilder:validation:Optional // +kubebuilder:default:=300 // +kubebuilder:validation:Minimum:=0 TimeoutSecond int32 `json:"timeoutSeconds,omitempty"` // DeleteEmptyDir indicates if should continue even if there are pods using emptyDir // (local data that will be deleted when the node is drained) // +kubebuilder:validation:Optional // +kubebuilder:default:=false DeleteEmptyDir bool `json:"deleteEmptyDir,omitempty"` // PodEvictionFilters specifies filters for pods that need to undergo eviction during drain. // if specified. only pods that match PodEvictionFilters will be evicted during drain operation. // if unspecified. all non-daemonset pods will be evicted. // logical OR is performed between filter entires. logical AND is performed within different filters // in a filter entry. // +kubebuilder:validation:Optional PodEvictionFilters []PodEvictionFiterEntry `json:"podEvictionFilters,omitempty"` }
DrainSpec describes configuration for node drain during automatic upgrade
func (*DrainSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrainSpec.
func (*DrainSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DrainStatus ¶
type DrainStatus struct { // TotalPods is the number of pods on the node at the time NodeMaintenance started draining // +kubebuilder:validation:Minimum:=0 TotalPods int32 `json:"totalPods"` // EvictionPods is the total number of pods that need to be evicted at the time NodeMaintenance started draining // +kubebuilder:validation:Minimum:=0 EvictionPods int32 `json:"evictionPods"` // DrainProgress represents the draining progress as percentage // +kubebuilder:validation:Minimum:=0 DrainProgress int32 `json:"drainProgress"` // WaitForEviction is the list of namespaced named pods that need to be evicted WaitForEviction []string `json:"waitForEviction,omitempty"` }
DrainStatus represents the status of draining for the node
func (*DrainStatus) DeepCopy ¶
func (in *DrainStatus) DeepCopy() *DrainStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrainStatus.
func (*DrainStatus) DeepCopyInto ¶
func (in *DrainStatus) DeepCopyInto(out *DrainStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MaintenanceOperatorConfig ¶
type MaintenanceOperatorConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MaintenanceOperatorConfigSpec `json:"spec,omitempty"` }
MaintenanceOperatorConfig is the Schema for the maintenanceoperatorconfigs API
func (*MaintenanceOperatorConfig) DeepCopy ¶
func (in *MaintenanceOperatorConfig) DeepCopy() *MaintenanceOperatorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceOperatorConfig.
func (*MaintenanceOperatorConfig) DeepCopyInto ¶
func (in *MaintenanceOperatorConfig) DeepCopyInto(out *MaintenanceOperatorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MaintenanceOperatorConfig) DeepCopyObject ¶
func (in *MaintenanceOperatorConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MaintenanceOperatorConfigList ¶
type MaintenanceOperatorConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MaintenanceOperatorConfig `json:"items"` }
MaintenanceOperatorConfigList contains a list of MaintenanceOperatorConfig
func (*MaintenanceOperatorConfigList) DeepCopy ¶
func (in *MaintenanceOperatorConfigList) DeepCopy() *MaintenanceOperatorConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceOperatorConfigList.
func (*MaintenanceOperatorConfigList) DeepCopyInto ¶
func (in *MaintenanceOperatorConfigList) DeepCopyInto(out *MaintenanceOperatorConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MaintenanceOperatorConfigList) DeepCopyObject ¶
func (in *MaintenanceOperatorConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MaintenanceOperatorConfigSpec ¶
type MaintenanceOperatorConfigSpec struct { // MaxParallelOperations indicates the maximal number nodes that can undergo maintenance // at a given time. 0 means no limit // value can be an absolute number (ex: 5) or a percentage of total nodes in the cluster (ex: 10%). // absolute number is calculated from percentage by rounding up. // defaults to 1. The actual number of nodes that can undergo maintenance may be lower depending // on the value of MaintenanceOperatorConfigSpec.MaxUnavailable. // +kubebuilder:default=1 // +kubebuilder:validation:XIntOrString MaxParallelOperations *intstr.IntOrString `json:"maxParallelOperations,omitempty"` // value can be an absolute number (ex: 5) or a percentage of total nodes in the cluster (ex: 10%). // absolute number is calculated from percentage by rounding up. // by default, unset. // new nodes will not be processed if the number of unavailable node will exceed this value // +kubebuilder:validation:XIntOrString MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` // LogLevel is the operator logging level // +kubebuilder:default="info" LogLevel OperatorLogLevel `json:"logLevel,omitempty"` // MaxNodeMaintenanceTimeSeconds is the time from when a NodeMaintenance is marked as ready (phase: Ready) // until the NodeMaintenance is considered stale and removed by the operator. // should be less than idle time for any autoscaler that is running. // default to 30m (1600 seconds) // +kubebuilder:default=1600 // +kubebuilder:validation:Minimum:=0 MaxNodeMaintenanceTimeSeconds int32 `json:"maxNodeMaintenanceTimeSeconds,omitempty"` }
MaintenanceOperatorConfigSpec defines the desired state of MaintenanceOperatorConfig
func (*MaintenanceOperatorConfigSpec) DeepCopy ¶
func (in *MaintenanceOperatorConfigSpec) DeepCopy() *MaintenanceOperatorConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceOperatorConfigSpec.
func (*MaintenanceOperatorConfigSpec) DeepCopyInto ¶
func (in *MaintenanceOperatorConfigSpec) DeepCopyInto(out *MaintenanceOperatorConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeMaintenance ¶
type NodeMaintenance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NodeMaintenanceSpec `json:"spec,omitempty"` Status NodeMaintenanceStatus `json:"status,omitempty"` }
NodeMaintenance is the Schema for the nodemaintenances API
func (*NodeMaintenance) CanonicalString ¶
func (nm *NodeMaintenance) CanonicalString() string
CanonicalString is a canonical string representation of NodeMaintenance
func (*NodeMaintenance) DeepCopy ¶
func (in *NodeMaintenance) DeepCopy() *NodeMaintenance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMaintenance.
func (*NodeMaintenance) DeepCopyInto ¶
func (in *NodeMaintenance) DeepCopyInto(out *NodeMaintenance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeMaintenance) DeepCopyObject ¶
func (in *NodeMaintenance) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeMaintenanceList ¶
type NodeMaintenanceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NodeMaintenance `json:"items"` }
NodeMaintenanceList contains a list of NodeMaintenance
func (*NodeMaintenanceList) DeepCopy ¶
func (in *NodeMaintenanceList) DeepCopy() *NodeMaintenanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMaintenanceList.
func (*NodeMaintenanceList) DeepCopyInto ¶
func (in *NodeMaintenanceList) DeepCopyInto(out *NodeMaintenanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeMaintenanceList) DeepCopyObject ¶
func (in *NodeMaintenanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeMaintenanceSpec ¶
type NodeMaintenanceSpec struct { // RequestorID MUST follow domain name notation format (https://tools.ietf.org/html/rfc1035#section-2.3.1) // It MUST be 63 characters or less, beginning and ending with an alphanumeric // character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. // caller SHOULD NOT create multiple objects with same requestorID and nodeName. // This field identifies the requestor of the operation. // +kubebuilder:validation:Pattern=`^([a-z0-9A-Z]([-a-z0-9A-Z]*[a-z0-9A-Z])?(\.[a-z0-9A-Z]([-a-z0-9A-Z]*[a-z0-9A-Z])?)*)$` // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:MinLength=2 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" RequestorID string `json:"requestorID"` // AdditionalRequestors is a set of additional requestor IDs which are using the same NodeMaintenance // request. addition or removal of requiestor IDs to this list MUST be made with update operation (and retry on failure) // which will replace the entire list. // +kubebuilder:validation:Optional // +listType=set AdditionalRequestors []string `json:"additionalRequestors,omitempty"` // NodeName is The name of the node that maintenance operation will be performed on // creation fails if node obj does not exist (webhook) // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" NodeName string `json:"nodeName"` // Cordon if set, marks node as unschedulable during maintenance operation // +kubebuilder:default=true Cordon bool `json:"cordon,omitempty"` // WaitForPodCompletion specifies pods via selector to wait for completion before performing drain operation // if not provided, will not wait for pods to complete WaitForPodCompletion *WaitForPodCompletionSpec `json:"waitForPodCompletion,omitempty"` // DrainSpec specifies how a node will be drained. if not provided, no draining will be performed. DrainSpec *DrainSpec `json:"drainSpec,omitempty"` }
NodeMaintenanceSpec defines the desired state of NodeMaintenance
func (*NodeMaintenanceSpec) DeepCopy ¶
func (in *NodeMaintenanceSpec) DeepCopy() *NodeMaintenanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMaintenanceSpec.
func (*NodeMaintenanceSpec) DeepCopyInto ¶
func (in *NodeMaintenanceSpec) DeepCopyInto(out *NodeMaintenanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeMaintenanceStatus ¶
type NodeMaintenanceStatus struct { // Conditions represents observations of NodeMaintenance current state // +kubebuilder:validation:Optional // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` // WaitForCompletion is the list of namespaced named pods that we wait to complete WaitForCompletion []string `json:"waitForCompletion,omitempty"` // Drain represents the drain status of the node Drain *DrainStatus `json:"drain,omitempty"` }
NodeMaintenanceStatus defines the observed state of NodeMaintenance
func (*NodeMaintenanceStatus) DeepCopy ¶
func (in *NodeMaintenanceStatus) DeepCopy() *NodeMaintenanceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMaintenanceStatus.
func (*NodeMaintenanceStatus) DeepCopyInto ¶
func (in *NodeMaintenanceStatus) DeepCopyInto(out *NodeMaintenanceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorLogLevel ¶
type OperatorLogLevel string
OperatorLogLevel is the operator log level. one of: ["debug", "info", "error"] +kubebuilder:validation:Enum=debug;info;error
type PodEvictionFiterEntry ¶
type PodEvictionFiterEntry struct { // ByResourceNameRegex filters pods by the name of the resources they consume using regex. ByResourceNameRegex *string `json:"byResourceNameRegex,omitempty"` }
PodEvictionFiterEntry defines filters for Pod evictions during drain operation
func (*PodEvictionFiterEntry) DeepCopy ¶
func (in *PodEvictionFiterEntry) DeepCopy() *PodEvictionFiterEntry
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodEvictionFiterEntry.
func (*PodEvictionFiterEntry) DeepCopyInto ¶
func (in *PodEvictionFiterEntry) DeepCopyInto(out *PodEvictionFiterEntry)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WaitForPodCompletionSpec ¶
type WaitForPodCompletionSpec struct { // PodSelector specifies a label selector for the pods to wait for completion // For more details on label selectors, see: // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors // +kubebuilder:validation:Optional // +kubebuilder:example="app=my-workloads" PodSelector string `json:"podSelector,omitempty"` // TimeoutSecond specifies the length of time in seconds // to wait before giving up on pod termination, zero means infinite // +kubebuilder:validation:Optional // +kubebuilder:default:=0 // +kubebuilder:validation:Minimum:=0 TimeoutSecond int32 `json:"timeoutSeconds,omitempty"` }
WaitForPodCompletionSpec describes the configuration for waiting on pods completion
func (*WaitForPodCompletionSpec) DeepCopy ¶
func (in *WaitForPodCompletionSpec) DeepCopy() *WaitForPodCompletionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaitForPodCompletionSpec.
func (*WaitForPodCompletionSpec) DeepCopyInto ¶
func (in *WaitForPodCompletionSpec) DeepCopyInto(out *WaitForPodCompletionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.