From 080d4285658323a0ed357999e3e41693feceb7e6 Mon Sep 17 00:00:00 2001 From: David Gomez Date: Wed, 11 Jun 2025 15:48:52 +0200 Subject: [PATCH] [bitnami/grafana-alloy] Replace configmap with secret for configuration (#34346) * [bitnami/grafana-alloy] Replace configmap with secret for configuration Signed-off-by: David Gomez * Update CHANGELOG.md Signed-off-by: Bitnami Bot --------- Signed-off-by: David Gomez Signed-off-by: Bitnami Bot Co-authored-by: Bitnami Bot --- bitnami/grafana-alloy/CHANGELOG.md | 8 ++++++-- bitnami/grafana-alloy/Chart.yaml | 2 +- bitnami/grafana-alloy/README.md | 4 ++-- bitnami/grafana-alloy/templates/_helpers.tpl | 8 ++++---- bitnami/grafana-alloy/templates/application.yaml | 6 +++--- .../templates/{configmap.yaml => secret.yaml} | 6 +++--- bitnami/grafana-alloy/values.yaml | 6 +++--- 7 files changed, 22 insertions(+), 18 deletions(-) rename bitnami/grafana-alloy/templates/{configmap.yaml => secret.yaml} (95%) diff --git a/bitnami/grafana-alloy/CHANGELOG.md b/bitnami/grafana-alloy/CHANGELOG.md index 6a5573dcaa..044e4a3fa6 100644 --- a/bitnami/grafana-alloy/CHANGELOG.md +++ b/bitnami/grafana-alloy/CHANGELOG.md @@ -1,8 +1,12 @@ # Changelog -## 0.1.3 (2025-06-10) +## 0.2.0 (2025-06-11) -* [bitnami/grafana-alloy] :zap: :arrow_up: Update dependency references ([#34309](https://github.com/bitnami/charts/pull/34309)) +* [bitnami/grafana-alloy] Replace configmap with secret for configuration ([#34346](https://github.com/bitnami/charts/pull/34346)) + +## 0.1.3 (2025-06-10) + +* [bitnami/grafana-alloy] :zap: :arrow_up: Update dependency references (#34309) ([a21b221](https://github.com/bitnami/charts/commit/a21b22148fbf5faef8b50ad83a658cf70dc1134d)), closes [#34309](https://github.com/bitnami/charts/issues/34309) ## 0.1.2 (2025-06-10) diff --git a/bitnami/grafana-alloy/Chart.yaml b/bitnami/grafana-alloy/Chart.yaml index e250ed3333..3884f773d7 100644 --- a/bitnami/grafana-alloy/Chart.yaml +++ b/bitnami/grafana-alloy/Chart.yaml @@ -36,4 +36,4 @@ maintainers: name: grafana-alloy sources: - https://github.com/bitnami/charts/tree/main/bitnami/grafana-alloy -version: 0.1.3 +version: 0.2.0 diff --git a/bitnami/grafana-alloy/README.md b/bitnami/grafana-alloy/README.md index 6611175890..4e03c9e8b0 100644 --- a/bitnami/grafana-alloy/README.md +++ b/bitnami/grafana-alloy/README.md @@ -224,8 +224,8 @@ Install the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/char | `alloy.image.pullSecrets` | Grafana Alloy image pull secrets | `[]` | | `alloy.containerPorts.http` | Grafana Alloy HTTP container port | `8080` | | `alloy.extraContainerPorts` | Optionally specify extra list of additional ports for Grafana Alloy containers | `[]` | -| `alloy.existingConfigmap` | The name of an existing ConfigMap with your custom configuration for Grafana Alloy | `""` | -| `alloy.configuration` | Specify content for Grafan Alloy config file. Omitted if alloy.existingConfigmap is provided. | `""` | +| `alloy.existingSecret` | The name of an existing Secret with your custom configuration for Grafana Alloy | `""` | +| `alloy.configuration` | Specify content for Grafana Alloy config file. Omitted if alloy.existingSecret is provided. | `""` | | `alloy.extraConfig` | Append extra configuration to the default config file | `""` | | `alloy.clustering.enabled` | Deploy Grafana Alloy in a cluster to allow for load distribution. | `false` | | `alloy.clustering.name` | Name for the Grafana Alloy cluster. Used for differentiating between clusters. | `""` | diff --git a/bitnami/grafana-alloy/templates/_helpers.tpl b/bitnami/grafana-alloy/templates/_helpers.tpl index f08e57212e..94a90fe5b4 100644 --- a/bitnami/grafana-alloy/templates/_helpers.tpl +++ b/bitnami/grafana-alloy/templates/_helpers.tpl @@ -36,11 +36,11 @@ Create the name of the service account to use {{- end -}} {{/* -Name of the Grafana Alloy ConfigMap +Name of the Grafana Alloy Secret */}} -{{- define "grafana-alloy.configmapName" -}} -{{- if .Values.alloy.existingConfigmap -}} - {{- include "common.tplvalues.render" (dict "value" .Values.alloy.existingConfigmap "context" $) -}} +{{- define "grafana-alloy.secretName" -}} +{{- if .Values.alloy.existingSecret -}} + {{- include "common.tplvalues.render" (dict "value" .Values.alloy.existingSecret "context" $) -}} {{- else -}} {{- include "common.names.fullname" . -}} {{- end -}} diff --git a/bitnami/grafana-alloy/templates/application.yaml b/bitnami/grafana-alloy/templates/application.yaml index aecf037457..4b7d5c8ce7 100644 --- a/bitnami/grafana-alloy/templates/application.yaml +++ b/bitnami/grafana-alloy/templates/application.yaml @@ -51,7 +51,7 @@ spec: template: metadata: annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} {{- if .Values.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} {{- end }} @@ -330,8 +330,8 @@ spec: {{- end }} volumes: - name: config - configMap: - name: {{ include "grafana-alloy.configmapName" . }} + secret: + secretName: {{ include "grafana-alloy.secretName" . }} {{- if .Values.alloy.mounts.varlog }} - name: varlog hostPath: diff --git a/bitnami/grafana-alloy/templates/configmap.yaml b/bitnami/grafana-alloy/templates/secret.yaml similarity index 95% rename from bitnami/grafana-alloy/templates/configmap.yaml rename to bitnami/grafana-alloy/templates/secret.yaml index bb16e2c4b6..1b83ebfb49 100644 --- a/bitnami/grafana-alloy/templates/configmap.yaml +++ b/bitnami/grafana-alloy/templates/secret.yaml @@ -3,9 +3,9 @@ Copyright Broadcom, Inc. All Rights Reserved. SPDX-License-Identifier: APACHE-2.0 */}} -{{- if not .Values.alloy.existingConfigMap }} +{{- if not .Values.alloy.existingSecret }} apiVersion: v1 -kind: ConfigMap +kind: Secret metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} @@ -15,7 +15,7 @@ metadata: {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} -data: +stringData: config.alloy: | {{- if .Values.alloy.configuration }} {{- include "common.tplvalues.render" (dict "value" .Values.alloy.configuration "context" .) | nindent 4 }} diff --git a/bitnami/grafana-alloy/values.yaml b/bitnami/grafana-alloy/values.yaml index a0abab01cf..59b451c78a 100644 --- a/bitnami/grafana-alloy/values.yaml +++ b/bitnami/grafana-alloy/values.yaml @@ -300,10 +300,10 @@ alloy: ## containerPort: 9090 ## extraContainerPorts: [] - ## @param alloy.existingConfigmap The name of an existing ConfigMap with your custom configuration for Grafana Alloy + ## @param alloy.existingSecret The name of an existing Secret with your custom configuration for Grafana Alloy ## - existingConfigmap: "" - ## @param alloy.configuration Specify content for Grafan Alloy config file. Omitted if alloy.existingConfigmap is provided. + existingSecret: "" + ## @param alloy.configuration Specify content for Grafana Alloy config file. Omitted if alloy.existingSecret is provided. ## e.g: ## configuration: |- ## ...