Skip to content

Commit

Permalink
Add additional host option
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Jan 27, 2024
1 parent 9ad644e commit f246788
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/operator-wandb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions charts/operator-wandb/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,22 @@ 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 }}
tls: {{ toYaml .Values.ingress.tls | nindent 4 }}
{{- end }}

rules:
- host: {{ replace "https://" "" (replace "http://" "" .Values.global.host) }}
{{- range append .Values.ingress.additionalHosts (list $defaultHost) }}
- host: {{ . }}
http:
paths:
- pathType: Prefix
Expand All @@ -96,3 +98,4 @@ spec:
name: {{ .Release.Name }}-console
port:
number: 8082
{{- end }}
1 change: 1 addition & 0 deletions charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ ingress:
annotations: {}
labels: {}
tls: []
additionalHosts: []
class: ""
issuer:
create: false
Expand Down

0 comments on commit f246788

Please sign in to comment.