Skip to content

Commit e05b0de

Browse files
authored
Support set volume attribute class name (#1259)
<!-- ### 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 6c6f651 commit e05b0de

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

charts/sn-platform-slim/templates/bookkeeper/_bookkeeper.tpl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,25 @@ Define bookie zookeeper client tls settings
3030
{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}
3131
{{- end }}
3232

33+
{{- define "pulsar.bookkeeper.journal.volumeAttributesClassName" -}}
34+
{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.journal.name }}
35+
{{- end }}
36+
37+
{{- define "pulsar.bookkeeper.ledgers.volumeAttributesClassName" -}}
38+
{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}
39+
{{- end }}
40+
3341
{{- define "pulsar.bookkeeper.journal.storage.class" -}}
3442
{{- if .Values.bookkeeper.volumes.journal.storageClass }}
3543
storageClassName: "{{ template "pulsar.bookkeeper.journal.pvc.name" . }}"
3644
{{- else if .Values.bookkeeper.volumes.journal.storageClassName }}
3745
storageClassName: "{{ .Values.bookkeeper.volumes.journal.storageClassName }}"
3846
{{- end }}
47+
{{- if .Values.bookkeeper.volumes.journal.volumeAttributesClass }}
48+
volumeAttributesClassName: "{{ template "pulsar.bookkeeper.journal.volumeAttributesClassName" . }}"
49+
{{- else if .Values.bookkeeper.volumes.journal.volumeAttributesClassName }}
50+
volumeAttributesClassName: "{{ .Values.bookkeeper.volumes.journal.volumeAttributesClassName }}"
51+
{{- end }}
3952
{{- end }}
4053

4154
{{- define "pulsar.bookkeeper.ledgers.storage.class" -}}
@@ -44,6 +57,11 @@ storageClassName: "{{ template "pulsar.bookkeeper.ledgers.pvc.name" . }}"
4457
{{- else if .Values.bookkeeper.volumes.ledgers.storageClassName }}
4558
storageClassName: "{{ .Values.bookkeeper.volumes.ledgers.storageClassName }}"
4659
{{- end }}
60+
{{- if .Values.bookkeeper.volumes.ledgers.volumeAttributesClass }}
61+
volumeAttributesClassName: "{{ template "pulsar.bookkeeper.ledgers.volumeAttributesClassName" . }}"
62+
{{- else if .Values.bookkeeper.volumes.ledgers.volumeAttributesClassName }}
63+
volumeAttributesClassName: "{{ .Values.bookkeeper.volumes.ledgers.volumeAttributesClassName }}"
64+
{{- end }}
4765
{{- end }}
4866

