From bb64dbd026e96451e0db559853468b2c92b75d6d Mon Sep 17 00:00:00 2001 From: Milos Backonja Date: Tue, 12 Dec 2023 17:17:38 +0100 Subject: [PATCH 1/2] feat: env vars support through values file Signed-off-by: Milos Backonja --- infrastructure/charts/agent/templates/deployment.yaml | 4 ++++ infrastructure/charts/agent/values.yaml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/infrastructure/charts/agent/templates/deployment.yaml b/infrastructure/charts/agent/templates/deployment.yaml index 85a2023818..f6a8888dc3 100644 --- a/infrastructure/charts/agent/templates/deployment.yaml +++ b/infrastructure/charts/agent/templates/deployment.yaml @@ -194,6 +194,10 @@ spec: key: root-token optional: false {{- end }} + {{- range $key, $value := .Values.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} {{- if .Values.server.keycloak.enabled }} - name: KEYCLOAK_ENABLED value: "true" diff --git a/infrastructure/charts/agent/values.yaml b/infrastructure/charts/agent/values.yaml index 582c0ebc3f..a32e7562f5 100644 --- a/infrastructure/charts/agent/values.yaml +++ b/infrastructure/charts/agent/values.yaml @@ -142,6 +142,9 @@ keycloak: mountPath: /opt/bitnami/keycloak/data/import readOnly: true +# Additional environment variables to be added to the server container +env: {} + # It is configured for deployment and postgresql objects of prism-agent affinity: nodeAffinity: {} From 54d37654305702229a4d317bca26ce8e26059d31 Mon Sep 17 00:00:00 2001 From: Milos Backonja Date: Tue, 12 Dec 2023 18:52:21 +0100 Subject: [PATCH 2/2] fix: Option to disable apisix key auth Signed-off-by: Milos Backonja --- infrastructure/charts/agent/templates/apisixroute.yaml | 2 +- infrastructure/charts/agent/templates/deployment.yaml | 4 ---- infrastructure/charts/agent/values.yaml | 8 ++++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/infrastructure/charts/agent/templates/apisixroute.yaml b/infrastructure/charts/agent/templates/apisixroute.yaml index 8a389f4013..47f1f5a0b9 100644 --- a/infrastructure/charts/agent/templates/apisixroute.yaml +++ b/infrastructure/charts/agent/templates/apisixroute.yaml @@ -20,7 +20,7 @@ spec: - serviceName: agent-server-tapir-service servicePort: 8085 authentication: - enable: true + enable: {{ .Values.ingress.auth.enable }} type: keyAuth plugins: - name: proxy-rewrite diff --git a/infrastructure/charts/agent/templates/deployment.yaml b/infrastructure/charts/agent/templates/deployment.yaml index f6a8888dc3..85a2023818 100644 --- a/infrastructure/charts/agent/templates/deployment.yaml +++ b/infrastructure/charts/agent/templates/deployment.yaml @@ -194,10 +194,6 @@ spec: key: root-token optional: false {{- end }} - {{- range $key, $value := .Values.env }} - - name: {{ $key }} - value: {{ $value | quote }} - {{- end }} {{- if .Values.server.keycloak.enabled }} - name: KEYCLOAK_ENABLED value: "true" diff --git a/infrastructure/charts/agent/values.yaml b/infrastructure/charts/agent/values.yaml index a32e7562f5..d702cc9f41 100644 --- a/infrastructure/charts/agent/values.yaml +++ b/infrastructure/charts/agent/values.yaml @@ -7,6 +7,8 @@ ingress: enabled: false allow_origins: "" consumers: [] + auth: + enable: true # External Consumers are ones where the secret keys/API tokens # are pulled in using External Secrets [and therefore aren't generated by helm] externalConsumerKeyPrefix: chart-base-key-prefix @@ -28,7 +30,8 @@ server: requests: cpu: 250m memory: 512Mi - additionalEnvVariables: [] + # Additional environment variables to be added to the server container + additionalEnvVariables: {} useVault: true keycloak: enabled: false @@ -142,9 +145,6 @@ keycloak: mountPath: /opt/bitnami/keycloak/data/import readOnly: true -# Additional environment variables to be added to the server container -env: {} - # It is configured for deployment and postgresql objects of prism-agent affinity: nodeAffinity: {}