Chart 配置

本文档描述了 artifacthub-shim 的通用 Helm values。该 Chart 的默认配置针对轻量级、离线友好的安装进行了优化,内置 Tekton catalog,且不使用持久化运行时存储。

完整的 value schema 以 charts/artifacthub-shim/values.yaml 为准。下面各节重点介绍运维人员最常覆盖的 values。

基础设置

ValueDefaultDescription
namespaceOverride""将工作负载资源安装到此 namespace,而不是 Helm release namespace。 当 config.namespace 为空时,也会从 pod namespace 监视 repository ConfigMap 和 Secret。
replicaCount1API Replica 数量。每个 Replica 都会构建并提供自己的只读快照。增加该值之前请先查看 High Availability
global.registry.addressregistry-dev.alauda.ioChart 镜像使用的 Registry 前缀。在生产环境中请将其设置为 air-gapped registry mirror。仅当镜像仓库本身已包含 registry 前缀时,才将其留空。
global.registry.imagePullSecrets[]添加到 pod spec 的镜像拉取 Secret。
global.images.api.*variesAPI server 镜像仓库、tag、digest 元数据以及拉取策略。运行时 pod 的镜像引用使用 repository:tag
global.images.extension.*variesExtension webhook 镜像仓库、tag、digest 元数据以及拉取策略。第一个 extension 能力是为 catalog TaskRun 提供模板渲染。运行时 pod 的镜像引用使用 repository:tag
global.images.catalog.*variescatalog.enabled=true 时,copy-catalog init container 使用的内置 catalog 镜像。运行时 pod 的镜像引用使用 repository:tag
global.images.catalog_*.*varies从 catalog release 复制而来的 catalog 工具镜像清单,用于离线打包发现。这些条目不会被 Chart 的工作负载模板引用。
podSecurityContextrestricted-compatible defaultsPod 级别的 security context。默认值设置了非 root UID/GID、fsGroupseccompProfile.type=RuntimeDefault,因此该 Chart 可以在强制使用 Kubernetes restricted Pod Security profile 的 namespace 中运行。
securityContextrestricted-compatible defaultsAPI container 与内置 copy-catalog init container 共享的 container 级别 security context。默认会禁用特权提升、删除所有 Linux capabilities,并使用只读 root filesystem。

内置 catalog

ValueDefaultDescription
catalog.enabledtrue启用内置 catalog 镜像。Chart 会在 API server 启动前运行一个 init container,将 catalog 文件复制到 pod 本地 volume。对于离线安装,这是推荐的默认值。
catalog.extraResources.enabledtrue在运行时同步内置 catalog 目录中的带标签 ConfigMap 资源。
catalog.extraResources.pathconfig内置 catalog 根目录下包含 ConfigMap 资源 YAML 文件的相对目录。只有带有 artifacthub-shim.alauda.io/import: "true"v1/ConfigMap 文档会被导入;其他文件和资源都会被跳过。该路径不能跳出 catalog 根目录。
catalog.mountPath/var/lib/artifacthub-shim/catalog挂载到 API container 中的运行时路径,并通过 ARTIFACTHUB_SHIM_CATALOG_ROOT 暴露。
catalog.initialPath/var/lib/initial/cataloginit container 从内置 catalog 镜像中复制的路径。

catalog.enabled=trueconfig.sources 为空时,进程会在 catalog root 下为 taskpipeline 创建默认 sources。只有当打包的 catalog 包含 stepaction/ 目录时,才会创建可选的 catalog-stepactions source。仅提供自定义静态 sources 或仅提供基于 ConfigMap 的 Git repository sources 时,请设置 catalog.enabled=false

Extension webhook

artifacthub-shim-extension 是与 API server 分离的独立 Deployment。它不提供 Artifact Hub APIs;它托管 catalog 集成所使用的 admission webhook 能力。第一个启用的能力是为携带已配置 template-render 参数的 TaskRun 提供模板渲染。

