v1alpha1

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

View Source
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

View Source
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

This section is empty.

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"
)

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

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

func (far *FenceAgentsRemediation) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationList.

func (*FenceAgentsRemediationList) DeepCopyInto

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"`

	// SharedParameters are passed to the fencing agent regardless of which node is about to be fenced (i.e., they are common for all the nodes)
	//+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"`
}

FenceAgentsRemediationSpec defines the desired state of FenceAgentsRemediation

func (*FenceAgentsRemediationSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationSpec.

func (*FenceAgentsRemediationSpec) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationStatus.

func (*FenceAgentsRemediationStatus) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplate.

func (*FenceAgentsRemediationTemplate) DeepCopyInto

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) 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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplateList.

func (*FenceAgentsRemediationTemplateList) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplateResource.

func (*FenceAgentsRemediationTemplateResource) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplateSpec.

func (*FenceAgentsRemediationTemplateSpec) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FenceAgentsRemediationTemplateStatus.

func (*FenceAgentsRemediationTemplateStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeName

type NodeName string

type ParameterName

type ParameterName string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL