Skip to content

Commit 4a518b3

Browse files
committed
fixup! feat: Add preflight checks framework
Add 'cluster' to webhook path and name
1 parent 5eb6d26 commit 4a518b3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

charts/cluster-api-runtime-extensions-nutanix/templates/webhooks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ webhooks:
6262
service:
6363
name: '{{ include "chart.name" . }}-admission'
6464
namespace: '{{ .Release.Namespace }}'
65-
path: /preflight-v1beta1
65+
path: /preflight-v1beta1-cluster
6666
failurePolicy: Fail
67-
name: preflight.caren.nutanix.com
67+
name: preflight.cluster.caren.nutanix.com
6868
rules:
6969
- apiGroups:
7070
- cluster.x-k8s.io

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func main() {
220220
Handler: cluster.NewValidator(mgr.GetClient(), admission.NewDecoder(mgr.GetScheme())),
221221
})
222222

223-
mgr.GetWebhookServer().Register("/preflight-v1beta1", &webhook.Admission{
223+
mgr.GetWebhookServer().Register("/preflight-v1beta1-cluster", &webhook.Admission{
224224
Handler: preflight.New(mgr.GetClient(), admission.NewDecoder(mgr.GetScheme()),
225225
[]preflight.Checker{
226226
// Add your preflight checkers here.

pkg/webhook/preflight/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// SPDX-License-Identifier: Apache-2.0
33
package preflight
44

5-
// +kubebuilder:webhook:path=/preflight-v1beta1,mutating=false,failurePolicy=fail,groups="cluster.x-k8s.io",resources=clusters,verbs=create;update,versions=*,name=preflight.caren.nutanix.com,admissionReviewVersions=v1,sideEffects=None,timeoutSeconds=30
5+
// +kubebuilder:webhook:path=/preflight-v1beta1-cluster,mutating=false,failurePolicy=fail,groups="cluster.x-k8s.io",resources=clusters,verbs=create;update,versions=*,name=preflight.cluster.caren.nutanix.com,admissionReviewVersions=v1,sideEffects=None,timeoutSeconds=30

0 commit comments

Comments
 (0)