diff --git a/charts/pulsar/templates/bookkeeper-configmap.yaml b/charts/pulsar/templates/bookkeeper-configmap.yaml index 8ed5f9b..f133f1f 100644 --- a/charts/pulsar/templates/bookkeeper-configmap.yaml +++ b/charts/pulsar/templates/bookkeeper-configmap.yaml @@ -55,6 +55,10 @@ data: {{- else }} ledgerDirectories: "/pulsar/data/bookkeeper/ledgers" {{- end }} + {{- if .Values.functions.useBookieAsStateStore }} + # Stateful function config + extraServerComponents: "org.apache.bookkeeper.stream.server.StreamStorageLifecycleComponent" + {{- end }} # TLS config {{- include "pulsar.bookkeeper.config.tls" . | nindent 2 }} {{ toYaml .Values.bookkeeper.configData | indent 2 }} diff --git a/charts/pulsar/templates/broker-configmap.yaml b/charts/pulsar/templates/broker-configmap.yaml index b5278c9..c02a4df 100644 --- a/charts/pulsar/templates/broker-configmap.yaml +++ b/charts/pulsar/templates/broker-configmap.yaml @@ -50,6 +50,9 @@ data: {{- end }} {{- if or .Values.components.functions .Values.extra.functionsAsPods }} functionsWorkerEnabled: "true" + {{- if .Values.functions.useBookieAsStateStore }} + PF_stateStorageServiceUrl: "bk://{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}:{{ .Values.bookkeeper.ports.statestore }}" + {{- end }} PF_functionRuntimeFactoryClassName: "org.apache.pulsar.functions.runtime.kubernetes.KubernetesRuntimeFactory" PF_pulsarFunctionsCluster: {{ template "pulsar.cluster.name" . }} PF_connectorsDirectory: ./connectors diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index f347d2f..34c2898 100644 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -437,6 +437,7 @@ bookkeeper: ports: http: 8000 bookie: 3181 + statestore: 4181 # nodeSelector: # cloud.google.com/gke-nodepool: default-pool probe: @@ -796,6 +797,7 @@ broker: ## functions: component: functions-worker + useBookieAsStateStore: false ## Pulsar: Functions Worker ClusterRole or Role ## templates/broker-rbac.yaml # Default is false which deploys functions with ClusterRole and ClusterRoleBinding at the cluster level