ValueDefaultDescription
extension.enabledtrue部署 extension 的 Deployment、Service、RBAC、Certificate/Issuer 和 MutatingWebhookConfiguration。
extension.replicaCount1extension webhook 的 Replica 数量。
extension.service.port443Kubernetes admission webhook client 使用的 Service 端口。
extension.service.targetPort9443HTTPS webhook container 端口。
extension.webhook.failurePolicyIgnoretemplate-render webhook 的 admission failure policy。
extension.webhook.path/mutate/render/templateWebhook HTTP 路径。
extension.webhook.certManager.enabledtrue渲染 cert-manager Issuer 和 Certificate 资源,并将 CA bundle 注入 webhook 配置。
extension.resolutionRequestPolicy.enabledtrue渲染用于检查 Hub ResolutionRequest catalog 可见性的 validating webhook。若要立即回滚,请设置为 false
extension.resolutionRequestPolicy.path/validate/hub-resolution-requestextension 提供的用于 Hub 可见性验证的 HTTPS 路径。
extension.resolutionRequestPolicy.failurePolicyIgnore当 webhook 无法访问时,仍允许创建 PipelineRun 和 TaskRun。处理程序在内部错误时也会显式 fail open。
extension.resolutionRequestPolicy.timeoutSeconds3用于可见性检查的 Kubernetes admission 超时时间。
extension.templateRender.detailsURLTemplateACP PipelineRun/TaskRun URL template用于构建渲染后模板详情链接的 Go template。
extension.templateRender.timeZone""模板渲染可选的时区覆盖。
extension.templateRender.params.*renderTemplateName, renderTemplateNamespace, renderTemplateValuestemplate-render webhook 使用的 TaskRun 参数名。
extension.resources50m/64Mi/32Mi request, 250m/256Mi/256Mi limitextension container 的 CPU、内存和 ephemeral-storage 请求与限制。
extension.podLabels{}额外的 extension pod template labels。
extension.podAnnotations{}额外的 extension pod template annotations。

ResolutionRequest policy 不会读取 hubresolver-config,也不会发现 resolver Deployment。它会跳过显式使用 Tekton Hub 的请求,并在本地 shim index 上审查显式 Artifact Hub 请求,以及省略 type 的请求。没有显式 catalogkindnameversion 参数的请求会 fail open,因为 webhook 无法安全地重建 resolver 默认值。

extension.webhook.certManager.enabled=true 时,目标集群必须已安装 cert-manager。如果证书管理由外部提供,请将 extension.webhook.certManager.enabled=false,并通过 extension.webhook.certManager.secretName 提供已配置的 webhook 证书 Secret 名称。API 和 extension 的 Deployment 都使用根级别的 nodeSelectortolerationsaffinitypriorityClassName 调度值。

运行时刷新与 repository 发现

