-
Notifications
You must be signed in to change notification settings - Fork 319
/
podsecuritypolicy.yaml
78 lines (78 loc) · 1.55 KB
/
podsecuritypolicy.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
74
75
76
77
78
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
annotations:
apparmor.security.beta.kubernetes.io/allowedProfileNames: "runtime/default"
apparmor.security.beta.kubernetes.io/defaultProfileName: "runtime/default"
seccomp.security.alpha.kubernetes.io/allowedProfileNames: "docker/default"
seccomp.security.alpha.kubernetes.io/defaultProfileName: "docker/default"
labels:
app.kubernetes.io/name: kube2iam
name: kube2iam
spec:
allowedCapabilities: []
allowPrivilegeEscalation: true
fsGroup:
rule: MustRunAs
ranges:
- min: 1
max: 65535
hostIPC: false
hostNetwork: true
hostPID: false
hostPorts:
- min: 8181
max: 8181
privileged: true
readOnlyRootFilesystem: false
requiredDropCapabilities:
- ALL
runAsUser:
rule: RunAsAny
seLinux:
# assumes AppArmor instead of SELinux
rule: RunAsAny
supplementalGroups:
rule: MustRunAs
ranges:
- min: 1
max: 65535
volumes:
- configMap
- downwardAPI
- emptyDir
- persistentVolumeClaim
- projected
- secret
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app.kubernetes.io/name: kube2iam
name: kube2iam
rules:
- apiGroups:
- policy
resourceNames:
- kube2iam
resources:
- podsecuritypolicies
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app.kubernetes.io/name: kube2iam
name: kube2iam
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kube2iam
subjects:
- kind: ServiceAccount
name: kube2iam
...