Skip to content

Commit

Permalink
improve: change toolset pod as nonroot user (#1065)
Browse files Browse the repository at this point in the history
Signed-off-by: ericsyh <[email protected]>
(cherry picked from commit f62ecba)
  • Loading branch information
ericsyh committed Jul 10, 2023
1 parent f1ae28a commit 80dd97d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
7 changes: 6 additions & 1 deletion charts/sn-platform-slim/templates/toolset/_toolset.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@ Define pulsarctl config volume mount
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}-pulsarctl"
mountPath: "/home/pulsar/.config/pulsar/config"
subPath: pulsarctl.config
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}-pulsarctl"
mountPath: "/root/.config/pulsar/config"
subPath: pulsarctl.config
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}-pulsarctl"
mountPath: "/.config/pulsar/config"
subPath: pulsarctl.config
{{- end }}

{{/*
Define toolset pulsarctl config volumes
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ toolset:
-Xmx128M
-XX:MaxDirectMemorySize=128M
securityContext:
runAsUser: 0
runAsNonRoot: true
serviceAccount:
# Specifies whether to use a service account to run this component
use: true
Expand Down
6 changes: 6 additions & 0 deletions charts/sn-platform/templates/toolset/_toolset.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ Define pulsarctl config volume mount
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}-pulsarctl"
mountPath: "/home/pulsar/.config/pulsar/config"
subPath: pulsarctl.config
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}-pulsarctl"
mountPath: "/root/.config/pulsar/config"
subPath: pulsarctl.config
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}-pulsarctl"
mountPath: "/.config/pulsar/config"
subPath: pulsarctl.config
{{- end }}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ toolset:
-Xmx128M
-XX:MaxDirectMemorySize=128M
securityContext:
runAsUser: 0
runAsNonRoot: true
serviceAccount:
# Specifies whether to use a service account to run this component
use: true
Expand Down

0 comments on commit 80dd97d

Please sign in to comment.