Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

[WiP] Adds traffic route rules appliers #4

Closed
wants to merge 1 commit into from

Conversation

lordofthejars
Copy link
Contributor

I have created the first part of the PR which implies creating a class to apply istio resources to the cluster.

Currently, I have only implemented the RouteRoules but if we agree with everything I'll implement for the rest.

I'd like to discuss is the names of the classes (I am really bad naming classes) and the Adapter interface. I have created this interface for next reason: There are two different kubernetes client (the f8 kubernates client and the f8 kubernetes client uberjar versioned) so to give support to both possibilities I needed to create this abstraction. This also applies if someday we need to apply some specific operations for OpenShift client or other kubernetes client that are out there.

@metacosm
Copy link
Member

I have taken your code and made some modifications which I think make it a little simpler (no need to create a new Applier implementation per resource). I pushed it at https://github.com/snowdrop/istio-java-api/tree/applier_module, let me know what you think. The tests are currently failing, it seems like the mock isn't triggered but I'm not sure why.

@lordofthejars
Copy link
Contributor Author

lordofthejars commented Jan 10, 2018 via email

@metacosm
Copy link
Member

I suspect it has something to do with the mocking set-up as stepping into the code shows the non-mocked methods behave as expected but the mock doesn't.

@metacosm
Copy link
Member

Tests are fixed, I had a logic error in them.

@metacosm
Copy link
Member

@lordofthejars Did you get a chance to look at the new version?

@lordofthejars
Copy link
Contributor Author

I am waiting for the change you mentioned me in twitter, but I couldn't see any new commit to master.

@metacosm
Copy link
Member

I have released istio-java-api 0.4 which enables you to create quota and such. It has a slight API change due to the issue of the missing spec element which should now be fixed. I'm leaning towards merging the applier_module branch soon…

@lordofthejars
Copy link
Contributor Author

On Monday I'll work on that to have the new elements on place, and then we can merge the PR.

@metacosm
Copy link
Member

You'll see that the new code doesn't really require much to add the new elements (and probably still can be improved): it should only be a matter of adding an entry in a map… see in particular: https://github.com/snowdrop/istio-java-api/blob/applier_module/istio-applier/src/main/java/me/snowdrop/istio/applier/IstioExecutor.java#L33

@metacosm
Copy link
Member

Merged branch into master. I renamed the module to istio-client along with package name and IstioExecutor -> IstioClient since I think it's more explicit and other features might be added to interact with the Istio runtime at some point. Thank you again!

@metacosm metacosm closed this Jan 13, 2018
@lordofthejars lordofthejars deleted the applier_module branch January 14, 2018 10:23
@lordofthejars
Copy link
Contributor Author

Nice!!! Thank you very much. I see that it has been released, this means that I can start the integration with traffic rules in Arquillian Cube.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants