From d2959647f7144a9b19dff57bbd9837813141e21d Mon Sep 17 00:00:00 2001 From: sipr-invivo <160140834+sipr-invivo@users.noreply.github.com> Date: Thu, 4 Apr 2024 17:38:33 +0200 Subject: [PATCH] Add support for envFrom for LAPI (#156) --- charts/crowdsec/templates/lapi-deployment.yaml | 4 ++++ charts/crowdsec/values.yaml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/charts/crowdsec/templates/lapi-deployment.yaml b/charts/crowdsec/templates/lapi-deployment.yaml index 1d39145..daae089 100644 --- a/charts/crowdsec/templates/lapi-deployment.yaml +++ b/charts/crowdsec/templates/lapi-deployment.yaml @@ -54,6 +54,10 @@ spec: - name: crowdsec-lapi image: "{{ .Values.image.repository | default "crowdsecurity/crowdsec" }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.lapi.envFrom }} + envFrom: + {{- toYaml .Values.lapi.envFrom | nindent 10 }} + {{- end }} env: {{- if .Values.tls.enabled }} - name: LOCAL_API_URL diff --git a/charts/crowdsec/values.yaml b/charts/crowdsec/values.yaml index cae00c7..7abbad3 100644 --- a/charts/crowdsec/values.yaml +++ b/charts/crowdsec/values.yaml @@ -138,6 +138,12 @@ lapi: # by default disable the agent because it only needs the local API. #- name: DISABLE_AGENT # value: "true" + # Allows you to load environment variables from kubernetes secret or config map + envFrom: [] + # - secretRef: + # name: env-secret + # - configMapRef: + # name: config-map # -- Enable ingress lapi object ingress: enabled: false