Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use selectors with volumeClaimTemplates #286

Merged
merged 3 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions charts/pulsar/templates/bookkeeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ spec:
{{- else if and .Values.volumes.local_storage .Values.bookkeeper.volumes.common.local_storage }}
storageClassName: "local-storage"
{{- end }}
{{- with .Values.bookkeeper.volumes.common.selector }}
selector:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- else }}
{{- if .Values.bookkeeper.volumes.journal.useMultiVolumes }}
{{- $fullname := include "pulsar.fullname" . -}}
Expand All @@ -263,6 +267,10 @@ spec:
{{- if .storageClassName }}
storageClassName: "{{ .storageClassName }}"
{{- end }}
{{- with .Values.bookkeeper.volumes.journal.selector }}
selector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- else }}
- metadata:
Expand All @@ -279,6 +287,10 @@ spec:
{{- else if and .Values.volumes.local_storage .Values.bookkeeper.volumes.journal.local_storage }}
storageClassName: "local-storage"
{{- end }}
{{- with .Values.bookkeeper.volumes.journal.selector }}
selector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.bookkeeper.volumes.ledgers.useMultiVolumes }}
{{- $fullname := include "pulsar.fullname" . -}}
Expand All @@ -294,6 +306,10 @@ spec:
{{- if .storageClassName }}
storageClassName: "{{ .storageClassName }}"
{{- end }}
{{- with .Values.bookkeeper.volumes.ledgers.selector }}
selector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- else }}
- metadata:
Expand All @@ -310,6 +326,10 @@ spec:
{{- else if and .Values.volumes.local_storage .Values.bookkeeper.volumes.ledgers.local_storage }}
storageClassName: "local-storage"
{{- end }}
{{- with .Values.bookkeeper.volumes.ledgers.selector }}
selector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions charts/pulsar/templates/zookeeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,5 +268,9 @@ spec:
{{- else if and .Values.volumes.local_storage .Values.zookeeper.volumes.data.local_storage }}
storageClassName: "local-storage"
{{- end }}
{{- with .Values.zookeeper.volumes.data.selector }}
selector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
14 changes: 14 additions & 0 deletions charts/pulsar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ zookeeper:
# type: pd-ssd
# fsType: xfs
# provisioner: kubernetes.io/gce-pd
## If you want to bind static persistent volumes via selectors, e.g.:
# selector:
# matchLabels:
# app: pulsar-zookeeper
selector: {}
# External zookeeper server list in case of global-zk list to create zk cluster across zk deployed on different clusters/namespaces
# Example value: "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"
externalZookeeperServerList: ""
Expand Down Expand Up @@ -501,6 +506,11 @@ bookkeeper:
# type: pd-ssd
# fsType: xfs
# provisioner: kubernetes.io/gce-pd
## If you want to bind static persistent volumes via selectors, e.g.:
# selector:
# matchLabels:
# app: pulsar-bookkeeper-journal
selector: {}
useMultiVolumes: false
multiVolumes:
- name: journal0
Expand All @@ -518,6 +528,8 @@ bookkeeper:
# storageClassName:
# storageClass:
# ...
# selector:
# ...
useMultiVolumes: false
multiVolumes:
- name: ledgers0
Expand All @@ -538,6 +550,8 @@ bookkeeper:
# storageClassName:
# storageClass: ## this is common too
# ...
# selector:
# ...

## Bookkeeper configmap
## templates/bookkeeper-configmap.yaml
Expand Down