[bitnami/mariadb] fix: 🔒 Move service-account token auto-mount to pod declaration (#22427)

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
Javier J. Salmerón-García
2024-01-19 10:23:13 +01:00
committed by GitHub
parent 0ff9aebcdd
commit 201142f2c9
5 changed files with 11 additions and 1 deletions

View File

@@ -34,4 +34,4 @@ maintainers:
name: mariadb
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/mariadb
version: 15.1.2
version: 15.2.0

View File

@@ -114,6 +114,7 @@ The command removes all the Kubernetes components associated with the chart and
| `primary.command` | Override default container command on MariaDB Primary container(s) (useful when using custom images) | `[]` |
| `primary.args` | Override default container args on MariaDB Primary container(s) (useful when using custom images) | `[]` |
| `primary.lifecycleHooks` | for the MariaDB Primary container(s) to automate configuration before or after startup | `{}` |
| `primary.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
| `primary.hostAliases` | Add deployment host aliases | `[]` |
| `primary.configuration` | MariaDB Primary configuration to be injected as ConfigMap | `""` |
| `primary.existingConfigmap` | Name of existing ConfigMap with MariaDB Primary configuration. | `""` |
@@ -214,6 +215,7 @@ The command removes all the Kubernetes components associated with the chart and
| `secondary.command` | Override default container command on MariaDB Secondary container(s) (useful when using custom images) | `[]` |
| `secondary.args` | Override default container args on MariaDB Secondary container(s) (useful when using custom images) | `[]` |
| `secondary.lifecycleHooks` | for the MariaDB Secondary container(s) to automate configuration before or after startup | `{}` |
| `secondary.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
| `secondary.hostAliases` | Add deployment host aliases | `[]` |
| `secondary.configuration` | MariaDB Secondary configuration to be injected as ConfigMap | `""` |
| `secondary.existingConfigmap` | Name of existing ConfigMap with MariaDB Secondary configuration. | `""` |

View File

@@ -37,6 +37,7 @@ spec:
app.kubernetes.io/component: primary
spec:
{{- include "mariadb.imagePullSecrets" . | nindent 6 }}
automountServiceAccountToken: {{ .Values.primary.automountServiceAccountToken }}
{{- if .Values.primary.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.primary.hostAliases "context" $) | nindent 8 }}
{{- end }}

View File

@@ -43,6 +43,7 @@ spec:
schedulerName: {{ (coalesce .Values.secondary.schedulerName .Values.schedulerName) | quote }}
{{- end }}
serviceAccountName: {{ template "mariadb.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.secondary.automountServiceAccountToken }}
{{- if .Values.secondary.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.hostAliases "context" $) | nindent 8 }}
{{- end }}

View File

@@ -185,6 +185,9 @@ primary:
## @param primary.lifecycleHooks for the MariaDB Primary container(s) to automate configuration before or after startup
##
lifecycleHooks: {}
## @param primary.automountServiceAccountToken Mount Service Account token in pod
##
automountServiceAccountToken: false
## @param primary.hostAliases Add deployment host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
@@ -597,6 +600,9 @@ secondary:
## @param secondary.lifecycleHooks for the MariaDB Secondary container(s) to automate configuration before or after startup
##
lifecycleHooks: {}
## @param secondary.automountServiceAccountToken Mount Service Account token in pod
##
automountServiceAccountToken: false
## @param secondary.hostAliases Add deployment host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##