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

Add standard Crossplane package labels to objects. #5536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

padlar
Copy link
Contributor

@padlar padlar commented Apr 3, 2024

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:

Need help with this checklist? See the cheat sheet.

@padlar padlar requested review from turkenh and a team as code owners April 3, 2024 05:28
@padlar padlar requested a review from negz April 3, 2024 05:28
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()),
Copy link
Contributor Author

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.

Copy link
Member

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()),
Copy link
Member

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.

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.

Add standard package labels to Function Deployments, ServiceAccounts and TLS Secrets
2 participants