forked from svollath/deploy-cap-aks-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuse-cap-psp.yaml
97 lines (97 loc) · 2.07 KB
/
suse-cap-psp.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: suse.cap.psp
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
spec:
# Privileged
#default in suse.caasp.psp.unprivileged
#privileged: false
privileged: true
# Volumes and File Systems
volumes:
# Kubernetes Pseudo Volume Types
- configMap
- secret
- emptyDir
- downwardAPI
- projected
- persistentVolumeClaim
# Networked Storage
- nfs
- rbd
- cephFS
- glusterfs
- fc
- iscsi
# Cloud Volumes
- cinder
- gcePersistentDisk
- awsElasticBlockStore
- azureDisk
- azureFile
- vsphereVolume
allowedFlexVolumes: []
# hostPath volumes are not allowed; pathPrefix must still be specified
allowedHostPaths:
- pathPrefix: /opt/kubernetes-hostpath-volumes
readOnlyRootFilesystem: false
# Users and groups
runAsUser:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
fsGroup:
rule: RunAsAny
# Privilege Escalation
#default in suse.caasp.psp.unprivileged
#allowPrivilegeEscalation: false
allowPrivilegeEscalation: true
#default in suse.caasp.psp.unprivileged
#defaultAllowPrivilegeEscalation: false
# Capabilities
allowedCapabilities: []
defaultAddCapabilities: []
requiredDropCapabilities: []
# Host namespaces
hostPID: false
hostIPC: false
hostNetwork: false
hostPorts:
- min: 0
max: 65535
# SELinux
seLinux:
# SELinux is unsed in CaaSP
rule: 'RunAsAny'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: suse:cap:psp
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames: ['suse.cap.psp']
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cap:clusterrole
roleRef:
kind: ClusterRole
name: suse:cap:psp
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: default
namespace: uaa
- kind: ServiceAccount
name: default
namespace: scf
- kind: ServiceAccount
name: default
namespace: stratos