-
Notifications
You must be signed in to change notification settings - Fork 899
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
Add standard Crossplane package labels to objects. #5536
base: master
Are you sure you want to change the base?
Conversation
Adding the labels to the objects created by crossplane function and provider helps the end users to filter resources on these labels. Signed-off-by: Sunil Shivanand <padlar@live.com>
@@ -194,6 +195,7 @@ func (b *RuntimeManifestBuilder) Deployment(serviceAccount string, overrides ... | |||
// Optional defaults, will be used only if the runtime config does not | |||
// specify them. | |||
DeploymentWithOptionalName(b.revision.GetName()), | |||
DeploymentWithLabels(b.podSelectors()), |
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.
Not sure if adding it as an override is a good option. Other option is to add it in the runtime pre/post hook.
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.
I'm not sure either. @turkenh introduced this pattern, so I'm sure he can provide guidance.
@@ -159,6 +159,7 @@ func (b *RuntimeManifestBuilder) ServiceAccount(overrides ...ServiceAccountOverr | |||
|
|||
// Overrides that we are opinionated about. | |||
ServiceAccountWithNamespace(b.namespace), | |||
ServiceAccountWithLabels(b.podSelectors()), |
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.
Perhaps we should rename podSelectors
if we're now using it to do more than select pods.
Adding the labels to the objects created by crossplane function and provider helps the end users to filter resources on these labels.
Description of your changes
Fixes #5273
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR.Need help with this checklist? See the cheat sheet.