controlplane

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnnotationKeyManagedBy is the annotation key that indicates which controller manages the infrastructure object
	AnnotationKeyManagedBy = "cluster.x-k8s.io/managed-by"

	// AnnotationValueManagedByK0smotron is the value for the managed-by annotation
	AnnotationValueManagedByK0smotron = "k0smotron"
)

Variables

View Source
var (
	ErrNotReady               = fmt.Errorf("waiting for the state")
	ErrNewMachinesNotReady    = fmt.Errorf("waiting for new machines: %w", ErrNotReady)
	FRPTokenNameTemplate      = "%s-frp-token"
	FRPConfigMapNameTemplate  = "%s-frps-config"
	FRPDeploymentNameTemplate = "%s-frps"
	FRPServiceNameTemplate    = "%s-frps"
)

Functions

This section is empty.

Types

type K0sControlPlaneValidator added in v1.5.4

type K0sControlPlaneValidator struct{}

K0sControlPlaneValidator struct is responsible for validating the K0sControlPlane resource when it is created, updated, or deleted.

NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as this struct is used only for temporary operations and does not need to be deeply copied.

func (*K0sControlPlaneValidator) SetupK0sControlPlaneWebhookWithManager added in v1.5.4

func (v *K0sControlPlaneValidator) SetupK0sControlPlaneWebhookWithManager(mgr ctrl.Manager) error

SetupK0sControlPlaneWebhookWithManager registers the webhook for K0sControlPlane in the manager.

func (*K0sControlPlaneValidator) ValidateCreate added in v1.5.4

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

func (*K0sControlPlaneValidator) ValidateDelete added in v1.5.4

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

func (*K0sControlPlaneValidator) ValidateUpdate added in v1.5.4

func (v *K0sControlPlaneValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)

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

type K0sController added in v0.6.0

type K0sController struct {
	client.Client
	SecretCachingClient client.Client
	ClientSet           *kubernetes.Clientset
	RESTConfig          *rest.Config
	// contains filtered or unexported fields
}

func (*K0sController) Reconcile added in v0.6.0

func (c *K0sController) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err error)

func (*K0sController) SetupWithManager added in v0.6.0

func (c *K0sController) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error

SetupWithManager sets up the controller with the Manager.

type K0smotronControlPlaneValidator added in v1.6.1

type K0smotronControlPlaneValidator struct {
	// contains filtered or unexported fields
}

K0smotronControlPlaneValidator struct is responsible for validating the K0smotronControlPlane resource when it is created, updated, or deleted.

NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as this struct is used only for temporary operations and does not need to be deeply copied.

func (*K0smotronControlPlaneValidator) SetupK0smotronControlPlaneWebhookWithManager added in v1.6.1

func (v *K0smotronControlPlaneValidator) SetupK0smotronControlPlaneWebhookWithManager(mgr ctrl.Manager) error

SetupK0smotronControlPlaneWebhookWithManager registers the webhook for K0smotronControlPlane in the manager.

func (*K0smotronControlPlaneValidator) ValidateCreate added in v1.6.1

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

func (*K0smotronControlPlaneValidator) ValidateDelete added in v1.6.1

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

func (*K0smotronControlPlaneValidator) ValidateUpdate added in v1.6.1

func (v *K0smotronControlPlaneValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)

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

type K0smotronController added in v0.6.0

type K0smotronController struct {
	client.Client
	SecretCachingClient client.Client
	Scheme              *runtime.Scheme
	ClientSet           *kubernetes.Clientset
	RESTConfig          *rest.Config
}

func (*K0smotronController) Reconcile added in v0.6.0

func (c *K0smotronController) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err error)

func (*K0smotronController) SetupWithManager added in v0.6.0

func (c *K0smotronController) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error

SetupWithManager sets up the controller with the Manager.

type Scope

type Scope struct {
	Config *cpv1beta1.K0smotronControlPlane
	// ConfigOwner *bsutil.ConfigOwner
	Cluster *clusterv1.Cluster
}

Jump to

Keyboard shortcuts

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