Skip to content

Commit 9d1bedb

Browse files
committed
✨ Add environment variable overrides support to octane pools
1 parent 9a2386f commit 9d1bedb

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

osu/osu-web/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ 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.1025.0
18+
version: 2025.1117.0
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
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "2025.1025.0"
24+
appVersion: "2025.1112.1"
2525

2626
dependencies:
2727
- name: osu-beatmap-difficulty-lookup-cache

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@
55
{{- $suffix := hasKey $pool "suffix" | ternary $pool.suffix (printf "-%s" $poolName) -}}
66
{{- $resourceName := printf "%s-octane%s" (include "osu-web-chart.fullname" $) $suffix }}
77

8+
# Add secret if $pool.extraEnv is defined and has at least one key
9+
{{- if and $pool.extraEnv (gt (len $pool.extraEnv) 0) }}
10+
---
11+
apiVersion: v1
12+
kind: Secret
13+
metadata:
14+
name: {{ include "osu-web-chart.fullname" $ }}-pool-{{ $poolName }}-env
15+
labels:
16+
{{- include "osu-web-chart.labels" (dict "root" $ "options" (dict)) | nindent 4 }}
17+
type: Opaque
18+
stringData:
19+
{{- range $key, $value := $pool.extraEnv }}
20+
{{ $key }}: {{ $value | quote }}
21+
{{- end }}
22+
{{- end }}
823
---
924
apiVersion: apps/v1
1025
kind: Deployment
@@ -103,6 +118,10 @@ spec:
103118
envFrom:
104119
- secretRef:
105120
name: {{ include "osu-web-chart.fullname" $ }}-env
121+
{{- if and $pool.extraEnv (gt (len $pool.extraEnv) 0) }}
122+
- secretRef:
123+
name: {{ include "osu-web-chart.fullname" $ }}-pool-{{ $poolName }}-env
124+
{{- end }}
106125
{{- with (default $poolDefaults.extraContainers $pool.extraContainers) }}
107126
{{- toYaml . | nindent 8 }}
108127
{{- end }}

0 commit comments

Comments
 (0)