* Support mechanism to provide external zookeeper-server list to build global/configuration zookeeper * Add external zk example * add external zk list into values.yaml Fixes #268 ### Motivation Right now, [chart dynamically](https://github.com/apache/pulsar-helm-chart/blob/master/charts/pulsar/templates/zookeeper-statefulset.yaml#L140) creates zk cluster with zk pods initialized in the same namespace. However, for global/configuration zookeeper, user requires to build zk clusters with pods deployed in different namespaces. Therefore, user needs a mechanism to pass an external list of zk-servers to the chart and build zk-cluster with pods across different namespaces. ### Modification - Chart should be considering zk-value's configuration for external zookeeper and generate zk-configuration file with appropriate zk-server list and unique id of that zookeeper. This PR sets `ZOOKEEPER_SERVERS` value provided by user and also sets override-value flag which will be used by [generate-zookeeper-config.sh](https://github.com/apache/pulsar/blob/master/docker/pulsar/scripts/generate-zookeeper-config.sh) to override external zk list in config file and assign appropriate id to the host. https://github.com/apache/pulsar/pull/15987 fixes [generate-zookeeper-config.sh](https://github.com/apache/pulsar/blob/master/docker/pulsar/scripts/generate-zookeeper-config.sh) changes. ### Result - User can add `ZOOKEEPER_SERVERS` string into `zookeeper.configData` in [Values.yaml](https://github.com/apache/pulsar-helm-chart/blob/master/charts/pulsar/values.yaml#L385) file to override external zk-server list.
69 lines
2.5 KiB
YAML
69 lines
2.5 KiB
YAML
#
|
|
# 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.
|
|
#
|
|
|
|
metadataPrefix: "/configuration-store"
|
|
|
|
## start
|
|
components:
|
|
# zookeeper
|
|
zookeeper: true
|
|
# bookkeeper
|
|
bookkeeper: false
|
|
# bookkeeper - autorecovery
|
|
autorecovery: false
|
|
# broker
|
|
broker: false
|
|
# proxy
|
|
proxy: false
|
|
# toolset
|
|
toolset: false
|
|
# pulsar manager
|
|
pulsar_manager: false
|
|
|
|
monitoring:
|
|
# monitoring - prometheus
|
|
prometheus: false
|
|
# monitoring - grafana
|
|
grafana: false
|
|
# monitoring - node_exporter
|
|
node_exporter: false
|
|
|
|
zookeeper:
|
|
configData:
|
|
# External zookeeper server list in case of global-zk list to create zk cluster across zk deployed on different clusters/namespaces
|
|
# ZOOKEEPER_SERVERS: "us-east1-pulsar-zookeeper-0.us-east1-pulsar-zookeeper.us-east1.svc.cluster.local:2888:3888,us-east1-pulsar-zookeeper-1.us-east1-pulsar-zookeeper.us-east1.svc.cluster.local:2888:3888,us-east1-pulsar-zookeeper-2.us-east1-pulsar-zookeeper.us-east1.svc.cluster.local:2888:3888,us-west1-pulsar-zookeeper-0.us-west1-pulsar-zookeeper.us-west1.svc.cluster.local:2888:3888,us-west1-pulsar-zookeeper-1.us-west1-pulsar-zookeeper.us-west1.svc.cluster.local:2888:3888,us-west1-pulsar-zookeeper-2.us-west1-pulsar-zookeeper.us-west1.svc.cluster.local:2888:3888"
|
|
volumes:
|
|
# use a persistent volume or emptyDir
|
|
persistence: true
|
|
data:
|
|
name: data
|
|
size: 5Gi
|
|
local_storage: false
|
|
## If you already have an existent storage class and want to reuse it, you can specify its name with the option below
|
|
##
|
|
storageClassName: gp2
|
|
#
|
|
## Instead if you want to create a new storage class define it below
|
|
## If left undefined no storage class will be defined along with PVC
|
|
##
|
|
# storageClass:
|
|
# type: pd-ssd
|
|
# fsType: xfs
|
|
# provisioner: kubernetes.io/gce-pd
|