From 456968ffc98a26d59635d64c1957bc1499c36a88 Mon Sep 17 00:00:00 2001 From: Quan TRAN Date: Mon, 5 Dec 2022 11:37:31 +0100 Subject: [PATCH] [bitnami/zookeeper] replace commonAnnotations & commonLabels with persistence.annotations & persistence.labels in volumeClaimTemplates (#13662) * [zookeeper] remove common annotations from volumeClaimTemplates Signed-off-by: Quan TRAN * [zookeeper] add persistence.labels Signed-off-by: Quan TRAN Signed-off-by: Quan TRAN --- bitnami/zookeeper/Chart.yaml | 2 +- bitnami/zookeeper/README.md | 5 ++-- bitnami/zookeeper/templates/statefulset.yaml | 26 ++++++-------------- bitnami/zookeeper/values.yaml | 3 +++ 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/bitnami/zookeeper/Chart.yaml b/bitnami/zookeeper/Chart.yaml index c8dc398125..edeeee647f 100644 --- a/bitnami/zookeeper/Chart.yaml +++ b/bitnami/zookeeper/Chart.yaml @@ -21,4 +21,4 @@ name: zookeeper sources: - https://github.com/bitnami/containers/tree/main/bitnami/zookeeper - https://zookeeper.apache.org/ -version: 10.2.5 +version: 11.0.0 diff --git a/bitnami/zookeeper/README.md b/bitnami/zookeeper/README.md index 540208e403..013cba8af0 100644 --- a/bitnami/zookeeper/README.md +++ b/bitnami/zookeeper/README.md @@ -7,7 +7,7 @@ Apache ZooKeeper provides a reliable, centralized register of configuration data [Overview of Apache ZooKeeper](https://zookeeper.apache.org) Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement. - + ## TL;DR ```console @@ -240,6 +240,7 @@ The command removes all the Kubernetes components associated with the chart and | `persistence.accessModes` | PVC Access modes | `["ReadWriteOnce"]` | | `persistence.size` | PVC Storage Request for ZooKeeper data volume | `8Gi` | | `persistence.annotations` | Annotations for the PVC | `{}` | +| `persistence.labels` | Labels for the PVC | `{}` | | `persistence.selector` | Selector to match an existing Persistent Volume for ZooKeeper's data PVC | `{}` | | `persistence.dataLogDir.size` | PVC Storage Request for ZooKeeper's dedicated data log directory | `8Gi` | | `persistence.dataLogDir.existingClaim` | Provide an existing `PersistentVolumeClaim` for ZooKeeper's data log directory | `""` | @@ -524,4 +525,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License. diff --git a/bitnami/zookeeper/templates/statefulset.yaml b/bitnami/zookeeper/templates/statefulset.yaml index a44d17c74f..025d3630b2 100644 --- a/bitnami/zookeeper/templates/statefulset.yaml +++ b/bitnami/zookeeper/templates/statefulset.yaml @@ -488,16 +488,11 @@ spec: {{- if not .Values.persistence.existingClaim }} - metadata: name: data - annotations: - {{- range $key, $value := .Values.persistence.annotations }} - {{ $key }}: {{ $value }} + {{- if .Values.persistence.annotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }} {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 10 }} - {{- end }} - {{- if .Values.commonLabels }} - labels: - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 10 }} + {{- if .Values.persistence.labels }} + labels: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.labels "context" $) | nindent 10 }} {{- end }} spec: accessModes: @@ -515,16 +510,11 @@ spec: {{- if and (not .Values.persistence.dataLogDir.existingClaim) .Values.dataLogDir }} - metadata: name: data-log - annotations: - {{- range $key, $value := .Values.persistence.annotations }} - {{ $key }}: {{ $value }} + {{- if .Values.persistence.annotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }} {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 10 }} - {{- end }} - {{- if .Values.commonLabels }} - labels: - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 10 }} + {{- if .Values.persistence.labels }} + labels: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.labels "context" $) | nindent 10 }} {{- end }} spec: accessModes: diff --git a/bitnami/zookeeper/values.yaml b/bitnami/zookeeper/values.yaml index 89420a3da0..37bab7420e 100644 --- a/bitnami/zookeeper/values.yaml +++ b/bitnami/zookeeper/values.yaml @@ -607,6 +607,9 @@ persistence: ## @param persistence.annotations Annotations for the PVC ## annotations: {} + ## @param persistence.labels Labels for the PVC + ## + labels: {} ## @param persistence.selector Selector to match an existing Persistent Volume for ZooKeeper's data PVC ## If set, the PVC can't have a PV dynamically provisioned for it ## E.g.