v1alpha1

package
v0.2.7 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the controlplane v1alpha1 API group +kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io

Index

Constants

View Source
const (
	// AvailableCondition documents that the first control plane instance has completed the RKE2 initialization
	// and so the control plane is available and an API server instance is ready for processing requests.
	AvailableCondition clusterv1.ConditionType = "Available"

	// WaitingForRKE2ServerReason (Severity=Info) documents a RKE2ControlPlane object waiting for the first
	// control plane instance to complete the RKE2 Server initialization.
	WaitingForRKE2ServerReason = "WaitingForRKE2Server"
)
View Source
const (
	// ControlPlaneComponentsHealthyCondition reports the overall status of control plane components
	// implemented as static pods generated by RKE2 including kube-api-server, kube-controller manager,
	// kube-scheduler and etcd if managed.
	ControlPlaneComponentsHealthyCondition clusterv1.ConditionType = "ControlPlaneComponentsHealthy"

	// ControlPlaneComponentsUnhealthyReason (Severity=Error) documents a control plane component not healthy.
	ControlPlaneComponentsUnhealthyReason = "ControlPlaneComponentsUnhealthy"

	// ControlPlaneComponentsUnknownReason reports a control plane component in unknown status.
	ControlPlaneComponentsUnknownReason = "ControlPlaneComponentsUnknown"

	// ControlPlaneComponentsInspectionFailedReason documents a failure in inspecting the control plane component status.
	ControlPlaneComponentsInspectionFailedReason = "ControlPlaneComponentsInspectionFailed"

	// MachinesSpecUpToDateCondition documents that the spec of the machines controlled by the RKE2ControlPlane
	// is up to date. Whe this condition is false, the RKE2ControlPlane is executing a rolling upgrade.
	MachinesSpecUpToDateCondition clusterv1.ConditionType = "MachinesSpecUpToDate"

	// NodeMetadataUpToDate documents that the metadata of the nodes controlled by the RKE2 machines
	// is up to date. When this condition is false, or missing the node metadata is not propagated.
	NodeMetadataUpToDate clusterv1.ConditionType = "NodeMetadataUpToDate"

	// MachineAgentHealthyCondition reports a machine's rke2 agent's operational status.
	MachineAgentHealthyCondition clusterv1.ConditionType = "AgentHealthy"

	// NodePatchFailedReason (Severity=Error) documents reason why Node object could not be patched.
	NodePatchFailedReason = "NodePatchFailed"

	// PodInspectionFailedReason documents a failure in inspecting the pod status.
	PodInspectionFailedReason = "PodInspectionFailed"

	// PodMissingReason (Severity=Error) documents a pod does not exist.
	PodMissingReason = "PodMissing" // RollingUpdateInProgressReason (Severity=Warning) documents a RKE2ControlPlane object executing a

	// PodFailedReason (Severity=Error) documents if a pod failed during provisioning i.e., e.g CrashLoopbackOff, ImagePullBackOff
	// or if all the containers in a pod have terminated.
	PodFailedReason = "PodFailed"

	// RollingUpdateInProgressReason (Severity=Warning) documents a RKE2ControlPlane object executing a
	// rolling upgrade for aligning the machines spec to the desired state.
	RollingUpdateInProgressReason = "RollingUpdateInProgress"
)
View Source
const (
	// EtcdClusterHealthyCondition documents the overall etcd cluster's health.
	EtcdClusterHealthyCondition clusterv1.ConditionType = "EtcdClusterHealthyCondition"

	// EtcdClusterInspectionFailedReason documents a failure in inspecting the etcd cluster status.
	EtcdClusterInspectionFailedReason = "EtcdClusterInspectionFailed"

	// MachineEtcdMemberHealthyCondition report the machine's etcd member's health status.
	// NOTE: This conditions exists only if a stacked etcd cluster is used.
	MachineEtcdMemberHealthyCondition clusterv1.ConditionType = "EtcdMemberHealthy"

	// EtcdMemberInspectionFailedReason documents a failure in inspecting the etcd member status.
	EtcdMemberInspectionFailedReason = "MemberInspectionFailed"

	// ResizedCondition documents a RKE2ControlPlane that is resizing the set of controlled machines.
	ResizedCondition clusterv1.ConditionType = "Resized"

	// ScalingUpReason (Severity=Info) documents a RKE2ControlPlane that is increasing the number of replicas.
	ScalingUpReason = "ScalingUp"

	// ScalingDownReason (Severity=Info) documents a RKE2ControlPlane that is decreasing the number of replicas.
	ScalingDownReason = "ScalingDown"
)
View Source
const (
	// CertificatesAvailableCondition documents the overall status of the certificates generated by the RKE2ControlPlane.
	CertificatesAvailableCondition clusterv1.ConditionType = "CertificatesAvailable"

	// CertificatesGenerationFailedReason documents a failure in generating the certificates.
	CertificatesGenerationFailedReason string = "CertificateGenerationFailed"
)
View Source
const (
	// RKE2ControlPlaneFinalizer allows the controller to clean up resources on delete.
	RKE2ControlPlaneFinalizer = "rke2.controleplane.cluster.x-k8s.io"

	// RKE2ServerConfigurationAnnotation is a machine annotation that stores the json-marshalled string of RKE2Config
	// This annotation is used to detect any changes in RKE2Config and trigger machine rollout.
	RKE2ServerConfigurationAnnotation = "controlplane.cluster.x-k8s.io/rke2-server-configuration"
)
View Source
const (
	// MachinesReadyCondition reports an aggregate of current status of the machines controlled by the RKE2ControlPlane.
	MachinesReadyCondition clusterv1.ConditionType = "MachinesReady"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.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
)
View Source
var (
	// RegistrationMethodFavourInternalIPs is a registration method where the IP address of the control plane
	// machines are used for registration. For each machine it will check if there is an internal IP address
	// and will use that. If there is no internal IP address it will use the external IP address if there is one.
	RegistrationMethodFavourInternalIPs = RegistrationMethod("internal-first")
	// RegistrationMethodInternalIPs is a registration method where the internal IP address of the control plane
	// machines are used for registration.
	RegistrationMethodInternalIPs = RegistrationMethod("internal-only-ips")
	// RegistrationMethodExternalIPs is a registration method where the external IP address of the control plane
	// machines are used for registration.
	RegistrationMethodExternalIPs = RegistrationMethod("external-only-ips")
	// RegistrationMethodAddress is a registration method where an explicit address supplied at cluster creation
	// time is used for registration. This is for use in LB or VIP scenarios.
	RegistrationMethodAddress = RegistrationMethod("address")
)

