-
Notifications
You must be signed in to change notification settings - Fork 106
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
EXPERIMENTAL HA support #163
EXPERIMENTAL HA support #163
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianludwin 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 |
5b233ec
to
154cb37
Compare
/lgtm |
This change lets the HNC manager be run both without webhooks and in webhook-only mode. This allows us to create two Deployments - one for the controller which actually makes changes, and another replicated deployment for the webhooks, each of which independently sync their in-memory forests and serve webhook requests. Taking advantage of this new feature requires considerable changes to the manifests, which I'm checking in as a separate commit. Tested: change passes smoke test when deployed with HA manifests, but I haven't done any careful validation that (for example) the HA deployment isn't actually writing anything.
154cb37
to
4e63495
Compare
/lgtm |
Erik's busy so submitting this now. /hold cancel |
@@ -102,7 +102,7 @@ func HNCBeforeSuite() { | |||
Expect(err).ToNot(HaveOccurred()) | |||
|
|||
By("creating reconcilers") | |||
err = setup.CreateReconcilers(k8sManager, forest.NewForest(), 100, true) | |||
err = setup.CreateReconcilers(k8sManager, forest.NewForest(), 100, false, true) |
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.
Could it make sense to create some constants to make the code more readable? What does false, true
really mean here? ReadOnlyMode, UseFakeClient
would read better IMO.
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.
Whoops, I just removed the hold. This is an easy followup.
This change lets the HNC manager be run both without webhooks and
in webhook-only mode. This allows us to create two Deployments - one for
the controller which actually makes changes, and another replicated
deployment for the webhooks, each of which independently sync their
in-memory forests and serve webhook requests.
Taking advantage of this new feature requires considerable changes to
the manifests, which I'm checking in as a separate commit.
Tested: change passes smoke test when deployed with HA manifests, but I
haven't done any careful validation that (for example) the HA deployment
isn't actually writing anything.