-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Fix]: Let assignment of annotations to Pod without any existing ones #18
Conversation
Go test coverage: 85.6% for commit 53da70eView coverage for all packages# Package Name | Coverage
+ github.com/NCCloud/metadata-reflector/internal/clients | 88.1%
+ github.com/NCCloud/metadata-reflector/internal/common | 100.0%
+ github.com/NCCloud/metadata-reflector/internal/controllers/reflector | 83.0%
+ github.com/NCCloud/metadata-reflector/internal/metrics | 100.0% |
@nepomucen great, thank you, this looks awesome! I wonder if we need to add the same for setting labels. Theoretically, there will be no case when the pod doesn't have labels because we use them to actually get the pod but to keep things error-free, let's add the same logic here, wdyt? |
I agree with you about the extending the fix's logic to other functions as well. |
Thank you! Could you please cover these changes with tests as well 🙏 |
Sure, will do ... |
The tests are now added. |
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.
LGTM 🚀
What does this change resolve?
2024-12-18T11:36:46.057252474Z panic: assignment to entry in nil map
which occurs when controller tries to set annotations to Pod without existing ones.
Open questions or TODOs before merging if any