Functions

This section is empty.

Types

type CNI

type CNI string

CNI defines the Cni options for deploying RKE2.

const (
	// Cilium references the RKE2 CNI Plugin "cilium".
	Cilium CNI = "cilium"
	// Calico references the RKE2 CNI Plugin "calico".
	Calico CNI = "calico"
	// Canal references the RKE2 CNI Plugin "canal".
	Canal CNI = "canal"
	// None means that no CNI Plugin will be installed with RKE2, letting the operator install his own CNI afterwards.
	None CNI = "none"
)

type DisableComponents

type DisableComponents struct {
	// KubernetesComponents is a list of Kubernetes components to disable.
	KubernetesComponents []DisabledKubernetesComponent `json:"kubernetesComponents,omitempty"`

	// PluginComponents is a list of PluginComponents to disable.
	PluginComponents []DisabledPluginComponent `json:"pluginComponents,omitempty"`
}

DisableComponents describes components of RKE2 (Kubernetes components and plugin components) that should be disabled.

func (*DisableComponents) DeepCopy

func (in *DisableComponents) DeepCopy() *DisableComponents

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

func (*DisableComponents) DeepCopyInto

func (in *DisableComponents) DeepCopyInto(out *DisableComponents)

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

type DisabledKubernetesComponent

type DisabledKubernetesComponent string

DisabledKubernetesComponent is an enum field that can take one of the following values: scheduler, kubeProxy or cloudController. +kubebuilder:validation:Enum=scheduler;kubeProxy;cloudController

