From 4ff7e6ac25fa7a8cb00bd4e3018f6a05d5b3d9d9 Mon Sep 17 00:00:00 2001 From: ihiverlet Date: Fri, 17 Oct 2025 14:17:19 +0000 Subject: [PATCH 1/3] unify ingresses --- charts/library-chart/Chart.yaml | 2 +- charts/library-chart/templates/_common.tpl | 6 +++--- charts/library-chart/templates/_ingress.tpl | 8 ++++---- charts/library-chart/templates/_route.tpl | 6 +++--- charts/library-chart/templates/_service.tpl | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/library-chart/Chart.yaml b/charts/library-chart/Chart.yaml index c23e3bd2..9f725e8d 100644 --- a/charts/library-chart/Chart.yaml +++ b/charts/library-chart/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: library-chart -version: 1.7.14 +version: 1.8.0 type: library diff --git a/charts/library-chart/templates/_common.tpl b/charts/library-chart/templates/_common.tpl index c8c07ef3..caad31a9 100644 --- a/charts/library-chart/templates/_common.tpl +++ b/charts/library-chart/templates/_common.tpl @@ -20,11 +20,11 @@ Return the URL at which the service can be accessed */}} {{- define "library-chart.sparkui-url" -}} - {{- if (.Values.spark).sparkui -}} + {{- if (.Values.spark).ui -}} {{- if (.Values.ingress).enabled -}} - {{- printf "%s://%s" (.Values.ingress.tls | ternary "https" "http") .Values.ingress.sparkHostname -}} + {{- printf "%s://%s" (.Values.ingress.tls | ternary "https" "http") .Values.spark.hostname -}} {{- else if (.Values.route).enabled -}} - {{- printf "https://%s" .Values.route.sparkHostname -}} + {{- printf "https://%s" .Values.spark.hostname -}} {{- end -}} {{- end -}} {{- end -}} diff --git a/charts/library-chart/templates/_ingress.tpl b/charts/library-chart/templates/_ingress.tpl index c6fdccb6..d93cb800 100644 --- a/charts/library-chart/templates/_ingress.tpl +++ b/charts/library-chart/templates/_ingress.tpl @@ -145,7 +145,7 @@ spec: {{/* Template to generate an Ingress for the Spark UI */}} {{- define "library-chart.ingressSpark" -}} -{{- if and (.Values.ingress).enabled (.Values.spark).sparkui -}} +{{- if and (.Values.ingress).enabled (.Values.spark).ui -}} {{- $fullName := include "library-chart.fullname" . -}} {{- $svcPort := .Values.networking.sparkui.port -}} apiVersion: networking.k8s.io/v1 @@ -163,7 +163,7 @@ spec: {{- if .Values.ingress.tls }} tls: - hosts: - - {{ .Values.ingress.sparkHostname | quote }} + - {{ .Values.spark.hostname | quote }} {{ if and .Values.ingress.useTlsSecret (ne .Values.ingress.tlsSecretName "") }} secretName: {{ .Values.ingress.tlsSecretName }} {{ else if or .Values.ingress.useCertManager .Values.ingress.useTlsSecret }} @@ -171,10 +171,10 @@ spec: {{- end }} {{- end }} rules: - - host: {{ .Values.ingress.sparkHostname | quote }} + - host: {{ .Values.spark.hostname | quote }} http: paths: - - path: {{ .Values.ingress.sparkPath | default "/" }} + - path: {{ .Values.spark.path | default "/" }} pathType: Prefix backend: service: diff --git a/charts/library-chart/templates/_route.tpl b/charts/library-chart/templates/_route.tpl index 9aaf80f7..bf55c4e1 100644 --- a/charts/library-chart/templates/_route.tpl +++ b/charts/library-chart/templates/_route.tpl @@ -117,7 +117,7 @@ spec: {{/* Template to generate a Route for the Spark UI */}} {{- define "library-chart.routeSpark" -}} {{- if .Values.route.enabled -}} -{{- if .Values.spark.sparkui -}} +{{- if .Values.spark.ui -}} {{- $fullName := include "library-chart.fullname" . -}} {{- $svcPort := .Values.networking.sparkui.port -}} apiVersion: route.openshift.io/v1 @@ -129,8 +129,8 @@ metadata: annotations: {{- include "library-chart.route.annotations" . | nindent 4 }} spec: - host: {{ .Values.route.sparkHostname | quote }} - path: {{ .Values.route.sparkPath | default "/" }} + host: {{ .Values.spark.hostname | quote }} + path: {{ .Values.spark.path | default "/" }} to: kind: Service name: {{ $fullName }} diff --git a/charts/library-chart/templates/_service.tpl b/charts/library-chart/templates/_service.tpl index a0603ef0..09e7d09a 100644 --- a/charts/library-chart/templates/_service.tpl +++ b/charts/library-chart/templates/_service.tpl @@ -30,7 +30,7 @@ spec: name: {{ printf "user-%d" (int $userPort) | quote }} {{- end }} {{ if .Values.spark }} - {{ if .Values.spark.sparkui }} + {{ if .Values.spark.ui }} {{ if .Values.networking.sparkui }} - port: {{ .Values.networking.sparkui.port }} targetPort: {{ .Values.networking.sparkui.port }} From 6a2959e1cb88750ded9fcd3c6637d8e89f639c06 Mon Sep 17 00:00:00 2001 From: ihiverlet Date: Fri, 17 Oct 2025 14:25:00 +0000 Subject: [PATCH 2/3] modify notes --- charts/library-chart/templates/_notes.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/library-chart/templates/_notes.tpl b/charts/library-chart/templates/_notes.tpl index da134628..0071144a 100644 --- a/charts/library-chart/templates/_notes.tpl +++ b/charts/library-chart/templates/_notes.tpl @@ -67,7 +67,7 @@ and then use the following URL with your browser: `http://localhost: Generate NOTES about connection to the Spark UI (if enabled). */}} {{- define "library-chart.notes-sparkui" -}} -{{- if (.Values.spark).sparkui -}} +{{- if (.Values.spark).ui -}} {{- if eq .Values.userPreferences.language "fr" -}} {{- if or (.Values.ingress).enabled (.Values.route).enabled -}} - Lorsque le driver Spark est en cours d'exécution, vous pouvez vous connecter à l'interface Spark depuis votre navigateur en utilisant [ce lien]({{ include "library-chart.sparkui-url" . }}). From 296d09314573cf12b77f88318e9854912921f353 Mon Sep 17 00:00:00 2001 From: ihiverlet Date: Mon, 20 Oct 2025 12:42:50 +0000 Subject: [PATCH 3/3] unify ingress --- charts/jupyter-pyspark/Chart.yaml | 4 +-- charts/jupyter-pyspark/values.schema.json | 31 ++++++++--------------- charts/jupyter-pyspark/values.yaml | 7 +++-- charts/rstudio-sparkr/Chart.yaml | 4 +-- charts/rstudio-sparkr/values.schema.json | 22 ++++++++-------- charts/rstudio-sparkr/values.yaml | 6 ++--- charts/vscode-pyspark/Chart.yaml | 4 +-- charts/vscode-pyspark/values.schema.json | 31 ++++++++--------------- charts/vscode-pyspark/values.yaml | 6 ++--- 9 files changed, 48 insertions(+), 67 deletions(-) diff --git a/charts/jupyter-pyspark/Chart.yaml b/charts/jupyter-pyspark/Chart.yaml index 54481c9d..cbca3f5f 100644 --- a/charts/jupyter-pyspark/Chart.yaml +++ b/charts/jupyter-pyspark/Chart.yaml @@ -24,8 +24,8 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.3.25 +version: 3.0.0 dependencies: - name: library-chart - version: 1.7.14 + version: 2.0.0 repository: https://inseefrlab.github.io/helm-charts-interactive-services diff --git a/charts/jupyter-pyspark/values.schema.json b/charts/jupyter-pyspark/values.schema.json index b2ce3948..05b9e43f 100644 --- a/charts/jupyter-pyspark/values.schema.json +++ b/charts/jupyter-pyspark/values.schema.json @@ -69,11 +69,20 @@ "overwriteSchemaWith": "spark.json" }, "properties": { - "sparkui": { + "ui": { "title": "Enable monitoring interface", "type": "boolean", "default": true }, + "hostname": { + "type": "string", + "form": true, + "title": "Hostname", + "x-onyxia": { + "hidden": true, + "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-spark.{{k8s.domain}}" + } + }, "default": { "title": "Create a Spark configuration", "type": "boolean", @@ -755,7 +764,7 @@ "type": "object", "form": true, "x-onyxia": { - "overwriteSchemaWith": "ide/ingress-spark.json" + "overwriteSchemaWith": "ide/ingress.json" }, "properties": { "enabled": { @@ -776,15 +785,6 @@ "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-0.{{k8s.domain}}" } }, - "sparkHostname": { - "type": "string", - "form": true, - "title": "Hostname", - "x-onyxia": { - "hidden": true, - "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-spark.{{k8s.domain}}" - } - }, "userHostname": { "type": "string", "form": true, @@ -863,15 +863,6 @@ "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-0.{{k8s.domain}}" } }, - "sparkHostname": { - "type": "string", - "form": true, - "title": "Hostname", - "x-onyxia": { - "hidden": true, - "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-spark.{{k8s.domain}}" - } - }, "userHostname": { "type": "string", "form": true, diff --git a/charts/jupyter-pyspark/values.yaml b/charts/jupyter-pyspark/values.yaml index b1d2851f..964eee8d 100644 --- a/charts/jupyter-pyspark/values.yaml +++ b/charts/jupyter-pyspark/values.yaml @@ -14,7 +14,9 @@ service: version: "inseefrlab/onyxia-jupyter-pyspark:py3.13.8-spark3.5.7" spark: - sparkui: false + ui: false + hostname: chart-example-spark.local + path: / secretName: "" default: true disabledCertChecking: false @@ -198,10 +200,8 @@ ingress: # kubernetes.io/tls-acme: "true" hostname: chart-example.local userHostname: chart-example-user.local - sparkHostname: chart-example-spark.local path: / userPath: / - sparkPath: / # - secretName: chart-example-tls # hosts: # - chart-example.local @@ -216,7 +216,6 @@ route: # route.openshift.io/termination: "reencrypt" hostname: chart-example.local userHostname: chart-example-user.local - sparkHostname: chart-example-spark.local tls: termination: edge # key: diff --git a/charts/rstudio-sparkr/Chart.yaml b/charts/rstudio-sparkr/Chart.yaml index b3952e6b..9ec21d2b 100644 --- a/charts/rstudio-sparkr/Chart.yaml +++ b/charts/rstudio-sparkr/Chart.yaml @@ -23,8 +23,8 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.3.16 +version: 3.0.0 dependencies: - name: library-chart - version: 1.7.14 + version: 2.0.0 repository: https://inseefrlab.github.io/helm-charts-interactive-services diff --git a/charts/rstudio-sparkr/values.schema.json b/charts/rstudio-sparkr/values.schema.json index e9849ffd..829aaed9 100644 --- a/charts/rstudio-sparkr/values.schema.json +++ b/charts/rstudio-sparkr/values.schema.json @@ -69,11 +69,20 @@ "overwriteSchemaWith": "spark.json" }, "properties": { - "sparkui": { + "ui": { "title": "Enable monitoring interface", "type": "boolean", "default": true }, + "hostname": { + "type": "string", + "form": true, + "title": "Hostname", + "x-onyxia": { + "hidden": true, + "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-spark.{{k8s.domain}}" + } + }, "default": { "title": "Create a Spark configuration", "type": "boolean", @@ -713,7 +722,7 @@ "type": "object", "form": true, "x-onyxia": { - "overwriteSchemaWith": "ide/ingress-spark.json" + "overwriteSchemaWith": "ide/ingress.json" }, "properties": { "enabled": { @@ -734,15 +743,6 @@ "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-0.{{k8s.domain}}" } }, - "sparkHostname": { - "type": "string", - "form": true, - "title": "Hostname", - "x-onyxia": { - "hidden": true, - "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-spark.{{k8s.domain}}" - } - }, "userHostname": { "type": "string", "form": true, diff --git a/charts/rstudio-sparkr/values.yaml b/charts/rstudio-sparkr/values.yaml index a5a4c720..e0a26cca 100644 --- a/charts/rstudio-sparkr/values.yaml +++ b/charts/rstudio-sparkr/values.yaml @@ -14,7 +14,9 @@ service: version: "inseefrlab/onyxia-rstudio-sparkr:r4.5.1-spark3.5.7" spark: - sparkui: false + ui: false + hostname: chart-example-spark.local + path: / secretName: "" default: true disabledCertChecking: false @@ -175,10 +177,8 @@ ingress: # kubernetes.io/tls-acme: "true" hostname: chart-example.local userHostname: chart-example-user.local - sparkHostname: chart-example-spark.local path: / userPath: / - sparkPath: / # - secretName: chart-example-tls # hosts: # - chart-example.local diff --git a/charts/vscode-pyspark/Chart.yaml b/charts/vscode-pyspark/Chart.yaml index 74e64566..0b3979ea 100644 --- a/charts/vscode-pyspark/Chart.yaml +++ b/charts/vscode-pyspark/Chart.yaml @@ -24,8 +24,8 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.3.22 +version: 3.0.0 dependencies: - name: library-chart - version: 1.7.14 + version: 2.0.0 repository: https://inseefrlab.github.io/helm-charts-interactive-services diff --git a/charts/vscode-pyspark/values.schema.json b/charts/vscode-pyspark/values.schema.json index ebe0e742..816d25e7 100644 --- a/charts/vscode-pyspark/values.schema.json +++ b/charts/vscode-pyspark/values.schema.json @@ -69,11 +69,20 @@ "overwriteSchemaWith": "spark.json" }, "properties": { - "sparkui": { + "ui": { "title": "Enable monitoring interface", "type": "boolean", "default": true }, + "hostname": { + "type": "string", + "form": true, + "title": "Hostname", + "x-onyxia": { + "hidden": true, + "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-spark.{{k8s.domain}}" + } + }, "default": { "title": "Create a Spark configuration", "type": "boolean", @@ -738,7 +747,7 @@ "type": "object", "form": true, "x-onyxia": { - "overwriteSchemaWith": "ide/ingress-spark.json" + "overwriteSchemaWith": "ide/ingress.json" }, "properties": { "enabled": { @@ -759,15 +768,6 @@ "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-0.{{k8s.domain}}" } }, - "sparkHostname": { - "type": "string", - "form": true, - "title": "Hostname", - "x-onyxia": { - "hidden": true, - "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-spark.{{k8s.domain}}" - } - }, "userHostname": { "type": "string", "form": true, @@ -846,15 +846,6 @@ "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-0.{{k8s.domain}}" } }, - "sparkHostname": { - "type": "string", - "form": true, - "title": "Hostname", - "x-onyxia": { - "hidden": true, - "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-spark.{{k8s.domain}}" - } - }, "userHostname": { "type": "string", "form": true, diff --git a/charts/vscode-pyspark/values.yaml b/charts/vscode-pyspark/values.yaml index 1d683c88..f24ba6b8 100644 --- a/charts/vscode-pyspark/values.yaml +++ b/charts/vscode-pyspark/values.yaml @@ -14,7 +14,9 @@ service: version: "inseefrlab/onyxia-vscode-pyspark:py3.13.8-spark3.5.7" spark: - sparkui: false + ui: false + hostname: chart-example-spark.local + path: / secretName: "" default: true disabledCertChecking: false @@ -198,10 +200,8 @@ ingress: # kubernetes.io/tls-acme: "true" hostname: chart-example.local userHostname: chart-example-user.local - sparkHostname: chart-example-spark.local path: / userPath: / - sparkPath: / # - secretName: chart-example-tls # hosts: # - chart-example.local