-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement remote plugin runtime injection #14333
Conversation
Inject remote plugin injection with help of init container and changing plugin container command and arguments Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:
|
E2E tests of Eclipse Che Multiuser on OCP has been successful:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, I'd like to test the changes before approval.
Please consider test cases for patching.
throws InternalInfrastructureException { | ||
return chePlugins | ||
.stream() | ||
.filter(chePlugin -> "che editor".equals(chePlugin.getType().toLowerCase())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"che editor" should be extracted to a Constant.
.orElseThrow( | ||
() -> | ||
new InternalInfrastructureException( | ||
"Workspace should has defined at least one editor")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Workspace should has defined at least one editor")); | |
"Workspace should have at least one editor defined")); |
|
||
boolean pluginIsMatched = pluginIsMatchedToPatch(pluginType, pluginPatcher); | ||
|
||
if (pluginIsMatched) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to use the intermediate variable, we could just do if (pluginIsMatchedToPatch(pluginType, pluginPatcher)
Container k8sContainer = toK8sContainer(container, emptyList()); | ||
|
||
k8sContainer.setCommand(container.getCommand()); | ||
k8sContainer.setArgs(container.getArgs()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about adding args
and command
to k8sContainerResolver instead of doing it manually?
@@ -651,6 +651,7 @@ private ChePlugin createChePlugin(String name, CheContainer... containers) { | |||
ChePlugin plugin = new ChePlugin(); | |||
plugin.setName(name); | |||
plugin.setPublisher(publisher); | |||
plugin.setType("Che editor"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have test cases for the patching process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that we might need to have a bit more discussion on the underlying meta.yaml and plugin model changes before merging this.
What does this PR do?
Implement remote plugin runtime injection :
Inject remote plugin injection with help of init container and changing plugin container command and arguments
What issues does this PR fix or reference?
redhat-developer/rh-che#1449
Needed for #13387
DEPENDS ON RP:
eclipse-che/che-plugin-broker#71
Signed-off-by: Oleksandr Andriienko oandriie@redhat.com