Skip to content

Commit edb0e4c

Browse files
committed
helm: Add ability to set scheme for probes
1 parent bd7b6ab commit edb0e4c

28 files changed

+441
-0
lines changed

charts/headlamp/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,42 @@ httpRoute:
246246
port: 80
247247
```
248248

249+
### Probe Configuration
250+
251+
| Key | Type | Default | Description |
252+
|-----|------|---------|-------------|
253+
| probes.scheme | string | `"HTTP"` | Scheme for liveness/readiness probes (HTTP or HTTPS). Set to HTTPS when TLS is enabled at the backend. |
254+
| probes.livenessProbe.initialDelaySeconds | int | `0` | Initial delay before liveness probe starts |
255+
| probes.livenessProbe.periodSeconds | int | `10` | Period between liveness checks |
256+
| probes.livenessProbe.timeoutSeconds | int | `1` | Timeout for liveness probe |
257+
| probes.livenessProbe.successThreshold | int | `1` | Must be 1 for liveness probes (Kubernetes requirement) |
258+
| probes.livenessProbe.failureThreshold | int | `3` | Minimum consecutive failures |
259+
| probes.readinessProbe.initialDelaySeconds | int | `0` | Initial delay before readiness probe starts |
260+
| probes.readinessProbe.periodSeconds | int | `10` | Period between readiness checks |
261+
| probes.readinessProbe.timeoutSeconds | int | `1` | Timeout for readiness probe |
262+
| probes.readinessProbe.successThreshold | int | `1` | Minimum consecutive successes |
263+
| probes.readinessProbe.failureThreshold | int | `3` | Minimum consecutive failures |
264+
265+
When using TLS termination at the backend server, you must set `probes.scheme` to `HTTPS`:
266+
267+
```yaml
268+
config:
269+
tlsCertPath: "/headlamp-cert/tls.crt"
270+
tlsKeyPath: "/headlamp-cert/tls.key"
271+
272+
probes:
273+
scheme: HTTPS # Required when TLS is enabled at backend
274+
275+
volumes:
276+
- name: headlamp-cert
277+
secret:
278+
secretName: headlamp-tls
279+
280+
volumeMounts:
281+
- name: headlamp-cert
282+
mountPath: /headlamp-cert
283+
```
284+
249285
### Resource Management
250286

251287
| Key | Type | Default | Description |

charts/headlamp/templates/deployment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,22 @@ spec:
333333
httpGet:
334334
path: "{{ .Values.config.baseURL }}/"
335335
port: http
336+
scheme: {{ .Values.probes.scheme | default "HTTP" }}
337+
initialDelaySeconds: {{ .Values.probes.livenessProbe.initialDelaySeconds | default 0 }}
338+
periodSeconds: {{ .Values.probes.livenessProbe.periodSeconds | default 10 }}
339+
timeoutSeconds: {{ .Values.probes.livenessProbe.timeoutSeconds | default 1 }}
340+
successThreshold: 1
341+
failureThreshold: {{ .Values.probes.livenessProbe.failureThreshold | default 3 }}
336342
readinessProbe:
337343
httpGet:
338344
path: "{{ .Values.config.baseURL }}/"
339345
port: http
346+
scheme: {{ .Values.probes.scheme | default "HTTP" }}
347+
initialDelaySeconds: {{ .Values.probes.readinessProbe.initialDelaySeconds | default 0 }}
348+
periodSeconds: {{ .Values.probes.readinessProbe.periodSeconds | default 10 }}
349+
timeoutSeconds: {{ .Values.probes.readinessProbe.timeoutSeconds | default 1 }}
350+
successThreshold: {{ .Values.probes.readinessProbe.successThreshold | default 1 }}
351+
failureThreshold: {{ .Values.probes.readinessProbe.failureThreshold | default 3 }}
340352
resources:
341353
{{- toYaml .Values.resources | nindent 12 }}
342354
{{- if or .Values.pluginsManager.enabled .Values.volumeMounts }}

charts/headlamp/tests/expected_templates/azure-oidc-with-validators.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,21 @@ spec:
136136
httpGet:
137137
path: "/"
138138
port: http
139+
scheme: HTTP
140+
initialDelaySeconds: 0
141+
periodSeconds: 10
142+
timeoutSeconds: 1
143+
successThreshold: 1
144+
failureThreshold: 3
139145
readinessProbe:
140146
httpGet:
141147
path: "/"
142148
port: http
149+
scheme: HTTP
150+
initialDelaySeconds: 0
151+
periodSeconds: 10
152+
timeoutSeconds: 1
153+
successThreshold: 1
154+
failureThreshold: 3
143155
resources:
144156
{}

charts/headlamp/tests/expected_templates/default.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,21 @@ spec:
121121
httpGet:
122122
path: "/"
123123
port: http
124+
scheme: HTTP
125+
initialDelaySeconds: 0
126+
periodSeconds: 10
127+
timeoutSeconds: 1
128+
successThreshold: 1
129+
failureThreshold: 3
124130
readinessProbe:
125131
httpGet:
126132
path: "/"
127133
port: http
134+
scheme: HTTP
135+
initialDelaySeconds: 0
136+
periodSeconds: 10
137+
timeoutSeconds: 1
138+
successThreshold: 1
139+
failureThreshold: 3
128140
resources:
129141
{}

charts/headlamp/tests/expected_templates/extra-args.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,21 @@ spec:
122122
httpGet:
123123
path: "/"
124124
port: http
125+
scheme: HTTP
126+
initialDelaySeconds: 0
127+
periodSeconds: 10
128+
timeoutSeconds: 1
129+
successThreshold: 1
130+
failureThreshold: 3
125131
readinessProbe:
126132
httpGet:
127133
path: "/"
128134
port: http
135+
scheme: HTTP
136+
initialDelaySeconds: 0
137+
periodSeconds: 10
138+
timeoutSeconds: 1
139+
successThreshold: 1
140+
failureThreshold: 3
129141
resources:
130142
{}

charts/headlamp/tests/expected_templates/extra-manifests.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,21 @@ spec:
138138
httpGet:
139139
path: "/"
140140
port: http
141+
scheme: HTTP
142+
initialDelaySeconds: 0
143+
periodSeconds: 10
144+
timeoutSeconds: 1
145+
successThreshold: 1
146+
failureThreshold: 3
141147
readinessProbe:
142148
httpGet:
143149
path: "/"
144150
port: http
151+
scheme: HTTP
152+
initialDelaySeconds: 0
153+
periodSeconds: 10
154+
timeoutSeconds: 1
155+
successThreshold: 1
156+
failureThreshold: 3
145157
resources:
146158
{}

charts/headlamp/tests/expected_templates/host-users-override.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,21 @@ spec:
121121
httpGet:
122122
path: "/"
123123
port: http
124+
scheme: HTTP
125+
initialDelaySeconds: 0
126+
periodSeconds: 10
127+
timeoutSeconds: 1
128+
successThreshold: 1
129+
failureThreshold: 3
124130
readinessProbe:
125131
httpGet:
126132
path: "/"
127133
port: http
134+
scheme: HTTP
135+
initialDelaySeconds: 0
136+
periodSeconds: 10
137+
timeoutSeconds: 1
138+
successThreshold: 1
139+
failureThreshold: 3
128140
resources:
129141
{}

charts/headlamp/tests/expected_templates/httproute-enabled.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,22 @@ spec:
121121
httpGet:
122122
path: "/"
123123
port: http
124+
scheme: HTTP
125+
initialDelaySeconds: 0
126+
periodSeconds: 10
127+
timeoutSeconds: 1
128+
successThreshold: 1
129+
failureThreshold: 3
124130
readinessProbe:
125131
httpGet:
126132
path: "/"
127133
port: http
134+
scheme: HTTP
135+
initialDelaySeconds: 0
136+
periodSeconds: 10
137+
timeoutSeconds: 1
138+
successThreshold: 1
139+
failureThreshold: 3
128140
resources:
129141
{}
130142
---

charts/headlamp/tests/expected_templates/me-user-info-url-directly.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,21 @@ spec:
124124
httpGet:
125125
path: "/"
126126
port: http
127+
scheme: HTTP
128+
initialDelaySeconds: 0
129+
periodSeconds: 10
130+
timeoutSeconds: 1
131+
successThreshold: 1
132+
failureThreshold: 3
127133
readinessProbe:
128134
httpGet:
129135
path: "/"
130136
port: http
137+
scheme: HTTP
138+
initialDelaySeconds: 0
139+
periodSeconds: 10
140+
timeoutSeconds: 1
141+
successThreshold: 1
142+
failureThreshold: 3
131143
resources:
132144
{}

charts/headlamp/tests/expected_templates/me-user-info-url.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,21 @@ spec:
128128
httpGet:
129129
path: "/"
130130
port: http
131+
scheme: HTTP
132+
initialDelaySeconds: 0
133+
periodSeconds: 10
134+
timeoutSeconds: 1
135+
successThreshold: 1
136+
failureThreshold: 3
131137
readinessProbe:
132138
httpGet:
133139
path: "/"
134140
port: http
141+
scheme: HTTP
142+
initialDelaySeconds: 0
143+
periodSeconds: 10
144+
timeoutSeconds: 1
145+
successThreshold: 1
146+
failureThreshold: 3
135147
resources:
136148
{}

0 commit comments

Comments
 (0)