GitLab 组件子 chart
极狐GitLab Helm chart 由多个子 chart 组成,这些子 chart 提供了极狐GitLab 核心组件:
- Gitaly
- GitLab Exporter
- GitLab Pages
- GitLab Runner
- GitLab Shell
- GitLab agent server (KAS)
- Mailroom
- Migrations
- Praefect
- Sidekiq
- Spamcheck
- Toolbox
- Webservice
每个子 chart 的参数必须在 gitlab
键下。例如,GitLab Shell 参数类似于:
gitlab:
gitlab-shell:
...
使用这些 charts 用于可选的依赖项:
使用这些 charts 用于附加组件:
- Prometheus
- 没有特权的,使用 Kubernetes 执行器的极狐GitLab Runner
- 从 Let’s Encrypt 自动配置 SSL,它使用 Jetstack 的 cert-manager 和 certmanager-issuer
GitLab Helm 子 chart 选项参数
affinity
- 自极狐GitLab 17.3(Charts 8.3)为除
webservice
和sidekiq
之外的所有 GitLab Helm 子 chart 引入。
affinity
在所有极狐GitLab Helm 子 chart 中是可选的参数。当您设置它时,它将优先于全局 affinity
值。关于 affinity
的更多详情, 可查看与 Kubernetes 相关的文档。。
The
webservice
and sidekiq
Helm charts can only use the global affinity
value. Follow issue 25403 to learn when the local affinity
is implemented for webservice
and sidekiq
.
webservice
和 sidekiq
Helm charts 只能使用全局 affinity
值。affinity
的设置方法:
-
podAntiAffinity
规则设置:- 不要在与匹配表达式对应的
topology key
的 pods 相同的域中调度 pods。 -
podAntiAffinity
的两种设置规则:: required (requiredDuringSchedulingIgnoredDuringExecution
) 和 preferred (preferredDuringSchedulingIgnoredDuringExecution
)。在values.yaml
中使用变量antiAffinity
,若将其设置为soft
,则 preferred 模式生效,若设置为hard
,则 required 模式生效。
- 不要在与匹配表达式对应的
-
nodeAffinity
规则设置:- 将 pod 掉调度到特定区域或区域中的节点。
-
nodeAffinity
的两种设置规则:required (requiredDuringSchedulingIgnoredDuringExecution
) 和 preferred (preferredDuringSchedulingIgnoredDuringExecution
). 当设置为soft
,则 preferred 模式生效。当设置为hard
,则 required 模式生效。 此规则仅在registry
chart 和gitlab
chart 及其所有子 chart 中实现,除了webservice
和sidekiq
。
nodeAffinity
仅在 In
operator 中起作用。
下面的示例设置了 affinity
,其中 nodeAffinity
和 antiAffinity
均设置为 hard
:
nodeAffinity: "hard"
antiAffinity: "hard"
affinity:
nodeAffinity:
key: "test.com/zone"
values:
- us-east1-a
- us-east1-b
podAntiAffinity:
topologyKey: "test.com/hostname"