Add support for stateful functions using the bookie as state storage (#171)
### Motivation Enables support for using the Pulsar bookies as persistent state storage for functions. ### Modifications - Added an option to enable/disable using bookies as state storage - Adds extra server components options to the bookkeeper to enable necessary features for bookies to be used as state storage - Adds stateStorageServiceUrl to the broker configmap
This commit is contained in:
parent
042fd5b6d4
commit
73fe688a43
@ -55,6 +55,10 @@ data:
|
|||||||
{{- else }}
|
{{- else }}
|
||||||
ledgerDirectories: "/pulsar/data/bookkeeper/ledgers"
|
ledgerDirectories: "/pulsar/data/bookkeeper/ledgers"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.functions.useBookieAsStateStore }}
|
||||||
|
# Stateful function config
|
||||||
|
extraServerComponents: "org.apache.bookkeeper.stream.server.StreamStorageLifecycleComponent"
|
||||||
|
{{- end }}
|
||||||
# TLS config
|
# TLS config
|
||||||
{{- include "pulsar.bookkeeper.config.tls" . | nindent 2 }}
|
{{- include "pulsar.bookkeeper.config.tls" . | nindent 2 }}
|
||||||
{{ toYaml .Values.bookkeeper.configData | indent 2 }}
|
{{ toYaml .Values.bookkeeper.configData | indent 2 }}
|
||||||
|
|||||||
@ -50,6 +50,9 @@ data:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.components.functions .Values.extra.functionsAsPods }}
|
{{- if or .Values.components.functions .Values.extra.functionsAsPods }}
|
||||||
functionsWorkerEnabled: "true"
|
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_functionRuntimeFactoryClassName: "org.apache.pulsar.functions.runtime.kubernetes.KubernetesRuntimeFactory"
|
||||||
PF_pulsarFunctionsCluster: {{ template "pulsar.cluster.name" . }}
|
PF_pulsarFunctionsCluster: {{ template "pulsar.cluster.name" . }}
|
||||||
PF_connectorsDirectory: ./connectors
|
PF_connectorsDirectory: ./connectors
|
||||||
|
|||||||
@ -437,6 +437,7 @@ bookkeeper:
|
|||||||
ports:
|
ports:
|
||||||
http: 8000
|
http: 8000
|
||||||
bookie: 3181
|
bookie: 3181
|
||||||
|
statestore: 4181
|
||||||
# nodeSelector:
|
# nodeSelector:
|
||||||
# cloud.google.com/gke-nodepool: default-pool
|
# cloud.google.com/gke-nodepool: default-pool
|
||||||
probe:
|
probe:
|
||||||
@ -796,6 +797,7 @@ broker:
|
|||||||
##
|
##
|
||||||
functions:
|
functions:
|
||||||
component: functions-worker
|
component: functions-worker
|
||||||
|
useBookieAsStateStore: false
|
||||||
## Pulsar: Functions Worker ClusterRole or Role
|
## Pulsar: Functions Worker ClusterRole or Role
|
||||||
## templates/broker-rbac.yaml
|
## templates/broker-rbac.yaml
|
||||||
# Default is false which deploys functions with ClusterRole and ClusterRoleBinding at the cluster level
|
# Default is false which deploys functions with ClusterRole and ClusterRoleBinding at the cluster level
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user