Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the drain v1 API group +kubebuilder:object:generate=true +groupName=drain.k8s.slyng.dk
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "drain.k8s.slyng.dk", Version: "v1"} // 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 Condition ¶
type Condition struct {
metav1.Condition `json:",inline"`
// lastCheckTime is the last time the condition has been checked.
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=date-time
LastCheckTime *metav1.Time `json:"lastCheckTime" protobuf:"bytes,4,opt,name=lastCheckTime"`
}
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Node ¶
type Node struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec NodeSpec `json:"spec,omitempty"`
Status NodeStatus `json:"status,omitempty"`
}
Node is the Schema for the nodes API
func (*Node) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.
func (*Node) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Node) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeCurrentState ¶
type NodeCurrentState string
const ( NodeCurrentStateOk NodeCurrentState = "OK" NodeCurrentStateCordoned NodeCurrentState = "Cordoned" NodeCurrentStateQueued NodeCurrentState = "Queued" NodeCurrentStateNext NodeCurrentState = "Next" NodeCurrentStateDraining NodeCurrentState = "Draining" NodeCurrentStateDrained NodeCurrentState = "Drained" NodeCurrentStateUndraining NodeCurrentState = "Undraining" NodeCurrentStateRebooting NodeCurrentState = "Rebooting" )
func GetNodeCurrentStates ¶
func GetNodeCurrentStates() []NodeCurrentState
func (NodeCurrentState) String ¶
func (c NodeCurrentState) String() string
func (NodeCurrentState) WorkState ¶
func (c NodeCurrentState) WorkState() bool
type NodeList ¶
type NodeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Node `json:"items"`
}
NodeList contains a list of Node
func (*NodeList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList.
func (*NodeList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeSpec ¶
type NodeSpec struct {
// +kubebuilder:validation:Required
// +kubebuilder:default=Active
// +kubebuilder:validation:Enum=Active;Cordoned;Drained;RebootIfRequired
State NodeState `json:"state,omitempty"`
}
NodeSpec defines the desired state of Node
func (*NodeSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.
func (*NodeSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeStatus ¶
type NodeStatus struct {
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=date-time
RebootRequiredLastChecked *metav1.Time `json:"rebootRequiredLastChecked,omitempty"`
// +optional
RebootRequired *bool `json:"rebootRequired"`
// +kubebuilder:validation:Required
// +kubebuilder:default=false
Drained bool `json:"drained"`
// +kubebuilder:validation:Required
// +kubebuilder:default=OK
// +kubebuilder:validation:Enum=OK;Cordoned;Queued;Next;Draining;Drained;Undraining;Rebooting
CurrentState NodeCurrentState `json:"currentState,omitempty"`
BootID string `json:"bootID,omitempty"`
}
NodeStatus defines the observed state of Node
func (*NodeStatus) DeepCopy ¶
func (in *NodeStatus) DeepCopy() *NodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.
func (*NodeStatus) DeepCopyInto ¶
func (in *NodeStatus) DeepCopyInto(out *NodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.