-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Elasticsearch: set PVC labels through setting all StatefulSet labels to its volumeClaimTemplate #665
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @desaintmartin,
Thank you for this PR 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upgrade test is failing because volumeClaimTemplates
update is forbidden for statefulsets:
14:52:00 Upgrading Elasticsearch chart
14:52:01 Error: UPGRADE FAILED: StatefulSet.apps "upgrade-master" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden
14:52:01 UPGRADE FAILED
I would suggest adding a persistence.labels.enabled
value. This label would default to false
to no break upgrade from previous versions and would add the labels only when overrided to true
.
WDYT?
Sure, here you are. Would you need tests for this? |
jenkins test this please |
@@ -26,6 +26,16 @@ spec: | |||
volumeClaimTemplates: | |||
- metadata: | |||
name: {{ template "elasticsearch.uname" . }} | |||
{{- if .Values.labels.enabled }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{- if .Values.labels.enabled }} | |
{{- if .Values.persistence.labels.enabled }} |
Adding test would be great. Ideally we should have an |
Updated! |
jenkins test this please |
💚 CLA has been signed |
…to its volumeClaimTemplate. Allows to track created PVCs (example: delete all PVCs from this recently deleted Release). Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
Done, signed, rebased. |
jenkins test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM⛴
Thanks for this PR 👍
…to its volumeClaimTemplate (#665)
…to its volumeClaimTemplate (#665)
…to its volumeClaimTemplate (#665)
backported to |
Elasticsearch: set PVC labels through setting all StatefulSet labels to its volumeClaimTemplate.
Allows to track created PVCs (example: delete all PVCs from this recently deleted Release).
${CHART}/tests/*.py
${CHART}/examples/*/test/goss.yaml