From 2cf600fab55e562dbce96b2ec1a32018aa1ecc56 Mon Sep 17 00:00:00 2001 From: FL42 <46161216+fl42@users.noreply.github.com> Date: Tue, 3 May 2022 13:20:44 +0200 Subject: [PATCH] [bitnami/kube-prometheus] Allow to add initContainers to prometheus pods (#9996) * feat: allow to add initContainers to prometheus pods Signed-off-by: FL42 <46161216+fl42@users.noreply.github.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers * [bitnami/kube-prometheus] Update components versions Signed-off-by: Bitnami Containers Co-authored-by: Bitnami Containers --- bitnami/kube-prometheus/Chart.lock | 6 +++--- bitnami/kube-prometheus/Chart.yaml | 2 +- bitnami/kube-prometheus/README.md | 11 ++++++----- .../templates/prometheus/prometheus.yaml | 4 ++++ bitnami/kube-prometheus/values.yaml | 18 ++++++++++++++---- 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/bitnami/kube-prometheus/Chart.lock b/bitnami/kube-prometheus/Chart.lock index 198b874665..022a82ce8b 100644 --- a/bitnami/kube-prometheus/Chart.lock +++ b/bitnami/kube-prometheus/Chart.lock @@ -7,6 +7,6 @@ dependencies: version: 2.2.19 - name: common repository: https://charts.bitnami.com/bitnami - version: 1.13.0 -digest: sha256:7c2b3148c814436d2a7741fb91bdd0f8da92fe467b8c01fc4f1fa06c121220db -generated: "2022-04-19T21:01:14.78891962Z" + version: 1.13.1 +digest: sha256:fb5f86f07e1bdff24dfca140806bada02c49a075ca2839f0134016543311282a +generated: "2022-05-03T10:33:20.642965645Z" diff --git a/bitnami/kube-prometheus/Chart.yaml b/bitnami/kube-prometheus/Chart.yaml index e1bc43051e..c6a30843c0 100644 --- a/bitnami/kube-prometheus/Chart.yaml +++ b/bitnami/kube-prometheus/Chart.yaml @@ -35,4 +35,4 @@ sources: - https://github.com/bitnami/bitnami-docker-prometheus - https://github.com/bitnami/bitnami-docker-alertmanager - https://github.com/prometheus-operator/kube-prometheus -version: 6.9.7 +version: 6.10.0 diff --git a/bitnami/kube-prometheus/README.md b/bitnami/kube-prometheus/README.md index bc5c206a1e..1de5e93ee7 100644 --- a/bitnami/kube-prometheus/README.md +++ b/bitnami/kube-prometheus/README.md @@ -92,7 +92,7 @@ The command removes all the Kubernetes components associated with the chart and | `operator.enabled` | Deploy Prometheus Operator to the cluster | `true` | | `operator.image.registry` | Prometheus Operator image registry | `docker.io` | | `operator.image.repository` | Prometheus Operator image repository | `bitnami/prometheus-operator` | -| `operator.image.tag` | Prometheus Operator Image tag (immutable tags are recommended) | `0.55.1-debian-10-r7` | +| `operator.image.tag` | Prometheus Operator Image tag (immutable tags are recommended) | `0.56.0-debian-10-r1` | | `operator.image.pullPolicy` | Prometheus Operator image pull policy | `IfNotPresent` | | `operator.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `operator.extraArgs` | Additional arguments passed to Prometheus Operator | `[]` | @@ -177,7 +177,7 @@ The command removes all the Kubernetes components associated with the chart and | `prometheus.enabled` | Deploy Prometheus to the cluster | `true` | | `prometheus.image.registry` | Prometheus image registry | `docker.io` | | `prometheus.image.repository` | Prometheus image repository | `bitnami/prometheus` | -| `prometheus.image.tag` | Prometheus Image tag (immutable tags are recommended) | `2.33.5-debian-10-r24` | +| `prometheus.image.tag` | Prometheus Image tag (immutable tags are recommended) | `2.35.0-debian-10-r3` | | `prometheus.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `prometheus.serviceAccount.create` | Specify whether to create a ServiceAccount for Prometheus | `true` | | `prometheus.serviceAccount.name` | The name of the ServiceAccount to create | `""` | @@ -292,6 +292,7 @@ The command removes all the Kubernetes components associated with the chart and | `prometheus.persistence.size` | Persistent Volume Size | `8Gi` | | `prometheus.priorityClassName` | Priority class assigned to the Pods | `""` | | `prometheus.containers` | Containers allows injecting additional containers | `[]` | +| `prometheus.initContainers` | Add additional init containers to the prometheus pod(s) | `[]` | | `prometheus.volumes` | Volumes allows configuration of additional volumes | `[]` | | `prometheus.volumeMounts` | VolumeMounts allows configuration of additional VolumeMounts. Evaluated as a template | `[]` | | `prometheus.additionalPrometheusRules` | PrometheusRule defines recording and alerting rules for a Prometheus instance. | `[]` | @@ -309,7 +310,7 @@ The command removes all the Kubernetes components associated with the chart and | `prometheus.thanos.create` | Create a Thanos sidecar container | `false` | | `prometheus.thanos.image.registry` | Thanos image registry | `docker.io` | | `prometheus.thanos.image.repository` | Thanos image name | `bitnami/thanos` | -| `prometheus.thanos.image.tag` | Thanos image tag | `0.25.2-scratch-r1` | +| `prometheus.thanos.image.tag` | Thanos image tag | `0.25.2-scratch-r5` | | `prometheus.thanos.image.pullPolicy` | Thanos image pull policy | `IfNotPresent` | | `prometheus.thanos.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `prometheus.thanos.containerSecurityContext.enabled` | Enable container security context | `true` | @@ -360,7 +361,7 @@ The command removes all the Kubernetes components associated with the chart and | `alertmanager.enabled` | Deploy Alertmanager to the cluster | `true` | | `alertmanager.image.registry` | Prometheus image registry | `docker.io` | | `alertmanager.image.repository` | Prometheus Image repository | `bitnami/alertmanager` | -| `alertmanager.image.tag` | Prometheus Image tag (immutable tags are recommended) | `0.24.0-debian-10-r8` | +| `alertmanager.image.tag` | Prometheus Image tag (immutable tags are recommended) | `0.24.0-debian-10-r30` | | `alertmanager.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `alertmanager.serviceAccount.create` | Specify whether to create a ServiceAccount for Alertmanager | `true` | | `alertmanager.serviceAccount.name` | The name of the ServiceAccount to create | `""` | @@ -479,7 +480,7 @@ The command removes all the Kubernetes components associated with the chart and | `blackboxExporter.image.registry` | Blackbox Exporter image registry | `docker.io` | | `blackboxExporter.image.repository` | Blackbox Exporter Image repository | `bitnami/blackbox-exporter` | | `blackboxExporter.image.pullPolicy` | Blackbox Exporter Image pull policy | `IfNotPresent` | -| `blackboxExporter.image.tag` | Blackbox Exporter Image tag (immutable tags are recommended) | `0.20.0-debian-10-r19` | +| `blackboxExporter.image.tag` | Blackbox Exporter Image tag (immutable tags are recommended) | `0.20.0-debian-10-r38` | | `blackboxExporter.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `blackboxExporter.extraEnvVars` | Array with extra environment variables to add to blackboxExporter nodes | `[]` | | `blackboxExporter.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for blackboxExporter nodes | `""` | diff --git a/bitnami/kube-prometheus/templates/prometheus/prometheus.yaml b/bitnami/kube-prometheus/templates/prometheus/prometheus.yaml index ff875cc810..27cf54dbda 100644 --- a/bitnami/kube-prometheus/templates/prometheus/prometheus.yaml +++ b/bitnami/kube-prometheus/templates/prometheus/prometheus.yaml @@ -208,6 +208,10 @@ spec: {{- end }} {{- include "kube-prometheus.imagePullSecrets" . | indent 2 }} {{- if or .Values.prometheus.containers .Values.prometheus.thanos.create .Values.prometheus.containerSecurityContext.enabled .Values.prometheus.containerSecurityContext.enabled .Values.operator.prometheusConfigReloader.containerSecurityContext.enabled }} + initContainers: + {{- if .Values.prometheus.initContainers }} + {{- include "common.tplvalues.render" (dict "value" .Values.prometheus.initContainers "context" $) | nindent 4 }} + {{- end }} containers: {{- if .Values.prometheus.thanos.create }} - name: thanos-sidecar diff --git a/bitnami/kube-prometheus/values.yaml b/bitnami/kube-prometheus/values.yaml index f0b25ea1de..d23da8f88f 100644 --- a/bitnami/kube-prometheus/values.yaml +++ b/bitnami/kube-prometheus/values.yaml @@ -50,7 +50,7 @@ operator: image: registry: docker.io repository: bitnami/prometheus-operator - tag: 0.56.0-debian-10-r1 + tag: 0.56.0-debian-10-r9 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -362,7 +362,7 @@ prometheus: image: registry: docker.io repository: bitnami/prometheus - tag: 2.35.0-debian-10-r3 + tag: 2.35.0-debian-10-r11 ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ @@ -840,6 +840,16 @@ prometheus: ## @param prometheus.containers Containers allows injecting additional containers ## containers: [] + ## @param prometheus.initContainers Add additional init containers to the prometheus pod(s) + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + ## e.g: + ## initContainers: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## command: ['sh', '-c', 'echo "hello world"'] + ## + initContainers: [] ## @param prometheus.volumes Volumes allows configuration of additional volumes ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusspec ## @@ -1163,7 +1173,7 @@ alertmanager: image: registry: docker.io repository: bitnami/alertmanager - tag: 0.24.0-debian-10-r30 + tag: 0.24.0-debian-10-r38 ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ @@ -1655,7 +1665,7 @@ blackboxExporter: image: registry: docker.io repository: bitnami/blackbox-exporter - tag: 0.20.0-debian-10-r38 + tag: 0.20.0-debian-10-r46 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace.