Kubernetes Executor: Does not distinguish between ENTRYPOINT and CMD in services
Summary
No matter what we specify in .gitlab-ci.yml for extended services (either entrypoint or command) the Kubernetes Executor always transforms it to ContainerSpec.command, but never to ContainerSpec.args.
Steps to reproduce
# .gitlab-ci.yml
stages: ['repr']
repr-entrypoint:
stage: repr
script:
- sleep 600
services:
- name: docker:dind
entrypoint: ['--registry-mirror=http://gitlab-runner-proxy-registry.default:5000']
repr-command:
stage: repr
script:
- sleep 600
services:
- name: docker:dind
command: ['--registry-mirror=http://gitlab-runner-proxy-registry.default:5000']
Actual behavior
Pods specs (in Kubernetes Dashboard, for example) show that ContainerSpec.command is used in both cases:
svc-0
Image:
docker:dind
Environment variables:
DOCKER_DRIVER: overlay2
CI_SERVER: yes
...
CI_SERVER_NAME: GitLab
CI_SERVER_VERSION: 10.4.2
CI_SERVER_REVISION: b1c501c
...
CI_DISPOSABLE_ENVIRONMENT: true
Commands:
--registry-mirror=http://gitlab-runner-proxy-registry.default:5000
Args:
-
Expected behavior
To be compatible with Kubernetes docs:
- For
services[*].entrypointshould be usedContainerSpec.commandin Pod. - For
services[*].commandshould be usedContainerSpec.argsin Pod.
Environment description
Used GitLab Runner version
/ # gitlab-runner --version
Version: 10.4.0
Git revision: 857480b6
Git branch: 10-4-stable
GO version: go1.8.5
Built: Mon, 22 Jan 2018 09:47:33 +0000
OS/Arch: linux/amd64
