Skip to content

Commit 1d43b5b

Browse files
authored
Support adding annotation to pvc (#1226)
<!-- ### Contribution Checklist - Name the pull request in the form "[charts/<chart-name>] Title of the pull request". Skip *[charts/<chart-name>]* if the PR doesn't change a specific chart. E.g. `[docs] Fix typo in README`. - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review. - Each pull request should address only one issue, not mix up code from multiple issues. - Each commit in the pull request has a meaningful commit message - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below. **(The sections below can be removed for hotfixes of typos)** --> *(If this PR fixes a github issue, please add `Fixes #<xyz>`.)* Fixes #<xyz> *(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)* Master Issue: #<xyz> ### Motivation *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* ### Modifications *Describe the modifications you've done.* ### Verifying this change - [ ] Make sure that the change passes the CI checks. *(Please pick either of the following options)* This change is a trivial rework / code cleanup without any test coverage. *(or)* This change is already covered by existing tests, such as *(please describe tests)*. *(or)* This change added tests and can be verified as follows: *(example:)* - *Added integration tests for end-to-end deployment with large payloads (10MB)* - *Extended integration test for recovery after broker failure* ### Documentation Check the box below. Need to update docs? - [ ] `doc-required` (If you need help on updating docs, create a doc issue) - [ ] `no-need-doc` (Please explain why) - [ ] `doc` (If this PR contains doc changes)
1 parent bc2cb1d commit 1d43b5b

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,17 @@ spec:
131131
journal:
132132
numVolumes: {{ .Values.bookkeeper.volumes.journal.numVolumes | default 1 }}
133133
numDirsPerVolume: {{ .Values.bookkeeper.volumes.journal.numDirsPerVolume | default 1 }}
134+
{{- if .Values.bookkeeper.volumes.journal.metadata }}
135+
metadata:
136+
{{- if .Values.bookkeeper.volumes.journal.metadata.annotations }}
137+
annotations:
138+
{{ toYaml .Values.bookkeeper.volumes.journal.metadata.annotations | indent 10 }}
139+
{{- end }}
140+
{{- if .Values.bookkeeper.volumes.journal.metadata.labels }}
141+
labels:
142+
{{ toYaml .Values.bookkeeper.volumes.journal.metadata.labels | indent 10 }}
143+
{{- end }}
144+
{{- end }}
134145
volumeClaimTemplate:
135146
accessModes:
136147
{{- range .Values.bookkeeper.volumes.journal.accessModes }}
@@ -143,6 +154,17 @@ spec:
143154
ledger:
144155
numVolumes: {{ .Values.bookkeeper.volumes.ledgers.numVolumes | default 1 }}
145156
numDirsPerVolume: {{ .Values.bookkeeper.volumes.ledgers.numDirsPerVolume | default 1 }}
157+
{{- if .Values.bookkeeper.volumes.ledgers.metadata }}
158+
metadata:
159+
{{- if .Values.bookkeeper.volumes.ledgers.metadata.annotations }}
160+
annotations:
161+
{{ toYaml .Values.bookkeeper.volumes.ledgers.metadata.annotations | indent 10 }}
162+
{{- end }}
163+
{{- if .Values.bookkeeper.volumes.ledgers.metadata.labels }}
164+
labels:
165+
{{ toYaml .Values.bookkeeper.volumes.ledgers.metadata.labels | indent 10 }}
166+
{{- end }}
167+
{{- end }}
146168
volumeClaimTemplate:
147169
accessModes:
148170
{{- range .Values.bookkeeper.volumes.ledgers.accessModes }}

charts/sn-platform-slim/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,12 @@ bookkeeper:
907907
# mountOptions:
908908
# extraParameters:
909909
# iopsPerGB: "50"
910+
# metadata to add onto PVCs for journal storage
911+
# metadata:
912+
# annotations:
913+
# example.com/annotation-key: "annotation-value"
914+
# labels:
915+
# example.com/label-key: "label-value"
910916
ledgers:
911917
# It determines the directory of ledgers data
912918
numVolumes: 1
@@ -930,6 +936,12 @@ bookkeeper:
930936
# mountOptions:
931937
# extraParameters:
932938
# iopsPerGB: "50"
939+
# metadata to add onto PVCs for ledgers storage
940+
# metadata:
941+
# annotations:
942+
# example.com/annotation-key: "annotation-value"
943+
# labels:
944+
# example.com/label-key: "label-value"
933945
jvm:
934946
# BookKeeper Operator will automatically generate the JVM memory options based on the Pod memory size. You can override this by entering a new value.
935947
memoryOptions: []

charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,17 @@ spec:
131131
journal:
132132
numVolumes: {{ .Values.bookkeeper.volumes.journal.numVolumes | default 1 }}
133133
numDirsPerVolume: {{ .Values.bookkeeper.volumes.journal.numDirsPerVolume | default 1 }}
134+
{{- if .Values.bookkeeper.volumes.journal.metadata }}
135+
metadata:
136+
{{- if .Values.bookkeeper.volumes.journal.metadata.annotations }}
137+
annotations:
138+
{{ toYaml .Values.bookkeeper.volumes.journal.metadata.annotations | indent 10 }}
139+
{{- end }}
140+
{{- if .Values.bookkeeper.volumes.journal.metadata.labels }}
141+
labels:
142+
{{ toYaml .Values.bookkeeper.volumes.journal.metadata.labels | indent 10 }}
143+
{{- end }}
144+
{{- end }}
134145
volumeClaimTemplate:
135146
accessModes:
136147
{{- range .Values.bookkeeper.volumes.journal.accessModes }}
@@ -143,6 +154,17 @@ spec:
143154
ledger:
144155
numVolumes: {{ .Values.bookkeeper.volumes.ledgers.numVolumes | default 1 }}
145156
numDirsPerVolume: {{ .Values.bookkeeper.volumes.ledgers.numDirsPerVolume | default 1 }}
157+
{{- if .Values.bookkeeper.volumes.ledgers.metadata }}
158+
metadata:
159+
{{- if .Values.bookkeeper.volumes.ledgers.metadata.annotations }}
160+
annotations:
161+
{{ toYaml .Values.bookkeeper.volumes.ledgers.metadata.annotations | indent 10 }}
162+
{{- end }}
163+
{{- if .Values.bookkeeper.volumes.ledgers.metadata.labels }}
164+
labels:
165+
{{ toYaml .Values.bookkeeper.volumes.ledgers.metadata.labels | indent 10 }}
166+
{{- end }}
167+
{{- end }}
146168
volumeClaimTemplate:
147169
accessModes:
148170
{{- range .Values.bookkeeper.volumes.journal.accessModes }}

charts/sn-platform/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,12 @@ bookkeeper:
982982
# mountOptions:
983983
# extraParameters:
984984
# iopsPerGB: "50"
985+
# metadata to add onto PVCs for journal storage
986+
# metadata:
987+
# annotations:
988+
# example.com/annotation-key: "annotation-value"
989+
# labels:
990+
# example.com/label-key: "label-value"
985991
ledgers:
986992
# It determines the directory of ledgers data
987993
numVolumes: 1
@@ -1005,6 +1011,12 @@ bookkeeper:
10051011
# mountOptions:
10061012
# extraParameters:
10071013
# iopsPerGB: "50"
1014+
# metadata to add onto PVCs for ledgers storage
1015+
# metadata:
1016+
# annotations:
1017+
# example.com/annotation-key: "annotation-value"
1018+
# labels:
1019+
# example.com/label-key: "label-value"
10081020
jvm:
10091021
# BookKeeper Operator will automatically generate the JVM memory options based on the Pod memory size. You can override this by entering a new value.
10101022
memoryOptions: []

0 commit comments

Comments
 (0)