const (
	// Scheduler references the Kube Scheduler Kubernetes components of the control plane/server nodes.
	Scheduler DisabledKubernetesComponent = "scheduler"

	// KubeProxy references the Kube Proxy Kubernetes components on the agents.
	KubeProxy DisabledKubernetesComponent = "kubeProxy"

	// CloudController references the Cloud Controller Manager Kubernetes Components on the control plane / server nodes.
	CloudController DisabledKubernetesComponent = "cloudController"
)

type DisabledPluginComponent

type DisabledPluginComponent string

DisabledPluginComponent selects a plugin Components to be disabled. +kubebuilder:validation:Enum=rke2-coredns;rke2-ingress-nginx;rke2-metrics-server

const (
	// CoreDNS references the RKE2 Plugin "rke2-coredns".
	CoreDNS DisabledPluginComponent = "rke2-coredns"
	// IngressNginx references the RKE2 Plugin "rke2-ingress-nginx".
	IngressNginx DisabledPluginComponent = "rke2-ingress-nginx"
	// MetricsServer references the RKE2 Plugin "rke2-metrics-server".
	MetricsServer DisabledPluginComponent = "rke2-metrics-server"
)

type EtcdBackupConfig

type EtcdBackupConfig struct {
	// DisableAutomaticSnapshots defines the policy for ETCD snapshots.
	// true means automatic snapshots will be scheduled, false means automatic snapshots will not be scheduled.
	//+optional
	DisableAutomaticSnapshots *bool `json:"disableAutomaticSnapshots,omitempty"`

	// SnapshotName Set the base name of etcd snapshots. Default: etcd-snapshot-<unix-timestamp> (default: "etcd-snapshot").
	//+optional
	SnapshotName string `json:"snapshotName,omitempty"`

	// ScheduleCron Snapshot interval time in cron spec. eg. every 5 hours '* */5 * * *' (default: "0 */12 * * *").
	//+optional
	ScheduleCron string `json:"scheduleCron,omitempty"`

	// Retention Number of snapshots to retain Default: 5 (default: 5).
	//+optional
	Retention string `json:"retention,omitempty"`

	// Directory to save db snapshots.
	//+optional
	Directory string `json:"directory,omitempty"`

	// S3 Enable backup to an S3-compatible Object Store.
	//+optional
	S3 *EtcdS3 `json:"s3,omitempty"`
}

EtcdBackupConfig describes the backup configuration for ETCD.

func (*EtcdBackupConfig) DeepCopy

func (in *EtcdBackupConfig) DeepCopy() *EtcdBackupConfig

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

func (*EtcdBackupConfig) DeepCopyInto

func (in *EtcdBackupConfig) DeepCopyInto(out *EtcdBackupConfig)

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

type EtcdConfig

type EtcdConfig struct {
	// ExposeEtcdMetrics defines the policy for ETCD Metrics exposure.
	// if value is true, ETCD metrics will be exposed
	// if value is false, ETCD metrics will NOT be exposed
	// +optional
	ExposeMetrics bool `json:"exposeMetrics,omitempty"`

	// BackupConfig defines how RKE2 will snapshot ETCD: target storage, schedule, etc.
	//+optional
	BackupConfig EtcdBackupConfig `json:"backupConfig,omitempty"`

	// CustomConfig defines the custom settings for ETCD.
	CustomConfig *bootstrapv1.ComponentConfig `json:"customConfig,omitempty"`
}

EtcdConfig regroups the ETCD-specific configuration of the control plane.

func (*EtcdConfig) DeepCopy

func (in *EtcdConfig) DeepCopy() *EtcdConfig

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

func (*EtcdConfig) DeepCopyInto

func (in *EtcdConfig) DeepCopyInto(out *EtcdConfig)

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

type EtcdS3

