AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

AtlasCustomRole 사용자 지정 리소스

중요

레거시 하위 리소스는 해당 CRD 출시하다 시점부터 더 이상 사용되지 않습니다. 현재 구성이 이 리소스 정의의 하위 리소스 형식을 사용하는 경우 CRD로 마이그레이션.

사용자 지정 리소스 데이터베이스 사용자에게 AtlasCustomRole 권한을 할당하는 사용자 지정 데이터베이스 역할 정의합니다.

지정된 프로젝트 내에서 이 사용자 지정 역할 만들려면 다음 중 하나를 수행해야 합니다.

  • Atlas Kubernetes Operator 로 관리 프로젝트의 경우 사용자 AtlasProject 지정 리소스 에서 사용자 지정 리소스 이름을 참조하세요.AtlasCustomRole

  • Reference the project ID of your Atlas project in the AtlasCustomRole custom resource, for projects you don't manage with Atlas Kubernetes Operator

중요

Custom Resource(사용자 정의 리소스)는 더 이상 기본적으로 객체를 삭제하지 않음

  • Atlas Kubernetes Operator 사용자 지정 리소스 구성 파일을 사용하여 Atlas 구성을 관리 하지만, Atlas Kubernetes Operator 부터는 Kubernetes 에서 삭제 사용자 지정 2.0 리소스가 더 이상 ( 기본값) Atlas 에서 삭제되지 않습니다. 대신 Atlas Kubernetes Operator Atlas 에서 해당 리소스 관리를 중지할 뿐입니다. 예시 들어, Kubernetes 에서 Custom Resource(사용자 AtlasProject 지정 리소스)를 삭제 하면 기본값 으로 Atlas Kubernetes Operator 더 이상 Atlas 에서 해당 프로젝트 자동으로 삭제하지 않습니다. 이러한 동작 변경은 우발적이거나 예기치 않은 삭제를 방지하기 위한 것입니다. 이 동작을 Atlas Kubernetes Operator 이전에 사용된 기본값 으로 되돌리는 2 방법0 등 자세한 학습 새 기본값: Atlas Kubernetes Operator 2 의 삭제0 보호 기능을 참조하세요.

    마찬가지로, Atlas Kubernetes Operator 를 사용하여 Kubernetes 의 Atlas 프로젝트 에서 팀을 제거 하는 경우 Atlas Kubernetes 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 Custom Database Role API Resource(사용자 지정 데이터베이스 역할 API리소스)를 사용하여 다음 작업 중 하나를 수행합니다.

  • 새 사용자 지정 데이터베이스 역할 만듭니다.

  • 기존 사용자 지정 데이터베이스 역할 업데이트합니다.

다음 예시 my-project 프로젝트 내에서 샤딩된 클러스터를 백업하고 모니터링 할 수 있는 권한이 있는 shard-operator 사용자 지정 역할 정의하는 AtlasCustomRole 사용자 지정 리소스 보여줍니다.

apiVersion: atlas.mongodb.com/v1
kind: AtlasCustomRole
metadata:
name: shard-operator-role
namespace: mongodb-atlas-system
labels:
mongodb.com/atlas-reconciliation-policy: keep
spec:
projectRef:
name: my-project
namespace: my-operator-namespace
role:
name: my-role
actions:
- name: getShardMap
resources:
cluster: true
- name: shardingState
resources:
cluster: true
- name: connPoolStats
resources:
cluster: true
- name: getLog
resources:
cluster: true
inheritedRoles:
- name: operator-role-1
role: backup

The following example shows an AtlasCustomRole independent CRD that defines the same shard-operator custom role defined in the Basic Example. This custom resource definition allows you to create this role in a project you don't manage in the same instance of Atlas Kubernetes Operator with which you define this resource. To enable independent operation, you must use an externalProjectRef instead of a projectRef, and you must supply a connectionSecret directly since this resource can't inherit API credentials from its parent project.

apiVersion: atlas.mongodb.com/v1
kind: AtlasCustomRole
metadata:
name: shard-operator-role
namespace: mongodb-atlas-system
labels:
mongodb.com/atlas-reconciliation-policy: keep
spec:
externalProjectRef:
id: 671998971c8520583f24f411
connectionSecret:
name: my-atlas-key
role:
name: my-role
actions:
- name: getShardMap
resources:
cluster: true
- name: shardingState
resources:
cluster: true
- name: connPoolStats
resources:
cluster: true
- name: getLog
resources:
cluster: true
inheritedRoles:
- name: operator-role-1
role: backup

이 섹션에서는 사용 가능한 AtlasCustomRole 사용자 지정 리소스 매개 변수에 대해 설명합니다.

metadata.name

유형: 문자열

필수 사항

AtlasProject Custom Resource(사용자 지정 리소스)가 이 사용자 지정 역할 프로젝트에 추가하는 데 사용하는 이름입니다.

metadata.namespace

유형: 문자열

옵션

atlasCustomRole 사용자 지정 리소스 포함할 네임스페이스입니다. 지정하지 않으면 Atlas Kubernetes Operator kubectl에서 설정하다 현재 네임스페이스 사용합니다.

