diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 8baf195d..269ec914 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -20,6 +20,7 @@ webhooks: - v1beta1 operations: - CREATE + - UPDATE resources: - elfmachines sideEffects: None diff --git a/webhooks/elfmachine_webhook_mutation.go b/webhooks/elfmachine_webhook_mutation.go index 477ff26e..85f58e6c 100644 --- a/webhooks/elfmachine_webhook_mutation.go +++ b/webhooks/elfmachine_webhook_mutation.go @@ -45,7 +45,7 @@ func (m *ElfMachineMutation) SetupWebhookWithManager(mgr ctrl.Manager) error { } //+kubebuilder:object:generate=false -//+kubebuilder:webhook:verbs=create,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-elfmachine,mutating=true,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=elfmachines,versions=v1beta1,name=mutation.elfmachine.infrastructure.x-k8s.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-elfmachine,mutating=true,failurePolicy=fail,sideEffects=None,groups=infrastructure.cluster.x-k8s.io,resources=elfmachines,versions=v1beta1,name=mutation.elfmachine.infrastructure.x-k8s.io,admissionReviewVersions=v1 type ElfMachineMutation struct { client.Client