Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
oztalat opened this issue Mar 28, 2024 · 0 comments
Closed

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

oztalat opened this issue Mar 28, 2024 · 0 comments

Comments

@oztalat
Copy link

oztalat commented Mar 28, 2024

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:

@oztalat oztalat closed this as completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant