-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Don't use global state #169
Comments
This issue blocks #139. I haven't looked into dynamic client pools, but it looks like once you create the client pool the any CRD's registered after the operator starts won't be available to the sdkclient API's. |
@hasbro17 @ericchiang is this PR in the direction you were thinking, i want to verify that it is the right direction and i will complete it and add unit tests. |
@CSdread I would hold off on that for now. Your PR is in the right direction but there's more to it than just making it a package level singleton. |
With #382 and the controller-runtime objects we don't have any implicit pkg level state backing global functions(for the client) anymore. |
https://github.com/coreos/operator-sdk/blob/01a1d22496f3344e750234bde022f7565d5d0fbe/pkg/k8sclient/client.go#L37-L45
https://peter.bourgon.org/blog/2017/06/09/theory-of-modern-go.html
The text was updated successfully, but these errors were encountered: