You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/10/21 21:07:51 UTC
[GitHub] [pulsar] stupidusername edited a comment on issue #5325: Pulsar on
k8s: broker start failure when set functionsWorkerEnabled=true
stupidusername edited a comment on issue #5325: Pulsar on k8s: broker start failure when set functionsWorkerEnabled=true
URL: https://github.com/apache/pulsar/issues/5325#issuecomment-544706581
I spent more than 12 hours on this...
There are 2 problems here:
- The functions worker needs to know the cluster name.
- The `public/functions` namespace needs to have that cluster set.
The list of `public/functions` clusters is set when the ZooKeeper service is created.
Here is my solution:
- `zookeeper.yaml`
```
apiVersion: v1
kind: ConfigMap
metadata:
name: zookeeper-config
data:
...
PF_pulsarFunctionsCluster: <cluster>
PF_numFunctionPackageReplicas: "2"
...
containers:
- name: zookeeper
image: apachepulsar/pulsar:2.4.1
command: ["sh", "-c"]
args:
- >
bin/apply-config-from-env.py conf/zookeeper.conf &&
bin/apply-config-from-env.py conf/pulsar_env.sh &&
bin/generate-zookeeper-config.sh conf/zookeeper.conf &&
bin/gen-yml-from-env.py conf/functions_worker.yml &&
bin/pulsar zookeeper
...
```
- `broker.yaml`:
```
apiVersion: v1
kind: ConfigMap
metadata:
name: broker-config
data:
...
functionsWorkerEnabled: "true"
PF_pulsarFunctionsCluster: <cluster>
PF_numFunctionPackageReplicas: "2"
...
containers:
- name: broker
image: apachepulsar/pulsar:2.4.1
command: ["sh", "-c"]
args:
- >
bin/apply-config-from-env.py conf/broker.conf &&
bin/gen-yml-from-env.py conf/functions_worker.yml &&
bin/apply-config-from-env.py conf/pulsar_env.sh &&
bin/pulsar broker
...
```
I hope this helps you.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services