Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add security context to Gatekeeper container #273

Merged
merged 3 commits into from
Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ install: manifests
kustomize build config/crd | kubectl apply -f -

# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
deploy: manifests
deploy: patch-image manifests
touch -a ./config/overlays/dev/manager_image_patch.yaml
# TODO use kustomize for CRDs
kubectl apply -f config/crd/bases
Expand Down
5 changes: 5 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@ spec:
requests:
cpu: 100m
memory: 256Mi
securityContext:
runAsUser: 1000
runAsGroup: 999
runAsNonRoot: true
allowPrivilegeEscalation: false
terminationGracePeriodSeconds: 60
5 changes: 5 additions & 0 deletions deploy/gatekeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ spec:
requests:
cpu: 100m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 999
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
- mountPath: /certs
name: cert
Expand Down