MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs 菜单
Docs 主页
/ /
/ / /

AtlasStreamConnection 自定义资源

AtlasStreamConnection 自定义资源配置 Atlas Stream Processing 连接您可以配置示例连接、与Atlas变更流的连接或与Apache Kafka 系统的连接。

以下示例将一个连接添加到 stream processing 工作区的“连接注册表”中。要学习;了解更多信息,请参阅 托管 Atlas Stream Processing。

apiVersion: atlas.mongodb.com/v1
kind: AtlasStreamConnection
metadata:
name: my-stream-connection
spec:
name: sample_stream_solar
type: Sample

注意

如果您为spec.type参数指定Sample ,则spec.name参数必须与样本集合名称匹配。 目前,Atlas Kubernetes Operator 仅支持此自定义资源的sample_stream_solar样本集合。

apiVersion: atlas.mongodb.com/v1
kind: AtlasStreamConnection
metadata:
name: my-stream-connection
spec:
name: my-stream-connection
type: Cluster
clusterConfig:
name: my-cluster
role:
name: my-db-role
type: CUSTOM
apiVersion: atlas.mongodb.com/v1
kind: AtlasStreamConnection
metadata:
name: my-stream-connection
spec:
name: my-stream-connection
type: Kafka
kafkaConfig:
bootstrapServers: "comma,separated,list,of,server,addresses"
authentication:
mechanism: SCRAM-512
credentials:
name: ref-to-creds-secret
namespace: default
security:
protocol: SSL
certificate:
name: ref-to-certificate-secret
namespace: default

AtlasStreamConnection 是 atlasstreamconnections API的模式

Name
类型
说明
必需

apiVersion

字符串

atlas.mongodb.com/v1

true

kind

字符串

AtlasStreamConnection

true

metadata

对象

有关 metadata字段的字段,请参阅Kubernetes API 文档。

true

spec

对象

AtlasStreamConnectionSpec 定义了 AtlasStreamConnection 的目标状态。

false

status

对象

AtlasStreamConnectionStatus 定义了 AtlasStreamConnection 的观察到的状态。

false

AtlasStreamConnectionSpec 定义 AtlasStreamConnection 的目标状态。

Name
类型
说明
必需

name

字符串

人类可读标签,用于唯一标识流连接。

true

type

枚举

连接类型。可以是 Cluster 或Kafka。枚举: Kafka、Cluster、Sample

true

clusterConfig

对象

用于连接到Atlas集群的配置。

false

kafkaConfig

对象

用于连接到Kafka集群的配置。

false

用于连接到Atlas集群的配置。

Name
类型
说明
必需

name

字符串

为此连接配置的集群名称。

true

role

对象

要连接到Atlas集群的内置或自定义 DB 角色的名称。

true

用于连接到Atlas集群的内置或自定义数据库角色的名称。

Name
类型
说明
必需

name

字符串

要使用的角色的 name。可以是内置角色或自定义角色。

true

type

枚举

DB角色的类型。可以是BUILT_INCUSTOM 。枚举:BUILT_INCUSTOM

true

用于连接到Kafka集群的配置。

Name
类型
说明
必需

authentication

对象

连接Kafka集群所需的用户凭证。包括 authentication 类型以及该 authentication模式的参数。

true

bootstrapServers

字符串

逗号分隔的服务器地址列表

true

security

对象

与Kafka的安全传输连接的属性。对于 SSL,这可以包括要使用的受信任证书。

true

config

map[string]string

用于可选配置的Kafka键值对映射。这是一个平面对象,键中可以带有“.”。字符。

false

连接Kafka集群所需的用户凭证。包括身份验证类型以及该身份验证模式的参数。

Name
类型
说明
必需

credentials

对象

对包含用于连接到Kafka集群的帐户的“用户名”和“密码”的密钥的引用。

true

mechanism

枚举

身份验证方式。可以是PLAINSCRAM -256 或SCRAM -512 之一。枚举: PLAINSCRAM -256 、SCRAM -512

true

对包含用于连接到Kafka集群的帐户的“用户名”和“密码”的密钥的引用。

Name
类型
说明
必需

name

字符串

Kubernetes资源名称

true

namespace

字符串

Kubernetes资源的命名空间

false

与Kafka 的安全传输连接的属性。对于 SSL,这可以包括要使用的受信任证书。

Name
类型
说明
必需

protocol

枚举

描述传输类型。可以是PLAINTEXTSSL 。枚举:PLAINTEXTSSL

true

certificate

对象

一个可信的公共 x509 certificate,用于通过 SSL 连接到Kafka 。

false

受信任的公共 x509 证书,用于通过 SSL 连接Kafka 。

Name
类型
说明
必需

name

字符串

Kubernetes资源名称

true

namespace

字符串

Kubernetes资源的命名空间

false

AtlasStreamConnectionStatus 定义了 AtlasStreamConnection 的观察到状态。

Name
类型
说明
必需

conditions

[]对象

条件是显示Atlas自定义资源当前状态的状态列表

true

instances

[]对象

使用连接配置的 instances 列表

false

observedGeneration

整型

ObservedGeneration 表示Atlas Operator 感知的资源规范的生成。 Atlas Operator 在开始资源协调后立即将该字段更新为“元数据生成”的值。格式:int64

false

条件描述了Atlas自定义资源在某一点的状态。

Name
类型
说明
必需

status

字符串

条件的状态; True、False、未知之一。

true

type

字符串

Atlas自定义资源条件的类型。

true

lastTransitionTime

字符串

上次条件从一种状态转换为另一种状态的时间。以ISO8601 格式表示。格式:日期-时间

false

message

字符串

提供有关转换的详细信息的 message

false

reason

字符串

条件的最后一次转换的 reason

false

ResourceRefNamespaced 是对Kubernetes资源的引用,允许配置命名空间

Name
类型
说明
必需

name

字符串

Kubernetes资源名称

true

namespace

字符串

Kubernetes资源的命名空间

false

后退

AtlasSearchIndexConfig

在此页面上