hazelcast / charts

Hazelcast Official Helm Chart Repository
Apache License 2.0
36 stars 86 forks source link

Some securityContext parameters (e.g., seccompProfile) not rendered #425

Closed oztalat closed 4 months ago

oztalat commented 4 months ago

Some relatively newer security-policy settings such as seccompProfile are not rendered, which causes problems when using the chart on clusters with active security-policies.

Suggestion is to render the complete settings from values.yaml, instead of rendering particular parameters:

      {{- if .Values.podSecurityContext }}
      securityContext:
        {{- include "common.tplvalues.render" (dict "value" .Values.podSecurityContext "context" $) | nindent 8 }}
      {{- end }}

Or, preferably with the possibility to accommodate an enabled parameter:

      {{- $securityContext := include "common.tplvalues.render" (dict "value" .Values.podSecurityContext "context" $) | fromYaml }}
      {{- if and $securityContext $securityContext.enabled }}
      securityContext: {{- omit $securityContext "enabled" | toYaml | nindent 8 }}
      {{- end }}

Here are the locations that these changes are applicable: