MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs Menu
Docs Home
/ /
/ / /

AtlasTeam Custom Resource

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.

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 AtlasProject Custom 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 READY state. For example, explicitly defining your desired autoscaling behavior in your AtlasDeployment custom 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 does one of the following actions using the Atlas Teams API Resource:

  • Creates a new team.

  • Updates an existing team.

The following example shows an AtlasTeam custom resource that defines the green-leaf-team, comprised of four users. This custom resource must be referenced from the AtlasProject Custom Resource before this team can access an Atlas project:

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 is the Schema for the Atlas Teams API

Name
Type
Description
Required

apiVersion

string

atlas.mongodb.com/v1

true

kind

string

AtlasTeam

true

metadata

object

Refer to the Kubernetes API documentation for the fields of the metadata field.

true

spec

object

TeamSpec defines the target state of a Team in Atlas.

true

status

object

TeamStatus defines the observed state of AtlasTeam.

false

TeamSpec defines the target state of a Team in Atlas.

Name
Type
Description
Required

name

string

The name of the team you want to create.

true

usernames

[]string

Valid email addresses of users to add to the new team.

true

TeamStatus defines the observed state of AtlasTeam.

Name
Type
Description
Required

conditions

[]object

Conditions is the list of statuses showing the current state of the Atlas Custom Resource

true

id

string

ID of the team

false

observedGeneration

integer

ObservedGeneration indicates the generation of the resource specification of which the Atlas Operator is aware. The Atlas Operator updates this field to the value of 'metadata.generation' as soon as it starts reconciliation of the resource. Format: int64

false

projects

[]object

List of projects which the team is assigned

false

Condition describes the state of an Atlas Custom Resource at a certain point.

Name
Type
Description
Required

status

string

Status of the condition; one of True, False, Unknown.

true

type

string

Type of Atlas Custom Resource condition.

true

lastTransitionTime

string

Last time the condition transitioned from one status to another. Represented in ISO 8601 format. Format: date-time

false

message

string

A message providing details about the transition.

false

reason

string

The reason for the condition's last transition.

false

Name
Type
Description
Required

id

string

Unique identifier of the project inside atlas

true

name

string

Name given to the project

true

Back

AtlasBackupCompliance

On this page