ValueDefaultDescription
config.listenAddress":8080"容器内的 HTTP 绑定地址。通常无需更改,因为 Service 目标是名为 http 的端口。
config.sources""可选的逗号分隔静态 source 描述符,格式为 kind:name:path[:displayName]。静态路径相对于 ARTIFACTHUB_SHIM_CATALOG_ROOT
config.disabledPackages[]静态 catalog source 的禁用 package 规则。规则按 catalog 和 kind 作用域划分。
config.refreshInterval10m首次发布快照之后的后台刷新间隔。更短的间隔可以更快获取 repository 变更,但会增加 source 加载、CPU、内存和磁盘 I/O 负载。
config.initialSyncTimeout15m初始 source 加载阶段的超时时间。如果某些 source 失败或超出该时间窗口,进程仍会发布包含 source 状态的诊断快照,以便在第一次刷新尝试完成后 readiness 可以变为 true。
config.sourceLoadTimeout15m加载一个已注册 catalog source 的超时时间。对于 Git-backed sources,这包括凭证解析、clone 或 fetch、checkout、清理以及 source 扫描。
config.enableConfigMapSourcestrue启用由带标签 ConfigMap 声明的 repository sources。被监视的 ConfigMap 必须具有 artifacthub-shim.alauda.io/repository: "true",并且 repository.yaml 数据键中包含 gitRepositories 列表。当前基于 ConfigMap 的 sources 都是 Git-backed。
config.globalConfigMapSources.enabledtrue启用对 repository ConfigMap 的集群范围发现,这些 ConfigMap 显式选择作为全局可见的 Catalog Source。主监视 namespace 之外的匹配 ConfigMap 必须同时具有 artifacthub-shim.alauda.io/repository: "true"artifacthub-shim.alauda.io/repository-visibility: "global"。启用后,Chart 会渲染集群范围的只读 RBAC。
config.globalConfigMapSources.allowedNamespaces[]可显式声明 repository-visibility: global 的非主 namespace 精确允许列表。为空表示不受限制。
config.scopedConfigMapSources.enabledtrue启用对 namespace、project 以及显式 Namespace 允许列表 repository ConfigMap 的集群范围发现。没有可见性标签的非主 ConfigMap 默认为 namespace 作用域。
config.extraResourceSync.enabledtrue启用来自内置 catalog 以及基于 ConfigMap 的 Git extraResources 目录的运行时 ConfigMap 资源同步。只有带有 artifacthub-shim.alauda.io/import: "true" 的 ConfigMap 会被导入。
config.extraResourceSync.allowedNamespaces[kube-public]可以接收已同步 ConfigMap 的 namespace。Chart 仅为这些 namespace 渲染 ConfigMap 写入 RBAC。
config.extraResourceSync.leaderElection.enabledtrue使用 Kubernetes Lease,使得在所有 Replica 继续提供 API 流量的同时,只有一个 Replica 会写入或清理 ConfigMap。
config.extraResourceSync.leaderElection.leaseName""可选的自定义 Lease 名称。为空时渲染 release 作用域的默认值。
config.namespace""监视 repository ConfigMap 和 Secret 的 namespace。为空表示 pod namespace。Chart 会在被监视的 namespace 中创建 Role 和 RoleBinding 资源。
config.repositoryEventDebounce2sConfigMap 和 Secret watch 事件的防抖窗口。如果大量 repository 对象同时更新,请增大该值。
config.sourceWorkDir/var/lib/artifacthub-shim/sourcessource materialization 和 provider cache 的运行时路径。Chart 会从 storage.sourceWorkDir 挂载该路径。
config.maxConcurrentSources4单个 pod 在一次刷新中可并行加载的 catalog source 最大数量。集群范围的刷新并发大约为 replicaCount * config.maxConcurrentSources
config.maxBatchQuerySize200单个 UI 查询请求可接受的资源/item 最大数量。单位是 resource metadata 条目,因此默认值允许每个请求最多 200 个资源;它不是持续时间、字节大小或 QPS 值。该值会暴露为 ARTIFACTHUB_SHIM_MAX_BATCH_QUERY_SIZE,目前还会限制 UI list endpoint 的分页大小,并且默认与 tektoncd-hubs-apiMAX_QUERY_SIZE 保持一致。UI batch 请求体在 JSON 解码前也会被硬性限制为 1 MiB。
config.globalCluster.enabledfalsehubIngress.className 为空时,使用 global-cluster 默认的 Hub UI IngressClass(global-alb2)。这不再注入 Erebus 或 Kubernetes endpoint 环境变量。
config.authentication.enabledtrue为 UI 兼容的 endpoints 启用请求认证与授权。与 resolver 兼容的 Artifact Hub endpoints 仍然不需要认证。
config.authentication.kubernetesFallbacktrue在 platform 和 OIDC authentication backend 之后,启用当前集群的 Kubernetes TokenReview 回退。
config.authentication.platform.modeautoPlatform authentication 模式。auto 在直接配置 platformURLclusterName,或从 kube-public/global-info 发现这些值时使用 platform auth;enabled 要求 platform 配置;disabled 则跳过它。
config.authentication.platform.platformURL""可选的 ACP platform URL。为空时回退到 kube-public/global-info 中的 platformURL
config.authentication.platform.clusterName""可选的 ACP cluster name。为空时回退到 kube-public/global-info 中的 clusterName
config.authentication.platform.insecureSkipTLSVerifytrue连接 ACP platform Kubernetes endpoint 时跳过 TLS certificate 验证。当 pod trust bundle 可以验证 ACP platform 证书时,请将其设置为 false
config.authentication.oidc.enabledfalse在 platform auth 和 Kubernetes fallback 之间启用显式 OIDC token 验证。
config.authentication.oidc.issuerURL""受信任的 OIDC issuer URL。为空时,在可用时回退到 kube-public/global-info 中的 oidcIssuer
config.authentication.oidc.audiences[]接受的 OIDC token audience。为空时,在可用时回退到 kube-public/global-info 中的 oidcClientID
config.authentication.oidc.usernameClaims[]按顺序检查的 username claim。为空时使用共享的 requestauth 默认值。
config.authentication.oidc.groupsClaims[]映射到 Kubernetes groups 的 OIDC claim 名称。
config.authentication.oidc.rolesClaims[]映射到 Kubernetes groups 的 OIDC role claim 名称。
config.authentication.oidc.userPrefix""添加到映射用户名中的前缀。
config.authentication.oidc.groupPrefix""添加到映射 group 中的前缀。
config.authentication.oidc.requiredClaims{}必须完全匹配的必需字符串 claim。
config.authentication.oidc.requireEmailVerifiedfalse当使用 email claim 作为用户名时,要求 email_verified=true
config.authentication.oidc.ca.secretRef.name""安装 namespace 中可选的 Secret,包含用于私有 OIDC issuer 的 PEM CA bundle。
config.authentication.oidc.ca.secretRef.keyca.crtOIDC CA bundle 的 Secret data key。
config.authentication.oidc.clockSkew2mOIDC token 时间校验的容差。

