From a2056251ed8feb3c8feeb5055e97b0775cbfe616 Mon Sep 17 00:00:00 2001 From: dvdlevanon-miggo Date: Tue, 19 Nov 2024 17:45:48 +0200 Subject: [PATCH] allow adding envs to k8s read (#47) * allow adding envs to k8s read * [AUTO GITHUB] Bump chart versions * allow pass envs to static sbom * [AUTO GITHUB] Bump chart versions --------- Co-authored-by: dvdlevanon-miggo --- charts/k8s-read/Chart.yaml | 2 +- charts/k8s-read/templates/deployment.yaml | 10 ++++++++-- charts/k8s-read/values.yaml | 2 ++ charts/static-sbom/Chart.yaml | 2 +- charts/static-sbom/templates/deployment.yaml | 10 ++++++++-- charts/static-sbom/values.yaml | 2 ++ 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/charts/k8s-read/Chart.yaml b/charts/k8s-read/Chart.yaml index c954285e..58ddb22c 100644 --- a/charts/k8s-read/Chart.yaml +++ b/charts/k8s-read/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: k8s-read description: A Helm chart for miggo's k8s-read type: application -version: 0.0.4 +version: 0.0.5 appVersion: "0.0.1" diff --git a/charts/k8s-read/templates/deployment.yaml b/charts/k8s-read/templates/deployment.yaml index 268f39ed..ff0bedbd 100644 --- a/charts/k8s-read/templates/deployment.yaml +++ b/charts/k8s-read/templates/deployment.yaml @@ -54,15 +54,21 @@ spec: - --metric-tls-skip-verify={{ default .Values.output.otlp.tlsSkipVerify $globalMetricTlsSkipVerify }} - --metric-interval={{ coalesce .Values.config.metrics.interval $globalMetricInterval }} - --interval={{ .Values.config.interval }} - {{- if .Values.output.otlp.existingSecret }} envFrom: + {{- if .Values.output.otlp.existingSecret }} - secretRef: name: {{ .Values.output.otlp.existingSecret }} {{- else }} - envFrom: - secretRef: name: k8s-read-otlp-secret {{- end }} + {{- with .Values.extraEnvsFrom }} + {{- toYaml . | nindent 10 }} + {{- end }} + env: + {{- with .Values.extraEnvs }} + {{- toYaml . | nindent 12 }} + {{- end }} ports: - containerPort: {{ .Values.healthcheck.port }} livenessProbe: diff --git a/charts/k8s-read/values.yaml b/charts/k8s-read/values.yaml index f0fd46c1..c0cf2e71 100644 --- a/charts/k8s-read/values.yaml +++ b/charts/k8s-read/values.yaml @@ -71,3 +71,5 @@ nodeSelector: {} tolerations: [] affinity: {} +extraEnvs: [] +extraEnvsFrom: [] diff --git a/charts/static-sbom/Chart.yaml b/charts/static-sbom/Chart.yaml index 97d32e98..588087bf 100644 --- a/charts/static-sbom/Chart.yaml +++ b/charts/static-sbom/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: static-sbom description: A Helm chart for miggo's static-sbom type: application -version: 0.0.7 +version: 0.0.8 appVersion: "0.0.1" diff --git a/charts/static-sbom/templates/deployment.yaml b/charts/static-sbom/templates/deployment.yaml index 94c45122..e6305559 100644 --- a/charts/static-sbom/templates/deployment.yaml +++ b/charts/static-sbom/templates/deployment.yaml @@ -62,15 +62,21 @@ spec: - --cache-cm-name={{ include "static-sbom.configMapCacheName" . }} - --cache-cm-namespace={{ .Release.Namespace }} {{ end }} - {{- if .Values.output.otlp.existingSecret }} envFrom: + {{- if .Values.output.otlp.existingSecret }} - secretRef: name: {{ .Values.output.otlp.existingSecret }} {{- else }} - envFrom: - secretRef: name: static-sbom-otlp-secret {{- end }} + {{- with .Values.extraEnvsFrom }} + {{- toYaml . | nindent 10 }} + {{- end }} + env: + {{- with .Values.extraEnvs }} + {{- toYaml . | nindent 12 }} + {{- end }} ports: - containerPort: {{ .Values.healthcheck.port }} livenessProbe: diff --git a/charts/static-sbom/values.yaml b/charts/static-sbom/values.yaml index 1b7ab411..b600b5c2 100644 --- a/charts/static-sbom/values.yaml +++ b/charts/static-sbom/values.yaml @@ -77,3 +77,5 @@ nodeSelector: {} tolerations: [] affinity: {} +extraEnvs: [] +extraEnvsFrom: []