对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

AtlasDataFederation 自定义资源

注意

Atlas Kubernetes Operator 不支持 Atlas for 政府 的AtlasDataFederation自定义资源。

AtlasDataFederation 自定义资源在Atlas中配置联合数据库实例。当您创建 AtlasDataFederation 自定义资源时, Atlas Kubernetes Operator会尝试在Atlas中创建或更新联合数据库实例。您可以使用联合数据库实例来运行联合查询。

重要

自定义资源不再默认删除对象

  • Atlas Kubernetes Operator使用自定义资源配置文件来管理Atlas配置,但从Atlas Kubernetes Operator2.0 开始,您在Kubernetes中删除的自定义资源不再(默认)在Atlas中删除。相反, Atlas Kubernetes Operator只是停止管理Atlas中的这些资源。 AtlasProject示例,如果您在Kubernetes中删除 自定义资源,默认默认, Atlas Kubernetes Operator不再自动从Atlas中删除相应的项目。这种行为更改旨在帮助防止意外删除。 要学习;了解详情,包括如何将此行为恢复为在Atlas Kubernetes Operator.2 0之前使用的默认,请参阅新默认值: Atlas Kubernetes2 Operator.0 中的删除保护。

    同样,如果您使用Atlas Kubernetes Operator从Kubernetes中的Atlas项目中删除团队,则Atlas Kubernetes Operator不会从Atlas中删除团队。

  • 显式定义所需的配置详细信息,以避免隐式使用默认Atlas配置值。 在某些情况下,继承Atlas默认值可能会导致协调循环,从而阻止自定义资源实现 READY 状态。 示例,在 AtlasDeployment 自定义资源中显式定义所需的自动伸缩行为(如所包含的示例所示)可确保自定义资源中的静态实例大小不会重复应用于已启用自动伸缩的Atlas部署。

    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.

如果您从 Kubernetes 集群中删除AtlasDataFederation资源,Atlas Kubernetes Operator 将从 Atlas 中删除联合数据库实例。

以下示例显示了已配置私有端点的AtlasDataFederation自定义资源规范:

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

This section describes some of the key AtlasDataFederation custom resource parameters available. For a full list of available parameters, see the Atlas Data Federation API.

请参考这些说明、可用示例和 API 文档,自行制定规范。

metadata.name

类型:字符串

必需

Label that identifies the AtlasDataFederation Custom Resource that Atlas Kubernetes Operator uses to add this federated database instance to a project.

spec.cloudProviderConfig

类型:对象

必需

包含联合数据库实例的云提供商配置的列表。

spec.cloudProviderConfig.aws

类型:对象

必需

托管联合数据库实例的云服务提供商的名称。

spec.cloudProviderConfig.aws.roleId

类型:字符串

必需

联合数据库实例可用于访问数据存储的角色的唯一标识符。

spec.cloudProviderConfig.aws.testS3Bucket

类型:字符串

必需

所提供的角色 ID 有权访问的 S3 数据存储桶的名称。

spec.dataProcessRegion

类型:对象

必需

有关联合数据库实例将客户端连接路由到的云提供商区域的信息。 Atlas Kubernetes Operator 支持仅Amazon Web Services 。

spec.dataProcessRegion.cloudProvider

类型:字符串

必需

托管联合数据库实例的数据存储的云服务提供商的名称。 Atlas Kubernetes Operator 接受以下值:

  • AWS

  • TENANT

  • SERVERLESS

spec.dataProcessRegion.region

类型:字符串

必需

指示联合数据库实例的数据存储地理位置的标签。 Atlas Kubernetes Operator 接受以下值:

  • SYDNEY_AUS

  • MUMBAI_IND

  • FRANKFURT_DEU

  • DUBLIN_IRL

  • LONDON_GBR

  • VIRGINIA_USA

  • OREGON_USA

  • SAOPAULO_BRA

  • SINGAPORE_SGP

spec.name

类型:字符串

Optional

用于标识 Atlas 中联合数据库实例的标签。

spec.storage

类型:对象

Optional

每个数据存储的配置信息及其到 Atlas 数据库的映射。

spec.storage.databases

类型:数组

Optional

包含此联合数据库实例的可查询数据库和collection的列表。

spec.storage.databases.collections

类型:数组

Optional

映射到stores数据存储的collection和数据源的列表。

spec.storage.databases.collections.dataSources

类型:数组

Optional

列表,其中包含映射到此联合数据库实例的集合的数据存储。

spec.storage.databases.collections.dataSources.allowInsecure

类型:布尔值

Optional

用于验证指定 URL 中的方案的标志。 如果true ,Atlas Kubernetes Operator 允许不安全的HTTP方案,不验证服务器的证书链和主机名,并接受服务器提供的具有任何主机名的任何证书。 如果为false,Atlas Kubernetes Operator仅允许保护HTTPS方案。

spec.storage.databases.collections.dataSources.collection

类型:字符串

Optional

人类可读标签,用于标识数据库中的集合。 要创建通配符 ( * ) collection,必须省略此参数。

spec.storage.databases.collections.dataSources.collectionRegex

类型:字符串

Optional

用于创建通配符 ( * ) collection的正则表达式模式。

spec.storage.databases.collections.dataSources.database

类型:字符串

Optional

用于标识数据库的人类可读标签,其中包含集群中的collection。您必须省略此参数才能为动态生成的数据库生成通配符 ( * ) collection。

spec.storage.databases.collections.dataSources.databaseRegex

类型:字符串

Optional

用于创建通配符 ( * ) 数据库的正则表达式模式。

spec.storage.databases.collections.dataSources.defaultFormat

类型:字符串

Optional

如果 Atlas Kubernetes Operator 在搜索 storeName 时遇到没有文件扩展名的文件,它使用的文件格式。Atlas Kubernetes Operator 接受以下值:

  • .avro

  • .avro.bz2

  • .avro.gz

  • .bson

  • .bson.bz2

  • .bson.gz

  • .bsonx

  • .csv

  • .csv.bz2

  • .csv.gz

  • .json

  • .json.bz2

  • .json.gz

  • .orc

  • .parquet

  • .tsv

  • .tsv.bz2

  • .tsv.gz

spec.storage.databases.collections.dataSources.path

类型:字符串

Optional

文件路径,用于控制 Atlas Kubernetes Operator 在将文件映射到collection之前如何搜索和解析storeName中的文件。指定/以捕获前缀路径中的所有文件和文件夹。

spec.storage.databases.collections.dataSources.provenanceFieldName

类型:字符串

Optional

人类可读标签,用于标识结果中包含文档来源的字段。 Atlas Kubernetes Operator 在结果中为每个支持的提供商返回不同的字段。

spec.storage.databases.collections.dataSources.storeName

类型:字符串

Optional

人类可读标签,用于标识 Atlas Kubernetes Operator 映射到collection的数据存储。

spec.storage.databases.collections.dataSources.urls

类型:数组

Optional

URLs of the publicly-accessible data files. You can't specify URLs that require authentication. Atlas Data Federation creates a partition for each URL. If empty or omitted, Atlas Data Federation uses the URLs from the store specified in the dataSources.storeName parameter.

spec.storage.databases.collections.name

类型:字符串

Optional

人类可读标签,用于标识 Atlas Kubernetes Operator 将数据存储中的数据映射到的collection。

spec.storage.databases.maxWildcardCollections

类型:int32

Optional

数据库中通配符collection的最大数量。这仅适用于 S3 数据源。 默认值为100 。

spec.storage.databases.name

类型:字符串

Optional

人类可读标签,用于标识联合数据库实例将数据映射到的数据库。

spec.storage.databases.views

类型:数组

Optional

应用于collection的聚合管道列表。这仅适用于 S3 数据源。

spec.storage.databases.views.name

类型:字符串

Optional

用于标识视图的人类可读标签,对应于collection上的聚合管道。

spec.storage.databases.views.pipeline

类型:字符串

Optional

要应用于源collection的聚合管道阶段。

spec.storage.databases.views.source

类型:字符串

Optional

人类可读标签,用于标识视图的源集合。

spec.storage.stores

类型:数组

Optional

包含联合数据库实例的数据存储的列表。

spec.storage.stores.name

类型:字符串

Optional

Human-readable label that identifies the data store. The spec.storage.databases.collections.dataSources.storeName field references this values as part of the mapping configuration.

spec.storage.stores.provider

类型:字符串

可选的

商店的提供商。 Atlas Kubernetes Operator 仅支持S3 。 您必须指定此字段才能使用数据存储。

spec.storage.stores.additionalStorageClasses

类型:数组

Optional

AWS S3 存储类的集合。Atlas Data Federation 在查询结果中包含这些存储类中的文件。Atlas Kubernetes Operator 接受以下值:

  • STANDARD

  • INTELLIGENT_TIERING

  • STANDARD_IA

spec.storage.stores.bucket

类型:字符串

Optional

人类可读标签,用于标识 AWS S3 存储桶。此标签必须与联合数据库实例可以使用配置的 AWS IAM 凭证访问的 S3 存储桶的名称完全匹配。

spec.storage.stores.delimiter

类型:字符串

Optional

The delimiter that separates spec.storage.databases.collections.dataSources.path segments in the data store. Atlas Kubernetes Operator uses the delimiter to efficiently traverse S3 buckets with a hierarchical directory structure. You can specify any character supported by the S3 object keys as the delimiter. For example, you can specify an underscore (_) or a plus sign (+) or multiple characters, such as double underscores (__) as the delimiter. If omitted, defaults to /.

spec.storage.stores.includeTags

类型:布尔值

Optional

指示是否在给定路径中的文件上使用 S3 标签作为附加分区属性的标志。 如果设置为 true,Atlas Kubernetes Operator 会将 S3 标签添加为附加分区属性,并添加将每个标签与每个文档关联的新的顶级 BSON 元素。如果省略,则默认为false 。

spec.storage.stores.prefix

类型:字符串

Optional

Prefix that Atlas Kubernetes Operator applies when searching for files in the S3 bucket. The data store prepends the value of prefix to the spec.storage.databases.collections.dataSources.path to create the full path for files to ingest. If omitted, Atlas Kubernetes Operator searches all files from the root of the S3 bucket.

spec.storage.stores.public

类型:布尔值

Optional

标志,指示存储桶是否公开。如果设置为 true,Atlas Kubernetes Operator 将不会使用配置的 AWS IAM 角色来访问 S3 存储桶。如果设置为 false,则配置的 Amazon Web Services IAM 角色必须包含访问权限,才能访问 S3 存储桶。

spec.storage.stores.region

类型:字符串

Optional

Amazon Web Services 区域,表示 S3 存储桶的物理位置。

spec.privateEndpoints

类型:数组

Optional

包含联合数据库实例的私有端点配置的列表。

spec.privateEndpoints.endpointId

类型:字符串

必需

唯一的 22 字符构成的字母数字符串,以 vpce- 开头,用于标识 AWS 中的私有端点。

spec.privateEndpoints.provider

类型:字符串

Optional

用于标识云服务提供商的人类可读标签。 Atlas Data Federation 仅支持AWS 。

spec.privateEndpoints.type

类型:字符串

Optional

人类可读标签,用于标识与此私有端点关联的资源类型。 Atlas Data Federation 仅支持DATA_LAKE 。

spec.projectRef.name

类型:字符串

必需

联合数据库实例所属项目的名称。 您必须指定现有的AtlasProject自定义资源。

spec.projectRef.namespace

类型:字符串

必需

Namespace in which the AtlasProject Custom Resource specified in spec.projectRef.name exists.

给本页内容打分

在此页面上