Ingress optional hostname (#54)

Fixes #50 

### Motivation
The host option is not required to setup an ingress, so I made it an optional value
### Modifications

*Describe the modifications you've done.*
Made setting the host optional.
This commit is contained in:
Thomas O'Neill 2020-09-21 14:16:20 -04:00 committed by GitHub
parent 5049d3564a
commit bf349a8c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 11 deletions

View File

@ -39,12 +39,15 @@ spec:
{{ toYaml .Values.grafana.ingress.tls | indent 4 }}
{{- end }}
rules:
- host: {{ required "Grafana ingress hostname not provided" .Values.grafana.ingress.hostname }}
http:
- http:
paths:
- path: {{ .Values.grafana.ingress.path }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}"
servicePort: {{ .Values.grafana.ingress.port }}
{{- end }}
{{- end }}
{{- if .Values.grafana.ingress.hostname }}
host: {{ .Values.grafana.ingress.hostname }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -40,8 +40,7 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ required "proxy ingress hostname not provided" .Values.proxy.ingress.hostname }}
http:
- http:
paths:
- path: {{ .Values.proxy.ingress.path }}
backend:
@ -51,4 +50,7 @@ spec:
{{- else }}
servicePort: {{ .Values.proxy.ports.http }}
{{- end }}
{{- if .Values.proxy.ingress.hostname }}
host: {{ .Values.proxy.ingress.hostname }}
{{- end }}
{{- end }}

View File

@ -40,11 +40,13 @@ spec:
{{- end }}
{{- end }}
rules:
- host: {{ required "pulsar_manager ingress hostname not provided" .Values.pulsar_manager.ingress.hostname }}
http:
- http:
paths:
- path: {{ .Values.pulsar_manager.ingress.path }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}"
servicePort: {{ .Values.pulsar_manager.service.targetPort }}
{{- if .Values.pulsar_manager.ingress.hostname }}
host: {{ .Values.pulsar_manager.ingress.hostname }}
{{- end }}
{{- end }}

View File

@ -739,7 +739,6 @@ proxy:
## Optional. Leave it blank if your Ingress Controller can provide a default certificate.
secretName: ""
## Required if ingress is enabled
hostname: ""
path: "/"
## Proxy PodDisruptionBudget
@ -909,7 +908,6 @@ grafana:
## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
extraPaths: []
## Required if ingress is enabled
hostname: ""
protocol: http
path: /grafana
@ -962,7 +960,6 @@ pulsar_manager:
## Optional. Leave it blank if your Ingress Controller can provide a default certificate.
secretName: ""
## Required if ingress is enabled
hostname: ""
path: "/"