GitLab 组件子 chart

极狐GitLab Helm chart 由多个子 chart 组成,这些子 chart 提供了极狐GitLab 核心组件:

每个子 chart 的参数必须在 gitlab 键下。例如,GitLab Shell 参数类似于:

gitlab:
  gitlab-shell:
    ...

使用这些 charts 用于可选的依赖项:

使用这些 charts 用于附加组件:

GitLab Helm 子 chart 选项参数

affinity

  • 自极狐GitLab 17.3(Charts 8.3)为除 webservicesidekiq 之外的所有 GitLab Helm 子 chart 引入。

affinity 在所有极狐GitLab Helm 子 chart 中是可选的参数。当您设置它时,它将优先于全局 affinity 值。关于 affinity 的更多详情, 可查看与 Kubernetes 相关的文档。

note 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. webservicesidekiq 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 中实现,除了 webservicesidekiq

nodeAffinity 仅在 In operator 中起作用。

下面的示例设置了 affinity,其中 nodeAffinityantiAffinity 均设置为 hard

nodeAffinity: "hard"
antiAffinity: "hard"
affinity:
  nodeAffinity:
    key: "test.com/zone"
    values:
    - us-east1-a
    - us-east1-b
  podAntiAffinity:
    topologyKey: "test.com/hostname"