From 75568498ea950571e2a0541f169e1928e391a392 Mon Sep 17 00:00:00 2001 From: Theo Brigitte Date: Mon, 19 Aug 2024 13:49:07 +0200 Subject: [PATCH] use extraEnv --- pkg/monitoring/alloy/configmap.go | 2 -- .../alloy/templates/monitoring-config.yaml.template | 3 --- .../alloy/templates/monitoring-secret.yaml.template | 10 ++++------ 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pkg/monitoring/alloy/configmap.go b/pkg/monitoring/alloy/configmap.go index b144fa10..996cf002 100644 --- a/pkg/monitoring/alloy/configmap.go +++ b/pkg/monitoring/alloy/configmap.go @@ -83,14 +83,12 @@ func (a *Service) GenerateAlloyMonitoringConfigMapData(ctx context.Context, curr Replicas int RequestsCPU string RequestsMemory string - SecretName string }{ AlloyConfig: alloyConfig, PriorityClassName: commonmonitoring.PriorityClassName, Replicas: shards, RequestsCPU: commonmonitoring.AlloyRequestsCPU, RequestsMemory: commonmonitoring.AlloyRequestsMemory, - SecretName: commonmonitoring.AlloyMonitoringAgentAppName, } var values bytes.Buffer diff --git a/pkg/monitoring/alloy/templates/monitoring-config.yaml.template b/pkg/monitoring/alloy/templates/monitoring-config.yaml.template index 5f54a7e7..02820dfe 100644 --- a/pkg/monitoring/alloy/templates/monitoring-config.yaml.template +++ b/pkg/monitoring/alloy/templates/monitoring-config.yaml.template @@ -49,9 +49,6 @@ alloy: create: true content: |- {{ .AlloyConfig | indent 8 }} - envFrom: - - secretRef: - name: {{ .SecretName }} resources: requests: cpu: {{ .RequestsCPU }} diff --git a/pkg/monitoring/alloy/templates/monitoring-secret.yaml.template b/pkg/monitoring/alloy/templates/monitoring-secret.yaml.template index 1622deb6..3a63bcbb 100644 --- a/pkg/monitoring/alloy/templates/monitoring-secret.yaml.template +++ b/pkg/monitoring/alloy/templates/monitoring-secret.yaml.template @@ -1,8 +1,6 @@ alloy: alloy: - secret: - create: true - content: |- -{{- range . }} -{{ .Name | indent 8 }}: {{ .Value }} -{{- end }} + extraEnv: + {{- range . }} + - {{ .Name }}={{ .Value }} + {{- end }}