Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the fence-agents-remediation v1alpha1 API group +kubebuilder:object:generate=true +groupName=fence-agents-remediation.medik8s.io
Index ¶
- Constants
- Variables
- func InitOutOfServiceTaintSupportedFlag(outOfServiceTaintSupported bool)
- type ConditionsChangeReason
- type FenceAgentsRemediation
- func (in *FenceAgentsRemediation) DeepCopy() *FenceAgentsRemediation
- func (in *FenceAgentsRemediation) DeepCopyInto(out *FenceAgentsRemediation)
- func (in *FenceAgentsRemediation) DeepCopyObject() runtime.Object
- func (r *FenceAgentsRemediation) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (far *FenceAgentsRemediation) ValidateCreate() (admission.Warnings, error)
- func (far *FenceAgentsRemediation) ValidateDelete() (admission.Warnings, error)
- func (far *FenceAgentsRemediation) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type FenceAgentsRemediationList
- type FenceAgentsRemediationSpec
- type FenceAgentsRemediationStatus
- type FenceAgentsRemediationTemplate
- func (in *FenceAgentsRemediationTemplate) DeepCopy() *FenceAgentsRemediationTemplate
- func (in *FenceAgentsRemediationTemplate) DeepCopyInto(out *FenceAgentsRemediationTemplate)
- func (in *FenceAgentsRemediationTemplate) DeepCopyObject() runtime.Object
- func (farTemplate *FenceAgentsRemediationTemplate) Default()
- func (r *FenceAgentsRemediationTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (farTemplate *FenceAgentsRemediationTemplate) ValidateCreate() (admission.Warnings, error)
- func (farTemplate *FenceAgentsRemediationTemplate) ValidateDelete() (admission.Warnings, error)
- func (farTemplate *FenceAgentsRemediationTemplate) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type FenceAgentsRemediationTemplateList
- type FenceAgentsRemediationTemplateResource
- type FenceAgentsRemediationTemplateSpec
- type FenceAgentsRemediationTemplateStatus
- type NodeName
- type ParameterName
- type RemediationStrategyType
Constants ¶
const ( // FARFinalizer is a finalizer for a FenceAgentsRemediation CR deletion FARFinalizer string = "fence-agents-remediation.medik8s.io/far-finalizer" // Taints FARNoExecuteTaintKey = "medik8s.io/fence-agents-remediation" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "fence-agents-remediation.medik8s.io", 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 ¶
func InitOutOfServiceTaintSupportedFlag ¶ added in v0.4.0
func InitOutOfServiceTaintSupportedFlag(outOfServiceTaintSupported bool)
Types ¶
type ConditionsChangeReason ¶ added in v0.2.0
type ConditionsChangeReason string
ConditionsChangeReason represents the reason of updating the some or all the conditions
const ( // RemediationFinishedNodeNotFound - CR was found but its name doesn't matche a node RemediationFinishedNodeNotFound ConditionsChangeReason = "RemediationFinishedNodeNotFound" // RemediationInterruptedByNHC - Remediation was interrupted by NHC timeout annotation RemediationInterruptedByNHC ConditionsChangeReason = "RemediationInterruptedByNHC" // RemediationStarted - CR was found, its name matches a node, and a finalizer was set RemediationStarted ConditionsChangeReason = "RemediationStarted" // FenceAgentSucceeded - FAR taint was added, fence agent command has been created and executed successfully FenceAgentSucceeded ConditionsChangeReason = "FenceAgentSucceeded" // RemediationFinishedSuccessfully - The unhealthy node was fully remediated/fenced (it was tainted, fenced by FA and all of its resources have been deleted) RemediationFinishedSuccessfully ConditionsChangeReason = "RemediationFinishedSuccessfully" ResourceDeletionRemediationStrategy = RemediationStrategyType("ResourceDeletion") OutOfServiceTaintRemediationStrategy = RemediationStrategyType("OutOfServiceTaint") )
type FenceAgentsRemediation ¶
type FenceAgentsRemediation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FenceAgentsRemediationSpec `json:"spec,omitempty"` Status FenceAgentsRemediationStatus `json:"status,omitempty"` }
+operator-sdk:csv:customresourcedefinitions:resources={{"FenceAgentsRemediation","v1alpha1","fenceagentsremediations"}} FenceAgentsRemediation is the Schema for the fenceagentsremediations API
func (*FenceAgentsRemediation) DeepCopy ¶
func (in *FenceAgentsRemediation) DeepCopy() *FenceAgentsRemediation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediation.
func (*FenceAgentsRemediation) DeepCopyInto ¶
func (in *FenceAgentsRemediation) DeepCopyInto(out *FenceAgentsRemediation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FenceAgentsRemediation) DeepCopyObject ¶
func (in *FenceAgentsRemediation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*FenceAgentsRemediation) SetupWebhookWithManager ¶ added in v0.3.0
func (r *FenceAgentsRemediation) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*FenceAgentsRemediation) ValidateCreate ¶ added in v0.3.0
func (far *FenceAgentsRemediation) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*FenceAgentsRemediation) ValidateDelete ¶ added in v0.3.0
func (far *FenceAgentsRemediation) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*FenceAgentsRemediation) ValidateUpdate ¶ added in v0.3.0
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type FenceAgentsRemediationList ¶
type FenceAgentsRemediationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []FenceAgentsRemediation `json:"items"` }
+kubebuilder:object:root=true FenceAgentsRemediationList contains a list of FenceAgentsRemediation
func (*FenceAgentsRemediationList) DeepCopy ¶
func (in *FenceAgentsRemediationList) DeepCopy() *FenceAgentsRemediationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationList.
func (*FenceAgentsRemediationList) DeepCopyInto ¶
func (in *FenceAgentsRemediationList) DeepCopyInto(out *FenceAgentsRemediationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FenceAgentsRemediationList) DeepCopyObject ¶
func (in *FenceAgentsRemediationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FenceAgentsRemediationSpec ¶
type FenceAgentsRemediationSpec struct { // Agent is the name of fence agent that will be used. // It should have a fence_ prefix. //+operator-sdk:csv:customresourcedefinitions:type=spec //+kubebuilder:validation:Type=string //+kubebuilder:validation:Pattern=fence_.+ Agent string `json:"agent"` // RetryCount is the number of times the fencing agent will be executed //+kubebuilder:default:=5 //+operator-sdk:csv:customresourcedefinitions:type=spec RetryCount int `json:"retrycount,omitempty"` // RetryInterval is the interval between each fencing agent execution //+kubebuilder:default:="5s" //+kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" //+kubebuilder:validation:Type=string //+operator-sdk:csv:customresourcedefinitions:type=spec RetryInterval metav1.Duration `json:"retryinterval,omitempty"` // Timeout is the timeout for each fencing agent execution //+kubebuilder:default:="60s" //+kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" //+kubebuilder:validation:Type=string //+operator-sdk:csv:customresourcedefinitions:type=spec Timeout metav1.Duration `json:"timeout,omitempty"` //+operator-sdk:csv:customresourcedefinitions:type=spec SharedParameters map[ParameterName]string `json:"sharedparameters,omitempty"` // NodeParameters are passed to the fencing agent according to the node that is fenced, since they are node specific //+operator-sdk:csv:customresourcedefinitions:type=spec NodeParameters map[ParameterName]map[NodeName]string `json:"nodeparameters,omitempty"` // RemediationStrategy is the remediation method for unhealthy nodes. // Currently, it could be either "OutOfServiceTaint" or "ResourceDeletion". // ResourceDeletion will iterate over all pods related to the unhealthy node and delete them. // OutOfServiceTaint will add the out-of-service taint which is a new well-known taint "node.kubernetes.io/out-of-service" // that enables automatic deletion of pv-attached pods on failed nodes, "out-of-service" taint is only supported on clusters with k8s version 1.26+ or OCP/OKD version 4.13+. // +kubebuilder:default:="ResourceDeletion" // +kubebuilder:validation:Enum=ResourceDeletion;OutOfServiceTaint // +operator-sdk:csv:customresourcedefinitions:type=spec RemediationStrategy RemediationStrategyType `json:"remediationStrategy,omitempty"` }
FenceAgentsRemediationSpec defines the desired state of FenceAgentsRemediation
func (*FenceAgentsRemediationSpec) DeepCopy ¶
func (in *FenceAgentsRemediationSpec) DeepCopy() *FenceAgentsRemediationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationSpec.
func (*FenceAgentsRemediationSpec) DeepCopyInto ¶
func (in *FenceAgentsRemediationSpec) DeepCopyInto(out *FenceAgentsRemediationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FenceAgentsRemediationStatus ¶
type FenceAgentsRemediationStatus struct { // Represents the observations of a FenceAgentsRemediation's current state. // Known .status.conditions.type are: "Processing", "FenceAgentActionSucceeded", and "Succeeded". // +listType=map // +listMapKey=type //+optional // +operator-sdk:csv:customresourcedefinitions:type=status,displayName="conditions",xDescriptors="urn:alm:descriptor:io.kubernetes.conditions" Conditions []metav1.Condition `json:"conditions,omitempty"` // LastUpdateTime is the last time the status was updated. // //+optional //+kubebuilder:validation:Type=string //+kubebuilder:validation:Format=date-time //+operator-sdk:csv:customresourcedefinitions:type=status LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` }
FenceAgentsRemediationStatus defines the observed state of FenceAgentsRemediation
func (*FenceAgentsRemediationStatus) DeepCopy ¶
func (in *FenceAgentsRemediationStatus) DeepCopy() *FenceAgentsRemediationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationStatus.
func (*FenceAgentsRemediationStatus) DeepCopyInto ¶
func (in *FenceAgentsRemediationStatus) DeepCopyInto(out *FenceAgentsRemediationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FenceAgentsRemediationTemplate ¶
type FenceAgentsRemediationTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FenceAgentsRemediationTemplateSpec `json:"spec,omitempty"` Status FenceAgentsRemediationTemplateStatus `json:"status,omitempty"` }
FenceAgentsRemediationTemplate is the Schema for the fenceagentsremediationtemplates API +operator-sdk:csv:customresourcedefinitions:resources={{"FenceAgentsRemediationTemplate","v1alpha1","fenceagentsremediationtemplates"}}
func (*FenceAgentsRemediationTemplate) DeepCopy ¶
func (in *FenceAgentsRemediationTemplate) DeepCopy() *FenceAgentsRemediationTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplate.
func (*FenceAgentsRemediationTemplate) DeepCopyInto ¶
func (in *FenceAgentsRemediationTemplate) DeepCopyInto(out *FenceAgentsRemediationTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FenceAgentsRemediationTemplate) DeepCopyObject ¶
func (in *FenceAgentsRemediationTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*FenceAgentsRemediationTemplate) Default ¶ added in v0.4.0
func (farTemplate *FenceAgentsRemediationTemplate) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*FenceAgentsRemediationTemplate) SetupWebhookWithManager ¶ added in v0.3.0
func (r *FenceAgentsRemediationTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*FenceAgentsRemediationTemplate) ValidateCreate ¶ added in v0.3.0
func (farTemplate *FenceAgentsRemediationTemplate) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*FenceAgentsRemediationTemplate) ValidateDelete ¶ added in v0.3.0
func (farTemplate *FenceAgentsRemediationTemplate) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*FenceAgentsRemediationTemplate) ValidateUpdate ¶ added in v0.3.0
func (farTemplate *FenceAgentsRemediationTemplate) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type FenceAgentsRemediationTemplateList ¶
type FenceAgentsRemediationTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []FenceAgentsRemediationTemplate `json:"items"` }
FenceAgentsRemediationTemplateList contains a list of FenceAgentsRemediationTemplate
func (*FenceAgentsRemediationTemplateList) DeepCopy ¶
func (in *FenceAgentsRemediationTemplateList) DeepCopy() *FenceAgentsRemediationTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplateList.
func (*FenceAgentsRemediationTemplateList) DeepCopyInto ¶
func (in *FenceAgentsRemediationTemplateList) DeepCopyInto(out *FenceAgentsRemediationTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FenceAgentsRemediationTemplateList) DeepCopyObject ¶
func (in *FenceAgentsRemediationTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FenceAgentsRemediationTemplateResource ¶
type FenceAgentsRemediationTemplateResource struct {
Spec FenceAgentsRemediationSpec `json:"spec"`
}
func (*FenceAgentsRemediationTemplateResource) DeepCopy ¶
func (in *FenceAgentsRemediationTemplateResource) DeepCopy() *FenceAgentsRemediationTemplateResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplateResource.
func (*FenceAgentsRemediationTemplateResource) DeepCopyInto ¶
func (in *FenceAgentsRemediationTemplateResource) DeepCopyInto(out *FenceAgentsRemediationTemplateResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FenceAgentsRemediationTemplateSpec ¶
type FenceAgentsRemediationTemplateSpec struct { // Template defines the desired state of FenceAgentsRemediationTemplate //+operator-sdk:csv:customresourcedefinitions:type=spec Template FenceAgentsRemediationTemplateResource `json:"template"` }
FenceAgentsRemediationTemplateSpec defines the desired state of FenceAgentsRemediationTemplate
func (*FenceAgentsRemediationTemplateSpec) DeepCopy ¶
func (in *FenceAgentsRemediationTemplateSpec) DeepCopy() *FenceAgentsRemediationTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplateSpec.
func (*FenceAgentsRemediationTemplateSpec) DeepCopyInto ¶
func (in *FenceAgentsRemediationTemplateSpec) DeepCopyInto(out *FenceAgentsRemediationTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FenceAgentsRemediationTemplateStatus ¶
type FenceAgentsRemediationTemplateStatus struct { }
FenceAgentsRemediationTemplateStatus defines the observed state of FenceAgentsRemediationTemplate
func (*FenceAgentsRemediationTemplateStatus) DeepCopy ¶
func (in *FenceAgentsRemediationTemplateStatus) DeepCopy() *FenceAgentsRemediationTemplateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplateStatus.
func (*FenceAgentsRemediationTemplateStatus) DeepCopyInto ¶
func (in *FenceAgentsRemediationTemplateStatus) DeepCopyInto(out *FenceAgentsRemediationTemplateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterName ¶
type ParameterName string
type RemediationStrategyType ¶ added in v0.4.0
type RemediationStrategyType string