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 workspace. 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
AtlasStreamConnection
AtlasStreamConnection is the Schema for the atlasstreamconnections API
Name | Type | Description | Required |
|---|---|---|---|
| string | atlas.mongodb.com/v1 | true |
| string |
| true |
| object | Refer to the Kubernetes | true |
| object |
| false |
| object |
| false |
AtlasStreamConnection.spec
AtlasStreamConnectionSpec defines the target state of AtlasStreamConnection.
Name | Type | Description | Required |
|---|---|---|---|
| string | Human-readable label that uniquely identifies the stream connection. | true |
| enum | Type of the connection. Can be either Cluster or Kafka. Enum: Kafka, Cluster, Sample | true |
| object | The configuration to be used to connect to an Atlas Cluster. | false |
| object | The configuration to be used to connect to a Kafka Cluster. | false |
AtlasStreamConnection.spec.clusterConfig
The configuration to be used to connect to an Atlas Cluster.
Name | Type | Description | Required |
|---|---|---|---|
| string | Name of the cluster configured for this connection. | true |
| object | The name of a built-in or Custom | true |
AtlasStreamConnection.spec.clusterConfig.role
The name of a built-in or Custom DB Role to connect to an Atlas Cluster.
Name | Type | Description | Required |
|---|---|---|---|
| string | The | true |
| enum | Type of the | true |
AtlasStreamConnection.spec.kafkaConfig
The configuration to be used to connect to a Kafka Cluster.
Name | Type | Description | Required |
|---|---|---|---|
| object | User credentials required to connect to a Kafka Cluster. Includes the | true |
| string | Comma separated list of server addresses | true |
| object | Properties for the secure transport connection to Kafka. For | true |
| map[string]string | A map of Kafka key-value pairs for optional configuration. This is a flat object, and keys can have '.' characters. | false |
AtlasStreamConnection.spec.kafkaConfig.authentication
User credentials required to connect to a Kafka Cluster. Includes the authentication type, as well as the parameters for that authentication mode.
Name | Type | Description | Required |
|---|---|---|---|
| object | Reference to the secret containing th Username and Password of the account to connect to the Kafka cluster. | true |
| enum | Style of authentication. Can be one of | true |
AtlasStreamConnection.spec.kafkaConfig.authentication.credentials
Reference to the secret containing th Username and Password of the account to connect to the Kafka cluster.
Name | Type | Description | Required |
|---|---|---|---|
| string | Name of the Kubernetes Resource | true |
| string | Namespace of the Kubernetes Resource | false |
AtlasStreamConnection.spec.kafkaConfig.security
Properties for the secure transport connection to Kafka. For SSL, this can include the trusted certificate to use.
Name | Type | Description | Required |
|---|---|---|---|
| enum | Describes the transport type. Can be either | true |
| object | A trusted, public x509 | false |
AtlasStreamConnection.spec.kafkaConfig.security.certificate
A trusted, public x509 certificate for connecting to Kafka over SSL.
Name | Type | Description | Required |
|---|---|---|---|
| string | Name of the Kubernetes Resource | true |
| string | Namespace of the Kubernetes Resource | false |
AtlasStreamConnection.status
AtlasStreamConnectionStatus defines the observed state of AtlasStreamConnection.
Name | Type | Description | Required |
|---|---|---|---|
| []object | Conditions is the list of statuses showing the current state of the Atlas Custom Resource | true |
| []object | List of | false |
| integer |
| false |
AtlasStreamConnection.status.conditions
Condition describes the state of an Atlas Custom Resource at a certain point.
Name | Type | Description | Required |
|---|---|---|---|
| string | Status of the condition; one of True, False, Unknown. | true |
| string | Type of Atlas Custom Resource condition. | true |
| string | Last time the condition transitioned from one status to another.
Represented in | false |
| string | A | false |
| string | The | false |
AtlasStreamConnection.status.instances
ResourceRefNamespaced is a reference to a Kubernetes Resource that allows to configure the namespace
Name | Type | Description | Required |
|---|---|---|---|
| string | Name of the Kubernetes Resource | true |
| string | Namespace of the Kubernetes Resource | false |