type EtcdS3 struct {
	// Endpoint S3 endpoint url (default: "s3.amazonaws.com").
	Endpoint string `json:"endpoint"`

	// EndpointCA references the Secret that contains a custom CA that should be trusted to connect to S3 endpoint.
	// The secret must contain a key named "ca.pem" that contains the CA certificate.
	//+optional
	EndpointCASecret *corev1.ObjectReference `json:"endpointCAsecret,omitempty"`

	// EnforceSSLVerify may be set to false to skip verifying the registry's certificate, default is true.
	//+optional
	EnforceSSLVerify bool `json:"enforceSslVerify,omitempty"`

	// S3CredentialSecret is a reference to a Secret containing the Access Key and Secret Key necessary to access the target S3 Bucket.
	// The Secret must contain the following keys: "aws_access_key_id" and "aws_secret_access_key".
	S3CredentialSecret corev1.ObjectReference `json:"s3CredentialSecret"`

	// Bucket S3 bucket name.
	//+optional
	Bucket string `json:"bucket,omitempty"`

	// Region S3 region / bucket location (optional) (default: "us-east-1").
	//+optional
	Region string `json:"region,omitempty"`

	// Folder S3 folder.
	//+optional
	Folder string `json:"folder,omitempty"`
}

EtcdS3 defines the S3 configuration for ETCD snapshots.

func (*EtcdS3) DeepCopy

func (in *EtcdS3) DeepCopy() *EtcdS3

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

func (*EtcdS3) DeepCopyInto

func (in *EtcdS3) DeepCopyInto(out *EtcdS3)

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

type RKE2ControlPlane

type RKE2ControlPlane struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RKE2ControlPlaneSpec   `json:"spec,omitempty"`
	Status RKE2ControlPlaneStatus `json:"status,omitempty"`
}

RKE2ControlPlane is the Schema for the rke2controlplanes API.

func (*RKE2ControlPlane) DeepCopy

func (in *RKE2ControlPlane) DeepCopy() *RKE2ControlPlane

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

func (*RKE2ControlPlane) DeepCopyInto

func (in *RKE2ControlPlane) DeepCopyInto(out *RKE2ControlPlane)

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

func (*RKE2ControlPlane) DeepCopyObject

func (in *RKE2ControlPlane) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RKE2ControlPlane) Default

func (r *RKE2ControlPlane) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*RKE2ControlPlane) GetConditions

func (r *RKE2ControlPlane) GetConditions() clusterv1.Conditions

GetConditions returns the list of conditions for a RKE2ControlPlane object.

func (*RKE2ControlPlane) SetConditions

func (r *RKE2ControlPlane) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the list of conditions for a RKE2ControlPlane object.

func (*RKE2ControlPlane) SetupWebhookWithManager

func (r *RKE2ControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up the Controller Manager for the Webhook for the RKE2ControlPlane resource.

func (*RKE2ControlPlane) ValidateCreate

func (r *RKE2ControlPlane) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*RKE2ControlPlane) ValidateDelete

func (r *RKE2ControlPlane) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*RKE2ControlPlane) ValidateUpdate

func (r *RKE2ControlPlane) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type RKE2ControlPlaneList

type RKE2ControlPlaneList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RKE2ControlPlane `json:"items"`
}

RKE2ControlPlaneList contains a list of RKE2ControlPlane.

func (*RKE2ControlPlaneList) DeepCopy

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

func (*RKE2ControlPlaneList) DeepCopyInto

func (in *RKE2ControlPlaneList) DeepCopyInto(out *RKE2ControlPlaneList)

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

func (*RKE2ControlPlaneList) DeepCopyObject

