From e650f9e7705f6759aef1e511838f462e94f1a71e Mon Sep 17 00:00:00 2001 From: Thomas Memenga <1259783+tmemenga@users.noreply.github.com> Date: Sat, 1 Feb 2020 09:07:42 +0100 Subject: [PATCH] add missing check to dashboard-ingress (helm chart) (#6160) ### Motivation if you deploy pulsar using the helm chart and disable monitoring with ``` extras: dashboard: no ``` but you have the ingress of the dashboard set to true ``` dashboard: ingress: enabled: true ``` the helm chart will create an ingress that points to a non-existing service because the dashboard itself was not deployed. ### Modifications I've added the same check that is already in place in dashboard-service and dashboard-deployment ### Verifying this change I dont know of any automated tests, i tested it manually. In the end it's the same "if" that is already in place in dashboard-service and dashboard-deployment ### Does this pull request potentially affect one of the following parts: Affects deployment via helm chart. An unwanted ingress object is suppressed. ### Documentation no documentation need (cherry picked from commit efee516f0f4e2cb19b5fd7e0d4a6280277392c17) --- .../kubernetes/helm/pulsar/templates/dashboard-ingress.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deployment/kubernetes/helm/pulsar/templates/dashboard-ingress.yaml b/deployment/kubernetes/helm/pulsar/templates/dashboard-ingress.yaml index ff9106f2f1acb..10dc4f99e08e7 100644 --- a/deployment/kubernetes/helm/pulsar/templates/dashboard-ingress.yaml +++ b/deployment/kubernetes/helm/pulsar/templates/dashboard-ingress.yaml @@ -17,6 +17,7 @@ # under the License. # +{{- if .Values.extra.dashboard }} {{- if .Values.dashboard.ingress.enabled }} apiVersion: extensions/v1beta1 kind: Ingress @@ -51,3 +52,4 @@ spec: serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.dashboard.component }}" servicePort: {{ .Values.dashboard.ingress.port }} {{- end }} +{{- end }}