Gitlab ci runner 在Kubernetes中创建gitlab runner时,如何传入config.toml?
我能够进入gitlab runner pod,我注意到它在~/.gitlab runner中有一个config.toml文件。但是,我希望在创建runner时传递我自己的config.toml。我该怎么做?您可以创建一个秘密:Gitlab ci runner 在Kubernetes中创建gitlab runner时,如何传入config.toml?,gitlab-ci-runner,Gitlab Ci Runner,我能够进入gitlab runner pod,我注意到它在~/.gitlab runner中有一个config.toml文件。但是,我希望在创建runner时传递我自己的config.toml。我该怎么做?您可以创建一个秘密: kubectl create secret generic gitlab-runner-config --from-file=./config.toml 并在部署时进行配置 ... spec: ... containers: volumeMounts:
kubectl create secret generic gitlab-runner-config --from-file=./config.toml
并在部署时进行配置
...
spec:
...
containers:
volumeMounts:
- mountPath: $MOUNT_PATH
name: runner-conf
volumes:
- name: runner-conf
secret:
defaultMode: 420
secretName: gitlab-runner-config
...