Note
Atlas Kubernetes Operator doesn't support the AtlasDataFederation custom resource for
Atlas for Government.
The AtlasDataFederation custom resource configures a federated database instance in
Atlas. When you create the AtlasDataFederation custom
resource, Atlas Kubernetes Operator tries to create or update a federated database instance in
Atlas. You can use an federated database instance to run federated queries.
Important
Custom Resources No Longer Delete Objects by Default
Atlas Kubernetes Operator uses custom resource configuration files to manage your Atlas configuration, but as of Atlas Kubernetes Operator 2.0, custom resources you delete in Kubernetes are no longer (by default) deleted in Atlas. Instead, Atlas Kubernetes Operator simply stops managing those resources in Atlas. For example, if you delete an
AtlasProjectCustom Resource in Kubernetes, by default the Atlas Kubernetes Operator no longer automatically deletes the corresponding project from Atlas. This change in behavior is intended to help prevent accidental or unexpected deletions. To learn more, including how to revert this behavior to the default used prior to Atlas Kubernetes Operator 2.0, see New Default: Deletion Protection in Atlas Kubernetes Operator 2.0.Similarly, Atlas Kubernetes Operator does not delete teams from Atlas if you remove them from an Atlas project in Kubernetes with the Atlas Kubernetes Operator.
Explicitly define your desired configuration details in order to avoid implicitly using default Atlas configuration values. In some cases, inheriting Atlas defaults may result in a reconciliation loop which can prevent your custom resource from achieving a
READYstate. For example, explicitly defining your desired autoscaling behavior in yourAtlasDeploymentcustom resource, as shown in the included example, ensures that a static instance size in your custom resource is not being repeatedly applied to an Atlas deployment which has autoscaling enabled.autoScaling: diskGB: enabled: true compute: enabled: true scaleDownEnabled: true minInstanceSize: M30 maxInstanceSize: M40
Atlas Kubernetes Operator uses the Atlas Clusters API Resource and Advanced Clusters API Resource to create a new federated database instance or
update an existing federated database instance. If you specify values for fields under
spec.serverlessSpec, Atlas Kubernetes Operator uses the Atlas
Serverless Instance API Resource to create or configure private endpoints for
your federated database instance.
If you remove the AtlasDataFederation resource from your Kubernetes
cluster, Atlas Kubernetes Operator removes the federated database instance from Atlas.
Examples
The following example shows an AtlasDataFederation custom resource
specification with configured private endpoints:
apiVersion: atlas.mongodb.com/v1 kind: AtlasDataFederation metadata: name: my-federated-deployment spec: projectRef: name: my-project namespace: default cloudProviderConfig: aws: roleId: 12345678 testS3Bucket: my-bucket dataProcessRegion: cloudProvider: AWS region: OREGON_USA name: my-fdi storage: databases: - collections: - dataSources: - allowInsecure: false collection: my-collection collectionRegex: database: my-database databaseRegex: defaultFormat: ".avro" path: / provenanceFieldName: string storeName: my-data-store urls: - string: name: my-collection-mdb maxWildcardCollections: 100 name: my-database-mdb views: - name: my-view pipeline: source: my-source-collection stores: - name: my-store provider: S3 additionalStorageClasses: - STANDARD bucket: my-bucket delimiter: / includeTags: false prefix: data- public: false region: US_WEST_1 privateEndpoints: - endpointId: vpce-3bf78b0ddee411ba1 provider: AWS type: DATA_LAKE - endpointId: vpce-3bf78b0ddee411ba2 provider: AWS type: DATA_LAKE
Parameters
AtlasDataFederation
AtlasDataFederation is the Schema for the Atlas Data Federation API.
Name | Type | Description | Required |
|---|---|---|---|
| string | atlas.mongodb.com/v1 | true |
| string |
| true |
| object | Refer to the Kubernetes | true |
| object |
| false |
| object |
| false |
AtlasDataFederation.spec
DataFederationSpec defines the target state of AtlasDataFederation.
Name | Type | Description | Required |
|---|---|---|---|
| string | Human-readable label that identifies the Federated Database Instance. | true |
| object | Project is a reference to | true |
| object | Configuration for the cloud provider where this Federated Database Instance is hosted. | false |
| object | Information about the cloud provider region to which the Federated Database Instance routes client connections. | false |
| []object | Private endpoint for Federated Database Instances and Online Archives to add to the specified project. | false |
| object | Configuration information for each data store and its mapping to | false |
AtlasDataFederation.spec.projectRef
Project is a reference to AtlasProject resource the deployment belongs to.
Name | Type | Description | Required |
|---|---|---|---|
| string | Name of the Kubernetes Resource | true |
| string | Namespace of the Kubernetes Resource | false |
AtlasDataFederation.spec.cloudProviderConfig
Configuration for the cloud provider where this Federated Database Instance is hosted.
Name | Type | Description | Required |
|---|---|---|---|
| object | Configuration for running Data Federation in | false |
AtlasDataFederation.spec.cloudProviderConfig.aws
Configuration for running Data Federation in AWS.
Name | Type | Description | Required |
|---|---|---|---|
| string | Unique identifier of the role that the data lake can use to access the data stores.Required if specifying | false |
| string | Name of the | false |
AtlasDataFederation.spec.dataProcessRegion
Information about the cloud provider region to which the Federated Database Instance routes client connections.
Name | Type | Description | Required |
|---|---|---|---|
| enum | Name of the cloud service that hosts the Federated Database Instance's infrastructure.
Enum: | false |
| enum | Name of the | false |
AtlasDataFederation.spec.privateEndpoints
Name | Type | Description | Required |
|---|---|---|---|
| string | Unique 22-character alphanumeric string that identifies the private endpoint. | false |
| string | Human-readable label that identifies the cloud service provider. Atlas Data Lake supports Amazon Web Services only. | false |
| string | Human-readable label that identifies the resource | false |
AtlasDataFederation.spec.storage
Configuration information for each data store and its mapping to MongoDB Atlas databases.
Name | Type | Description | Required |
|---|---|---|---|
| []object | Array that contains the queryable | false |
| []object | Array that contains the data | false |
AtlasDataFederation.spec.storage.databases
Database associated with this data lake. Databases contain collections and views.
Name | Type | Description | Required |
|---|---|---|---|
| []object | Array of | false |
| integer | Maximum number of wildcard collections in the database. This only applies to | false |
| string | Human-readable label that identifies the database to which the data lake maps data. | false |
| []object | Array of aggregation pipelines that apply to the collection. This only applies to | false |
AtlasDataFederation.spec.storage.databases.collections
Collection maps to a stores data store.
Name | Type | Description | Required |
|---|---|---|---|
| []object | Array that contains the data stores that map to a collection for this data lake. | false |
| string | Human-readable label that identifies the collection to which | false |
AtlasDataFederation.spec.storage.databases.collections.dataSources
Name | Type | Description | Required |
|---|---|---|---|
| boolean | Flag that validates the scheme in the specified URLs.
If true, allows insecure | false |
| string | Human-readable label that identifies the | false |
| string | Regex pattern to use for creating the wildcard (*) collection. | false |
| string | Human-readable label that identifies the database, which contains the collection in the cluster. You must omit this parameter to generate wildcard (*) collections for dynamically generated databases. | false |
| string | Regex pattern to use for creating the wildcard (*) database. | false |
| enum | File format that | false |
| string | File | false |
| string | Name for the field that includes the provenance of the documents in the results. | false |
| string | Human-readable label that identifies the data store that | false |
| []string | URLs of the publicly accessible data files. You can't specify URLs that require authentication.
Atlas Data Lake creates a partition for each | false |
AtlasDataFederation.spec.storage.databases.views
Name | Type | Description | Required |
|---|---|---|---|
| string | Human-readable label that identifies the view, which corresponds to an aggregation pipeline on a collection. | false |
| string | Aggregation | false |
| string | Human-readable label that identifies the | false |
AtlasDataFederation.spec.storage.stores
Store is a group of settings that define where the data is stored.
Name | Type | Description | Required |
|---|---|---|---|
| []string | Collection of | false |
| string | Human-readable label that identifies the | false |
| string | The | false |
| boolean | Flag that indicates whether to use | false |
| string | Human-readable label that identifies the data store. The | false |
| string | Prefix that | false |
| string | The | false |
| boolean | Flag that indicates whether the bucket is public.
If set to true, | false |
| string | Physical location where | false |
AtlasDataFederation.status
DataFederationStatus defines the observed state of AtlasDataFederation.
Name | Type | Description | Required |
|---|---|---|---|
| []object | Conditions is the list of statuses showing the current state of the Atlas Custom Resource | true |
| string |
| false |
| integer |
| false |
AtlasDataFederation.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 |