-
Notifications
You must be signed in to change notification settings - Fork 6
/
coredns.yaml
73 lines (73 loc) · 1.71 KB
/
coredns.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: coredns
annotations:
kubernetes.io/description: 'psp to attach to coredns'
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default'
labels:
kubernetes.io/cluster-service: "true"
eks.amazonaws.com/component: pod-security-policy
spec:
privileged: false
allowPrivilegeEscalation: false
allowedCapabilities:
- 'NET_BIND_SERVICE'
volumes:
- configMap
- secret
- emptyDir
hostNetwork: true
hostPorts:
- min: 0
max: 65535
hostIPC: false
hostPID: false
runAsUser:
rule: 'RunAsAny'
seLinux:
rule: 'RunAsAny'
supplementalGroups:
rule: 'RunAsAny'
fsGroup:
rule: 'RunAsAny'
readOnlyRootFilesystem: false
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: eks:podsecuritypolicy:coredns
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
eks.amazonaws.com/component: pod-security-policy
rules:
- apiGroups:
- policy
resourceNames:
- coredns
resources:
- podsecuritypolicies
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: eks:podsecuritypolicy:coredns
namespace: kube-system
annotations:
kubernetes.io/description: 'Allow service account coredns to use coredns psp in kube-system namespace.'
labels:
kubernetes.io/cluster-service: "true"
eks.amazonaws.com/component: pod-security-policy
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: eks:podsecuritypolicy:coredns
subjects:
- kind: ServiceAccount
name: coredns
namespace: kube-system