func (in *RKE2ControlPlaneList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RKE2ControlPlaneSpec

type RKE2ControlPlaneSpec struct {
	// RKE2AgentSpec contains the node spec for the RKE2 Control plane nodes.
	bootstrapv1.RKE2ConfigSpec `json:",inline"`

	// Replicas is the number of replicas for the Control Plane.
	Replicas *int32 `json:"replicas,omitempty"`

	// ServerConfig specifies configuration for the agent nodes.
	//+optional
	ServerConfig RKE2ServerConfig `json:"serverConfig,omitempty"`

	// ManifestsConfigMapReference references a ConfigMap which contains Kubernetes manifests to be deployed automatically on the cluster
	// Each data entry in the ConfigMap will be will be copied to a folder on the control plane nodes that RKE2 scans and uses to deploy manifests.
	//+optional
	ManifestsConfigMapReference corev1.ObjectReference `json:"manifestsConfigMapReference,omitempty"`

	// InfrastructureRef is a required reference to a custom resource
	// offered by an infrastructure provider.
	InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"`

	// NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node
	// The default value is 0, meaning that the node can be drained without any time limitations.
	// NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
	// +optional
	NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"`

	// RegistrationMethod is the method to use for registering nodes into the RKE2 cluster.
	// +kubebuilder:validation:Enum=internal-first;internal-only-ips;external-only-ips;address
	// +kubebuilder:default=internal-first
	// +optional
	RegistrationMethod RegistrationMethod `json:"registrationMethod"`

	// RegistrationAddress is an explicit address to use when registering a node. This is required if
	// the registration type is "address". Its for scenarios where a load-balancer or VIP is used.
	// +optional
	RegistrationAddress string `json:"registrationAddress,omitempty"`

	// The RolloutStrategy to use to replace control plane machines with new ones.
	// +optional
	// +kubebuilder:default={type: "RollingUpdate", rollingUpdate: {maxSurge: 1}}
	RolloutStrategy *RolloutStrategy `json:"rolloutStrategy,omitempty"`
}

RKE2ControlPlaneSpec defines the desired state of RKE2ControlPlane.

func (*RKE2ControlPlaneSpec) DeepCopy

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

func (*RKE2ControlPlaneSpec) DeepCopyInto

func (in *RKE2ControlPlaneSpec) DeepCopyInto(out *RKE2ControlPlaneSpec)

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

type RKE2ControlPlaneStatus

type RKE2ControlPlaneStatus struct {
	// Ready indicates the BootstrapData field is ready to be consumed.
	Ready bool `json:"ready,omitempty"`

	// Initialized indicates the target cluster has completed initialization.
	Initialized bool `json:"initialized,omitempty"`

	// DataSecretName is the name of the secret that stores the bootstrap data script.
	// +optional
	DataSecretName *string `json:"dataSecretName,omitempty"`

	// FailureReason will be set on non-retryable errors.
	// +optional
	FailureReason string `json:"failureReason,omitempty"`

	// FailureMessage will be set on non-retryable errors.
	// +optional
	FailureMessage string `json:"failureMessage,omitempty"`

	// ObservedGeneration is the latest generation observed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions defines current service state of the RKE2Config.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`

	// Replicas is the number of replicas current attached to this ControlPlane Resource.
	Replicas int32 `json:"replicas,omitempty"`

	// ReadyReplicas is the number of replicas current attached to this ControlPlane Resource and that have Ready Status.
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// UpdatedReplicas is the number of replicas current attached to this ControlPlane Resource and that are up-to-date with Control Plane config.
	UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`

	// UnavailableReplicas is the number of replicas current attached to this ControlPlane Resource and that are up-to-date with Control Plane config.
	UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`

	// AvailableServerIPs is a list of the Control Plane IP adds that can be used to register further nodes.
	// +optional
	AvailableServerIPs []string `json:"availableServerIPs,omitempty"`
}

RKE2ControlPlaneStatus defines the observed state of RKE2ControlPlane.

func (*RKE2ControlPlaneStatus) DeepCopy

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

func (*RKE2ControlPlaneStatus) DeepCopyInto

func (in *RKE2ControlPlaneStatus) DeepCopyInto(out *RKE2ControlPlaneStatus)

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

type RKE2ControlPlaneTemplate

type RKE2ControlPlaneTemplate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RKE2ControlPlaneTemplateSpec   `json:"spec,omitempty"`
	Status RKE2ControlPlaneTemplateStatus `json:"status,omitempty"`
}

RKE2ControlPlaneTemplate is the Schema for the rke2controlplanetemplates API.

func (*RKE2ControlPlaneTemplate) DeepCopy

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

func (*RKE2ControlPlaneTemplate) DeepCopyInto

func (in *RKE2ControlPlaneTemplate) DeepCopyInto(out *RKE2ControlPlaneTemplate)

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

