You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/04/21 05:56:53 UTC
[pulsar-helm-chart] 14/34: Provide better defaults for ingress tls
and secretName configuration. (#5859)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
commit 1b680d3a54c970e5d24ac72da25d456697972dab
Author: Julio H Morimoto <jh...@juliohm.com.br>
AuthorDate: Tue Dec 17 08:40:25 2019 -0300
Provide better defaults for ingress tls and secretName configuration. (#5859)
This patch allows tls to be enabled with an empty secretName for ingress controllers might be able to provide a default certificate.
Fixes #5858, provides better defaults for the Ingress object and allows TLS to be enabled with an empty secretName.
### Motivation
The current helm chart can create an Ingress with TLS, but it requires a secretName to be added. This is not an Ingress requirement and, in some cases, the ingress controller can provide a default certificate when the Ingress object does not declare one.
### Modifications
Modifications include `values.yaml` and `dashboard-ingress.yaml` to address the issue.
---
pulsar/templates/dashboard-ingress.yaml | 6 ++++--
pulsar/values.yaml | 8 +++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/pulsar/templates/dashboard-ingress.yaml b/pulsar/templates/dashboard-ingress.yaml
index e6ebf56..ff9106f 100644
--- a/pulsar/templates/dashboard-ingress.yaml
+++ b/pulsar/templates/dashboard-ingress.yaml
@@ -34,11 +34,13 @@ metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.dashboard.component }}"
namespace: {{ .Values.namespace }}
spec:
-{{- if .Values.dashboard.ingress.tls }}
+{{- if .Values.dashboard.ingress.tls.enabled }}
tls:
- hosts:
- {{ .Values.dashboard.ingress.hostname }}
- secretName: {{ .Values.dashboard.ingress.tls.secretName }}
+ {{- with .Values.dashboard.ingress.tls.secretName }}
+ secretName: {{ . }}
+ {{- end }}
{{- end }}
rules:
- host: {{ required "Dashboard ingress hostname not provided" .Values.dashboard.ingress.hostname }}
diff --git a/pulsar/values.yaml b/pulsar/values.yaml
index a9e31b4..69b3ccf 100644
--- a/pulsar/values.yaml
+++ b/pulsar/values.yaml
@@ -331,7 +331,13 @@ dashboard:
ingress:
enabled: false
annotations: {}
- tls: {}
+ tls:
+ enabled: false
+
+ ## Optional. Leave it blank if your Ingress Controller can provide a default certificate.
+ secretName: ""
+
+ ## Required if ingress is enabled
hostname: ""
path: "/"
port: 80