[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
This commit is contained in:
SakaSun 2020-02-13 18:39:32 -03:00 committed by GitHub
parent 4d00b385ac
commit 7abb297a6b
5 changed files with 58 additions and 15 deletions

View File

@ -17,7 +17,7 @@
# under the License. # under the License.
# #
{{- if .Values.extra.monitoring }} {{- if .Values.extra.monitoring }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -31,14 +31,14 @@ metadata:
component: {{ .Values.grafana.component }} component: {{ .Values.grafana.component }}
cluster: {{ template "pulsar.fullname" . }} cluster: {{ template "pulsar.fullname" . }}
annotations: annotations:
{{ toYaml .Values.grafana.service.annotations | indent 4 }} {{ toYaml .Values.grafana.service.annotations | indent 4 }}
spec: spec:
ports: ports:
{{ toYaml .Values.grafana.service.ports | indent 2 }} {{ toYaml .Values.grafana.service.ports | indent 2 }}
selector: selector:
app: {{ template "pulsar.name" . }} app: {{ template "pulsar.name" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
component: {{ .Values.grafana.component }} component: {{ .Values.grafana.component }}
type: ClusterIP type: ClusterIP
sessionAffinity: None sessionAffinity: None
{{- end }} {{- end }}

View File

@ -0,0 +1,33 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
apiVersion: v1
kind: ConfigMap
metadata:
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.pulsar_manager.component }}
cluster: {{ template "pulsar.fullname" . }}
data:
{{ toYaml .Values.pulsar_manager.configData | indent 2 }}

View File

@ -69,18 +69,12 @@ spec:
volumeMounts: volumeMounts:
- name: pulsar-manager-data - name: pulsar-manager-data
mountPath: /data mountPath: /data
envFrom:
- configMapRef:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}"
env: env:
# for supporting apachepulsar/pulsar-manager
- name: PULSAR_CLUSTER - name: PULSAR_CLUSTER
value: {{ template "pulsar.fullname" . }} 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 - name: USERNAME
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@ -91,8 +85,6 @@ spec:
secretKeyRef: secretKeyRef:
key: PULSAR_MANAGER_ADMIN_PASSWORD key: PULSAR_MANAGER_ADMIN_PASSWORD
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret" name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
- name: LOG_LEVEL
value: DEBUG
volumes: volumes:
- name: pulsar-manager-data - name: pulsar-manager-data
emptyDir: {} emptyDir: {}

View File

@ -497,6 +497,15 @@ pulsar_manager:
requests: requests:
memory: 250Mi memory: 250Mi
cpu: 0.1 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 ## Pulsar manager service
## templates/pulsar-manager-service.yaml ## templates/pulsar-manager-service.yaml
## ##

View File

@ -493,6 +493,15 @@ pulsar_manager:
requests: requests:
memory: 250Mi memory: 250Mi
cpu: 0.1 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 ## Pulsar manager service
## templates/pulsar-manager-service.yaml ## templates/pulsar-manager-service.yaml
## ##