The AtlasStreamConnection custom resource configures
Atlas Stream Processing connections. You can configure a sample connection, a
connection to an Atlas change stream,
or a connection to an Apache Kafka system.
Examples
The following examples add a connection to add to the Connections Registry of the stream processing instance. To learn more, see Manage Atlas Stream Processing.
Sample Connection
apiVersion: atlas.mongodb.com/v1 kind: AtlasStreamConnection metadata: name: my-stream-connection spec: name: sample_stream_solar type: Sample
Note
If you specify Sample for the spec.type
parameter, the spec.name parameter must match the
sample collection name. Currently, Atlas Kubernetes Operator supports only
the sample_stream_solar sample collection for this
custom resource.
Change Stream Connection
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
Kafka Connection
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
Parameters
This section describes the available AtlasStreamConnection
parameters.
spec.nameType: string
Required
Name that identifies the stream processing connection.
Note
If you specify
Samplefor thespec.typeparameter, thespec.nameparameter must match the sample collection name. Currently, Atlas Kubernetes Operator supports only thesample_stream_solarsample collection for this custom resource.spec.typeType: string
Required
String that indicates the type of connection. Valid values include:
SampleClusterKafka
spec.clusterConfigType: object
Conditional
Object that contains the configuration for the connection to an Atlas change stream. If you specified
Clusterfor thespec.typeparameter, you must specify this setting.spec.clusterConfig.nameType: string
Conditional
Name that identifies the connection to the Atlas change stream. If you specified
Clusterfor thespec.typeparameter, you must specify this setting.spec.clusterConfig.roleType: string
Conditional
Database role for the connection to the Atlas change stream. If you specified
Clusterfor thespec.typeparameter, you must specify this setting.spec.clusterConfig.role.nameType: string
Conditional
Name that identifies the database role for the connection to the Atlas change stream. If you specified
Clusterfor thespec.typeparameter, you must specify this setting.spec.clusterConfig.role.typeType: string
Conditional
String that indicates the type of database role. Valid values include:
BUILT_INCUSTOM
To learn more, see Configure Custom Database Roles.
spec.kafkaConfigType: object
Conditional
Object that contains the configuration for the connection to an Apache Kafka system. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.bootstrapServersType: array
Conditional
Comma-separated list of server addresses for the connection to an Apache Kafka system. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.authenticationType: object
Conditional
Object that contains the configuration for the authentication mechanism and credentials. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.authentication.mechanismType: string
Conditional
String that indicates the authentication mechanism for the connection to an Apache Kafka system. If you specified
Kafkafor thespec.typeparameter, you must specify this setting. Valid values include:PLAINSCRAM-256SCRAM-512
spec.kafkaConfig.authentication.credentialsType: object
Conditional
Object that contains the reference to the secret that contains the authentication credentials. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.authentication.credentials.nameType: string
Conditional
Name of the opaque secret that contains your authentication credentials. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.authentication.credentials.namespaceType: string
Conditional
Namespace of the opaque secret that contains your authentication credentials. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.securityType: object
Conditional
Object that contains the configuration for the security protocol and certificate. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.security.protocolType: string
Conditional
String that indicates the security protocol for the connection to an Apache Kafka system. If you specified
Kafkafor thespec.typeparameter, you must specify this setting. Valid values include:PLAINSSL
spec.kafkaConfig.security.certificateType: object
Conditional
Object that contains the configuration for the security certificate. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.security.certificate.nameType: string
Conditional
Name of the opaque secret that contains your secrity certificate. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.spec.kafkaConfig.security.certificate.namespaceType: string
Conditional
Namespace of the opaque secret that contains your security certificate. If you specified
Kafkafor thespec.typeparameter, you must specify this setting.