日志

该 Chart 默认以 info 级别写入 JSON 日志。高级 zap 文件配置请参见 Logging

ValueDefaultDescription
logging.levelinfo在未使用 zap config 文件时启用的最小进程日志级别。有效值为 debuginfowarnerror
logging.formatjson在未使用 zap config 文件时的日志编码格式。有效值为 jsonconsole
logging.configFile""挂载的 YAML 或 JSON zap.Config 文件的可选路径。设置后,进程会忽略 logging.levellogging.format
logging.config{}由 Chart 渲染到 /etc/artifacthub-shim/logging.yaml 的内联 zap.Config。与 logging.configFile 互斥。

UI API RBAC

该 Chart 授予 API ServiceAccount 读取 kube-public/global-info 以及创建 TokenReviewSubjectAccessReview 对象的权限。进程通过共享的 requestauth 流程保护与 UI 兼容的 endpoints:

  • /api/v1alpha1/{tasks,pipelines,stepactions} 下的 GETPOST collection endpoints 需要 list hub.tekton.dev/resources。当提供 namespace 时,SubjectAccessReview 会针对该 Namespace,且作用域过滤会在分页或 batch 聚合之前进行。
  • /api/v1alpha1/{catalog}/{kind}/{name}[/version] 下的 detail endpoints,以及 /v1/resource/{catalog}/{kind}/{name}/{version}/yaml 下的原始 manifest URL,需要 get hub.tekton.dev/resources。隐藏的 catalog 会返回 404,并且生成的链接会保留 namespace 查询参数。
  • 当启用 platform authentication 且 platformURLclusterName 直接配置或从 kube-public/global-info 发现时,会首先尝试 platform authentication。它会将请求 bearer token 发送到 {platformURL}/kubernetes/{clusterName},并使用 platform SelfSubjectReviewSelfSubjectAccessReview
  • 只有当 config.authentication.oidc.enabled=true 时,才会进行显式 OIDC 验证。通过 OIDC 认证的用户会使用当前集群的 SubjectAccessReview 进行授权。
  • config.authentication.kubernetesFallback=true 时,会最后尝试当前集群的 Kubernetes TokenReview 回退,返回的用户会使用当前集群的 SubjectAccessReview 进行授权。
  • 该进程不会仅通过解码未签名的 Dex/JWT payload 来接受 token;token 必须被已配置的共享 backend 之一接受。
  • /api/v1/packages/... 下与 resolver 兼容的 Artifact Hub endpoints 仍然不需要认证,因此 Tekton hub resolver 可以继续在没有最终用户 token 的情况下调用它们。

平台认证不需要注入 Erebus 或 KUBERNETES_SERVICE_HOST 环境变量。如果 Hub UI Ingress 必须使用 global-cluster IngressClass,请将 config.globalCluster.enabled=true,或者显式设置 hubIngress.className

运行时存储

sourceWorkDir 用于存储已 materialize 的 repository sources 和 provider cache。对于当前基于 ConfigMap 的 Git sources,这里会在刷新之间保留 checkout。持久化它可以通过避免完整重新 clone 来降低 pod 重建成本。在启动后的第一次刷新期间,基于 PVC 的 workdir 可以在无需等待网络 fetch 的情况下提供有效的持久化 checkout;后续刷新仍会执行 fetch、checkout 请求的 revision、扫描 source 文件,并重建内存中的 metadata index。

基于 PVC 的 sourceWorkDir 存储仅支持单 Replica 部署。对于多个 Replica,请使用 emptyDir,以便每个 pod 都拥有独立的 checkout 目录。

