From 36627ef34a0884efe3d1ae131e7be06d354f1819 Mon Sep 17 00:00:00 2001 From: Jason Greathouse Date: Tue, 10 Sep 2024 14:49:09 -0500 Subject: [PATCH] optional values to set static salts for ingress cookies --- .internal-ci/helm/fog-ledger/templates/_helpers.tpl | 2 +- .internal-ci/helm/fog-ledger/values.yaml | 2 ++ .internal-ci/helm/fog-view/templates/_helpers.tpl | 2 +- .internal-ci/helm/fog-view/values.yaml | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.internal-ci/helm/fog-ledger/templates/_helpers.tpl b/.internal-ci/helm/fog-ledger/templates/_helpers.tpl index 82d9abaabe..d2d9694f3a 100644 --- a/.internal-ci/helm/fog-ledger/templates/_helpers.tpl +++ b/.internal-ci/helm/fog-ledger/templates/_helpers.tpl @@ -52,7 +52,7 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{/* grpcCookieSalt */}} {{- define "fog-ledger.grpcCookieSalt" -}} -{{- randAlphaNum 8 }} +{{- .Values.fogLedger.router.ingress.common.cookieSalt | default (randAlphaNum 8) }} {{- end }} {{/* stackConfig - get "network" name of fall back to default */}} diff --git a/.internal-ci/helm/fog-ledger/values.yaml b/.internal-ci/helm/fog-ledger/values.yaml index 8b285497db..55153d5d65 100644 --- a/.internal-ci/helm/fog-ledger/values.yaml +++ b/.internal-ci/helm/fog-ledger/values.yaml @@ -106,6 +106,8 @@ fogLedger: ingress: enabled: true common: + # Set a static salt for the dynamic cookie. See helpers for more info. + # cookieSalt: '' tls: clusterIssuer: letsencrypt-production-http blocklist: diff --git a/.internal-ci/helm/fog-view/templates/_helpers.tpl b/.internal-ci/helm/fog-view/templates/_helpers.tpl index 45dfb0b260..0ca5f3d161 100644 --- a/.internal-ci/helm/fog-view/templates/_helpers.tpl +++ b/.internal-ci/helm/fog-view/templates/_helpers.tpl @@ -52,7 +52,7 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{/* grpcCookieSalt */}} {{- define "fog-view.grpcCookieSalt" -}} -{{- randAlphaNum 8 }} +{{- .Values.fogView.router.ingress.common.cookieSalt | default (randAlphaNum 8) }} {{- end }} {{/* stackConfig - get "network" name of fall back to default */}} diff --git a/.internal-ci/helm/fog-view/values.yaml b/.internal-ci/helm/fog-view/values.yaml index 933da5ae18..fa5cc05b98 100644 --- a/.internal-ci/helm/fog-view/values.yaml +++ b/.internal-ci/helm/fog-view/values.yaml @@ -96,6 +96,8 @@ fogView: ingress: enabled: true common: + # Set a static salt for the dynamic cookie. See helpers for more info. + # cookieSalt: '' tls: clusterIssuer: letsencrypt-production-http blocklist: