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

Added Support for custom labels and annotations in pods created by chart #682

Closed
wants to merge 1 commit into from

Conversation

SargamPuram
Copy link

This PR

This PR introduces support for custom labels and annotations for Kubernetes resources controllerManager and kubeRbacProxy to enhance organization and metadata management within the cluster.

Related Issues

Fixes #677

Notes

Follow-up Tasks

How to test

@SargamPuram SargamPuram requested a review from a team as a code owner June 21, 2024 10:45
@toddbaert
Copy link
Member

toddbaert commented Jun 27, 2024

Hey @SargamPuram ! @cpitstick-latai started work on this as well. Check it here. What he has done fixes the errors in your build. The problem is that kustomize/helm don't play nice together, so we have to have a hacky script to do some pre-processing. His implementation adds the labels and annotations to the helm-installed pods, like you did here, but not the runtime injected ones.

If you'd still like to help with this issue, I'd recommend that you base of #681, and add the annotations/labels at runtime (in Go code). You can see something similar here that I did for image pull secrets: #655 (you can see in that PR I added an additional arg to the go application/container which adds the imagePullSecrets to the injected deployment template...you'd have to do something similar for pods/labels). Perhaps you can create a PR to @cpitstick-latai 's branch? Or you could base on his changes in a new PR (I don't think he will mind).

@SargamPuram
Copy link
Author

Hey @SargamPuram ! @cpitstick-latai started work on this as well. Check it here. What he has done fixes the errors in your build. The problem is that kustomize/helm don't play nice together, so we have to have a hacky script to do some pre-processing. His implementation adds the labels and annotations to the helm-installed pods, like you did here, but not the runtime injected ones.

If you'd still like to help with this issue, I'd recommend that you base of #681, and add the annotations/labels at runtime (in Go code). You can see something similar here that I did for image pull secrets: #655 (you can see in that PR I added an additional arg to the go application/container which adds the imagePullSecrets to the injected deployment template...you'd have to do something similar for pods/labels). Perhaps you can create a PR to @cpitstick-latai 's branch? Or you could base on his changes in a new PR (I don't think he will mind).

Hey @SargamPuram ! @cpitstick-latai started work on this as well. Check it here. What he has done fixes the errors in your build. The problem is that kustomize/helm don't play nice together, so we have to have a hacky script to do some pre-processing. His implementation adds the labels and annotations to the helm-installed pods, like you did here, but not the runtime injected ones.

If you'd still like to help with this issue, I'd recommend that you base of #681, and add the annotations/labels at runtime (in Go code). You can see something similar here that I did for image pull secrets: #655 (you can see in that PR I added an additional arg to the go application/container which adds the imagePullSecrets to the injected deployment template...you'd have to do something similar for pods/labels). Perhaps you can create a PR to @cpitstick-latai 's branch? Or you could base on his changes in a new PR (I don't think he will mind).

Hey @toddbaert ,

Thanks for the update! I checked out your work and it looks great. I understand the challenges with kustomize and helm, and the need for a pre-processing script makes sense.

I’ll base my work off #681 and add the annotations/labels at runtime in the Go code, similar to what you did in #655 for image pull secrets. I’ll create a PR to your branch to include these changes.
Thanks!

@toddbaert
Copy link
Member

Hey @SargamPuram ! @cpitstick-latai started work on this as well. Check it here. What he has done fixes the errors in your build. The problem is that kustomize/helm don't play nice together, so we have to have a hacky script to do some pre-processing. His implementation adds the labels and annotations to the helm-installed pods, like you did here, but not the runtime injected ones.
If you'd still like to help with this issue, I'd recommend that you base of #681, and add the annotations/labels at runtime (in Go code). You can see something similar here that I did for image pull secrets: #655 (you can see in that PR I added an additional arg to the go application/container which adds the imagePullSecrets to the injected deployment template...you'd have to do something similar for pods/labels). Perhaps you can create a PR to @cpitstick-latai 's branch? Or you could base on his changes in a new PR (I don't think he will mind).

Hey @SargamPuram ! @cpitstick-latai started work on this as well. Check it here. What he has done fixes the errors in your build. The problem is that kustomize/helm don't play nice together, so we have to have a hacky script to do some pre-processing. His implementation adds the labels and annotations to the helm-installed pods, like you did here, but not the runtime injected ones.
If you'd still like to help with this issue, I'd recommend that you base of #681, and add the annotations/labels at runtime (in Go code). You can see something similar here that I did for image pull secrets: #655 (you can see in that PR I added an additional arg to the go application/container which adds the imagePullSecrets to the injected deployment template...you'd have to do something similar for pods/labels). Perhaps you can create a PR to @cpitstick-latai 's branch? Or you could base on his changes in a new PR (I don't think he will mind).

Hey @toddbaert ,

Thanks for the update! I checked out your work and it looks great. I understand the challenges with kustomize and helm, and the need for a pre-processing script makes sense.

I’ll base my work off #681 and add the annotations/labels at runtime in the Go code, similar to what you did in #655 for image pull secrets. I’ll create a PR to your branch to include these changes. Thanks!

Thanks so much @SargamPuram !

FYI @cpitstick-latai

@cpitstick-latai
Copy link
Contributor

I really needed this to move forward so I think I finished #681, please take a look.

@toddbaert
Copy link
Member

Closing as completed with #681. @SargamPuram thanks, you helped us get this done.

@toddbaert toddbaert closed this Jul 23, 2024
@SargamPuram
Copy link
Author

Closing as completed with #681. @SargamPuram thanks, you helped us get this done.

Hey @toddbaert and @cpitstick-latai,

Thanks so much for your support and guidance throughout this process. I appreciate the opportunity to contribute and am glad that the work was completed successfully.

While I didn't contribute as much this time, I'm eager to make more valuable contributions in the future. Looking forward to collaborating more closely and helping the project in any way I can.

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.

[Helm] Support custom labels and annotations in pods created by chart
3 participants