Skip to content

Commit f80f803

Browse files
committed
fix(nebariapp): render auth and landingPage blocks via toYaml passthrough
templates/nebariapp.yaml hand-rendered the auth block field-by-field, covering only 5 of the 14 fields the NebariApp.spec.auth CRD defines. The other 9 (enforceAtGateway, clientSecretRef, denyRedirect, deviceFlowClient, groups, issuerURL, keycloakConfig, spaClient, tokenExchange) were silently dropped if a user tried to set them via values, forcing post-hoc kubectl patches to communicate fields the chart didn't expose. The landingPage block had the same shape: every sub-field hand-rendered, so any CRD addition would be silently dropped until the template caught up. Switch both blocks to `toYaml | nindent 4` passthrough, matching what the neighboring `routing` block already does. Every CRD field is now addressable from values.yaml. The JupyterHub-specific defaults (enabled: true, redirectURI: /hub/oauth_callback, enforceAtGateway: false, forwardAccessToken: false, the standard scopes set, landingPage defaults, healthCheck config) all live in values.yaml already, so the default chain is unchanged for users who don't override. Verified with `helm template`: rendered NebariApp.spec matches the previous output field-for-field; only field ordering differs because toYaml emits sorted keys. Fixes #57.
1 parent 748bdd5 commit f80f803

1 file changed

Lines changed: 2 additions & 50 deletions

File tree

‎templates/nebariapp.yaml‎

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -17,58 +17,10 @@ spec:
1717
{{- end }}
1818
{{- with .Values.nebariapp.auth }}
1919
auth:
20-
enabled: {{ .enabled | default true }}
21-
provider: {{ .provider | default "keycloak" }}
22-
provisionClient: {{ .provisionClient | default true }}
23-
redirectURI: {{ .redirectURI | default "/oauth2/callback" }}
24-
{{- with .scopes }}
25-
scopes:
26-
{{- toYaml . | nindent 6 }}
27-
{{- end }}
28-
{{- if hasKey . "enforceAtGateway" }}
29-
enforceAtGateway: {{ .enforceAtGateway }}
30-
{{- end }}
31-
{{- if hasKey . "forwardAccessToken" }}
32-
forwardAccessToken: {{ .forwardAccessToken }}
33-
{{- end }}
34-
{{- with .tokenExchange }}
35-
tokenExchange:
36-
{{- toYaml . | nindent 6 }}
37-
{{- end }}
20+
{{- toYaml . | nindent 4 }}
3821
{{- end }}
3922
{{- with .Values.nebariapp.landingPage }}
4023
landingPage:
41-
enabled: {{ .enabled | default false }}
42-
{{- with .displayName }}
43-
displayName: {{ . | quote }}
44-
{{- end }}
45-
{{- with .description }}
46-
description: {{ . | quote }}
47-
{{- end }}
48-
{{- with .icon }}
49-
icon: {{ . | quote }}
50-
{{- end }}
51-
{{- with .category }}
52-
category: {{ . | quote }}
53-
{{- end }}
54-
{{- with .priority }}
55-
priority: {{ . }}
56-
{{- end }}
57-
{{- with .externalUrl }}
58-
externalUrl: {{ . | quote }}
59-
{{- end }}
60-
{{- with .healthCheck }}
61-
healthCheck:
62-
enabled: {{ .enabled | default false }}
63-
{{- with .path }}
64-
path: {{ . | quote }}
65-
{{- end }}
66-
{{- with .intervalSeconds }}
67-
intervalSeconds: {{ . }}
68-
{{- end }}
69-
{{- with .timeoutSeconds }}
70-
timeoutSeconds: {{ . }}
71-
{{- end }}
72-
{{- end }}
24+
{{- toYaml . | nindent 4 }}
7325
{{- end }}
7426
{{- end }}

0 commit comments

Comments
 (0)