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

Migrate to operator-sdk 0.3.0 #315

Merged
merged 13 commits into from
Jan 7, 2019

Conversation

nicolaferraro
Copy link
Member

Fix #237
There are major changes between 0.0.7 and 0.3.x.

@nicolaferraro nicolaferraro added the status/wip Work in progress label Jan 4, 2019
@lburgazzoli
Copy link
Contributor

lburgazzoli commented Jan 4, 2019

just wondering: should we create a k8sclient package with a global client and some utilities instead of passing a client instance similar to the old operator sdk?

@nicolaferraro
Copy link
Member Author

Yes, now I've added a client-wrapper package that simplifies things a bit. But I'm not fully convinced on switching to the old "static var" approach...

@lburgazzoli
Copy link
Contributor

what are the cons?

@nicolaferraro
Copy link
Member Author

Client is injected by the controller runtime into the user controllers each time a reconciliation should be executed. Saving it to a global location and using it from there does not seem so clean to me...

Now you can assume it's always the same client, but what if it changes later (e.g. because of a periodic cache reset)?
And, in any case, you need to pass the context.Context around.. it cannot be global..

@lburgazzoli
Copy link
Contributor

now it’s more clear, thx

@nicolaferraro
Copy link
Member Author

Only thing missing seems to be (lupus in fabula) a cache reset in the out-of-cluster client during installation, otherwise kamel install is not able to install the CRDs as they don't exist at the beginning..

@nicolaferraro nicolaferraro removed the status/wip Work in progress label Jan 7, 2019
@nicolaferraro nicolaferraro changed the title [WIP] Migrate to operator-sdk 0.3.0 Migrate to operator-sdk 0.3.0 Jan 7, 2019
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.

2 participants