Menu Docs

AtlasStreamConnection Recurso personalizado

The AtlasStreamConnection custom resource configures Atlas Stream Processing conexões. You can configure a sample connection, a connection to an Atlas change stream, or a connection to an Apache Kafka system.

The following examples add a connection to add to the Connections Registry of the stream processing instance. To learn more, see Gerenciar Atlas Stream Processing.

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

Observação

Se você especificar Sample para o parâmetro spec.type , o parâmetro spec.name deverá corresponder ao nome da collection de amostra. Atualmente, o Atlas Kubernetes Operator suporta somente a collection de amostra sample_stream_solar para este recurso personalizado.

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

This section describes the available AtlasStreamConnection parameters.

spec.name

Tipo: string

Obrigatório

Name that identifies the stream processing connection.

Observação

Se você especificar Sample para o parâmetro spec.type , o parâmetro spec.name deverá corresponder ao nome da collection de amostra. Atualmente, o Atlas Kubernetes Operator suporta somente a collection de amostra sample_stream_solar para este recurso personalizado.

spec.type

Tipo: string

Obrigatório

String that indicates the type of connection. Valid values include:

  • Sample

  • Cluster

  • Kafka

spec.clusterConfig

Tipo: objeto

Condicional

Object that contains the configuration for the connection to an Atlas change stream. If you specified Cluster for the spec.type parameter, you must specify this setting.

spec.clusterConfig.name

Tipo: string

Condicional

Name that identifies the connection to the Atlas change stream. If you specified Cluster for the spec.type parameter, you must specify this setting.

spec.clusterConfig.role

Tipo: string

Condicional

Database role for the connection to the Atlas change stream. If you specified Cluster for the spec.type parameter, you must specify this setting.

spec.clusterConfig.role.name

Tipo: string

Condicional

Name that identifies the database role for the connection to the Atlas change stream. If you specified Cluster for the spec.type parameter, you must specify this setting.

spec.clusterConfig.role.type

Tipo: string

Condicional

String that indicates the type of database role. Valid values include:

  • BUILT_IN

  • CUSTOM

To learn more, see Configurar papéis personalizados do banco de dados.

spec.kafkaConfig

Tipo: objeto

Condicional

Object that contains the configuration for the connection to an Apache Kafka system. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.bootstrapServers

Tipo: array

Condicional

Comma-separated list of server addresses for the connection to an Apache Kafka system. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.authentication

Tipo: objeto

Condicional

Object that contains the configuration for the authentication mechanism and credentials. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.authentication.mechanism

Tipo: string

Condicional

String that indicates the authentication mechanism for the connection to an Apache Kafka system. If you specified Kafka for the spec.type parameter, you must specify this setting. Valid values include:

  • PLAIN

  • SCRAM-256

  • SCRAM-512

spec.kafkaConfig.authentication.credentials

Tipo: objeto

Condicional

Object that contains the reference to the secret that contains the authentication credentials. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.authentication.credentials.name

Tipo: string

Condicional

Name of the opaque secret that contains your authentication credentials. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.authentication.credentials.namespace

Tipo: string

Condicional

Namespace of the opaque secret that contains your authentication credentials. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.security

Tipo: objeto

Condicional

Object that contains the configuration for the security protocol and certificate. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.security.protocol

Tipo: string

Condicional

String that indicates the security protocol for the connection to an Apache Kafka system. If you specified Kafka for the spec.type parameter, you must specify this setting. Valid values include:

  • PLAIN

  • SSL

spec.kafkaConfig.security.certificate

Tipo: objeto

Condicional

Object that contains the configuration for the security certificate. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.security.certificate.name

Tipo: string

Condicional

Name of the opaque secret that contains your secrity certificate. If you specified Kafka for the spec.type parameter, you must specify this setting.

spec.kafkaConfig.security.certificate.namespace

Tipo: string

Condicional

Namespace of the opaque secret that contains your security certificate. If you specified Kafka for the spec.type parameter, you must specify this setting.