4.12. 镜像设置配置参数


oc-mirror 插件需要一个镜像设置配置文件,该文件定义哪些镜像要镜像(mirror)。下表列出了 ImageSetConfiguration 资源的可用参数。

Expand
表 4.1. ImageSetConfiguration 参数
参数描述

apiVersion

ImageSetConfiguration 内容的 API 版本。

字符串.例如: mirror.openshift.io/v1alpha2

archiveSize

镜像集中的每个存档文件的最大大小(以 GiB 为单位)。

整数.例如: 4

mirror

镜像集的配置。

对象

mirror.additionalImages

镜像集的额外镜像配置。

对象数组。例如:

additionalImages:
  - name: registry.redhat.io/ubi8/ubi:latest
Copy to Clipboard Toggle word wrap

mirror.additionalImages.name

要 mirror 的镜像的标签或摘要。

字符串.例如: registry.redhat.io/ubi8/ubi:latest

mirror.blockedImages

阻止 mirror 的镜像的完整标签、摘要或模式。

字符串数组。例如: docker.io/library/alpine

mirror.helm

镜像集的 helm 配置。请注意,oc-mirror 插件只支持 helm chart,在呈现时不需要用户输入。

对象

mirror.helm.local

要镜像的本地 helm chart。

对象数组。例如:

local:
  - name: podinfo
    path: /test/podinfo-5.0.0.tar.gz
Copy to Clipboard Toggle word wrap

mirror.helm.local.name

要镜像的本地 helm chart 的名称。

字符串.例如: podinfo

mirror.helm.local.path

到镜像的本地 helm chart 的路径。

字符串.例如: /test/podinfo-5.0.0.tar.gz

mirror.helm.repositories

从其中镜像的的远程 helm 软件仓库。

对象数组。例如:

repositories:
  - name: podinfo
    url: https://example.github.io/podinfo
    charts:
      - name: podinfo
        version: 5.0.0
Copy to Clipboard Toggle word wrap

mirror.helm.repositories.name

从其中镜像(mirror)的 helm 存储库的名称。

字符串.例如: podinfo

mirror.helm.repositories.url

从其中镜像(mirror)的 helm 存储库的 URL。

字符串.例如: https://example.github.io/podinfo

mirror.helm.repositories.charts

要镜像的远程 helm chart。

对象数组。

mirror.helm.repositories.charts.name

要镜像的 helm chart 的名称。

字符串.例如: podinfo

mirror.helm.repositories.charts.version

要镜像命名 helm chart 的版本。

字符串.例如: 5.0.0

mirror.operators

镜像集的 Operator 配置。

对象数组。例如:

operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.13
    packages:
      - name: elasticsearch-operator
        minVersion: '2.4.0'
Copy to Clipboard Toggle word wrap

mirror.operators.catalog

包括在镜像集中的 Operator 目录。

字符串.例如: registry.redhat.io/redhat/redhat-operator-index:v4.13

mirror.operators.full

true 时,下载完整的目录、Operator 软件包或 Operator 频道。

布尔值.默认值为 false

mirror.operators.packages

Operator 软件包配置。

对象数组。例如:

operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.13
    packages:
      - name: elasticsearch-operator
        minVersion: '5.2.3-31'
Copy to Clipboard Toggle word wrap

mirror.operators.packages.name

镜像集中要包含的 Operator 软件包名称

字符串.例如: elasticsearch-operator

mirror.operators.packages.channels

Operator 软件包频道配置。

对象

mirror.operators.packages.channels.name

Operator 频道名称(软件包中唯一)要包括在镜像集中。

字符串.例如: faststable-v4.13

mirror.operators.packages.channels.maxVersion

Operator 镜像的最高版本,在其中存在所有频道。详情请查看以下备注。

字符串.例如: 5.2.3-31

mirror.operators.packages.channels.minBundle

要包括的最小捆绑包的名称,以及将图中到频道头的所有捆绑包。仅在命名捆绑包没有语义版本元数据时设置此字段。

字符串.例如: bundleName

mirror.operators.packages.channels.minVersion

Operator 的最低版本,用于镜像存在的所有频道。详情请查看以下备注。

字符串.例如: 5.2.3-31

mirror.operators.packages.maxVersion

Operator 最高版本,可跨所有存在的频道进行镜像。详情请查看以下备注。

字符串.例如: 5.2.3-31

mirror.operators.packages.minVersion

Operator 的最低版本,用于镜像存在的所有频道。详情请查看以下备注。

字符串.例如: 5.2.3-31

mirror.operators.skipDependencies

如果为 true,则不会包含捆绑包的依赖项。

布尔值.默认值为 false

mirror.operators.targetCatalog

要镜像引用的目录的替代名称和可选命名空间层次结构。

字符串.例如:my-namespace/my-operator-catalog

mirror.operators.targetName

将引用的目录镜像为。

targetName 参数已弃用。改为使用 targetCatalog 参数。

字符串.例如: my-operator-catalog

mirror.operators.targetTag

附加到 targetNametargetCatalog 的替代标签。

字符串.例如: v1

mirror.platform

镜像集的平台配置。

对象

mirror.platform.architectures

要镜像的平台发行版本有效负载的架构。

字符串数组。例如:

architectures:
  - amd64
  - arm64
Copy to Clipboard Toggle word wrap

mirror.platform.channels

镜像集的平台频道配置。

对象数组。例如:

channels:
  - name: stable-4.10
  - name: stable-4.13
Copy to Clipboard Toggle word wrap

mirror.platform.channels.full

true 时,将 minVersion 设置为频道中的第一个发行版本,将 maxVersion 设置为该频道的最后一个发行版本。

布尔值.默认值为 false

mirror.platform.channels.name

发行频道的名称。

字符串.例如:stable-4.13

mirror.platform.channels.minVersion

要镜像引用的平台的最低版本。

字符串.例如:4.12.6

mirror.platform.channels.maxVersion

要镜像引用的平台的最高版本。

字符串.例如:4.13.1

mirror.platform.channels.shortestPath

切换最短的路径镜像或完整范围镜像。

布尔值.默认值为 false

mirror.platform.channels.type

要镜像的平台的类型。

字符串.例如: ocpokd。默认为 ocp

mirror.platform.graph

指明是否将 OSUS 图表添加到镜像集中,然后发布到镜像。

布尔值.默认值为 false

storageConfig

镜像集的后端配置。

对象

storageConfig.local

镜像集的本地后端配置。

对象

storageConfig.local.path

包含镜像设置元数据的目录路径。

字符串.例如: ./path/to/dir/

storageConfig.registry

镜像集的 registry 后端配置。

对象

storageConfig.registry.imageURL

后端 registry URI。可以选择在 URI 中包含命名空间引用。

字符串.例如: quay.io/myuser/imageset:metadata

storageConfig.registry.skipTLS

(可选)跳过引用的后端 registry 的 TLS 验证。

布尔值.默认值为 false

注意

使用 minVersionmaxVersion 属性过滤特定 Operator 版本范围可能会导致多个频道头错误。错误信息将显示有多个频道头。这是因为在应用过滤器时,Operator 的更新图会被截断。

Operator Lifecycle Manager 要求每个 operator 频道都包含一个端点组成更新图表的版本,即 Operator 的最新版本。在应用图形的过滤器范围时,可以进入两个或多个独立图形或具有多个端点的图形。

要避免这个错误,请不要过滤 Operator 的最新版本。如果您仍然遇到错误,根据具体的 Operator,增加 maxVersion 属性,或者减少 minVersion 属性。因为每个 Operator 图都可以不同,所以您可能需要根据流程调整这些值,直到错误丢失为止。

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat