Skip to content

Commit 7d89bae

Browse files
committed
♻️ Remove pool env overrides from checksum
Since they're in-lined now, they no longer need to be added to checksums like vars imported from configmap/secrets. Kubernetes will roll out on in-lined env vars on its own.
1 parent 29705fa commit 7d89bae

3 files changed

Lines changed: 8 additions & 15 deletions

File tree

osu/osu-web/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2025.1124.1
18+
version: 2025.1124.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

osu/osu-web/templates/_helpers.tpl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,6 @@ Create the name of the service account to use
7575
{{- end -}}
7676
{{- end -}}
7777

78-
{{- define "osu-web-chart.pool-env-vars" -}}
79-
{{- range $key, $value := . }}
80-
{{- if not (kindIs "invalid" $value) -}}
81-
- name: {{ $key | upper | quote }}
82-
value: {{ $value | quote }}
83-
{{- end -}}
84-
{{- end -}}
85-
{{- end -}}
86-
8778
{{- define "osu-web-chart.env-vars" -}}
8879
{{ template "osu-web-chart.env-var" (dict "name" "APP_URL" "value" (include "osu-web.laravelAppUrl" .)) }}
8980
{{ template "osu-web-chart.env-var" (dict "name" "APP_ENV" "value" .Values.config.laravel.env) }}

osu/osu-web/templates/octane-pool.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
{{- range $poolName, $pool := .Values.config.laravel.octane.pools -}}
55
{{- $suffix := hasKey $pool "suffix" | ternary $pool.suffix (printf "-%s" $poolName) -}}
66
{{- $resourceName := printf "%s-octane%s" (include "osu-web-chart.fullname" $) $suffix }}
7-
{{- $poolEnvVars := include "osu-web-chart.pool-env-vars" (default (dict) $pool.extraEnv) -}}
87
---
98
apiVersion: apps/v1
109
kind: Deployment
@@ -13,7 +12,7 @@ metadata:
1312
labels:
1413
{{- include "osu-web-chart.labels" (dict "root" $ "options" (dict "component" "octane" "pool" $poolName)) | nindent 4 }}
1514
annotations:
16-
checksum/config: {{ sha256sum (printf "%s-%s-%s-%s" $.Values.config.laravel.oauth.privateKey $.Values.config.laravel.oauth.publicKey (include "osu-web-chart.env-vars" $) $poolEnvVars) }}
15+
checksum/config: {{ sha256sum (printf "%s-%s-%s" $.Values.config.laravel.oauth.privateKey $.Values.config.laravel.oauth.publicKey (include "osu-web-chart.env-vars" $)) }}
1716
spec:
1817
replicas: {{ default $poolDefaults.replicas $pool.replicas }}
1918
{{- with (default $poolDefaults.strategy $pool.strategy) }}
@@ -26,7 +25,7 @@ spec:
2625
template:
2726
metadata:
2827
annotations:
29-
checksum/config: {{ sha256sum (printf "%s-%s-%s-%s" $.Values.config.laravel.oauth.privateKey $.Values.config.laravel.oauth.publicKey (include "osu-web-chart.env-vars" $) $poolEnvVars) }}
28+
checksum/config: {{ sha256sum (printf "%s-%s-%s" $.Values.config.laravel.oauth.privateKey $.Values.config.laravel.oauth.publicKey (include "osu-web-chart.env-vars" $)) }}
3029
{{- range $key, $value := (default $poolDefaults.extraPodAnnotations $pool.extraPodAnnotations) }}
3130
{{ $key | quote }}: {{ $value | quote }}
3231
{{- end }}
@@ -92,8 +91,11 @@ spec:
9291
{{- toYaml . | nindent 12 }}
9392
{{- end }}
9493
env:
95-
{{- if gt (len $poolEnvVars) 0 }}
96-
{{- $poolEnvVars | nindent 12 }}
94+
{{- if and $pool.extraEnv (gt (len $pool.extraEnv) 0) }}
95+
{{- range $key, $value := $pool.extraEnv }}
96+
- name: {{ $key | upper | quote }}
97+
value: {{ $value | quote }}
98+
{{- end }}
9799
{{- end }}
98100
- name: DATADOG_STATSD_HOST
99101
valueFrom:

0 commit comments

Comments
 (0)