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

Post Infinispan 10 integration tasks #140

Merged
merged 9 commits into from
Sep 5, 2019
Merged

Conversation

galderz
Copy link
Member

@galderz galderz commented Aug 30, 2019

Resolve #120, #121 and #122

Also refactored all Kubernetes code to use just one client API: the one provided by the controller. This way, we can load up the Kubernetes helper method from either the controller manager, or external configuration.

The controller API is less typesafe, which might be harder to use compared to the typed one, but it also offers more possibilities for further simplification of the API, since a lot of calls are very similar and only differ in parameters.

Documentation for the security changes will be added in a later commit (either in this PR or a separate one)

@galderz
Copy link
Member Author

galderz commented Aug 30, 2019

Fixing CI...

@galderz
Copy link
Member Author

galderz commented Aug 30, 2019

Added documentation for security changes (cc @oraNod), and refactored CR examples to highlight each independent set of examples.

@galderz
Copy link
Member Author

galderz commented Aug 30, 2019

Forced pushed branch to fix issue that was making CI fail

@galderz
Copy link
Member Author

galderz commented Sep 2, 2019

The issue I'm having with creating CRDs using the controller runtime API might be related to controller-runtime#321. I'm exploring alternatives proposed there. Otherwise can always revert to the previous method for creating/instantiating CRDs. A PR is currently being discussed to avoid this issue.

@galderz
Copy link
Member Author

galderz commented Sep 2, 2019

That worked, I'll tidy up the commits.

@galderz
Copy link
Member Author

galderz commented Sep 2, 2019

Squashed the CI fix (temporary workaround to use a dynamic rest mapper) to the refactoring commit. Let's see if CI agrees :)

@galderz
Copy link
Member Author

galderz commented Sep 2, 2019

CI looks good @rigazilla

@rigazilla
Copy link
Collaborator

@galderz ok. Testing locally

@rigazilla
Copy link
Collaborator

tests are ok locally in all the k8s flavours: minikube, os 3.11, os 4.1.
Quick reviewing the code now

Copy link
Collaborator

@rigazilla rigazilla left a comment

Choose a reason for hiding this comment

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

@galderz looks good. Added just some minor comments.

pkg/controller/infinispan/infinispan_controller.go Outdated Show resolved Hide resolved
pkg/controller/infinispan/util/cluster.go Outdated Show resolved Hide resolved
pkg/controller/infinispan/util/yaml.go Outdated Show resolved Hide resolved
@galderz
Copy link
Member Author

galderz commented Sep 5, 2019

@rigazilla Fixed you comments and pushed. Let's see CI...

* The operator gets given a Kubernetes client via the controller.
Refactor kubernetes code to use that, or resolve Kubernetes config locally.
* A bug in controller-runtime API means that if a CRD is created,
this won't be found by the client until it's recreated.
* Temporarily workaround it by using a dynamic REST mapper.
* It makes sense to have multiple CR examples,
but to avoid confusing users,
each set should be stored in its independent folder.
* Further configuration should be consulted in the official documentation.
@rigazilla rigazilla merged commit 0724e85 into infinispan:master Sep 5, 2019
@rigazilla
Copy link
Collaborator

thank you!

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.

Address production code Go linter warnings
2 participants