Skip to content

Commit 88e5c38

Browse files
committed
fix(templates): merge env blocks and add missing rate limit vars
- Combine REDIS_PASSWORD and extraEnv into a single env block in deployment.yaml to prevent extraEnv from overwriting REDIS_PASSWORD - Add missing INTROSPECT_RATE_LIMIT and INTROSPECT_RATE_LIMIT_BURST to configmap.yaml that were defined in values.yaml but not rendered - Add extraEnv support to metrics-leader deployment for consistency - Clarify README example YAML comments to avoid confusion with ci/ files
1 parent 20ff31d commit 88e5c38

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ helm install authgate . -f values-sqlite.yaml
134134
For production multi-replica deployments with external databases:
135135

136136
```yaml
137-
# values-ha-external.yaml
137+
# Example: HA with external databases
138138
replicaCount: 3
139139
database:
140140
driver: postgres
@@ -183,7 +183,7 @@ helm install authgate . -f values-ha-external.yaml
183183
One-click setup with bundled PostgreSQL and Redis:
184184

185185
```yaml
186-
# values-ha-subchart.yaml
186+
# Example: HA with bundled subcharts
187187
replicaCount: 2
188188
database:
189189
driver: postgres

templates/configmap.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ data:
6666
TOKEN_RATE_LIMIT_BURST: {{ .Values.rateLimit.tokenBurst | quote }}
6767
DEVICE_VERIFY_RATE_LIMIT: {{ .Values.rateLimit.deviceVerify | quote }}
6868
DEVICE_VERIFY_RATE_LIMIT_BURST: {{ .Values.rateLimit.deviceVerifyBurst | quote }}
69+
INTROSPECT_RATE_LIMIT: {{ .Values.rateLimit.introspect | quote }}
70+
INTROSPECT_RATE_LIMIT_BURST: {{ .Values.rateLimit.introspectBurst | quote }}
6971

7072
# Redis
7173
{{- if include "authgate.redisAvailable" . }}

templates/deployment-metrics-leader.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ spec:
6767
name: {{ .Release.Name }}-redis
6868
key: redis-password
6969
{{- end }}
70+
{{- with .Values.extraEnv }}
71+
{{- toYaml . | nindent 12 }}
72+
{{- end }}
7073
livenessProbe:
7174
httpGet:
7275
path: /health

templates/deployment.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,18 @@ spec:
6565
name: {{ include "authgate.configMapName" . }}
6666
- secretRef:
6767
name: {{ include "authgate.secretName" . }}
68-
{{- if and .Values.redis.enabled .Values.redis.auth.enabled }}
68+
{{- if or (and .Values.redis.enabled .Values.redis.auth.enabled) .Values.extraEnv }}
6969
env:
70+
{{- if and .Values.redis.enabled .Values.redis.auth.enabled }}
7071
- name: REDIS_PASSWORD
7172
valueFrom:
7273
secretKeyRef:
7374
name: {{ .Release.Name }}-redis
7475
key: redis-password
76+
{{- end }}
77+
{{- with .Values.extraEnv }}
78+
{{- toYaml . | nindent 12 }}
79+
{{- end }}
7580
{{- end }}
7681
livenessProbe:
7782
httpGet:
@@ -107,10 +112,6 @@ spec:
107112
{{- with .Values.extraVolumeMounts }}
108113
{{- toYaml . | nindent 12 }}
109114
{{- end }}
110-
{{- with .Values.extraEnv }}
111-
env:
112-
{{- toYaml . | nindent 12 }}
113-
{{- end }}
114115
volumes:
115116
{{- if eq .Values.database.driver "sqlite" }}
116117
- name: data

0 commit comments

Comments
 (0)