Skip to content

Commit

Permalink
Merge pull request #385 from AshleyDumaine/security-context
Browse files Browse the repository at this point in the history
add securityContext to the manager containers
  • Loading branch information
furkatgofurov7 authored Aug 9, 2024
2 parents 2ecc031 + 70ef7ad commit 480a96d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bootstrap/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,22 @@ spec:
httpGet:
path: /healthz
port: healthz
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsUser: 65532
runAsGroup: 65532
terminationGracePeriodSeconds: 10
serviceAccountName: manager
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
12 changes: 12 additions & 0 deletions controlplane/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ spec:
httpGet:
path: /healthz
port: healthz
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsUser: 65532
runAsGroup: 65532
# TODO(user): Configure the resources accordingly based on the project requirements.
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
Expand All @@ -70,3 +78,7 @@ spec:
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault

0 comments on commit 480a96d

Please sign in to comment.