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:
parent
27f4c66a80
commit
ded99204b2
@ -22,8 +22,8 @@ values: |
|
||||
user:
|
||||
myApp:
|
||||
uid: 34356
|
||||
myApp:
|
||||
security_context:
|
||||
myApp:
|
||||
readOnlyRootFilesystem: true
|
||||
seLinuxOptions:
|
||||
level: "s0:c123,c456"
|
||||
@ -42,7 +42,9 @@ return: |
|
||||
{{- $application := index . "application" -}}
|
||||
securityContext:
|
||||
runAsUser: {{ index $envAll.Values.pod.user $application "uid" }}
|
||||
{{- if hasKey (index $envAll.Values.pod $application) "security_context" }}
|
||||
{{ toYaml (index $envAll.Values.pod $application "security_context") | indent 2 }}
|
||||
{{- end }}
|
||||
{{- if hasKey $envAll.Values.pod "security_context" }}
|
||||
{{- if hasKey ( index $envAll.Values.pod.security_context ) $application }}
|
||||
{{ toYaml ( index $envAll.Values.pod.security_context $application ) | indent 2 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
Loading…
Reference in New Issue
Block a user