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

AtlasTeam 自定义资源

The AtlasTeam custom resource defines a team of Atlas users. To give this team access to one or more projects, you must reference the AtlasTeam custom resource from the AtlasProject Custom Resource and configure access roles for the team.

重要

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

  • 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 使用 Atlas Teams API 资源执行以下操作之一:

  • 创建一个新团队。

  • 更新现有团队。

以下示例显示了一个定义green-leaf-team (由四个用户组成)的AtlasTeam自定义资源。 必须先从AtlasProject自定义资源引用此自定义资源,此团队才能访问 Atlas 项目:

apiVersion: atlas.mongodb.com/v1
kind: AtlasTeam
metadata:
name: green-leaf-team
spec:
name: "greenLeafTeam"
usernames:
- "atlas.user1@example.com"
- "atlas.user2@example.com"
- "atlas.user3@example.com"
- "atlas.user4@example.com"

本部分介绍可用的AtlasTeam自定义资源参数。

metadata.name

类型:字符串

必需

AtlasProject自定义资源用于将此团队添加到项目中的名称。

metadata.namespace

类型:字符串

Optional

要包含 atlasTeam 自定义资源的命名空间。如果未指定, Atlas Kubernetes Operator将使用 kubectl设立的当前命名空间。

spec.name

类型:字符串

必需

用于标识团队的人类可读标签。 此名称会出现在您查看、添加或编辑团队的任何位置,以帮助您区分多个团队。

spec.usernames

类型:字符串

必需

包含该团队成员的 Atlas 用户名的列表。

给本页内容打分

在此页面上