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

Make the pod selector label configurable #148

Merged
merged 4 commits into from
Apr 16, 2019
Merged

Make the pod selector label configurable #148

merged 4 commits into from
Apr 16, 2019

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Apr 15, 2019

This PR introduces a new flag named selector-labels that allows the pod selector match label to be configured at run time.

By default Flagger will search for one of the following labels:

  • app
  • name
  • app.kubernetes.io/name

If none of the above labels are found in Deployment.Spec.Selector.MatchLabels the canary is rejected.

Fix: #100

@stefanprodan stefanprodan merged commit bdc3a32 into master Apr 16, 2019
@stefanprodan stefanprodan deleted the selectors branch April 16, 2019 06:51
@@ -96,6 +96,9 @@ spec:
app: podinfo
```

Besides `app` Flagger supports `name` and `app.kubernetes.io/name` selectors. If you use a different
convention you can specify your label with the `-selector-labels` flag.
Copy link

@sarialem sarialem Jan 9, 2020

Choose a reason for hiding this comment

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

It was really difficult to know where to use this flag from this documentation, I had to come to this PR to realize that it should be used when installing flagger with helm, or maybe I'm still wrong, how is it used?

Copy link
Member Author

Choose a reason for hiding this comment

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

The Helm options are documented in the chart readme here to set a label with Helm you would do --set selectorLabels=somelabel

Copy link

Choose a reason for hiding this comment

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

Thanks @stefanprodan

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you please open an issue for making the docs better around selector-labels, the Helm example should probably be there.

Copy link

Choose a reason for hiding this comment

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

Here:
#403

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks 👍

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

Successfully merging this pull request may close these issues.

Make the pod label selector configurable
2 participants