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 }} {{ toYaml .Values.grafana.ingress.tls | indent 4 }}
{{- end }} {{- end }}
rules: rules:
- host: {{ required "Grafana ingress hostname not provided" .Values.grafana.ingress.hostname }} - http:
http:
paths: paths:
- path: {{ .Values.grafana.ingress.path }} - path: {{ .Values.grafana.ingress.path }}
backend: backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}" serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}"
servicePort: {{ .Values.grafana.ingress.port }} servicePort: {{ .Values.grafana.ingress.port }}
{{- if .Values.grafana.ingress.hostname }}
host: {{ .Values.grafana.ingress.hostname }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

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

View File

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

View File

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