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

Customizing generated deployment labels to fix Jenkins X deployments #177

Closed
carlossg opened this issue May 10, 2019 · 1 comment
Closed

Comments

@carlossg
Copy link
Contributor

With the helm deployment using templates instead of tiller we are hitting this issue
jenkins-x/jx#3920

because jx will delete all the deployments whose labels do not match jenkins.io/chart-release=jx,jenkins.io/version!=CURRENT_VERSION to cleanup, which includes the generated primary deployment

There are several options to avoid it

  1. flagger does not copy the labels from the canary to the primary deployment, because this is making the generated deployment look like it is part of the helm chart. Annotations are not being copied for instance. At least the chart label should probably not be there.
  2. flagger canary object adds a spec.deployment.labels section where I can override jenkins.io/chart-release="" or add a jx-do-not-delete type of label
  3. jx fixes it maybe not deleting something with ownerReferences or not having an annotation

I'm inclined for 1+2, do not add any label, unless explicitly set in the canary object under spec.deployment.labels

WDYT?

carlossg added a commit to carlossg/flagger that referenced this issue May 10, 2019
Use the labels defined in Canary.Spec.Deployment.Labels
carlossg added a commit to carlossg/flagger that referenced this issue May 10, 2019
Use the labels defined in Canary.Spec.Deployment.Labels
stefanprodan added a commit that referenced this issue May 11, 2019
Fix #177 Do not copy labels from canary to primary deployment
@stefanprodan
Copy link
Member

@carlossg Flagger 0.13.2 image and chart are up, please let me know if it solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants