Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the nodemaintenance v1beta1 API group +kubebuilder:object:generate=true +groupName=nodemaintenance.kubevirt.io
Index ¶
- Constants
- Variables
- type MaintenancePhase
- type NodeMaintenance
- func (in *NodeMaintenance) DeepCopy() *NodeMaintenance
- func (in *NodeMaintenance) DeepCopyInto(out *NodeMaintenance)
- func (in *NodeMaintenance) DeepCopyObject() runtime.Object
- func (r *NodeMaintenance) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *NodeMaintenance) ValidateCreate() error
- func (r *NodeMaintenance) ValidateDelete() error
- func (r *NodeMaintenance) ValidateUpdate(old runtime.Object) error
- type NodeMaintenanceList
- type NodeMaintenanceSpec
- type NodeMaintenanceStatus
- type NodeMaintenanceValidator
Constants ¶
const ( ErrorNodeNotExists = "invalid nodeName, no node with name %s found" ErrorNodeMaintenanceExists = "invalid nodeName, a NodeMaintenance for node %s already exists" ErrorNodeNameUpdateForbidden = "updating spec.NodeName isn't allowed" ErrorMasterQuorumViolation = "can not put master node into maintenance at this moment, it would violate the master quorum" )
const ( EtcdQuorumPDBName = "etcd-quorum-guard" EtcdQuorumPDBNamespace = "openshift-etcd" LabelNameRoleMaster = "node-role.kubernetes.io/master" )
const ( WebhookCertDir = "/apiserver.local.config/certificates" WebhookCertName = "apiserver.crt" WebhookKeyName = "apiserver.key" )
const ( // NodeMaintenanceFinalizer is a finalizer for a NodeMaintenance CR deletion NodeMaintenanceFinalizer string = "foregroundDeleteNodeMaintenance" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "nodemaintenance.kubevirt.io", Version: "v1beta1"} // 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 MaintenancePhase ¶
type MaintenancePhase string
MaintenancePhase contains the phase of maintenance
const ( // MaintenanceRunning - maintenance has started its proccessing MaintenanceRunning MaintenancePhase = "Running" // MaintenanceSucceeded - maintenance has finished succesfuly, cordoned the node and evicted all pods (that could be evicted) MaintenanceSucceeded MaintenancePhase = "Succeeded" // MaintenanceFailed - maintenance has failed MaintenanceFailed MaintenancePhase = "Failed" )
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) 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.
func (*NodeMaintenance) SetupWebhookWithManager ¶
func (r *NodeMaintenance) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*NodeMaintenance) ValidateCreate ¶
func (r *NodeMaintenance) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*NodeMaintenance) ValidateDelete ¶
func (r *NodeMaintenance) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*NodeMaintenance) ValidateUpdate ¶
func (r *NodeMaintenance) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
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 { // Node name to apply maintanance on/off NodeName string `json:"nodeName"` // Reason for maintanance Reason string `json:"reason,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 { // Phase is the represtation of the maintenance progress (Running,Succeeded,Failed) Phase MaintenancePhase `json:"phase,omitempty"` // LastError represents the latest error if any in the latest reconciliation LastError string `json:"lastError,omitempty"` // PendingPods is a list of pending pods for eviction PendingPods []string `json:"pendingPods,omitempty"` // TotalPods is the total number of all pods on the node from the start TotalPods int `json:"totalpods,omitempty"` // EvictionPods is the total number of pods up for eviction from the start EvictionPods int `json:"evictionPods,omitempty"` // Consecutive number of errors upon obtaining a lease ErrorOnLeaseCount int `json:"errorOnLeaseCount,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 NodeMaintenanceValidator ¶
type NodeMaintenanceValidator struct {
// contains filtered or unexported fields
}
NodeMaintenanceValidator validates NodeMaintenance resources. Needed because we need a client for validation +k8s:deepcopy-gen=false
func (*NodeMaintenanceValidator) ValidateCreate ¶
func (v *NodeMaintenanceValidator) ValidateCreate(nm *NodeMaintenance) error
func (*NodeMaintenanceValidator) ValidateUpdate ¶
func (v *NodeMaintenanceValidator) ValidateUpdate(new, old *NodeMaintenance) error