From c92ba947db08c985eb0edff0e85c55d08494db7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n-Garc=C3=ADa?= Date: Wed, 6 Mar 2024 12:27:54 +0100 Subject: [PATCH] [bitnami/mediawiki] feat: :sparkles: :lock: Add automatic adaptation for Openshift restricted-v2 SCC (#24117) Signed-off-by: Javier Salmeron Garcia --- bitnami/mediawiki/Chart.lock | 6 +++--- bitnami/mediawiki/Chart.yaml | 2 +- bitnami/mediawiki/README.md | 11 ++++++----- bitnami/mediawiki/templates/deployment.yaml | 4 ++-- bitnami/mediawiki/values.yaml | 9 +++++++++ 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/bitnami/mediawiki/Chart.lock b/bitnami/mediawiki/Chart.lock index 7d9bf6f581..9622e00ce8 100644 --- a/bitnami/mediawiki/Chart.lock +++ b/bitnami/mediawiki/Chart.lock @@ -4,6 +4,6 @@ dependencies: version: 15.2.3 - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.16.1 -digest: sha256:2a5653d59718660e97d56b6438dde1030a550ceb6e2601066f3989069b185d8e -generated: "2024-02-21T14:49:55.418047436Z" + version: 2.18.0 +digest: sha256:75a50c85a663339c9980f1dd1a659f6f50e95c860859f89256030b286101ccc7 +generated: "2024-03-05T14:44:40.449564229+01:00" diff --git a/bitnami/mediawiki/Chart.yaml b/bitnami/mediawiki/Chart.yaml index 7b695814be..f2511c9b53 100644 --- a/bitnami/mediawiki/Chart.yaml +++ b/bitnami/mediawiki/Chart.yaml @@ -39,4 +39,4 @@ maintainers: name: mediawiki sources: - https://github.com/bitnami/charts/tree/main/bitnami/mediawiki -version: 18.4.1 +version: 18.5.0 diff --git a/bitnami/mediawiki/README.md b/bitnami/mediawiki/README.md index 91c9c9c798..5781f6e2a6 100644 --- a/bitnami/mediawiki/README.md +++ b/bitnami/mediawiki/README.md @@ -59,11 +59,12 @@ The command removes all the Kubernetes components associated with the chart and ### Global parameters -| Name | Description | Value | -| ------------------------- | ----------------------------------------------- | ----- | -| `global.imageRegistry` | Global Docker image registry | `""` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | -| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` | +| Name | Description | Value | +| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| `global.imageRegistry` | Global Docker image registry | `""` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | +| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` | +| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `disabled` | ### Common parameters diff --git a/bitnami/mediawiki/templates/deployment.yaml b/bitnami/mediawiki/templates/deployment.yaml index 9d6ff38d90..31bf212016 100644 --- a/bitnami/mediawiki/templates/deployment.yaml +++ b/bitnami/mediawiki/templates/deployment.yaml @@ -62,7 +62,7 @@ spec: tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} {{- end }} {{- if .Values.podSecurityContext.enabled }} - securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.podSecurityContext "context" $) | nindent 8 }} {{- end }} {{- if .Values.initContainers }} initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }} @@ -72,7 +72,7 @@ spec: image: {{ template "mediawiki.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }} {{- if .Values.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) | nindent 12 }} {{- end }} {{- if .Values.command }} command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }} diff --git a/bitnami/mediawiki/values.yaml b/bitnami/mediawiki/values.yaml index fac6881b83..6d9925becc 100644 --- a/bitnami/mediawiki/values.yaml +++ b/bitnami/mediawiki/values.yaml @@ -18,6 +18,15 @@ global: ## imagePullSecrets: [] storageClass: "" + ## Compatibility adaptations for Kubernetes platforms + ## + compatibility: + ## Compatibility adaptations for Openshift + ## + openshift: + ## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) + ## + adaptSecurityContext: disabled ## @section Common parameters ## @param kubeVersion Force target Kubernetes version (using Helm capabilities if not set)