HTK: Update pod security context snippet

This PS updates the pod security context snippet to support
a more sane values layout.

Change-Id: Id25441802a23e2dd00ad656cec2428432359dbe5
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2019-02-15 20:11:04 -06:00 committed by Pete Birley
parent 27f4c66a80
commit ded99204b2

View File

@ -22,8 +22,8 @@ values: |
user: user:
myApp: myApp:
uid: 34356 uid: 34356
myApp: security_context:
security_context: myApp:
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
seLinuxOptions: seLinuxOptions:
level: "s0:c123,c456" level: "s0:c123,c456"
@ -42,7 +42,9 @@ return: |
{{- $application := index . "application" -}} {{- $application := index . "application" -}}
securityContext: securityContext:
runAsUser: {{ index $envAll.Values.pod.user $application "uid" }} runAsUser: {{ index $envAll.Values.pod.user $application "uid" }}
{{- if hasKey (index $envAll.Values.pod $application) "security_context" }} {{- if hasKey $envAll.Values.pod "security_context" }}
{{ toYaml (index $envAll.Values.pod $application "security_context") | indent 2 }} {{- if hasKey ( index $envAll.Values.pod.security_context ) $application }}
{{- end }} {{ toYaml ( index $envAll.Values.pod.security_context $application ) | indent 2 }}
{{- end -}}
{{- end -}}
{{- end -}} {{- end -}}