Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trailing leader election cm when using helm #722

Merged
merged 2 commits into from
Oct 11, 2019

Conversation

Dean-Coakley
Copy link
Contributor

Proposed changes

When removing an ingress controller deployment managed by helm.
A leader election configmap was left behind because it was created by
the IC and not managed by Tiller/Helm.

This PR pre-allocates the configmap so it is now managed by Helm.
The created configmap is blank, but once the Ingress Controller starts it updates the configmap with necessary Annotations required for leader election.

Edge cases

If the configmap somehow already exists. The helm deployment fails cleanly at the client level.

$ kubectl create cm dev-nginx-ingress-leader-election
configmap/dev-nginx-ingress-leader-election created
$ helm install --name dev deployments/helm-chart -f deployments/helm-chart/values.yaml
Error: release dev failed: configmaps "dev-nginx-ingress-leader-election" already exists

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

When removing an ingress controller deployment managed by helm.
This would leave a leader election configmap because it was created by
the IC and not managed by Tiller/Helm.

This commit pre-allocates the configmap so it is now managed by Helm.
@Dean-Coakley Dean-Coakley added the bug An issue reporting a potential bug label Oct 10, 2019
@Dean-Coakley Dean-Coakley self-assigned this Oct 10, 2019
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Dean-Coakley Dean-Coakley merged commit 73711e3 into master Oct 11, 2019
@Dean-Coakley Dean-Coakley deleted the fix-helm-trailing-cm branch October 11, 2019 07:47
@pleshakov pleshakov added the change Pull requests that introduce a change label Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue reporting a potential bug change Pull requests that introduce a change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants