From 5e5877e6c38eb8937711ed0a73d44171370b09e9 Mon Sep 17 00:00:00 2001 From: unglaublicherdude Date: Wed, 21 Feb 2024 15:02:33 +0100 Subject: [PATCH] add extra env vars --- .gitignore | 3 ++- charts/vaas/Chart.lock | 12 ++++++++++++ charts/vaas/templates/gateway/_helpers.tpl | 7 +++++++ charts/vaas/templates/gateway/statefulset.yaml | 14 +++++++++++++- 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 charts/vaas/Chart.lock diff --git a/.gitignore b/.gitignore index 65999cf..596e88d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ *.log *-locale.yaml *.tgz -.fleet/ \ No newline at end of file +.fleet/ +values-local.yaml \ No newline at end of file diff --git a/charts/vaas/Chart.lock b/charts/vaas/Chart.lock new file mode 100644 index 0000000..9f545c5 --- /dev/null +++ b/charts/vaas/Chart.lock @@ -0,0 +1,12 @@ +dependencies: +- name: redis + repository: https://charts.bitnami.com/bitnami + version: 18.13.0 +- name: gdscan + repository: https://gdatasoftwareag.github.io/gdscan/ + version: 1.6.0 +- name: mini-identity-provider + repository: oci://ghcr.io/gdatasoftwareag + version: 0.1.17 +digest: sha256:c82d0b1c806656eace4e0fad4b2e73f5b3a2f5ba497b12788e77b3a3f4488030 +generated: "2024-02-21T14:56:55.183577055+01:00" diff --git a/charts/vaas/templates/gateway/_helpers.tpl b/charts/vaas/templates/gateway/_helpers.tpl index 87cd34d..d300635 100644 --- a/charts/vaas/templates/gateway/_helpers.tpl +++ b/charts/vaas/templates/gateway/_helpers.tpl @@ -88,4 +88,11 @@ Create environment variables to configure gateway container. - name: VerdictAsAService__Credentials__ClientSecret {{ toYaml .Values.gateway.options.credentials.clientsecret }} {{- end }} +{{- end }} + +{{- define "gateway.extractEnvVars" -}} +{{- range $key, $value := .Values.gateway.extraEnvVars }} +- name: {{ $key }} + value: {{ $value | quote }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/charts/vaas/templates/gateway/statefulset.yaml b/charts/vaas/templates/gateway/statefulset.yaml index 52e64c7..d617666 100644 --- a/charts/vaas/templates/gateway/statefulset.yaml +++ b/charts/vaas/templates/gateway/statefulset.yaml @@ -37,7 +37,19 @@ spec: - mountPath: /tmp name: gateway-tmp env: - {{- include "gateway.env" . | nindent 12 }} + - name: Authentication__Schemes__Bearer__Authority + value: {{.Values.gateway.authentication.authority}} + - name: Authentication__Schemes__Bearer__RequireHttpsMetadata + value: "false" + - name: Upload__Endpoint + value: {{.Values.gateway.uploadUrl}} + - name: JwtSettings__Secret + value: {{ randAlphaNum 64 }} + - name: GDScanConfiguration__Url + value: "http://gdscan:8080/scan/body" + - name: RedisConfiguration__Configuration + value: "redis-master" + {{- include "gateway.extractEnvVars" . | nindent 12 }} ports: - name: http containerPort: {{ .Values.gateway.service.http.port }}