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 support to set additional pod labels #3733

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

Conversation

shuheiktgw
Copy link

@shuheiktgw shuheiktgw commented Feb 22, 2025

Description:
I've added support to set additional pod labels like pod annotations. Thank you for your review!

Link to tracking Issue(s):

Testing:

Documentation:

@shuheiktgw shuheiktgw requested a review from a team as a code owner February 22, 2025 14:38
@@ -15,14 +15,24 @@ import (
// Deployment builds the deployment for the given instance.
func Deployment(params Params) (*appsv1.Deployment, error) {
name := naming.TargetAllocator(params.TargetAllocator.Name)
labels := manifestutils.Labels(params.TargetAllocator.ObjectMeta, name, params.TargetAllocator.Spec.Image, ComponentOpenTelemetryTargetAllocator, nil)
labels := manifestutils.Labels(params.TargetAllocator.ObjectMeta, name, params.TargetAllocator.Spec.Image, ComponentOpenTelemetryTargetAllocator, manifestutils.WithFilterLabels(params.Config.LabelsFilter()))
Copy link
Author

Choose a reason for hiding this comment

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

I believe we need to support label filter here.

@iblancasa
Copy link
Contributor

I'm not sure if this PR just covers #2884 or more things. My feeling is that we should filter some of the values in the created resources, not adding a new field (that can be interesting but I don't feel is what the issue is about).

@shuheiktgw
Copy link
Author

@iblancasa Thank you for your feedback! Now that I’ve reread the issue, I realize I completely misunderstood it—this PR actually does propagate annotations and labels to child resources 😂 Let me make sure I understand correctly. Are you suggesting that instead of adding new fields to the CRD or flags to the controllers, we should create a list of annotations and labels that should not be propagated to child resources?

@iblancasa
Copy link
Contributor

Are you suggesting that instead of adding new fields to the CRD or flags to the controllers, we should create a list of annotations and labels that should not be propagated to child resources?

Yes.

@shuheiktgw
Copy link
Author

Let me move our discussion to the original 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

Successfully merging this pull request may close these issues.

2 participants