Skip to content

Commit

Permalink
Merge pull request #1 from achrefbensaad/updateFailbehavior
Browse files Browse the repository at this point in the history
honor controller failback logic
  • Loading branch information
nam-jaehyun authored Jun 20, 2022
2 parents 7277a6d + 7ae03c5 commit c9b60c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deployments/annotations/kubearmor-annotation-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ webhooks:
name: kubearmor-annotation-webhook-service
namespace: kube-system
path: /mutate-pods
failurePolicy: Fail
failurePolicy: Ignore
name: annotation.kubearmor.com
rules:
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion pkg/KubeArmorAnnotation/config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ webhooks:
name: webhook-service
namespace: system
path: /mutate-pods
failurePolicy: Fail
failurePolicy: Ignore
name: annotation.kubearmor.com
rules:
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion pkg/KubeArmorAnnotation/handlers/pod_mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type PodAnnotator struct {
const k8sVisibility = "process,file,network,capabilities"
const appArmorAnnotation = "container.apparmor.security.beta.kubernetes.io/"

// +kubebuilder:webhook:path=/mutate-pods,mutating=true,failurePolicy=Fail,groups="",resources=pods,verbs=create;update,versions=v1,name=annotation.kubearmor.com,admissionReviewVersions=v1,sideEffects=NoneOnDryRun
// +kubebuilder:webhook:path=/mutate-pods,mutating=true,failurePolicy=Ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=annotation.kubearmor.com,admissionReviewVersions=v1,sideEffects=NoneOnDryRun

func (a *PodAnnotator) Handle(ctx context.Context, req admission.Request) admission.Response {
pod := &corev1.Pod{}
Expand Down

0 comments on commit c9b60c8

Please sign in to comment.