Merge pull request #3354 from jgsqware/adding-psp-support

example k8s: add support for PodSecurityPolicy
This commit is contained in:
Bryan Boreham
2018-10-03 16:54:16 +01:00
committed by GitHub
2 changed files with 29 additions and 0 deletions

View File

@@ -51,3 +51,11 @@ rules:
verbs:
- list
- watch
- apigroups:
- extensions
resourcenames:
- weave-scope
resources:
- podsecuritypolicies
verbs:
- use

21
examples/k8s/psp.yaml Normal file
View File

@@ -0,0 +1,21 @@
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: weave-scope
spec:
privileged: true
hostPID: true
hostNetwork: true
allowedCapabilities:
- 'NET_ADMIN'
fsGroup:
rule: RunAsAny
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- secret
- hostPath