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 7abb297a6b759f78c1b41aaae3919a9db826aea1 Author: SakaSun <marcos.sakam...@gmail.com> AuthorDate: Thu Feb 13 18:39:32 2020 -0300 [Helm] Pulsar Manager do not work if Pulsar authentication is enabled (#6315) Fixes ##6314 ### Motivation Pulsar Manager do not work if Pulsar authentication is enabled. ### Modifications pulsar-manager-configmap.yaml was created in order to allow configuration of the enviroment properties in values.yaml --- pulsar/templates/grafana-service.yaml | 8 ++++---- ...a-service.yaml => pulsar-manager-configmap.yaml} | 21 +++++---------------- pulsar/templates/pulsar-manager-deployment.yaml | 14 +++----------- pulsar/values-mini.yaml | 9 +++++++++ pulsar/values.yaml | 9 +++++++++ 5 files changed, 30 insertions(+), 31 deletions(-) diff --git a/pulsar/templates/grafana-service.yaml b/pulsar/templates/grafana-service.yaml index 3288f26..56dadde 100644 --- a/pulsar/templates/grafana-service.yaml +++ b/pulsar/templates/grafana-service.yaml @@ -17,7 +17,7 @@ # under the License. # - {{- if .Values.extra.monitoring }} +{{- if .Values.extra.monitoring }} apiVersion: v1 kind: Service metadata: @@ -31,14 +31,14 @@ metadata: component: {{ .Values.grafana.component }} cluster: {{ template "pulsar.fullname" . }} annotations: - {{ toYaml .Values.grafana.service.annotations | indent 4 }} +{{ toYaml .Values.grafana.service.annotations | indent 4 }} spec: ports: - {{ toYaml .Values.grafana.service.ports | indent 2 }} +{{ toYaml .Values.grafana.service.ports | indent 2 }} selector: app: {{ template "pulsar.name" . }} release: {{ .Release.Name }} component: {{ .Values.grafana.component }} type: ClusterIP sessionAffinity: None - {{- end }} +{{- end }} diff --git a/pulsar/templates/grafana-service.yaml b/pulsar/templates/pulsar-manager-configmap.yaml similarity index 67% copy from pulsar/templates/grafana-service.yaml copy to pulsar/templates/pulsar-manager-configmap.yaml index 3288f26..5444469 100644 --- a/pulsar/templates/grafana-service.yaml +++ b/pulsar/templates/pulsar-manager-configmap.yaml @@ -17,28 +17,17 @@ # under the License. # - {{- if .Values.extra.monitoring }} apiVersion: v1 -kind: Service +kind: ConfigMap metadata: - name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}" + name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}" namespace: {{ .Values.namespace }} labels: app: {{ template "pulsar.name" . }} chart: {{ template "pulsar.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} - component: {{ .Values.grafana.component }} + component: {{ .Values.pulsar_manager.component }} cluster: {{ template "pulsar.fullname" . }} - annotations: - {{ toYaml .Values.grafana.service.annotations | indent 4 }} -spec: - ports: - {{ toYaml .Values.grafana.service.ports | indent 2 }} - selector: - app: {{ template "pulsar.name" . }} - release: {{ .Release.Name }} - component: {{ .Values.grafana.component }} - type: ClusterIP - sessionAffinity: None - {{- end }} +data: +{{ toYaml .Values.pulsar_manager.configData | indent 2 }} diff --git a/pulsar/templates/pulsar-manager-deployment.yaml b/pulsar/templates/pulsar-manager-deployment.yaml index bb153e7..8a8493a 100644 --- a/pulsar/templates/pulsar-manager-deployment.yaml +++ b/pulsar/templates/pulsar-manager-deployment.yaml @@ -69,18 +69,12 @@ spec: volumeMounts: - name: pulsar-manager-data mountPath: /data + envFrom: + - configMapRef: + name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}" env: - # for supporting apachepulsar/pulsar-manager - name: PULSAR_CLUSTER value: {{ template "pulsar.fullname" . }} - - name: REDIRECT_HOST - value: http://127.0.0.1 - - name: REDIRECT_PORT - value: "9527" - - name: DRIVER_CLASS_NAME - value: org.postgresql.Driver - - name: URL - value: jdbc:postgresql://127.0.0.1:5432/pulsar_manager - name: USERNAME valueFrom: secretKeyRef: @@ -91,8 +85,6 @@ spec: secretKeyRef: key: PULSAR_MANAGER_ADMIN_PASSWORD name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret" - - name: LOG_LEVEL - value: DEBUG volumes: - name: pulsar-manager-data emptyDir: {} diff --git a/pulsar/values-mini.yaml b/pulsar/values-mini.yaml index a932d32..dadff58 100644 --- a/pulsar/values-mini.yaml +++ b/pulsar/values-mini.yaml @@ -497,6 +497,15 @@ pulsar_manager: requests: memory: 250Mi cpu: 0.1 + configData: + REDIRECT_HOST: "http://127.0.0.1" + REDIRECT_PORT: "9527" + DRIVER_CLASS_NAME: org.postgresql.Driver + URL: jdbc:postgresql://127.0.0.1:5432/pulsar_manager + LOG_LEVEL: DEBUG + ## If you enabled authentication support + #JWT_TOKEN: <token> + #SECRET_KEY: data:base64,<secret key> ## Pulsar manager service ## templates/pulsar-manager-service.yaml ## diff --git a/pulsar/values.yaml b/pulsar/values.yaml index 3ccd0ae..84a2bba 100644 --- a/pulsar/values.yaml +++ b/pulsar/values.yaml @@ -493,6 +493,15 @@ pulsar_manager: requests: memory: 250Mi cpu: 0.1 + configData: + REDIRECT_HOST: "http://127.0.0.1" + REDIRECT_PORT: "9527" + DRIVER_CLASS_NAME: org.postgresql.Driver + URL: jdbc:postgresql://127.0.0.1:5432/pulsar_manager + LOG_LEVEL: DEBUG + ## If you enabled authentication support + #JWT_TOKEN: <token> + #SECRET_KEY: data:base64,<secret key> ## Pulsar manager service ## templates/pulsar-manager-service.yaml ##