Skip to content

Commit e414ad2

Browse files
committed
.helm: make AUTHENTICATION_TOKEN_TTL configurable for the api
Helm has a silly behavior for empty values, see: - helm/helm#13487 .Values.api.authenticationTokenTtl should catch "", nil. Sometimes an empty value ends up as string <no value> which is explicitly checked here.
1 parent b60f75a commit e414ad2

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

.helm/ecamp3/env.example.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"API_AUTHENTICATION_TOKEN_TTL": null,
23
"API_CACHE_ENABLED": true,
34
"API_DATA_MIGRATIONS_DIR": "dev-data",
45
"API_NUM_THREADS": null,

.helm/ecamp3/templates/api_configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
{{- include "app.commonLabels" . | nindent 4 }}
88
data:
99
ADDITIONAL_TRUSTED_HOSTS: {{ .Values.domain | quote }}
10-
{{- if not (.Values.api.authenticationTokenTtl | empty) }}
10+
{{- if and (.Values.api.authenticationTokenTtl) (ne (.Values.api.authenticationTokenTtl | toString) "<no value>") }}
1111
AUTHENTICATION_TOKEN_TTL: {{ .Values.api.authenticationTokenTtl | quote }}
1212
{{- end }}
1313
COOKIE_PREFIX: {{ include "api.cookiePrefix" . | quote }}

.helm/ecamp3/values.yaml.gotmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ featureToggle:
2525
checklist: {{ .Environment.Values | getOrNil "FEATURE_CHECKLIST" | default false }}
2626

2727
api:
28+
authenticationTokenTtl: {{ .Environment.Values | getOrNil "API_AUTHENTICATION_TOKEN_TTL" }}
2829
dataMigrationsDir: {{ .Environment.Values | getOrNil "API_DATA_MIGRATIONS_DIR" | default "prod-data" }}
2930
subpath: "/api"
3031
image:

0 commit comments

Comments
 (0)