Skip to content

Commit

Permalink
Should hook elfMachine UPDATE verbs in mutation webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
huaqing1994 committed Nov 19, 2024
1 parent 95280ce commit 18c182e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ webhooks:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- elfmachines
sideEffects: None
Expand Down
2 changes: 1 addition & 1 deletion webhooks/elfmachine_webhook_mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 18c182e

Please sign in to comment.