第 2 章 CatalogSource [operators.coreos.com/v1alpha1]


描述
CatalogSource 是 CSV、CRD 和 operator 软件包的存储库。
类型
object
必填
  • metadata
  • spec

2.1. 规格

Expand
属性类型描述

apiVersion

string

APIVersion 定义对象的这个表示法的版本化的 schema。服务器应该将识别的模式转换为最新的内部值,并可拒绝未识别的值。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

kind 是一个字符串值,代表此对象所代表的 REST 资源。服务器可以从客户端向其提交请求的端点推断。无法更新。采用驼峰拼写法 (CamelCase)。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

ObjectMeta

标准对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

对象

 

status

对象

 

2.1.1. .spec

描述
类型
object
必填
  • sourceType
Expand
属性类型描述

address

字符串

address 是 OLM 用来连接到预先存在的 registry 的主机。格式:<registry-host 或 ip>:<port> 仅在 SourceType = SourceTypeGrpc 时使用。当设置 Image 字段时,忽略。

configMap

字符串

ConfigMap 是用来支持 configmap-server registry 的 ConfigMap 名称。仅在 SourceType = SourceTypeConfigmap 或 SourceTypeInternal 时使用。

description

字符串

 

displayName

字符串

元数据

grpcPodConfig

object

grpcPodConfig 会公开 CatalogSource Pod 的 pod 规格的不同覆盖。仅在设置了 SourceType = SourceTypeGrpc 和 Image 时使用。

icon

对象

 

image

字符串

镜像是一个 operator-registry 容器镜像,用于实例化 registry-server。仅在 SourceType = SourceTypeGrpc 时使用。如果存在,则忽略 address 字段。

priority

整数

priority 字段为目录源分配一个权重,以优先排序它们,使其可以被依赖项解析器消耗。usage: 高权重表示,在依赖项解析过程中,这个目录源优先于权重较低的目录源。优先级值的范围可以在 int32 之间从正到负面。具有未分配优先级的目录源的默认值为 0。具有相同优先级值的目录源根据其名称将按字母顺序排序。

publisher

字符串

 

secrets

数组(字符串)

secret 表示一组可用于访问目录内容的 secret。最好将此列表保持小,因为每个目录条目都需要尝试。

sourceType

字符串

sourceType 是源的类型

updateStrategy

对象

updateStrategy 定义如何发现更新的目录源镜像如何发现定义轮询持续时间和嵌入式策略类型的间隔的 Consists

2.1.2. .spec.grpcPodConfig

描述
grpcPodConfig 会公开 CatalogSource Pod 的 pod 规格的不同覆盖。仅在设置了 SourceType = SourceTypeGrpc 和 Image 时使用。
类型
object
Expand
属性类型描述

nodeSelector

对象(字符串)

nodeSelector 是一个选择器,必须为 true 才能使 pod 适合某个节点。选择器必须与节点的标签匹配,以便 pod 调度到该节点上。

priorityClassName

string

如果指定,指示 pod 的优先级。如果没有指定,如果没有默认值,pod 优先级将为 default 或零。

securityContextConfig

string

securityContextConfig 可以是 legacyrestricted 之一。CatalogSource 的 pod 可以与正确的 pod.spec.securityContext 和 pod.spec.container[*].securityContext 值注入,以允许 pod 在 Pod Security Admission (PSA) restricted 模式下运行,或者根本不设置这些值,在这种情况下,pod 只能在 PSA 基准特权 命名空间中运行。目前,如果 SecurityContextConfig 未指定,则使用 legacy 的默认值。指定 legacyrestricted 以外的值会导致验证错误。使用无法以 受限 模式运行的旧目录镜像时,SecurityContextConfig 应该设置为 旧的。在以后的版本中,目录维护人员应设置为 restricted,目录维护人员应使用支持以受限模式运行 catalogSource pod 的 opm 重建其目录,以准备这些更改。有关 PSA 的更多信息,请访问 :https://kubernetes.io/docs/concepts/security/pod-security-admission/'

容限(tolerations)

数组

容限(toleration)是目录源的 pod 的容限。

tolerations[]

对象

此 Toleration 附加到 pod,以使用匹配的 operator <operator> 容许与 triple <key,value,effect> 匹配的任何污点。

2.1.3. .spec.grpcPodConfig.tolerations

描述
容限(toleration)是目录源的 pod 的容限。
类型
数组

2.1.4. .spec.grpcPodConfig.tolerations[]

描述
此 Toleration 附加到 pod,以使用匹配的 operator <operator> 容许与 triple <key,value,effect> 匹配的任何污点。
类型
object
Expand
属性类型描述

effect

字符串

effect 表示要匹配的污点效果。空意味着匹配所有污点效果。指定后,允许的值为 NoSchedule,PreferNoSchedule 和 NoExecute。

key

字符串

key 是容限应用到的污点键。empty 表示与所有污点键匹配。如果键为空,则必须存在运算符;组合意味着匹配所有值和所有键。

operator

字符串

