Skip to content

Commit

Permalink
[bitnami/common] feat: ✨ Remove empty seLinuxOptions in adapted Opens…
Browse files Browse the repository at this point in the history
…hift rendered security context (#24268)

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
  • Loading branch information
javsalgar committed Mar 8, 2024
1 parent 71a4dda commit 1f2f5ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bitnami/common/Chart.yaml
Expand Up @@ -6,7 +6,7 @@ annotations:
licenses: Apache-2.0
apiVersion: v2
# Please make sure that version and appVersion are always the same.
appVersion: 2.18.0
appVersion: 2.19.0
description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
home: https://bitnami.com
icon: https://bitnami.com/downloads/logos/bitnami-mark.png
Expand All @@ -23,4 +23,4 @@ name: common
sources:
- https://github.com/bitnami/charts
type: library
version: 2.18.0
version: 2.19.0
4 changes: 4 additions & 0 deletions bitnami/common/templates/_compatibility.tpl
Expand Up @@ -28,6 +28,10 @@ Usage:
{{- if or (eq .context.Values.global.compatibility.openshift.adaptSecurityContext "force") (and (eq .context.Values.global.compatibility.openshift.adaptSecurityContext "auto") (include "common.compatibility.isOpenshift" .context)) -}}
{{/* Remove incompatible user/group values that do not work in Openshift out of the box */}}
{{- $adaptedContext = omit $adaptedContext "fsGroup" "runAsUser" "runAsGroup" -}}
{{- if not .secContext.seLinuxOptions -}}
{{/* If it is an empty object, we remove it from the resulting context because it causes validation issues */}}
{{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down

0 comments on commit 1f2f5ef

Please sign in to comment.