Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Elasticsearch: do not include heritage selector #437

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

desaintmartin
Copy link
Contributor

@desaintmartin desaintmartin commented Jan 10, 2020

According to https://github.com/helm/charts/blob/master/REVIEW_GUIDELINES.md, service selector should not contain heritage.

It would break (future) migration from helm 2 to helm 3 (during the rolling update only, there could be a downtime when only old nodes with old labels are ready but service has been updated to new selector).

  • Chart version not bumped (the versions are all bumped and released at the same time)
  • README.md updated with any new values or changes
  • Updated template tests in ${CHART}/tests/*.py
  • Updated integration tests in ${CHART}/examples/*/test/goss.yaml

@elasticmachine
Copy link
Collaborator

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?

@desaintmartin desaintmartin mentioned this pull request Jan 10, 2020
@pbecotte
Copy link
Contributor

I don't think helm adds any sort of labels by default- this should not be an issue with helm 2 > helm 3 upgrade?

The labels do not match the recommendations as you pointed out. If they are going to be changed though, there are a bunch of places that should happen. Plus, it's not a matter of just removing them- this one should be changed to app.kubernetes.io/managed-by

The best possible change would be to use the helpers file to build up a common labels block and replace all the instances with it.

@desaintmartin
Copy link
Contributor Author

heritage is "Tiller" in helm 2 and "Helm" in helm 3, thus having the new service with new selector filters out the old nodes, causing an unnecessary downtime during upgrade when new nodes are not yet ready.

Changing the labels to the new style labels is an incompatible change that requires downtime (removing statefulsets with cascading BEFORE upgrading), so it is much harder to do, although probably wanted in the (not so near) future, so maybe those are two different problems.

(Note that this is what I've done with kubernetes-dashboard, see the templates for labels https://github.com/kubernetes/dashboard/pull/4502/files#diff-c24a48865b91946a2e67f077b67682cfR37 and matchlabels https://github.com/kubernetes/dashboard/pull/4502/files#diff-c24a48865b91946a2e67f077b67682cfR48 , the downside being having to uninstall the Helm Release...)

I can update the PR to add two templates like this but keeping backward compatibility.

@jmlrt jmlrt added the enhancement New feature or request label Jan 20, 2020
@jmlrt
Copy link
Member

jmlrt commented Jan 20, 2020

jenkins test this please

@desaintmartin
Copy link
Contributor Author

Gentle up! ;)

According to https://github.com/helm/charts/blob/master/REVIEW_GUIDELINES.md, service selector should not contain heritage.

It would break (future) migration from helm 2 to helm 3 (during the rolling update only, there could be a downtime when only old nodes are ready but new services is there).
@desaintmartin
Copy link
Contributor Author

Rebased.

@jmlrt
Copy link
Member

jmlrt commented Jun 11, 2020

jenkins test this please

Copy link
Member

@jmlrt jmlrt left a 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 and sorry for the delay @desaintmartin

@jmlrt jmlrt merged commit a8e8752 into elastic:master Jun 11, 2020
jmlrt pushed a commit that referenced this pull request Jun 12, 2020
According to https://github.com/helm/charts/blob/master/REVIEW_GUIDELINES.md, service selector should not contain heritage.

It would break (future) migration from helm 2 to helm 3 (during the rolling update only, there could be a downtime when only old nodes are ready but new services is there).
jmlrt pushed a commit that referenced this pull request Jun 12, 2020
According to https://github.com/helm/charts/blob/master/REVIEW_GUIDELINES.md, service selector should not contain heritage.

It would break (future) migration from helm 2 to helm 3 (during the rolling update only, there could be a downtime when only old nodes are ready but new services is there).
@jmlrt
Copy link
Member

jmlrt commented Jun 12, 2020

backported to 6.8 and 7.x branches

@jmlrt jmlrt mentioned this pull request Jun 18, 2020
@jmlrt jmlrt mentioned this pull request Oct 28, 2020
This was referenced Nov 17, 2020
@jmlrt jmlrt mentioned this pull request Feb 8, 2021
This was referenced Mar 15, 2021
@jmlrt jmlrt mentioned this pull request May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants