-
Notifications
You must be signed in to change notification settings - Fork 528
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
Refactor JKubeServiceHub's BuildService election mechanism #253
Comments
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), setLogger() methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), setLogger() methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
I thought there was an extra-issue for this, but we probably just discussed this elsewhere because I can't find it. In addition to the way BuildService implementations are discovered and instantiated, we need a way to automatically (in case the user doesn't provide a manual configuration So, for openshift-maven-plugin, current assumption is to use s2i or in cluster Docker if specified as a build strategy. ✔️ However, for kubernetes-maven-plugin, if no strategy is selected, JKube should be smart enough to select the appropriate build strategy. e.g. try with Docker, fallback to jib |
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
…on mechanism + Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
+ Use ServiceLoader to load all Build Services and pick up service which is applicable in current context. This requires BuildService implementations to have zero-arg constructors so I need to set the elements from setters instead. + Added isApplicable(), setJKubeServiceHub(), methods in BuildService interface Signed-off-by: Rohan Kumar <[email protected]>
Right now we have a really ugly way of selecting a particular
BuildService
https://github.com/eclipse/jkube/blob/1c916f9e76566e8d2bc0721156742bd04bf5161a/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/JKubeServiceHub.java#L100-L110
This approach is fine for now but as we plan to increase support for multiple builds(like JIB, Buildah, Podman etc). We need to refactor this and make it generic. We can probably implement it like we're doing in case of Generators:
https://github.com/eclipse/jkube/blob/1c916f9e76566e8d2bc0721156742bd04bf5161a/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/generator/GeneratorManager.java#L52-L60
The text was updated successfully, but these errors were encountered: