From 83f1a81ac7b15d83f69b65bd5c8172c352a7071f Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Thu, 2 Jul 2026 14:46:22 +0200 Subject: [PATCH] depend on nebari-app chart --- helm/nebari-chat/Chart.lock | 7 +- helm/nebari-chat/Chart.yaml | 8 +- helm/nebari-chat/templates/_helpers.tpl | 120 ++---------------- .../templates/nebariapp-backend.yaml | 12 -- .../templates/nebariapp-frontend.yaml | 12 -- .../templates/nebariapp-namespace.yaml | 8 -- helm/nebari-chat/templates/nebariapp.yaml | 34 +++++ helm/nebari-chat/values.schema.json | 12 +- helm/nebari-chat/values.yaml | 4 +- 9 files changed, 62 insertions(+), 155 deletions(-) delete mode 100644 helm/nebari-chat/templates/nebariapp-backend.yaml delete mode 100644 helm/nebari-chat/templates/nebariapp-frontend.yaml delete mode 100644 helm/nebari-chat/templates/nebariapp-namespace.yaml create mode 100644 helm/nebari-chat/templates/nebariapp.yaml diff --git a/helm/nebari-chat/Chart.lock b/helm/nebari-chat/Chart.lock index 6c2d3ba..f8a6ee6 100644 --- a/helm/nebari-chat/Chart.lock +++ b/helm/nebari-chat/Chart.lock @@ -2,5 +2,8 @@ dependencies: - name: ravnar repository: oci://quay.io/nebari/charts version: 0.0.10 -digest: sha256:16e9b54afd12cde72ab68e652f10a7e2e87b3bc9f59e7f7f03676e2761607301 -generated: "2026-06-17T09:00:17.172822057+02:00" +- name: nebari-app + repository: file://../../../nebari-operator/charts/nebari-app + version: 0.1.0 +digest: sha256:0610b6475dddc0e46eac759504f05beb275db5dc9f41f4ff62179b6893420fa6 +generated: "2026-07-02T14:49:59.075241316+02:00" diff --git a/helm/nebari-chat/Chart.yaml b/helm/nebari-chat/Chart.yaml index 3e069d5..c557e69 100644 --- a/helm/nebari-chat/Chart.yaml +++ b/helm/nebari-chat/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: nebari-chat type: application description: chat pack for nebari -version: "set-by-cd" -appVersion: "set-by-cd" +version: "0.0.0" +appVersion: "0.0.0" keywords: - nebari home: https://github.com/nebari-dev/nebari-chat-pack @@ -17,3 +17,7 @@ dependencies: - name: ravnar repository: oci://quay.io/nebari/charts version: "0.0.10" + - name: nebari-app + repository: file://../../../nebari-operator/charts/nebari-app + # repository: oci://quay.io/nebari/charts + version: "0.1.0" diff --git a/helm/nebari-chat/templates/_helpers.tpl b/helm/nebari-chat/templates/_helpers.tpl index bb1ec10..535dc92 100644 --- a/helm/nebari-chat/templates/_helpers.tpl +++ b/helm/nebari-chat/templates/_helpers.tpl @@ -2,119 +2,17 @@ NebariApp helper template. Expects a dict with keys: top, component, service, nebariapp */}} -{{- define "nebari-chat.nebariapp" -}} +{{- define "nebari-chat.nebariApp" -}} {{- $top := .top -}} {{- $component := .component -}} -{{- $service := .service -}} -{{- $nebariapp := .nebariapp -}} -apiVersion: reconcilers.nebari.dev/v1 -kind: NebariApp -metadata: - name: {{ include "ravnar.component-name" (dict "top" $top "component" $component) }} - namespace: {{ $top.Release.Namespace }} - labels: - {{- include "ravnar.labels" (dict "top" $top "component" $component) | nindent 4 }} -spec: - hostname: {{ required (printf "%s.nebariapp.hostname is required" $component) $nebariapp.hostname }} - service: - name: {{ $service.name }} - port: {{ $service.port }} - {{- with $service.namespace }} - namespace: {{ . }} - {{- end }} - {{- with $nebariapp.serviceAccountName }} - serviceAccountName: {{ . }} - {{- end }} - {{- with $nebariapp.routing }} - routing: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with $nebariapp.auth }} - auth: - enabled: {{ .enabled }} - provider: {{ .provider }} - provisionClient: {{ .provisionClient }} - enforceAtGateway: {{ .enforceAtGateway }} - redirectURI: {{ .redirectURI }} - {{- with .clientSecretRef }} - clientSecretRef: {{ . }} - {{- end }} - {{- with .scopes }} - scopes: - {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .groups }} - groups: - {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .forwardAccessToken }} - forwardAccessToken: {{ . }} - {{- end }} - {{- with .denyRedirect }} - denyRedirect: - {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .issuerURL }} - issuerURL: {{ . }} - {{- end }} - {{- with .spaClient }} - spaClient: - {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .deviceFlowClient }} - deviceFlowClient: - {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .keycloakConfig }} - keycloakConfig: - {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .tokenExchange }} - tokenExchange: - {{- toYaml . | nindent 6 }} - {{- end }} - {{- end }} - {{- with $nebariapp.gateway }} - gateway: {{ . }} - {{- end }} - {{- with .nebariapp.landingPage }} - landingPage: - enabled: {{ .enabled | default false }} - {{- with .displayName }} - displayName: {{ . | quote }} - {{- end }} - {{- with .description }} - description: {{ . | quote }} - {{- end }} - {{- with .icon }} - icon: {{ . | quote }} - {{- end }} - {{- with .category }} - category: {{ . | quote }} - {{- end }} - {{- if kindIs "float64" .priority }} - priority: {{ .priority }} - {{- end }} - {{- with .externalUrl }} - externalUrl: {{ . | quote }} - {{- end }} - {{- with .healthCheck }} - healthCheck: - enabled: {{ .enabled | default false }} - {{- with .path }} - path: {{ . | quote }} - {{- end }} - {{- if .intervalSeconds }} - intervalSeconds: {{ .intervalSeconds }} - {{- end }} - {{- if .timeoutSeconds }} - timeoutSeconds: {{ .timeoutSeconds }} - {{- end }} - {{- if .port }} - port: {{ .port }} - {{- end }} - {{- end }} - {{- end }} +{{- include "nebari-app.nebariApp" (dict + "metadata" (dict + "name" (include "ravnar.component-name" (dict "top" $top "component" $component)) + "namespace" $top.Release.Namespace + "labels" (include "ravnar.labels" (dict "top" $top "component" $component) | fromYaml) + ) + "spec" .spec +) -}} {{- end -}} {{/* diff --git a/helm/nebari-chat/templates/nebariapp-backend.yaml b/helm/nebari-chat/templates/nebariapp-backend.yaml deleted file mode 100644 index 5e86a34..0000000 --- a/helm/nebari-chat/templates/nebariapp-backend.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- $component := "backend" }} -{{- with include "nebari-chat.ravnarContextJson" . | fromJson }} -{{- include "nebari-chat.nebariapp" (dict - "top" $ - "component" $component - "service" (dict - "name" (include "ravnar.fullname" .) - "port" .Values.service.port - ) - "nebariapp" $.Values.backend.nebariapp -) }} -{{- end }} diff --git a/helm/nebari-chat/templates/nebariapp-frontend.yaml b/helm/nebari-chat/templates/nebariapp-frontend.yaml deleted file mode 100644 index 12e6ae0..0000000 --- a/helm/nebari-chat/templates/nebariapp-frontend.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.frontend.enabled }} -{{- $component := "frontend" }} -{{- include "nebari-chat.nebariapp" (dict - "top" . - "component" $component - "service" (dict - "name" (include "ravnar.component-name" (dict "top" . "component" $component)) - "port" .Values.frontend.service.port - ) - "nebariapp" .Values.frontend.nebariapp -) }} -{{- end }} diff --git a/helm/nebari-chat/templates/nebariapp-namespace.yaml b/helm/nebari-chat/templates/nebariapp-namespace.yaml deleted file mode 100644 index e6090cf..0000000 --- a/helm/nebari-chat/templates/nebariapp-namespace.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- $component := "nebariapp" }} -apiVersion: v1 -kind: Namespace -metadata: - name: {{ .Release.Namespace }} - labels: - nebari.dev/managed: "true" - {{- include "ravnar.labels" (dict "top" . "component" $component) | nindent 4 }} diff --git a/helm/nebari-chat/templates/nebariapp.yaml b/helm/nebari-chat/templates/nebariapp.yaml new file mode 100644 index 0000000..4d98667 --- /dev/null +++ b/helm/nebari-chat/templates/nebariapp.yaml @@ -0,0 +1,34 @@ +{{- $component := "nebariapp" }} +apiVersion: v1 +kind: Namespace +metadata: + name: {{ .Release.Namespace }} + labels: + nebari.dev/managed: "true" + {{- include "ravnar.labels" (dict "top" . "component" $component) | nindent 4 }} +--- +{{- $component := "backend" }} +{{- with include "nebari-chat.ravnarContextJson" . | fromJson }} +{{- include "nebari-chat.nebariApp" (dict + "top" $ + "component" $component + "spec" (mergeOverwrite (dict + "service" (dict + "name" (include "ravnar.fullname" .) + "port" .Values.service.port + ) + ) $.Values.backend.nebariApp) +) }} +{{- end }} +--- +{{- $component := "frontend" }} +{{- include "nebari-chat.nebariApp" (dict + "top" $ + "component" $component + "spec" (mergeOverwrite (dict + "service" (dict + "name" (include "ravnar.component-name" (dict "top" . "component" $component)) + "port" .Values.frontend.service.port + ) + ) .Values.frontend.nebariApp) +) }} diff --git a/helm/nebari-chat/values.schema.json b/helm/nebari-chat/values.schema.json index 3cc24e1..3bef719 100644 --- a/helm/nebari-chat/values.schema.json +++ b/helm/nebari-chat/values.schema.json @@ -70,11 +70,11 @@ "backend": { "type": "object", "properties": { - "nebariapp": { - "$ref": "#/definitions/nebariapp" + "nebariApp": { + "$ref": "#/definitions/nebariApp" } }, - "required": ["nebariapp"] + "required": ["nebariApp"] }, "frontend": { "type": "object", @@ -185,14 +185,14 @@ } } }, - "nebariapp": { - "$ref": "#/definitions/nebariapp" + "nebariApp": { + "$ref": "#/definitions/nebariApp" } } } }, "definitions": { - "nebariapp": { + "nebariApp": { "type": "object", "properties": { "hostname": { diff --git a/helm/nebari-chat/values.yaml b/helm/nebari-chat/values.yaml index 7b98bc7..44505d4 100644 --- a/helm/nebari-chat/values.yaml +++ b/helm/nebari-chat/values.yaml @@ -30,7 +30,7 @@ ravnar: enabled: false backend: - nebariapp: + nebariApp: # -- The hostname for the backend NebariApp hostname: "" # -- Routing configuration for the backend NebariApp @@ -107,7 +107,7 @@ frontend: # -- The URL of the backend API. Auto-detected if not set url: "" - nebariapp: + nebariApp: # -- The hostname for the frontend NebariApp hostname: "" # -- Authentication configuration for the frontend NebariApp