ValueDefaultDescription
storage.sourceWorkDir.typeemptyDirsource materialization 的存储后端。有效值为 emptyDirpvcexistingPVCpvcexistingPVC 需要 replicaCount: 1
storage.sourceWorkDir.emptyDir.sizeLimit""emptyDir source workdir 的可选大小限制。
storage.sourceWorkDir.pvc.storageClassName""Chart 创建的 source workdir PVC 所使用的 StorageClass。为空时使用集群默认的 StorageClass。
storage.sourceWorkDir.pvc.size5GiChart 创建的 source workdir PVC 申请大小。
storage.sourceWorkDir.pvc.accessModes[ReadWriteOnce]Chart 创建的 source workdir PVC 的访问模式。任何 replicaCount>1 的基于 PVC 的 source workdir 都会被 Chart validation 拒绝。
storage.sourceWorkDir.pvc.existingClaim""storage.sourceWorkDir.type=existingPVC 时使用的现有 PVC 名称。

ContentStore 是可选存储,用于保存不可变的 Tekton manifest 和 README payload。它按 digest 存储 payload 字节。它不是 metadata index:package index、version 查找映射、search token 和 source 状态仍然为每个 pod 在内存中构建。

默认值为 storage.contentStore.enabled=false,此时 manifest 和 README payload 会保留在内存快照中。这是最简单的模式,适用于内置 catalog 和较小的自定义 catalog 集合。

ValueDefaultDescription
storage.contentStore.enabledfalse启用基于文件系统的 payload 存储。为 false 时,Chart 不会渲染 content-store volume、volume mount、content store directory 环境变量或 PVC。
storage.contentStore.typeemptyDir启用 ContentStore 时使用的存储后端。有效值为 emptyDirpvcexistingPVCpvcexistingPVC 需要 replicaCount: 1
storage.contentStore.mountPath/var/lib/artifacthub-shim/content启用 ContentStore 时挂载到 API container 中的路径。
storage.contentStore.maxBytes""总 content store 大小的可选软限制。当 type=existingPVC 时是必需的,因为 Chart 无法推断现有 claim 的容量。
storage.contentStore.emptyDir.sizeLimit2GiemptyDir content store 的大小限制。
storage.contentStore.pvc.storageClassName""Chart 创建的 PVC 所使用的 StorageClass。为空时使用集群默认的 StorageClass。
storage.contentStore.pvc.size5GiChart 创建的 PVC 申请大小。
storage.contentStore.pvc.accessModes[ReadWriteOnce]Chart 创建的 PVC 的访问模式。任何 replicaCount>1 的基于 PVC 的 ContentStore 都会被 Chart validation 拒绝。
storage.contentStore.pvc.existingClaim""storage.contentStore.type=existingPVC 时使用的现有 PVC 名称。

对于多 Replica 部署,除非存在经过测量的内存问题,否则请保持 ContentStore 关闭。如果必须在多个 Replica 下启用它,请优先使用 emptyDir,以便每个 pod 都拥有独立的本地 payload 存储。基于 PVC 的运行时存储仅支持单 Replica。

sourceWorkDir 或已启用的 ContentStore 使用基于 PVC 的存储时,Chart 会将 Deployment 渲染为 strategy.type: Recreate,以避免升级期间旧 pod 和新 pod 同时写入同一运行时存储。

Cache 和 payload 限制

ValueDefaultDescription
cache.payloadCacheSize128Mi用于基于 digest 的 payload 读取的进程内热 payload cache 大小。当启用 ContentStore 时,这一点最相关。
cache.maxManifestBytes1Mi单个 Tekton manifest 文件允许的最大大小。超大文件会针对该 source 或 version 被拒绝,以保护内存和响应大小。
cache.maxReadmeBytes2Mi单个 README 文件允许的最大大小。仅当 catalog repository 确实需要更大的文档 payload 时才提高此值。

网络暴露

ValueDefaultDescription
service.typeClusterIPKubernetes Service 类型。用于集群内 resolver 和 UI 流量时请选择 ClusterIP。仅当需要直接访问节点时才使用 NodePort
service.port80Service 端口。
service.targetPort8080API container 端口。Service 目标是由该值渲染出的名为 http 的端口。
service.nodePortnull可选的固定 node port,仅在 service.type=NodePort 时渲染。
service.annotations{}用于平台特定集成的 Service annotations。
hubIngress.enabledtrue启用 DevOps Hub UI Ingress,将 /hub(/|$)(.*) 流量重写到 API Service。
hubIngress.className""Hub UI Ingress 的 IngressClass 名称。当 config.globalCluster.enabled=true 且为空时,会自动选择 global-alb2,否则为 cpaas-system。设置非空值可覆盖。
hubIngress.annotationsNGINX rewrite annotationsHub UI 重写使用的 Ingress annotations。
hubIngress.hostshostless /hub(/|$)(.*) ruleHub UI Ingress 的 host 和 path 规则。空 host 会渲染为无 host 的规则。
hubIngress.tls[]Hub UI Ingress 的 TLS 条目。
ingress.enabledfalse启用路由到 API Service 的 Ingress。
ingress.className""可选的 IngressClass 名称。
ingress.annotations{}Ingress annotations。
ingress.hostsexample hosthost 和 path 规则。默认 path 使用 Prefix 路由 /
ingress.tls[]渲染出的 Ingress 的 TLS 条目。

