Skip to content

Commit

Permalink
Update Ansible sample to comply with Pod Security Standards (#5853)
Browse files Browse the repository at this point in the history
* 🌱 update Ansible sample to show how the Pods/Containers should be configured as restrictive

* fix nit format
  • Loading branch information
camilamacedo86 authored Jun 13, 2022
1 parent bf3bc89 commit 584ada8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hack/generate/samples/internal/ansible/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ const roleFragment = `
labels:
app: memcached
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
replicas: "{{size}}"
selector:
matchLabels:
Expand All @@ -37,6 +41,11 @@ const roleFragment = `
spec:
containers:
- name: memcached
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
command:
- memcached
- -m=64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
labels:
app: memcached
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
replicas: "{{size}}"
selector:
matchLabels:
Expand All @@ -22,6 +26,11 @@
spec:
containers:
- name: memcached
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
command:
- memcached
- -m=64
Expand Down

0 comments on commit 584ada8

Please sign in to comment.