Skip to content

Commit

Permalink
Adding privileged, allowPrivilegedEscalation and readOnlyRootFilesyst… (
Browse files Browse the repository at this point in the history
#473)

Adding privileged, allowPrivilegedEscalation and readOnlyRootFilesystem to container security context, also adjusting deployment.yaml

##### ISSUE TYPE
- Feature Pull Request
 

##### SUMMARY
Need to add more granular control to the container's security context. I'd need to add these extra attributes as well as liveness and readiness probes. Is this is something that can be included in the code? 
thank you !
  • Loading branch information
phlukman authored Apr 24, 2021
1 parent 9f9d372 commit 6d7c338
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helm/botkube/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.containerSecurityContext }}
securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
{{ end }}
volumeMounts:
- name: config-volume
mountPath: "/config"
Expand Down
5 changes: 5 additions & 0 deletions helm/botkube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ securityContext:
runAsUser: 101
runAsGroup: 101

containerSecurityContext:
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true

# set one of the log levels- info, warn, debug, error, fatal, panic
logLevel: info

Expand Down

0 comments on commit 6d7c338

Please sign in to comment.