Skip to content

Commit

Permalink
Only add cache buster values if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
timetinytim committed Dec 15, 2023
1 parent 319edf2 commit 9978c51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions templates/configmap-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ data:

{{- if .Values.mastodon.cacheBuster.enabled }}
CACHE_BUSTER_ENABLED: "true"
{{- else }}
CACHE_BUSTER_ENABLED: "false"
{{- end }}
{{- if .Values.mastodon.cacheBuster.httpMethod }}
{{- if .Values.mastodon.cacheBuster.httpMethod }}
CACHE_BUSTER_HTTP_METHOD: {{ .Values.mastodon.cacheBuster.httpMethod }}
{{- end }}
{{- if .Values.mastodon.cacheBuster.authHeader }}
{{- end }}
{{- if .Values.mastodon.cacheBuster.authHeader }}
CACHE_BUSTER_SECRET_HEADER: {{ .Values.mastodon.cacheBuster.authHeader }}
{{- end }}
{{- else }}
CACHE_BUSTER_ENABLED: "false"
{{- end }}
2 changes: 1 addition & 1 deletion templates/deployment-sidekiq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ spec:
name: {{ $context.Values.mastodon.deepl.apiKeySecretRef.name }}
key: {{ $context.Values.mastodon.deepl.apiKeySecretRef.key }}
{{- end }}
{{- if $context.Values.mastodon.cacheBuster.authToken.existingSecret }}
{{- if and $context.Values.mastodon.cacheBuster.enabled $context.Values.mastodon.cacheBuster.authToken.existingSecret }}
- name: CACHE_BUSTER_SECRET
valueFrom:
secretKeyRef:
Expand Down
2 changes: 1 addition & 1 deletion templates/deployment-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ spec:
name: {{ .Values.mastodon.hcaptcha.secretKeySecretRef.name }}
key: {{ .Values.mastodon.hcaptcha.secretKeySecretRef.key }}
{{- end }}
{{- if .Values.mastodon.cacheBuster.authToken.existingSecret }}
{{- if and .Values.mastodon.cacheBuster.enabled .Values.mastodon.cacheBuster.authToken.existingSecret }}
- name: CACHE_BUSTER_SECRET
valueFrom:
secretKeyRef:
Expand Down

0 comments on commit 9978c51

Please sign in to comment.