-
Notifications
You must be signed in to change notification settings - Fork 114
Initial implementation of managed labels #122
Initial implementation of managed labels #122
Conversation
Hey @rjbez17 let's maybe give this a day or two for others to chime in before we submit this? |
da7cb28
to
279e6e0
Compare
Sure thing. Is this a draft and you'll add the other pieces into this PR or follow up with a separate PR? |
No, this is the commit I want to submit. The other pieces can come in other PRs, hopefully including PRs submitted by other people. I just wanted to do the core work myself, but there are people volunteering to do things like add validators so I'd like to take them up on it. |
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.
@adrianludwin I did a first scan - mainly focusing on the "api" to this new feature. I think I need understand more of the HNC concepts before looking into the reconcile logic. 😅 It seems a bit complicated.
Yeah I need to (re?) write a guide to how HNC works internally to make it easier for people to onboard. It's not that complicated once you get it, but it's not exactly intuitive either. |
279e6e0
to
98f9654
Compare
98f9654
to
c37f159
Compare
See kubernetes-retired#47. This is the initial implementation of managed labels and annotations - that is, the ability to set a label (or annotation) in a HierarchyConfiguration object, and have that label (...) propagated to all descendants, similar to the way objects are propagated. As with objects, only allowlisted labels are propagated, as defined by the command line option '--managed-namespace-[label|annotation]'. Still to come: validator support, better conditions for conflicts, better testing for external namespaces, better testing for more regexes, documentation, end-to-end tests. Tested: see new integ tests.
c37f159
to
48df984
Compare
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, but I do not know the core well enough to count! 😉
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianludwin, erikgb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @rjbez17 I think we're ready for a review whenever you are, thanks! |
/lgtm |
See #47. This is the initial implementation of managed labels and
annotations - that is, the ability to set a label (or annotation) in a
HierarchyConfiguration object, and have that label (...) propagated to
all descendants, similar to the way objects are propagated. As with
objects, only allowlisted labels are propagated, as defined by the
command line option '--managed-namespace-[label|annotation]'.
Still to come: validator support, better conditions for conflicts,
better testing for external namespaces, better testing for more regexes,
documentation.
Tested: see new integ tests.
For more information, see design doc