Skip to content

Commit

Permalink
Allow user-defined labels on pvcs (#591)
Browse files Browse the repository at this point in the history
* allow user-defined labels on pvcs

Signed-off-by: Simon Stumpf <[email protected]>

* bummed version and updated changelog

Signed-off-by: Simon Stumpf <[email protected]>

* apply additional pvc labels regardless if labels are enabled

Signed-off-by: Simon Stumpf <[email protected]>

* updated changelog

Signed-off-by: Simon Stumpf <[email protected]>

---------

Signed-off-by: Simon Stumpf <[email protected]>
Signed-off-by: Simon Stumpf <[email protected]>
  • Loading branch information
simonstumpf authored Sep 16, 2024
1 parent ed36c59 commit 77b3e6c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
12 changes: 11 additions & 1 deletion charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.24.1]
### Added
- Allow user-defined labels on persistent volume claim
### Changed
### Deprecated
### Removed
### Fixed
### Security
=======
## [2.24.0]
### Added
- Ability to add additional `labels` to `serviceMonitor`
Expand Down Expand Up @@ -476,7 +485,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security

[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.24.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.24.1...HEAD
[2.24.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.24.0...opensearch-2.24.1
[2.24.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.23.1...opensearch-2.24.0
[2.23.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.23.1...opensearch-2.23.2
[2.23.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.23.0...opensearch-2.23.1
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2.24.0
version: 2.24.1

# 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
Expand Down
9 changes: 7 additions & 2 deletions charts/opensearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,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: <storageClass>
# If set to "-", storageClassName: "", which disables dynamic provisioning
Expand Down

0 comments on commit 77b3e6c

Please sign in to comment.