-
Notifications
You must be signed in to change notification settings - Fork 26
Start remote binary using env and appling ephemeral volume #76
Start remote binary using env and appling ephemeral volume #76
Conversation
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
+ Coverage 67.17% 68.15% +0.97%
==========================================
Files 6 7 +1
Lines 591 650 +59
==========================================
+ Hits 397 443 +46
- Misses 168 176 +8
- Partials 26 31 +5
Continue to review full report at Codecov.
|
IMHO description of the PR should tell the name of the env variable, what to add, etc. |
What is the impact on docs for this change? #definitionOfDone |
|
||
InjectorContainerName = "remote-runtime-injector" | ||
|
||
RemoteEndPontExecutableEnvVar = "PLUGIN_REMOTE_ENDPOINT_EXECUTABLE" |
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.
Typo: RemoteEndPointExecutableEnvVar
func InjectRemoteRuntime(plugins []model.ChePlugin) { | ||
editorPlugin, err := findDefaultEditorPlugin(plugins) | ||
if err != nil { | ||
return |
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 shouldn't fail silently here.
|
||
runtimeBinaryPathEnv, err := findEnv(RemoteEndPontExecutableEnvVar, containerInjector.Env) | ||
if err != nil || runtimeBinaryPathEnv.Value == "" { | ||
return nil, err |
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.
If err == nil
and runtimeBinaryPathEnv.Value == ""
, this will return nil, nil
.
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.
Fixed
Fixed |
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
What does this PR do?
At this pr I changed a bit model: applied Type field to the model.ChePlugin
Inject remote endpoint binary using env variable with remote binary path and volume where is binary located.
For this purpose we are using init container from che-theia editor-plugin:
Plugin broker should find this init container by name
remote-runtime-injector
and only for che-theia editor plugin. Then plugin-broker should analize env variables and volume from init container.REMOTE_ENDPOINT_VOLUME_NAME
env we are using to find one volume which should be shared with other sidecar containers. In this volume init container on start should copy remote binaryPLUGIN_REMOTE_ENDPOINT_EXECUTABLE
env will be shared with all sidecar containers.To start remote binary in the sidecar container, plugin writer should define in the sidecar dockerfile ENTRYPOINT:
Or apply starting remote binary in the entrypoint.sh script, if plugin image uses such one.
What issues does this PR fix or reference?
eclipse-che/che#13387