资源与调度

ValueDefaultDescription
resources100m/128Mi/64Mi request, 500m/512Mi/1Gi limitAPI container 的 CPU、内存和 ephemeral-storage 请求与限制。对于许多 catalog repository 或较大的 README payload,请增加内存,尤其是在 ContentStore 关闭时。
nodeSelector{}用于调度 pod 的 node selector。
tolerations[]Pod tolerations。
affinity{}Pod affinity 和 anti-affinity。如果希望 Replica 分布在不同节点上,请使用 pod anti-affinity。
priorityClassName""可选的 pod priority class。

扩展点

ValueDefaultDescription
extraEnv[]API container 的额外环境变量。这里的值可以覆盖从生成的 ConfigMap 导入的变量,因此请谨慎使用。
extraInitContainers[]追加在内置 copy-catalog init container 之后的额外 init container。可用于在 API container 启动前填充共享 pod volume。
extraVolumes[]额外的 pod volume。通常与 extraVolumeMounts 结合使用,用于静态 catalog 测试数据或受信任的 CA bundle。
extraVolumeMounts[]API container 的额外 volume mount。
podAnnotations{}额外的 pod template annotations。
podLabels{}额外的 pod template labels。

示例:最小化离线安装

这会保持内置 catalog 启用,并将 manifest/README payload 保留在内存快照中。

global:
  registry:
    address: registry.example.com/alauda
  images:
    api:
      repository: devops/artifacthub-shim/artifacthub-shim-api
      tag: v0.1.0
    extension:
      repository: devops/artifacthub-shim/artifacthub-shim-extension
      tag: v0.1.0
    catalog:
      repository: devops/tektoncd/hub/catalog
      tag: v0.1.0

catalog:
  enabled: true
  extraResources:
    enabled: true
    path: config

config:
  extraResourceSync:
    enabled: true
    allowedNamespaces:
      - kube-public
    leaderElection:
      enabled: true

storage:
  contentStore:
    enabled: false

service:
  type: ClusterIP

extension:
  enabled: true

示例:外部访问

当测试客户端或外部集成必须直接访问服务时,请使用以下模式之一。

service:
  type: NodePort
  nodePort: 30080
service:
  type: ClusterIP

ingress:
  enabled: true
  className: nginx
  hosts:
    - host: artifacthub-shim.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: artifacthub-shim-tls
      hosts:
        - artifacthub-shim.example.com

示例:持久化 source workdir

当单 Replica 部署使用大型外部 repository sources,且完整重新 clone 占据了明显的 pod 重启时间时,请使用此配置。它会持久化已 materialize 的 source checkout,而不是 metadata index。pod 重建后,第一次刷新可以先从已持久化的 checkout 发布,再执行网络 fetch。

replicaCount: 1

storage:
  sourceWorkDir:
    type: pvc
    pvc:
      size: 10Gi
      accessModes:
        - ReadWriteOnce

示例:更大的 catalog 与 ContentStore

仅当 repository 数量或 payload 大小带来可测量的内存压力时才使用此配置。index metadata 仍然保留在内存中,但 manifest 和 README payload 字节会存储在 pod 文件系统上,并通过 payload cache 读取。

config:
  refreshInterval: 30m
  initialSyncTimeout: 5m
  sourceLoadTimeout: 15m
  maxConcurrentSources: 2

storage:
  contentStore:
    enabled: true
    type: emptyDir
    emptyDir:
      sizeLimit: 10Gi

cache:
  payloadCacheSize: 256Mi
  maxManifestBytes: 2Mi
  maxReadmeBytes: 8Mi

resources:
  requests:
    cpu: 200m
    memory: 512Mi
  limits:
    cpu: "1"
    memory: 1Gi