From 6e3b46059f95619a91370a6b4255b50141167d82 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Thu, 7 May 2020 19:34:02 +0200 Subject: [PATCH] netbox: Fix ingress values to be more correct --- charts/netbox/templates/ingress.yaml | 4 ++++ charts/netbox/values.yaml | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/charts/netbox/templates/ingress.yaml b/charts/netbox/templates/ingress.yaml index 3fc9d94..e55ee51 100644 --- a/charts/netbox/templates/ingress.yaml +++ b/charts/netbox/templates/ingress.yaml @@ -29,6 +29,9 @@ spec: {{- end }} {{- end }} rules: + {{- if .Values.ingress.rules }} + {{ toYaml .Values.ingress.rules | nindent 4 }} + {{- else }} - host: {{ .Values.ingress.host | quote }} http: paths: @@ -36,4 +39,5 @@ spec: backend: serviceName: {{ $fullName }} servicePort: http + {{- end }} {{- end }} diff --git a/charts/netbox/values.yaml b/charts/netbox/values.yaml index 330ce4b..0d07c25 100644 --- a/charts/netbox/values.yaml +++ b/charts/netbox/values.yaml @@ -22,9 +22,15 @@ ingress: annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] + host: chart-example.local + # Can also be specified by entering rules directly; + # rules: + # - host: chart-example.local + # paths: + # - path: / + # backend: + # serviceName: netbox-example + # servicePort: http tls: [] # - secretName: chart-example-tls