-
Notifications
You must be signed in to change notification settings - Fork 743
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
Conversation
- default labels: app, name and app.kubernetes.io/name
@@ -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. |
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.
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?
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 Helm options are documented in the chart readme here to set a label with Helm you would do --set selectorLabels=somelabel
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.
Thanks @stefanprodan
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.
Can you please open an issue for making the docs better around selector-labels, the Helm example should probably be there.
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.
Here:
#403
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.
Thanks 👍
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