Skip to content

Commit 92dd1bd

Browse files
ChristianBieri1995arbreezyAlexsJones
authored
feat: add spec.template.spec.securityContext (#1109)
* feat: add spec.template.spec.securityContext Signed-off-by: ChristianBieri1995 <[email protected]> * make securityContext adjustable Signed-off-by: ChristianBieri1995 <[email protected]> * adjust values.yaml accordingly to enable adjustable securityContext Signed-off-by: ChristianBieri1995 <[email protected]> * Remove default values from securityContext Signed-off-by: ChristianBieri1995 <[email protected]> --------- Signed-off-by: ChristianBieri1995 <[email protected]> Co-authored-by: Aris Boutselis <[email protected]> Co-authored-by: Alex Jones <[email protected]>
1 parent 4867d39 commit 92dd1bd

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

charts/k8sgpt/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ spec:
2121
app.kubernetes.io/name: {{ include "k8sgpt.name" . }}
2222
app.kubernetes.io/instance: {{ .Release.Name }}
2323
spec:
24+
{{- if .Values.deployment.securityContext }}
25+
securityContext:
26+
{{- toYaml .Values.deployment.securityContext | nindent 8 }}
27+
{{ end -}}
2428
serviceAccountName: {{ template "k8sgpt.fullname" . }}
2529
containers:
2630
- name: k8sgpt-container

charts/k8sgpt/values.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ deployment:
1414
requests:
1515
cpu: "0.2"
1616
memory: "156Mi"
17-
17+
securityContext: {}
18+
# Set securityContext.runAsUser/runAsGroup if necessary. Values below were taken from https://github.com/k8sgpt-ai/k8sgpt/blob/main/container/Dockerfile
19+
# runAsUser: 65532
20+
# runAsGroup: 65532
1821
secret:
1922
secretKey: "" # base64 encoded OpenAI token
2023

0 commit comments

Comments
 (0)