func (*RKE2ControlPlaneTemplate) DeepCopyObject

func (in *RKE2ControlPlaneTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RKE2ControlPlaneTemplate) Default

func (r *RKE2ControlPlaneTemplate) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*RKE2ControlPlaneTemplate) SetupWebhookWithManager

func (r *RKE2ControlPlaneTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up the Controller Manager for the Webhook for the RKE2ControlPlaneTemplate resource.

func (*RKE2ControlPlaneTemplate) ValidateCreate

func (r *RKE2ControlPlaneTemplate) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*RKE2ControlPlaneTemplate) ValidateDelete

func (r *RKE2ControlPlaneTemplate) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*RKE2ControlPlaneTemplate) ValidateUpdate

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type RKE2ControlPlaneTemplateList

type RKE2ControlPlaneTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RKE2ControlPlaneTemplate `json:"items"`
}

RKE2ControlPlaneTemplateList contains a list of RKE2ControlPlaneTemplate.

func (*RKE2ControlPlaneTemplateList) DeepCopy

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

func (*RKE2ControlPlaneTemplateList) DeepCopyInto

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

func (*RKE2ControlPlaneTemplateList) DeepCopyObject

func (in *RKE2ControlPlaneTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RKE2ControlPlaneTemplateSpec

type RKE2ControlPlaneTemplateSpec struct {

	// Foo is an example field of RKE2ControlPlaneTemplate. Edit rke2controlplanetemplate_types.go to remove/update
	Foo string `json:"foo,omitempty"`
}

RKE2ControlPlaneTemplateSpec defines the desired state of RKE2ControlPlaneTemplate.

func (*RKE2ControlPlaneTemplateSpec) DeepCopy

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

func (*RKE2ControlPlaneTemplateSpec) DeepCopyInto

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

type RKE2ControlPlaneTemplateStatus

type RKE2ControlPlaneTemplateStatus struct {
}

RKE2ControlPlaneTemplateStatus defines the observed state of RKE2ControlPlaneTemplate.

func (*RKE2ControlPlaneTemplateStatus) DeepCopy

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

func (*RKE2ControlPlaneTemplateStatus) DeepCopyInto

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

type RKE2ServerConfig

type RKE2ServerConfig struct {
	// AuditPolicySecret path to the file that defines the audit policy configuration.
	//+optional
	AuditPolicySecret *corev1.ObjectReference `json:"auditPolicySecret,omitempty"`

	// BindAddress describes the rke2 bind address (default: 0.0.0.0).
	//+optional
	BindAddress string `json:"bindAddress,omitempty"`

	// AdvertiseAddress IP address that apiserver uses to advertise to members of the cluster (default: node-external-ip/node-ip).
	//+optional
	AdvertiseAddress string `json:"advertiseAddress,omitempty"`

	// TLSSan Add additional hostname or IP as a Subject Alternative Name in the TLS cert.
	//+optional
	TLSSan []string `json:"tlsSan,omitempty"`

	// ServiceNodePortRange is the port range to reserve for services with NodePort visibility (default: "30000-32767").
	//+optional
	ServiceNodePortRange string `json:"serviceNodePortRange,omitempty"`

	// ClusterDNS is the cluster IP for CoreDNS service. Should be in your service-cidr range (default: 10.43.0.10).
	//+optional
	ClusterDNS string `json:"clusterDNS,omitempty"`

	// ClusterDomain is the cluster domain name (default: "cluster.local").
	//+optional
	ClusterDomain string `json:"clusterDomain,omitempty"`

	// DisableComponents lists Kubernetes components and RKE2 plugin components that will be disabled.
	//+optional
	DisableComponents DisableComponents `json:"disableComponents,omitempty"`

	// CNI describes the CNI Plugins to deploy, one of none, calico, canal, cilium;
	// optionally with multus as the first value to enable the multus meta-plugin (default: canal).
	// +kubebuilder:validation:Enum=none;calico;canal;cilium
	//+optional
	CNI CNI `json:"cni,omitempty"`

	// CNIMultusEnable enables multus as the first CNI plugin (default: false).
	// This option will automatically make Multus a primary CNI, and the value, if specified in the CNI field, as a secondary CNI plugin.
	//+optional
	CNIMultusEnable bool `json:"cniMultusEnable,omitempty"`

	// PauseImage Override image to use for pause.
	//+optional
	PauseImage string `json:"pauseImage,omitempty"`

	// Etcd defines optional custom configuration of ETCD.
	//+optional
	Etcd EtcdConfig `json:"etcd,omitempty"`

	// KubeAPIServer defines optional custom configuration of the Kube API Server.
	//+optional
	KubeAPIServer *bootstrapv1.ComponentConfig `json:"kubeAPIServer,omitempty"`

	// KubeControllerManager defines optional custom configuration of the Kube Controller Manager.
	//+optional
	KubeControllerManager *bootstrapv1.ComponentConfig `json:"kubeControllerManager,omitempty"`

	// KubeScheduler defines optional custom configuration of the Kube Scheduler.
	//+optional
	KubeScheduler *bootstrapv1.ComponentConfig `json:"kubeScheduler,omitempty"`

	// CloudControllerManager defines optional custom configuration of the Cloud Controller Manager.
	//+optional
	CloudControllerManager *bootstrapv1.ComponentConfig `json:"cloudControllerManager,omitempty"`

	// CloudProviderName cloud provider name.
	//+optional
	CloudProviderName string `json:"cloudProviderName,omitempty"`
	// CloudProviderConfigMap is a reference to a ConfigMap containing Cloud provider configuration.
	// The config map must contain a key named cloud-config.
	//+optional
	CloudProviderConfigMap *corev1.ObjectReference `json:"cloudProviderConfigMap,omitempty"`
}

RKE2ServerConfig specifies configuration for the agent nodes.

func (*RKE2ServerConfig) DeepCopy

func (in *RKE2ServerConfig) DeepCopy() *RKE2ServerConfig

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

func (*RKE2ServerConfig) DeepCopyInto

func (in *RKE2ServerConfig) DeepCopyInto(out *RKE2ServerConfig)

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

type RegistrationMethod

type RegistrationMethod string

RegistrationMethod defines the methods to use for registering a new node in a cluster.

type RollingUpdate added in v0.2.0

type RollingUpdate struct {
	// The maximum number of control planes that can be scheduled above or under the
	// desired number of control planes.
	// Value can be an absolute number 1 or 0.
	// Defaults to 1.
	// Example: when this is set to 1, the control plane can be scaled
	// up immediately when the rolling update starts.
	// +optional
	MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
}

RollingUpdate is used to control the desired behavior of rolling update.

func (*RollingUpdate) DeepCopy added in v0.2.0

func (in *RollingUpdate) DeepCopy() *RollingUpdate

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

func (*RollingUpdate) DeepCopyInto added in v0.2.0

func (in *RollingUpdate) DeepCopyInto(out *RollingUpdate)

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

type RolloutStrategy added in v0.2.0

type RolloutStrategy struct {
	// Type of rollout. Currently the only supported strategy is "RollingUpdate".
	// Default is RollingUpdate.
	// +optional
	Type RolloutStrategyType `json:"type,omitempty"`

	// Rolling update config params. Present only if RolloutStrategyType = RollingUpdate.
	// +optional
	RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"`
}

RolloutStrategy describes how to replace existing machines with new ones.

func (*RolloutStrategy) DeepCopy added in v0.2.0

func (in *RolloutStrategy) DeepCopy() *RolloutStrategy

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

func (*RolloutStrategy) DeepCopyInto added in v0.2.0

func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy)

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

type RolloutStrategyType added in v0.2.0

type RolloutStrategyType string

RolloutStrategyType defines the rollout strategies for a RKE2ControlPlane.

const (
	// RollingUpdateStrategyType replaces the old control planes by new one using rolling update
	// i.e. gradually scale up or down the old control planes and scale up or down the new one.
	RollingUpdateStrategyType RolloutStrategyType = "RollingUpdate"
)

Jump to

Keyboard shortcuts

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