spec.connectionSecret.name

유형: 문자열

조건부

Atlas Kubernetes Operator Atlas 에 연결하는 데 사용하는 조직 ID 및 API 키가 포함된 불투명 시크릿의 이름입니다. 지정되지 않은 경우 Atlas Kubernetes Operator 다음 중 하나로 대체됩니다.

  • 상위 atlasProject의 spec.connectionSecretRef.name 매개 변수

  • 기본값 global 시크릿(상위 atlasProject에 대해 spec.connectionSecretRef.name 이 정의되지 않은 경우)

이 매개변수는 독립적인 CRD의 경우 필수입니다.

Atlas Kubernetes Operator atlas.mongodb.com/type=credentials 불필요한 시크릿을 감시하지 않기 위해 레이블이 있는 시크릿만 감시합니다.

다음 예시에서는 시크릿에 레이블을 지정합니다.

kubectl label secret the-user-password atlas.mongodb.com/type=credentials
spec.externalProjectRef.id

유형: 문자열

조건부

ID of the project to which the custom role belongs. You must specify the project ID of an existing Atlas Project. This parameter is required for custom roles that belong to projects managed by either:

  • Atlas Kubernetes Operator 의 다른 인스턴스

  • Atlas Kubernetes Operator 이외의 도구

동일한 Atlas Kubernetes Operator 인스턴스 에서 managed 프로젝트에 속한 사용자 지정 역할의 경우 spec.externalProjectRef.id을(를) 사용하지 않는 경우 spec.projectRef.name 을(를) 사용하세요.

사용자 지정 역할 하나의 프로젝트 에만 속할 수 있습니다. 여러 프로젝트에 대해 동일한 사용자 지정 역할 정의하려면 각 프로젝트 에 대한 사용자 지정 리소스 정의를 만듭니다.

spec.projectRef.name

유형: 문자열

조건부

사용자 지정 역할 속한 프로젝트 의 이름입니다. 기존 AtlasProject Custom Resource(사용자 지정 리소스)를 지정해야 합니다. 이 매개변수는 동일한 인스턴스 Atlas Kubernetes Operator 에서 managed 프로젝트에 속한 사용자 지정 역할에만 적용됩니다.

다음 중 하나에서 managed 프로젝트에 속한 사용자 지정 역할의 경우:

  • Atlas Kubernetes Operator 의 다른 인스턴스

  • Atlas Kubernetes Operator 이외의 도구

spec.externalProjectRef.id 을(를) 사용하세요.

사용자 지정 역할 하나의 프로젝트 에만 속할 수 있습니다. 여러 프로젝트에 대해 동일한 사용자 지정 역할 정의하려면 각 프로젝트 에 대한 사용자 지정 리소스 정의를 만듭니다.

spec.projectRef.namespace

유형: 문자열

조건부

에 AtlasProject 지정된 사용자 지정 리소스가 존재하는 네임스페이스입니다.spec.projectRef.name

다음 중 하나에서 managed 프로젝트에 속한 사용자 지정 역할의 경우:

  • Atlas Kubernetes Operator 의 다른 인스턴스

  • Atlas Kubernetes Operator 이외의 도구

이 매개변수를 설정하다 하지 마세요.

spec.role.actions

유형: 배열

옵션

역할이 부여하는 개별 권한 작업 을 나타내는 객체 목록입니다.

spec.role.actions.name

유형: 문자열

필수 사항

Label that identifies the privilege action. For a complete list of actions available in the Atlas Administration API, see /reference/custom-role-actions.

spec.role.actions.resources

유형: 배열

옵션

List of objects that indicate a database and collection on which the action is granted, or indicates that the action is granted on the cluster resource.

spec.role.actions.resources.cluster

유형: 부울

옵션

Flag that indicates that the action is granted on the cluster resource.

참고

This parameter is mutually exclusive with the spec.role.actions.resources.collection and spec.role.actions.resources.database parameters.

spec.role.actions.resources.collection

유형: 문자열

옵션

Human-readable label that identifies the collection on which the action is granted. If this value is an empty string, the action is granted on all collections within the database specified in the spec.role.actions.resources.database parameter.

참고

This parameter is mutually exclusive with the spec.role.actions.resources.cluster parameter.

spec.role.actions.resources.database

유형: 문자열

옵션

조치가 부여된 데이터베이스를 식별하는 사람이 읽을 수 있는 레이블입니다.

참고

This parameter is mutually exclusive with the spec.role.actions.resources.cluster parameter.

spec.role.inheritedRoles

유형: 배열

옵션

상속된 역할과 역할이 부여된 데이터베이스를 나타내는 키-값 쌍을 나타내는 객체 목록입니다.

spec.role.inheritedRoles.database

유형: 문자열

옵션

상속된 역할이 부여된 데이터베이스를 식별하는 사람이 읽을 수 있는 레이블입니다.

참고

This value should be admin for all roles except read and readWrite.

spec.role.inheritedRoles.name

유형: 문자열

옵션

Label that uniquely identifies the inherited role. You can specify another custom role or a built-in role.

이 페이지 평가하기