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
/ /
/ / /

AtlasNetworkPeering カスタム リソース

重要

レガシー サブリソースは、対応する CRD のリリース時点で非推奨となります。構成が現在、このリソース定義のサブリソース形式に依存している場合は、 は CRD に移行します。

AtlasNetworkPeeringカスタムリソースは、 Atlasプロジェクトのネットワークピアリング接続を定義します。ネットワーク ピアリング接続は、セキュリティを強化するためにパブリック ネットワークのトラフィックを分離します。

重要

カスタム リソースはデフォルトでオブジェクトを削除しなくなりました

  • Atlas Kubernetes Operator はカスタムリソース構成ファイルを使用して Atlas 構成を管理しますが、Atlas Kubernetes Operator2.0 以降、 Kubernetesで削除したカスタム リソースは Atlas で削除されなくなりました(デフォルトでは )。代わりに、Atlas Kubernetes Operator は Atlas 内のそれらのリソースの管理を停止します。 例、 Kubernetesで カスタム リソースを削除すると、デフォルトでは、Atlas Kubernetes Operator は AtlasAtlasProject から対応するプロジェクトを自動的に削除しなくなります。この動作の変更は、誤ってまたは予期せずに削除されるのを防ぐことを目的としています。 この動作を Atlas Kubernetes Operator. 以前に使用されていたデフォルトに戻す方法などの詳細については、「2 0新しいデフォルト: Atlas Kubernetes Operator. の削除保護2 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 ネットワークピアリングAPIリソースを使用して次のいずれかのアクションを実行します。

  • 新しいネットワークピアリング接続を作成します。

  • 既存のネットワークピアリング接続を更新します。

注意

ネットワークピアリング接続は1 つのプロジェクトにのみ属することができます。複数のプロジェクトで同じネットワークピアリング接続を定義するには、プロジェクトごとにカスタムリソース定義 を作成します。

次の例は、AtlasNetworkPeering CRD の構成を示しています。

  • 基本的な例では、親の Atlasプロジェクトを管理するのと同じ Atlas Kubernetes Operatorインスタンスで管理するリソースを定義します。

  • この例では、 基本的な例と同じ VPC ピアリング接続を構成しますが、 VPCピアリング接続を管理する Atlas Kubernetes Operatorインスタンスの外部で管理する Atlas プロジェクトを対象にしています。

次の例は、my-projectプロジェクトVPCAmazon Web Services VPC間の green-leaf-peering 接続を定義する AtlasNetworkPeering カスタムリソースを示しています。このリソースを、親 Atlasプロジェクトと同じ Atlas Kubernetes Operatorインスタンスで管理するには、externalProjectRef ではなく projectRef を使用してプロジェクトを識別する必要があります。

apiVersion: atlas.mongodb.com/v1
kind: AtlasNetworkPeering
metadata:
name: green-leaf-peering
spec:
projectRef:
name: my-project
namespace: my-operator-namespace
containerRef:
id: 72a6d2a69388ba121943ae27
id: 72a6d2a69388ba121943ae27
provider: AWS
awsConfiguration:
accepterRegionName: us-east-1
awsAccountId: 389226183042
routeTableCiderBlock: 10.0.0.0/21
vpcId: vpc-abc

次の例は、 基本的な例AtlasNetworkPeering で定義された同じVPCピアリング接続を構成する 独立した CRD を示しています。親プロジェクトとは独立してリソース管理を有効にするには、projectRef ではなく externalProjectRef を使用する必要があります。また、このリソースは親プロジェクトからAPI認証情報を継承できないため、connectionSecret を直接指定する必要があります。

apiVersion: atlas.mongodb.com/v1
kind: AtlasNetworkPeering
metadata:
name: green-leaf-peering
spec:
externalProjectRef:
projectId: 66e2f2b621571b7e69a89b66
connectionSecret:
name: atlas-connection-secret
containerRef:
id: 72a6d2a69388ba121943ae27
id: 72a6d2a69388ba121943ae27
provider: AWS
awsConfiguration:
accepterRegionName: us-east-1
awsAccountId: 389226183042
routeTableCiderBlock: 10.0.0.0/21
vpcId: vpc-abc

AtlasNetworkPeering is the Schema for the AtlasNetworkPeering API

Name
タイプ
説明
必須

apiVersion

string

atlas.mongodb.com/v1

true

kind

string

AtlasNetworkPeering

true

metadata

オブジェクト

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

true

spec

オブジェクト

AtlasNetworkPeeringSpec defines the target state of AtlasNetworkPeering. Validations:

  • (has(self.``externalProjectRef``) && !has(self.``projectRef``)) || (!has(self.``externalProjectRef``) && has(self.``projectRef``)): must define only one project reference through externalProjectRef or projectRef

  • (has(self.``externalProjectRef``) && has(self.``connectionSecret``)) || !has(self.``externalProjectRef``): must define a local connection secret when referencing an external project

  • (has(self.``containerRef``.name) && !has(self.``containerRef``.id)) || (!has(self.``containerRef``.name) && has(self.``containerRef``.id)): must either have a container Atlas id or Kubernetes name, but not both (or neither)

  • (self.``containerRef``.name == oldSelf.``containerRef``.name) || (!has(self.``containerRef``.name) && !has(oldSelf.``containerRef``.name)): container ref name is immutable

  • (self.``containerRef``.id == oldSelf.``containerRef``.id) || (!has(self.``containerRef``.id) && !has(oldSelf.``containerRef``.id)): container ref id is immutable

  • (self.id == oldSelf.id) || (!has(self.id) && !has(oldSelf.id)): id is immutable