4967
{{/*

charts/sn-platform-slim/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,7 @@ bookkeeper:
935935
accessModes:
936936
- ReadWriteOnce
937937
# storageClassName: ""
938+
# volumeAttributesClassName: ""
938939
## If the storage class is left undefined when using persistence
939940
## the default storage class for the cluster will be used.
940941
##
@@ -949,6 +950,11 @@ bookkeeper:
949950
# mountOptions:
950951
# extraParameters:
951952
# iopsPerGB: "50"
953+
# volumeAttributesClass:
954+
# driverName: "driver.example.com"
955+
# parameters:
956+
# key1: "value1"
957+
# key2: "value2"
952958
# metadata to add onto PVCs for journal storage
953959
# metadata:
954960
# annotations:
@@ -964,6 +970,7 @@ bookkeeper:
964970
accessModes:
965971
- ReadWriteOnce
966972
# storageClassName: ""
973+
# volumeAttributesClassName: ""
967974
## If the storage class is left undefined when using persistence
968975
## the default storage class for the cluster will be used.
969976
##
@@ -978,6 +985,11 @@ bookkeeper:
978985
# mountOptions:
979986
# extraParameters:
980987
# iopsPerGB: "50"
988+
# volumeAttributesClass:
989+
# driverName: "driver.example.com"
990+
# parameters:
991+
# key1: "value1"
992+
# key2: "value2"
981993
# metadata to add onto PVCs for ledgers storage
982994
# metadata:
983995
# annotations:

charts/sn-platform/templates/bookkeeper/_bookkeeper.tpl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,25 @@ Define bookie zookeeper client tls settings
3030
{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}
3131
{{- end }}
3232

33+
{{- define "pulsar.bookkeeper.journal.volumeAttributesClassName" -}}
34+
{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.journal.name }}
35+
{{- end }}
36+
37+
{{- define "pulsar.bookkeeper.ledgers.volumeAttributesClassName" -}}
38+
{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}
39+
{{- end }}
40+
3341
{{- define "pulsar.bookkeeper.journal.storage.class" -}}
3442
{{- if .Values.bookkeeper.volumes.journal.storageClass }}
3543
storageClassName: "{{ template "pulsar.bookkeeper.journal.pvc.name" . }}"
3644
{{- else if .Values.bookkeeper.volumes.journal.storageClassName }}
3745
storageClassName: "{{ .Values.bookkeeper.volumes.journal.storageClassName }}"
3846
{{- end }}
47+
{{- if .Values.bookkeeper.volumes.journal.volumeAttributesClass }}
48+
volumeAttributesClassName: "{{ template "pulsar.bookkeeper.journal.volumeAttributesClassName" . }}"
49+
{{- else if .Values.bookkeeper.volumes.journal.volumeAttributesClassName }}
50+
volumeAttributesClassName: "{{ .Values.bookkeeper.volumes.journal.volumeAttributesClassName }}"
51+
{{- end }}
3952
{{- end }}
4053

4154
{{- define "pulsar.bookkeeper.ledgers.storage.class" -}}
@@ -44,6 +57,11 @@ storageClassName: "{{ template "pulsar.bookkeeper.ledgers.pvc.name" . }}"
4457
{{- else if .Values.bookkeeper.volumes.ledgers.storageClassName }}
4558
storageClassName: "{{ .Values.bookkeeper.volumes.ledgers.storageClassName }}"
4659
{{- end }}
60+
{{- if .Values.bookkeeper.volumes.ledgers.volumeAttributesClass }}
61+
volumeAttributesClassName: "{{ template "pulsar.bookkeeper.ledgers.volumeAttributesClassName" . }}"
62+
{{- else if .Values.bookkeeper.volumes.ledgers.volumeAttributesClassName }}
63+
volumeAttributesClassName: "{{ .Values.bookkeeper.volumes.ledgers.volumeAttributesClassName }}"
64+
{{- end }}
4765
{{- end }}
4866

4967
{{/*

charts/sn-platform/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,7 @@ bookkeeper:
10101010
accessModes:
10111011
- ReadWriteOnce
10121012
# storageClassName: ""
1013+
# volumeAttributesClassName: ""
10131014
## If the storage class is left undefined when using persistence
10141015
## the default storage class for the cluster will be used.
10151016
##
@@ -1024,6 +1025,11 @@ bookkeeper:
10241025
# mountOptions:
10251026
# extraParameters:
10261027
# iopsPerGB: "50"
1028+
# volumeAttributesClass:
1029+
# driverName: "driver.example.com"
1030+
# parameters:
1031+
# key1: "value1"
1032+
# key2: "value2"
10271033
# metadata to add onto PVCs for journal storage
10281034
# metadata:
10291035
# annotations:
@@ -1039,6 +1045,7 @@ bookkeeper:
10391045
accessModes:
10401046
- ReadWriteOnce
10411047
# storageClassName: ""
1048+
# volumeAttributesClassName: ""
10421049
## If the storage class is left undefined when using persistence
10431050
## the default storage class for the cluster will be used.
10441051
##
@@ -1053,6 +1060,11 @@ bookkeeper:
10531060
# mountOptions:
10541061
# extraParameters:
10551062
# iopsPerGB: "50"
1063+
# volumeAttributesClass:
1064+
# driverName: "driver.example.com"
1065+
# parameters:
1066+
# key1: "value1"
1067+
# key2: "value2"
10561068
# metadata to add onto PVCs for ledgers storage
10571069
# metadata:
10581070
# annotations:

0 commit comments

Comments
 (0)