Operator 代表键与值的关系。有效的运算符是 Exists 和 Equal。默认值为 Equal。exists 等同于值的通配符,以便 pod 可以容忍特定类别的所有污点。

tolerationSeconds

整数

tolerationSeconds 代表容限的期间(必须生效 NoExecute,否则此字段将被忽略)可以容忍污点。默认情况下,它不会被设置,这意味着容许任何污点(不要驱除)。零值和负值将被视为 0 (立即删除)。

value

字符串

value 是容限匹配的污点值。如果运算符是 Exists,则该值应该为空,否则仅是一个常规字符串。

2.1.5. .spec.icon

描述
类型
object
必填
  • base64data
  • MediaType
Expand
属性类型描述

base64data

字符串

 

MediaType

字符串

 

2.1.6. .spec.updateStrategy

描述
updateStrategy 定义如何发现更新的目录源镜像如何发现定义轮询持续时间和嵌入式策略类型的间隔的 Consists
类型
object
Expand
属性类型描述

registryPoll

对象

 

2.1.7. .spec.updateStrategy.registryPoll

描述
类型
object
Expand
属性类型描述

interval

字符串

间隔用于决定最新目录源版本检查之间的时间间隔。catalog operator 会轮询以查看目录源的新版本是否可用。如果可用,则拉取最新的镜像,并且 gRPC 流量会被定向到最新的目录源。

2.1.8. .status

描述
类型
object
Expand
属性类型描述

conditions

array

代表 CatalogSource 的状态。请注意,Message 和 Reason 代表原始状态信息,这些信息可能会在以后被迁移为条件。引入的任何新功能都将使用条件。

conditions[]

对象

条件包含此 API 资源当前状态的一个方面的详情。--- 这个结构旨在直接用作字段路径 .status.conditions 中的数组。例如,输入 FooStatus struct{ // Represents the observations of a foo’s current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions" // other fields }

configMapReference

对象

 

connectionState

对象

 

latestImageRegistryPoll

字符串

CatalogSource 镜像 registry 最后一次轮询的时间,以确保镜像为最新版本

message

字符串

人类可读的消息,指示 CatalogSource 在这种情况下为什么的详情。

reason

字符串

CatalogSource 转换为当前状态的原因。

registryService

对象

 

2.1.9. .status.conditions

描述
代表 CatalogSource 的状态。请注意,Message 和 Reason 代表原始状态信息,这些信息可能会在以后被迁移为条件。引入的任何新功能都将使用条件。
类型
array

2.1.10. .status.conditions[]

描述
条件包含此 API 资源当前状态的一个方面的详情。--- 这个结构旨在直接用作字段路径 .status.conditions 中的数组。例如,输入 FooStatus struct{ // Represents the observations of a foo’s current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions" // other fields }
类型
object
必填
  • lastTransitionTime
  • message
  • reason
  • status
  • type
Expand
属性类型描述

lastTransitionTime

字符串

lastTransitionTime 是条件从一个状态转换到另一个状态最后一次的时间。这应该是底层条件变化的时间。如果为未知,则使用 API 字段更改的时间是可以接受的。

message

字符串

Message 是人类可读的消息,指示有关转换的详细信息。这可能是一个空字符串。

observedGeneration

整数

observedGeneration 代表 .metadata.generation,这是条件设置所基于的条件。例如,如果 .metadata.generation 目前为 12,但 .status.conditions[x].observedGeneration 是 9,则代表条件与实例的当前状态已不匹配。

reason

字符串

reason 包含程序标识符,指示条件最后一次转换的原因。特定条件类型的制作者可能会定义预期的值和此字段的含义,以及这些值是否被视为有保证的 API。该值应该是 CamelCase 字符串。此字段可能不是空的。

status

字符串

条件的状态,True, False, Unknown 之一。

type

字符串

CamelCase 或 foo.example.com/CamelCase 中的条件类型。-- Many .condition.type 值在资源间是一致的,但因为任意条件可能很有用(请参阅 .node.status.conditions),deconflict 的能力非常重要。它匹配的正则表达式是 (dns1123SubdomainFmt/)? (qualifiedNameFmt)

2.1.11. .status.configMapReference

描述
类型
object
必填
  • name
  • namespace
Expand
属性类型描述

lastUpdateTime

字符串

 

name

字符串

 

namespace

字符串

 

resourceVersion

字符串

 

uid

字符串

UID 是拥有唯一 ID 值的类型,包括 UUID。由于我们不仅使用 UUID,因此这是一个别名字符串。作为一种类型捕获意图,有助于确保 UID 和名称不会被限制。

2.1.12. .status.connectionState

描述
类型
object
必填
  • lastObservedState
Expand
属性类型描述

address

字符串

 

lastConnect

字符串

 

lastObservedState

字符串

 

2.1.13. .status.registryService

描述
类型
object
Expand
属性类型描述

createdAt

字符串

 

port

字符串

 

protocol

字符串

 

serviceName

字符串

 

serviceNamespace

字符串

 
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat