forked from kubearmor/KubeArmor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubearmor-controller-mutating-webhook-config.yaml
55 lines (55 loc) · 1.29 KB
/
kubearmor-controller-mutating-webhook-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: kubearmor-controller-serving-cert
namespace: kubearmor
spec:
dnsNames:
- kubearmor-controller-webhook-service.kubearmor.svc
- kubearmor-controller-webhook-service.kubearmor.svc.cluster.local
issuerRef:
kind: Issuer
name: kubearmor-controller-selfsigned-issuer
secretName: kubearmor-controller-webhook-server-cert
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: kubearmor-controller-selfsigned-issuer
namespace: kubearmor
spec:
selfSigned: {}
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: kubearmor/kubearmor-controller-serving-cert
name: kubearmor-controller-mutating-webhook-configuration
namespace: kubearmor
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
service:
name: kubearmor-controller-webhook-service
namespace: kubearmor
path: /mutate-pods
failurePolicy: Ignore
name: annotation.kubearmor.com
rules:
- apiGroups:
- ""
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- pods
- pods/binding
sideEffects: NoneOnDryRun
objectSelector:
matchExpressions:
- key: "kubearmor-app"
operator: DoesNotExist