Fix command and args assignment when creating containers with K8S executor
What does this MR do?
Fixes assignment of
Args values when Runner creates container with K8S executor. Currently it was handled improperly and was causing problems, when extended docker configuration for
services was used.
Additionally - to handle the breaking change in a user friendly way - a base Feature Flag mechanism was implemented.
Why was this MR needed?
Please look into #3536 (closed) for some context.
The problem is that in K8S API,
Command is always the replacement of Docker's
Entrypoint. The same is for
Args which should be treated as replacement for Docker's Command. Current implementation of Runner - introduced with !596 (merged) - was assuming, that
command should be filled first, and then
args when needed and that K8S will handle this properly.
This was a very wrong assumption.
Command should be populated with the value of requested
Entrypoint, or left empty if user want's image's default to be used. The same states for
Args - specify when needed, leave empty for image's default.
This MR fixes the wrong implementation.
Are there points in the code the reviewer needs to double check?
Does this MR meet the acceptance criteria?
- Added tests for this feature/bug
In case of conflicts with
master- branch was rebased