-
-
Notifications
You must be signed in to change notification settings - Fork 83
Add support for labels to more K8sResource types #53
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 for labels to more K8sResource types #53
Conversation
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
=========================================
Coverage 92.34% 92.34%
Complexity 497 497
=========================================
Files 54 54
Lines 1202 1202
=========================================
Hits 1110 1110
Misses 92 92
Continue to review full report at Codecov.
|
|
Interestingly enough, I think there are more resources in this situation. 🤔 |
|
I will be adding it to all resources, and if that works out we can discuss to move If you run the tests locally, does it work for you? |
|
FYI: I am going to switch to using Minikube, Docker for Mac has different defaults. For example; there is no storageclass called |
|
@MujibAzizi I use Minikube for testing, maybe that's what the testing is biased towards it. If all resources accept Labels, then it can be moved to the K8sResource. However, I think it's not the same as the annotations. |
7d2370f to
e0d37e8
Compare
|
@rennokki I've finished adding I'm marking the PR as Ready for Review. |
|
Thank you for your contribution. ❤️ |
My pleasure! Thank you for merging. |
This PR adds support for labels to more classes which extend the
K8sResourceclass.Right now, calling
setLabelson, for example,K8sServiceleads to theHasAttributes's__callmethod being used which adds thelabelsas a top level key rather than as a child ofmetadata. To correct the behaviour of this, theHasLabelsmust be added to all classes.Classes to add
HasLabels, tests and update documentation for:K8sScaleScale is not an Kubernetes resource and thus I will not addHasLabelsto it.Closes #52