-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathtest-suite.gatekeeper-ca-volume.yaml
More file actions
75 lines (75 loc) · 1.89 KB
/
test-suite.gatekeeper-ca-volume.yaml
File metadata and controls
75 lines (75 loc) · 1.89 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
apiVersion: mutations.gatekeeper.sh/v1
kind: Assign
metadata:
name: trust-ca-volume
spec:
applyTo:
- groups: [""]
kinds: ["Pod"]
versions: ["v1"]
match:
scope: Namespaced
kinds:
- apiGroups: ["*"]
kinds: ["Pod"]
excludedNamespaces: ["kube-system", "gatekeeper-system", "cert-manager", "ingress-nginx"]
location: "spec.volumes[name:cluster-ca-certs]"
parameters:
assign:
value:
name: cluster-ca-certs
configMap:
name: public-bundle-lagoon-test-ca
defaultMode: 0644
optional: false
items:
- key: ca-certificates.crt
path: ca-certificates.crt
---
apiVersion: mutations.gatekeeper.sh/v1
kind: Assign
metadata:
name: trust-ca-volumemount
spec:
applyTo:
- groups: [""]
kinds: ["Pod"]
versions: ["v1"]
match:
scope: Namespaced
kinds:
- apiGroups: ["*"]
kinds: ["Pod"]
excludedNamespaces: ["kube-system", "gatekeeper-system", "cert-manager", "ingress-nginx"]
# All containers in a pod mounting to volumeMount named "cluster-ca-certs"
location: "spec.containers[name:*].volumeMounts[name:cluster-ca-certs]"
parameters:
assign:
value:
mountPath: /etc/ssl/certs/
name: cluster-ca-certs
readOnly: true
---
apiVersion: mutations.gatekeeper.sh/v1
kind: ModifySet
metadata:
name: trust-ca-envvar
spec:
applyTo:
- groups: [""]
kinds: ["Pod"]
versions: ["v1"]
match:
scope: Namespaced
kinds:
- apiGroups: ["*"]
kinds: ["Pod"]
excludedNamespaces: ["kube-system", "gatekeeper-system", "cert-manager", "ingress-nginx"]
# All containers in a pod mounting envvar named "NODE_EXTRA_CA_CERTS" for node applications to use
location: "spec.containers[name:*].env"
parameters:
operation: merge
values:
fromList:
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/certs/ca-certificates.crt