Documentation
¶
Index ¶
- Constants
- Variables
- type K0sControlPlaneValidator
- func (v *K0sControlPlaneValidator) SetupK0sControlPlaneWebhookWithManager(mgr ctrl.Manager) error
- func (v *K0sControlPlaneValidator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *K0sControlPlaneValidator) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (v *K0sControlPlaneValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type K0sController
- type K0smotronControlPlaneValidator
- func (v *K0smotronControlPlaneValidator) SetupK0smotronControlPlaneWebhookWithManager(mgr ctrl.Manager) error
- func (v *K0smotronControlPlaneValidator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *K0smotronControlPlaneValidator) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (v *K0smotronControlPlaneValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type K0smotronController
- type Scope
Constants ¶
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 ¶
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
func (v *K0sControlPlaneValidator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type K0sControlPlane.
func (*K0sControlPlaneValidator) ValidateDelete ¶ added in v1.5.4
func (v *K0sControlPlaneValidator) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
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) 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
func (v *K0smotronControlPlaneValidator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type K0smotronControlPlane.
func (*K0smotronControlPlaneValidator) ValidateDelete ¶ added in v1.6.1
func (v *K0smotronControlPlaneValidator) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
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) 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.