From cf6d1a66bde7251a6b10acee3d17794643e6b771 Mon Sep 17 00:00:00 2001 From: Simon Stumpf <32813906+simonstumpf@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:56:09 +0200 Subject: [PATCH] backport 554 Signed-off-by: Simon Stumpf <32813906+simonstumpf@users.noreply.github.com> --- 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 37ea7ba3..d35cd1dc 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.32.0] +### Added +- Allow user-defined labels on persistent volume claim +### Changed +### Deprecated +### Removed +### Fixed +### Security +--- ## [1.31.0] ### Added - Ability to add additional `labels` to `serviceMonitor` @@ -715,7 +724,8 @@ config: ### Fixed ### Security -[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.0...HEAD +[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.32.0...HEAD +[1.32.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.0...opensearch-1.32.0 [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 [1.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.28.1...opensearch-1.29.0 diff --git a/charts/opensearch/Chart.yaml b/charts/opensearch/Chart.yaml index 5fad64bb..2f20b099 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.0 +version: 1.32.0 # 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