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

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com>
This commit is contained in:
Javier J. Salmerón-García
2024-01-22 14:19:18 +01:00
committed by GitHub
parent 08679ba3a0
commit 10dd0a5d05
5 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -35,4 +35,4 @@ sources:
- https://github.com/bitnami/containers/tree/main/bitnami/prometheus
- https://github.com/prometheus/prometheus
- https://github.com/prometheus-community/helm-charts
version: 0.6.1
version: 0.7.0
+3 -1
View File
@@ -140,6 +140,7 @@ The command removes all the Kubernetes components associated with the chart and
| `alertmanager.command` | Override default container command (useful when using custom images) | `[]` |
| `alertmanager.args` | Override default container args (useful when using custom images) | `[]` |
| `alertmanager.extraArgs` | Additional arguments passed to the Prometheus server container | `[]` |
| `alertmanager.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
| `alertmanager.hostAliases` | Alertmanager pods host aliases | `[]` |
| `alertmanager.podLabels` | Extra labels for Alertmanager pods | `{}` |
| `alertmanager.podAnnotations` | Annotations for Alertmanager pods | `{}` |
@@ -263,6 +264,7 @@ The command removes all the Kubernetes components associated with the chart and
| `server.command` | Override default container command (useful when using custom images) | `[]` |
| `server.args` | Override default container args (useful when using custom images) | `[]` |
| `server.extraArgs` | Additional arguments passed to the Prometheus server container | `[]` |
| `server.automountServiceAccountToken` | Mount Service Account token in pod | `true` |
| `server.hostAliases` | Prometheus pods host aliases | `[]` |
| `server.podLabels` | Extra labels for Prometheus pods | `{}` |
| `server.podAnnotations` | Annotations for Prometheus pods | `{}` |
@@ -381,7 +383,7 @@ The command removes all the Kubernetes components associated with the chart and
| `server.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `server.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `server.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
| `server.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` |
| `server.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` |
| `server.service.type` | Prometheus service type | `LoadBalancer` |
| `server.service.ports.http` | Prometheus service HTTP port | `80` |
| `server.service.nodePorts.http` | Node port for HTTP | `""` |
@@ -41,6 +41,7 @@ spec:
spec:
serviceAccountName: {{ template "prometheus.alertmanager.serviceAccountName" . }}
{{- include "prometheus.imagePullSecrets" . | nindent 6 }}
automountServiceAccountToken: {{ .Values.alertmanager.automountServiceAccountToken }}
{{- if .Values.alertmanager.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.alertmanager.hostAliases "context" $) | nindent 8 }}
{{- end }}
@@ -37,6 +37,7 @@ spec:
spec:
serviceAccountName: {{ template "prometheus.server.serviceAccountName" . }}
{{- include "prometheus.imagePullSecrets" . | nindent 6 }}
automountServiceAccountToken: {{ .Values.server.automountServiceAccountToken }}
{{- if .Values.server.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.server.hostAliases "context" $) | nindent 8 }}
{{- end }}
+7 -1
View File
@@ -239,6 +239,9 @@ alertmanager:
## - --tsdb.path=/data/
##
extraArgs: []
## @param alertmanager.automountServiceAccountToken Mount Service Account token in pod
##
automountServiceAccountToken: false
## @param alertmanager.hostAliases Alertmanager pods host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
@@ -797,6 +800,9 @@ server:
## - --tsdb.path=/data/
##
extraArgs: []
## @param server.automountServiceAccountToken Mount Service Account token in pod
##
automountServiceAccountToken: true
## @param server.hostAliases Prometheus pods host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
@@ -1388,7 +1394,7 @@ server:
annotations: {}
## @param server.serviceAccount.automountServiceAccountToken Automount service account token for the server service account
##
automountServiceAccountToken: true
automountServiceAccountToken: false
## Prometheus service parameters
##