Skip to content

Commit

Permalink
[Helm] Pulsar Manager do not work if Pulsar authentication is enabled (
Browse files Browse the repository at this point in the history
…apache#6315)

Fixes #apache#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
  • Loading branch information
SakaSun authored Feb 13, 2020
1 parent bce14ed commit d3ec620
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

{{- if .Values.extra.monitoring }}
{{- if .Values.extra.monitoring }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -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 }}
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: {}
Expand Down
9 changes: 9 additions & 0 deletions deployment/kubernetes/helm/pulsar/values-mini.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand Down
9 changes: 9 additions & 0 deletions deployment/kubernetes/helm/pulsar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand Down

0 comments on commit d3ec620

Please sign in to comment.