Skip to content
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

implementation of k8s client separation. #31

Merged

Conversation

eberlep
Copy link
Collaborator

@eberlep eberlep commented Dec 16, 2020

We now use two separate managers/clients to communicate with the service cluster (which holds the zalando postgresql resources) and the control plane cluster (which holds our fits postgres resources).

…ate managers/clients to communicate with the service cluster (which holds the zalando postgresql resources) and the control plane cluster (which holds our fits postgres resources)
@eberlep eberlep linked an issue Dec 16, 2020 that may be closed by this pull request
return ctrl.Result{}, err
}
log.Info("postgres status updated successfully", "status", newStatus)
// Update status will be handled by the StatusReconciler, based on the Zalando Status
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs discussion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this part anymore.

@eberlep eberlep changed the title WIP: initial implementation of k8s client separation. WIP: implementation of k8s client separation. Dec 16, 2020
@@ -90,12 +112,13 @@ func main() {
}()

if err = (&controllers.PostgresReconciler{
Client: mgr.GetClient(),
Client: ctrlPlaneClusterMgr.GetClient(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about an explicit name like ctrl for the client of the control-plane cluster and another explicit name like svc for the client of the service cluster?

Log: ctrl.Log.WithName("controllers").WithName("Status"),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
Client: svcClusterMgr.GetClient(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the above. How about an explicit name like svc for the client of the service-cluster?

@eberlep eberlep changed the title WIP: implementation of k8s client separation. implementation of k8s client separation. Jan 14, 2021
@eberlep eberlep merged commit 2b040de into main Jan 14, 2021
@eberlep eberlep deleted the separate_k8s_clients_for_service_cluster_and_ctrl_cluster branch January 14, 2021 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inject second kubernetes config and use this client for second manager
2 participants