作者:qk墨砚轩 | 来源:互联网 | 2022-11-16 14:00
我有一个连接到在Google(GKE)上运行的k8s集群的Gitlab云。该集群是通过Gitlab云创建的。
我想自定义的config.toml
,因为我想解决的K8S缓存中提出这个问题。
我config.toml
在runner-gitlab-runner
ConfigMap中找到了配置。我更新了ConfigMap以包含此config.toml
设置:
config.toml: |
cOncurrent= 4
check_interval = 3
log_level = "info"
listen_address = '[::]:9252'
[[runners]]
executor = "kubernetes"
cache_dir = "/tmp/gitlab/cache"
[runners.kubernetes]
memory_limit = "1Gi"
[runners.kubernetes.node_selector]
gitlab = "true"
[[runners.kubernetes.volumes.host_path]]
name = "gitlab-cache"
mount_path = "/tmp/gitlab/cache"
host_path = "/home/core/data/gitlab-runner/data"
要应用更改,我删除了runner-gitlab-runner-xxxx-xxx
pod,因此使用更新的来创建一个新的pod config.toml
。
但是,当我查看新的广告连播时,/home/gitlab-runner/.gitlab-runner/config.toml
现在包含两个[[runners]]
部分:
listen_address = "[::]:9252"
cOncurrent= 4
check_interval = 3
log_level = "info"
[session_server]
session_timeout = 1800
[[runners]]
name = ""
url = ""
token = ""
executor = "kubernetes"
cache_dir = "/tmp/gitlab/cache"
[runners.kubernetes]
host = ""
bearer_token_overwrite_allowed = false
image = ""
namespace = ""
namespace_overwrite_allowed = ""
privileged = false
memory_limit = "1Gi"
service_account_overwrite_allowed = ""
pod_annotations_overwrite_allowed = ""
[runners.kubernetes.node_selector]
gitlab = "true"
[runners.kubernetes.volumes]
[[runners.kubernetes.volumes.host_path]]
name = "gitlab-cache"
mount_path = "/tmp/gitlab/cache"
host_path = "/home/core/data/gitlab-runner/data"
[[runners]]
name = "runner-gitlab-runner-xxx-xxx"
url = "https://gitlab.com/"
token = ""
executor = "kubernetes"
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.kubernetes]
host = ""
bearer_token_overwrite_allowed = false
image = "ubuntu:16.04"
namespace = "gitlab-managed-apps"
namespace_overwrite_allowed = ""
privileged = true
service_account_overwrite_allowed = ""
pod_annotations_overwrite_allowed = ""
[runners.kubernetes.volumes]
该文件/scripts/config.toml
是我在ConfigMap中创建的配置。因此,我怀疑在/home/gitlab-runner/.gitlab-runner/config.toml
向Gitlab云注册Gitlab-Runner时以某种方式更新了它。
如果config.toml
无法通过ConfigMap 更改,则该如何更改配置?我在Gitlab或Gitlab文档中找不到关于此的任何信息。