diff --git a/api/v1alpha1/linodecluster_webhook.go b/api/v1alpha1/linodecluster_webhook.go index f9de6061f..b5338cd11 100644 --- a/api/v1alpha1/linodecluster_webhook.go +++ b/api/v1alpha1/linodecluster_webhook.go @@ -42,8 +42,8 @@ func (r *LinodeCluster) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable updation and deletion validation. -//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodecluster,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodeclusters,verbs=create,versions=v1alpha1,name=vlinodecluster.kb.io,admissionReviewVersions=v1 +// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable update and deletion validation. +//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodecluster,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodeclusters,verbs=create,versions=v1alpha1,name=validation.linodecluster.infrastructure.cluster.x-k8s.io,admissionReviewVersions=v1;v1alpha1 var _ webhook.Validator = &LinodeCluster{} diff --git a/api/v1alpha1/linodemachine_webhook.go b/api/v1alpha1/linodemachine_webhook.go index 1f6b12c6a..bffd69f09 100644 --- a/api/v1alpha1/linodemachine_webhook.go +++ b/api/v1alpha1/linodemachine_webhook.go @@ -62,8 +62,8 @@ func (r *LinodeMachine) SetupWebhookWithManager(mgr ctrl.Manager) error { // TODO(user): EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable updation and deletion validation. -//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodemachine,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodemachines,verbs=create,versions=v1alpha1,name=vlinodemachine.kb.io,admissionReviewVersions=v1 +// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable update and deletion validation. +//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodemachine,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodemachines,verbs=create,versions=v1alpha1,name=validation.linodemachine.infrastructure.cluster.x-k8s.io,admissionReviewVersions=v1;v1alpha1 var _ webhook.Validator = &LinodeMachine{} diff --git a/api/v1alpha1/linodeobjectstoragebucket_webhook.go b/api/v1alpha1/linodeobjectstoragebucket_webhook.go index 2e03a88c6..43a69d08d 100644 --- a/api/v1alpha1/linodeobjectstoragebucket_webhook.go +++ b/api/v1alpha1/linodeobjectstoragebucket_webhook.go @@ -49,8 +49,8 @@ func (r *LinodeObjectStorageBucket) SetupWebhookWithManager(mgr ctrl.Manager) er Complete() } -// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable updation and deletion validation. -//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodeobjectstoragebucket,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodeobjectstoragebuckets,verbs=create,versions=v1alpha1,name=vlinodeobjectstoragebucket.kb.io,admissionReviewVersions=v1 +// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable update and deletion validation. +//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodeobjectstoragebucket,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodeobjectstoragebuckets,verbs=create,versions=v1alpha1,name=validation.linodeobjectstoragebucket.infrastructure.cluster.x-k8s.io,admissionReviewVersions=v1;v1alpha1 var _ webhook.Validator = &LinodeObjectStorageBucket{} diff --git a/api/v1alpha1/linodevpc_webhook.go b/api/v1alpha1/linodevpc_webhook.go index 29202a519..0c5a0bc12 100644 --- a/api/v1alpha1/linodevpc_webhook.go +++ b/api/v1alpha1/linodevpc_webhook.go @@ -81,8 +81,8 @@ func (r *LinodeVPC) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable updation and deletion validation. -//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodevpc,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodevpcs,verbs=create,versions=v1alpha1,name=vlinodevpc.kb.io,admissionReviewVersions=v1 +// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable update and deletion validation. +//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodevpc,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodevpcs,verbs=create,versions=v1alpha1,name=validation.linodevpc.infrastructure.cluster.x-k8s.io,admissionReviewVersions=v1;v1alpha1 var _ webhook.Validator = &LinodeVPC{} diff --git a/api/v1alpha2/linodecluster_webhook.go b/api/v1alpha2/linodecluster_webhook.go index 602e86610..62452e90f 100644 --- a/api/v1alpha2/linodecluster_webhook.go +++ b/api/v1alpha2/linodecluster_webhook.go @@ -42,8 +42,8 @@ func (r *LinodeCluster) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable updation and deletion validation. -//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha2-linodecluster,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodeclusters,verbs=create,versions=v1alpha2,name=vlinodecluster.kb.io,admissionReviewVersions=v1 +// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable update and deletion validation. +//+kubebuilder:webhook:path=/validate-infrastructure-cluster-x-k8s-io-v1alpha2-linodecluster,mutating=false,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=linodeclusters,verbs=create,versions=v1alpha2,name=validation.linodecluster.infrastructure.cluster.x-k8s.io,admissionReviewVersions=v1;v1alpha1;v1alpha2 var _ webhook.Validator = &LinodeCluster{} diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index cab8e5b7d..19c5e407b 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -6,13 +6,15 @@ metadata: webhooks: - admissionReviewVersions: - v1 + - v1alpha1 + - v1alpha2 clientConfig: service: name: webhook-service namespace: system path: /validate-infrastructure-cluster-x-k8s-io-v1alpha2-linodecluster failurePolicy: Fail - name: vlinodecluster.kb.io + name: validation.linodecluster.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io @@ -25,13 +27,14 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 + - v1alpha1 clientConfig: service: name: webhook-service namespace: system path: /validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodecluster failurePolicy: Fail - name: vlinodecluster.kb.io + name: validation.linodecluster.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io @@ -44,13 +47,14 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 + - v1alpha1 clientConfig: service: name: webhook-service namespace: system path: /validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodemachine failurePolicy: Fail - name: vlinodemachine.kb.io + name: validation.linodemachine.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io @@ -63,13 +67,14 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 + - v1alpha1 clientConfig: service: name: webhook-service namespace: system path: /validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodeobjectstoragebucket failurePolicy: Fail - name: vlinodeobjectstoragebucket.kb.io + name: validation.linodeobjectstoragebucket.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io @@ -82,13 +87,14 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 + - v1alpha1 clientConfig: service: name: webhook-service namespace: system path: /validate-infrastructure-cluster-x-k8s-io-v1alpha1-linodevpc failurePolicy: Fail - name: vlinodevpc.kb.io + name: validation.linodevpc.infrastructure.cluster.x-k8s.io rules: - apiGroups: - infrastructure.cluster.x-k8s.io