diff --git a/charts/incubator/firezone/Chart.yaml b/charts/incubator/firezone/Chart.yaml index 97232aad8d9..c8cadfac92a 100644 --- a/charts/incubator/firezone/Chart.yaml +++ b/charts/incubator/firezone/Chart.yaml @@ -22,7 +22,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/firezone - https://github.com/firezone/firezone type: application -version: 0.1.0 +version: 0.2.0 annotations: truecharts.org/catagories: | - vpn diff --git a/charts/incubator/firezone/templates/_secrets.tpl b/charts/incubator/firezone/templates/_secrets.tpl index 0813312160a..9414aa9eb67 100644 --- a/charts/incubator/firezone/templates/_secrets.tpl +++ b/charts/incubator/firezone/templates/_secrets.tpl @@ -1,12 +1,15 @@ {{/* Define the secrets */}} {{- define "firezone.secrets" -}} {{- $secretName := (printf "%s-firezone-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) -}} -{{- $keyGuardian := randAlphaNum 64 -}} -{{- $keyDatabase := randAlphaNum 64 -}} -{{- $keySecret := randAlphaNum 64 -}} -{{- $keyLive := randAlphaNum 64 -}} -{{- $keyCookieSigning := randAlphaNum 64 -}} -{{- $keyCookieEncrypt := randAlphaNum 64 -}} + +# firezone requires all these keys to be in base 64 | b64enc format presented in the container, so this b64enc here is intentional +# https://www.firezone.dev/docs/reference/env-vars#secrets-and-encryption +{{- $keyGuardian := randAlphaNum 64 | b64enc -}} +{{- $keyDatabase := randAlphaNum 64 | b64enc -}} +{{- $keySecret := randAlphaNum 64 | b64enc -}} +{{- $keyLive := randAlphaNum 64 | b64enc -}} +{{- $keyCookieSigning := randAlphaNum 64 | b64enc -}} +{{- $keyCookieEncrypt := randAlphaNum 64 | b64enc -}} {{- with (lookup "v1" "Secret" .Release.Namespace $secretName) -}} {{- $keyGuardian = index .data "GUARDIAN_SECRET_KEY" | b64dec -}} {{- $keyDatabase = index .data "DATABASE_ENCRYPTION_KEY" | b64dec -}} @@ -17,12 +20,10 @@ {{- end }} enabled: true data: - # firezone requires all these keys to be in base 64 format presented in the container, so this b64enc here is intentional - # https://www.firezone.dev/docs/reference/env-vars#secrets-and-encryption - GUARDIAN_SECRET_KEY: {{ $keyGuardian | b64enc }} - DATABASE_ENCRYPTION_KEY: {{ $keyDatabase | b64enc }} - SECRET_KEY_BASE: {{ $keySecret | b64enc }} - LIVE_VIEW_SIGNING_SALT: {{ $keyLive | b64enc }} - COOKIE_SIGNING_SALT: {{ $keyCookieSigning | b64enc }} - COOKIE_ENCRYPTION_SALT: {{ $keyCookieEncrypt | b64enc }} + GUARDIAN_SECRET_KEY: {{ $keyGuardian }} + DATABASE_ENCRYPTION_KEY: {{ $keyDatabase }} + SECRET_KEY_BASE: {{ $keySecret }} + LIVE_VIEW_SIGNING_SALT: {{ $keyLive }} + COOKIE_SIGNING_SALT: {{ $keyCookieSigning }} + COOKIE_ENCRYPTION_SALT: {{ $keyCookieEncrypt }} {{- end -}}