false

status

オブジェクト

AtlasNetworkPeeringStatus is a status for the AtlasNetworkPeering Custom resource. Not the one included in the AtlasProject

false

AtlasNetworkPeeringSpec defines the target state of AtlasNetworkPeering.

Name
タイプ
説明
必須

containerRef

オブジェクト

ContainerDualReference refers to a Network Container either by Kubernetes name or Atlas ID.

true

provider

列挙

Name of the cloud service provider for which you want to create the network peering service. Enum: AWS, GCP, AZURE

true

awsConfiguration

オブジェクト

AWSConfiguration is the specific AWS settings for network peering.

false

azureConfiguration

オブジェクト

AzureConfiguration is the specific Azure settings for network peering.

false

connectionSecret

オブジェクト

Name of the secret containing Atlas API private and public keys.

false

externalProjectRef

オブジェクト

externalProjectRef holds the parent Atlas project ID. Mutually exclusive with the "projectRef" field.

false

gcpConfiguration

オブジェクト

GCPConfiguration is the specific Google Cloud settings for network peering.

false

id

string

ID is the peering identifier for an already existent network peering to be managed by the operator. This field is immutable.

false

projectRef

オブジェクト

projectRef is a reference to the parent AtlasProject resource. Mutually exclusive with the "externalProjectRef" field.

false

ContainerDualReference refers to a Network Container either by Kubernetes name or Atlas ID.

Name
タイプ
説明
必須

id

string

ID is the Atlas identifier of the Network Container Atlas resource this Peering Connection relies on. Use either name or ID, not both.

false

name

string

Name of the container Kubernetes resource, must be present in the same namespace. Use either name or ID, not both.

false

AWSConfiguration is the specific AWS settings for network peering.

Name
タイプ
説明
必須

accepterRegionName

string

AccepterRegionName is the provider region name of user's vpc in AWS native region format.

true

awsAccountId

string

AccountID of the user's vpc.

true

routeTableCidrBlock

string

User VPC CIDR.

true

vpcId

string

AWS VPC ID.

true

AzureConfiguration is the specific Azure settings for network peering.

Name
タイプ
説明
必須

azureDirectoryId

string

AzureDirectoryID is the unique identifier for an Azure AD directory.

true

azureSubscriptionId

string

AzureSubscriptionID is the unique identifier of the Azure subscription in which the VNet resides.

true

resourceGroupName

string

ResourceGroupName is the name of your Azure resource group.

true

vNetName

string

VNetName is name of your Azure VNet. Its applicable only for Azure.

true

Name of the secret containing Atlas API private and public keys.

externalProjectRef holds the parent Atlas project ID. Mutually exclusive with the "projectRef" field.

Name
タイプ
説明
必須

id

string

ID is the Atlas project ID.

true

GCPConfiguration is the specific Google Cloud settings for network peering.

Name
タイプ
説明
必須

gcpProjectId

string

User GCP Project ID. Its applicable only for GCP.

true

networkName

string

GCP Network Peer Name. Its applicable only for GCP.

true

projectRef is a reference to the parent AtlasProject resource. Mutually exclusive with the "externalProjectRef" field.

Name
タイプ
説明
必須

name

string

Name of the Kubernetes Resource

true

namespace

string

Namespace of the Kubernetes Resource

false

AtlasNetworkPeeringStatus is a status for the AtlasNetworkPeering Custom resource. Not the one included in the AtlasProject

Name
タイプ
説明
必須

conditions

[]object

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

true

awsStatus

オブジェクト

AWSStatus contains AWS only related status information

false

azureStatus

オブジェクト

AzureStatus contains Azure only related status information

false

gcpStatus

オブジェクト

GCPStatus contains GCP only related status information

false

id

string

ID recrods the identified of the peer created by Atlas

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

status

string

Status describes the last status seen for the network peering setup

false

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

Name
タイプ
説明
必須

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

AWSStatus contains AWS only related status information

Name
タイプ
説明
必須

connectionId

string

ConnectionID is the AWS VPC peering connection ID

false

vpcId

string

VpcID is AWS VPC id on the Atlas side

false

AzureStatus contains Azure only related status information

Name
タイプ
説明
必須

azureSubscriptionIDpcId

string

AzureSubscriptionID is Azure Subscription id on the Atlas side

false

vNetName

string

VnetName is Azure network on the Atlas side

false

GCPStatus contains GCP only related status information

Name
タイプ
説明
必須

gcpProjectID

string

GCPProjectID is GCP project on the Atlas side

false

networkName

string

NetworkName is GCP network on the Atlas side

false

戻る

AtlasNetworkContainer

項目一覧