Pass the agent's securityContext on to Kubernetes (#225)

Currently its ignored.

Signed-off-by: Kevin Fox <[email protected]>
This commit is contained in:
kfox1111
2024-01-30 19:55:12 +00:00
committed by GitHub
parent 6b03d5a0bd
commit d5475328b4
@@ -48,6 +48,8 @@ spec:
args: ["-t", "30", "-h", "{{ include "spire-agent.server-address" . | trim }}", "-p", {{ .Values.server.port | quote }}]
resources:
{{- toYaml .Values.waitForIt.resources | nindent 12 }}
securityContext:
{{ toYaml .Values.securityContext | nindent 12 }}
{{- if gt (int (dig "fsGroup" 0 $podSecurityContext)) 0 }}
- name: fsgroupfix
image: {{ template "spire-lib.image" (dict "image" .Values.fsGroupFix.image "global" .Values.global) }}
@@ -72,6 +74,8 @@ spec:
image: {{ template "spire-lib.image" (dict "appVersion" $.Chart.AppVersion "image" .Values.image "global" .Values.global) }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: ["-config", "/run/spire/config/agent.conf"]
securityContext:
{{ toYaml .Values.securityContext | nindent 12 }}
env:
- name: PATH
value: "/opt/spire/bin:/bin"