From 88052a9e3b9eb131f839f589070c81cbb9d9a204 Mon Sep 17 00:00:00 2001 From: Simon Stumpf <32813906+simonstumpf@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:10:24 +0100 Subject: [PATCH] backport 554 (#600) Signed-off-by: Simon Stumpf <32813906+simonstumpf@users.noreply.github.com> Signed-off-by: Peter Zhu Co-authored-by: Peter Zhu --- charts/opensearch/CHANGELOG.md | 12 +++++++++++- charts/opensearch/Chart.yaml | 2 +- charts/opensearch/templates/statefulset.yaml | 9 +++++++-- charts/opensearch/values.yaml | 2 ++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/charts/opensearch/CHANGELOG.md b/charts/opensearch/CHANGELOG.md index 962d5a02..fa03add4 100644 --- a/charts/opensearch/CHANGELOG.md +++ b/charts/opensearch/CHANGELOG.md @@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security --- +## [1.31.2] +### Added +- Allow user-defined labels on persistent volume claim +### Changed +### Deprecated +### Removed +### Fixed +### Security +--- ## [1.31.1] ### Added ### Changed @@ -724,7 +733,8 @@ config: ### Fixed ### Security -[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.1...HEAD +[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.2...HEAD +[1.31.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.1...opensearch-1.31.2 [1.31.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.0...opensearch-1.31.1 [1.31.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.30.0...opensearch-1.31.0 [1.30.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.29.0...opensearch-1.30.0 diff --git a/charts/opensearch/Chart.yaml b/charts/opensearch/Chart.yaml index ea031e67..22080072 100644 --- a/charts/opensearch/Chart.yaml +++ b/charts/opensearch/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.31.1 +version: 1.31.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/opensearch/templates/statefulset.yaml b/charts/opensearch/templates/statefulset.yaml index ad0a6cfa..daf96478 100644 --- a/charts/opensearch/templates/statefulset.yaml +++ b/charts/opensearch/templates/statefulset.yaml @@ -27,9 +27,14 @@ spec: volumeClaimTemplates: - metadata: name: {{ template "opensearch.uname" . }} - {{- if .Values.persistence.labels.enabled }} + {{- if or .Values.persistence.labels.enabled .Values.persistence.labels.additionalLabels }} labels: - {{- include "opensearch.labels" . | nindent 8 }} + {{- if .Values.persistence.labels.enabled }} + {{- include "opensearch.labels" . | nindent 8 }} + {{- end }} + {{- with .Values.persistence.labels.additionalLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} {{- with .Values.persistence.annotations }} annotations: diff --git a/charts/opensearch/values.yaml b/charts/opensearch/values.yaml index f5435d8a..dec56b5a 100644 --- a/charts/opensearch/values.yaml +++ b/charts/opensearch/values.yaml @@ -199,6 +199,8 @@ persistence: labels: # Add default labels for the volumeClaimTemplate of the StatefulSet enabled: false + # Add custom labels for the volumeClaimTemplate of the StatefulSet + additionalLabels: {} # OpenSearch Persistent Volume Storage Class # If defined, storageClassName: # If set to "-", storageClassName: "", which disables dynamic provisioning