-
Notifications
You must be signed in to change notification settings - Fork 172
Dynamically create object reconcilers for new types. #424
Dynamically create object reconcilers for new types. #424
Conversation
Hi @sophieliu15. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @rjbez17 Note that this change will also stop syncing everything except Roles and RoleBindings by default. |
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
/ok-to-test |
5f1b35e
to
d97b627
Compare
The test should be fixed by now. Feel free to take a look. |
// Add secret to HNCConfiguration so that an ObjectReconciler will be created for secret. | ||
addSecretToHNCConfig(ctx, hncConfig) | ||
|
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.
These should all be in the BeforeEach
function at the top of this file.
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.
Good point. Done.
d97b627
to
9d3f734
Compare
This lgtm, @adrianludwin and @yiqigao217 are you satisfied with the updates from you last few comments? Feel free to remove hold when happy. /assign @adrianludwin /lgtm |
var _ = Describe("Secret", func() { | ||
var _ = Describe("Role", func() { |
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.
Didn't we switch this back to "Secret" now?
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.
Good catch! Switched back to "Secret".
Thanks Ryan! Just one minor nit left then I'll remove the hold. |
This PR creates object reconciler(s) when new type(s) are added to the HNCConfiguration and informs the hierarchy reconciler about the new object reconciler(s). Specifically, it does the following tasks: - Dynamically creates an object reconciler when a new type is added in HNCConfiguration. - Informs the hierarchy reconciler about the newly added object reconciler so the corresponding objects can be propagated correctly when the hierarchy structure changes. Test: Verified on a GKE cluster that - When adding a new type in HNCConfiguration, corresponding object reconciler is created successfully. - When adding a new object of the same type to a node in the namespace tree, the object is propagated correctly to the descendants of the node. - When the tree structure changes (e.g., add another descendant to the node above), the new object of the same type is propagated correctly.
9d3f734
to
123981b
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
/unhold
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianludwin, rjbez17, sophieliu15 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 |
This PR creates object reconciler(s) when new type(s) are added to the
HNCConfiguration and informs the hierarchy reconciler about the new
object reconciler(s).
Specifically, it does the following tasks:
in HNCConfiguration.
reconciler so the corresponding objects can be propagated correctly
when the hierarchy structure changes.
Test: Verified on a GKE cluster that
reconciler is created successfully.
tree, the object is propagated correctly to the descendants of the
node.
node above), the new object of the same type is propagated
correctly.
Design doc: http://bit.ly/hnc-type-configuration
Issue: #411