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