From f2467888eb7144ca82d68ad658f07e88b15314c7 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Sat, 27 Jan 2024 00:52:01 -0500 Subject: [PATCH] Add additional host option --- charts/operator-wandb/Chart.yaml | 2 +- charts/operator-wandb/templates/ingress.yaml | 7 +++++-- charts/operator-wandb/values.yaml | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/operator-wandb/Chart.yaml b/charts/operator-wandb/Chart.yaml index 571c65c6..ba615d87 100644 --- a/charts/operator-wandb/Chart.yaml +++ b/charts/operator-wandb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: operator-wandb description: A Helm chart for deploying W&B to Kubernetes type: application -version: 0.10.36 +version: 0.10.37 appVersion: 1.0.0 icon: https://wandb.ai/logo.svg diff --git a/charts/operator-wandb/templates/ingress.yaml b/charts/operator-wandb/templates/ingress.yaml index a46e60d5..7cbbd64f 100644 --- a/charts/operator-wandb/templates/ingress.yaml +++ b/charts/operator-wandb/templates/ingress.yaml @@ -60,12 +60,13 @@ metadata: {{- toYaml .Values.ingress.annotations | nindent 4 }} {{- end }} spec: + {{- $defaultHost := replace "https://" "" (replace "http://" "" .Values.global.host) }} ingressClassName: {{ .Values.ingress.class }} {{- if .Values.ingress.issuer.create }} {{- if ne .Values.ingress.issuer.provider "google" }} tls: - - host: [{{ replace "https://" "" (replace "http://" "" .Values.global.host) }}] + - host: [{{ $defaultHost }}] secretName: {{ .Release.Name }}-tls {{- end }} {{- else }} @@ -73,7 +74,8 @@ spec: {{- end }} rules: - - host: {{ replace "https://" "" (replace "http://" "" .Values.global.host) }} + {{- range append .Values.ingress.additionalHosts (list $defaultHost) }} + - host: {{ . }} http: paths: - pathType: Prefix @@ -96,3 +98,4 @@ spec: name: {{ .Release.Name }}-console port: number: 8082 + {{- end }} diff --git a/charts/operator-wandb/values.yaml b/charts/operator-wandb/values.yaml index d156a85c..2ed408da 100644 --- a/charts/operator-wandb/values.yaml +++ b/charts/operator-wandb/values.yaml @@ -79,6 +79,7 @@ ingress: annotations: {} labels: {} tls: [] + additionalHosts: [] class: "" issuer: create: false