重要
レガシー サブリソースは、対応する CRD のリリース時点で非推奨となります。構成が現在、このリソース定義のサブリソース形式に依存している場合は、 は CRD に移行します。
AtlasNetworkPeeringカスタムリソースは、 Atlasプロジェクトのネットワークピアリング接続を定義します。ネットワーク ピアリング接続は、セキュリティを強化するためにパブリック ネットワークのトラフィックを分離します。
重要
カスタム リソースはデフォルトでオブジェクトを削除しなくなりました
Atlas Kubernetes Operator はカスタムリソース構成ファイルを使用して Atlas 構成を管理しますが、Atlas Kubernetes Operator2.0 以降、 Kubernetesで削除したカスタム リソースは Atlas で削除されなくなりました(デフォルトでは )。代わりに、Atlas Kubernetes Operator は Atlas 内のそれらのリソースの管理を停止します。 例、 Kubernetesで カスタム リソースを削除すると、デフォルトでは、Atlas Kubernetes Operator は Atlas
AtlasProjectから対応するプロジェクトを自動的に削除しなくなります。この動作の変更は、誤ってまたは予期せずに削除されるのを防ぐことを目的としています。 この動作を 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プロジェクトVPCとAmazon 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
独立した CRD の例
次の例は、 基本的な例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
パラメーター
AtlasNetworkPering
AtlasNetworkPeering is the Schema for the AtlasNetworkPeering API
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string | atlas.mongodb.com/v1 | true |
| string |
| true |
| オブジェクト | Refer to the Kubernetes | true |
| オブジェクト |
| false |
| オブジェクト |
| false |
AtlasNetworkPeering.spec
AtlasNetworkPeeringSpec defines the target state of AtlasNetworkPeering.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| オブジェクト |
| true |
| 列挙 | Name of the cloud service | true |
| オブジェクト | AWSConfiguration is the specific | false |
| オブジェクト |
| false |
| オブジェクト | Name of the secret containing Atlas | false |
| オブジェクト |
| false |
| オブジェクト | GCPConfiguration is the specific Google Cloud settings for network peering. | false |
| string |
| false |
| オブジェクト |
| false |
AtlasNetworkPeering.spec.containerRef
ContainerDualReference refers to a Network Container either by Kubernetes name or Atlas ID.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string |
| false |
| string | Name of the container Kubernetes resource, must be present in the same namespace. Use either | false |
AtlasNetworkPeering.spec.awsConfiguration
AWSConfiguration is the specific AWS settings for network peering.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string |
| true |
| string |
| true |
| string | User | true |
| string |
| true |
AtlasNetworkPeering.spec.azureConfiguration
AzureConfiguration is the specific Azure settings for network peering.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string |
| true |
| string |
| true |
| string |
| true |
| string | VNetName is name of your Azure VNet. Its applicable only for Azure. | true |
AtlasNetworkPeering.spec.connectionSecret
Name of the secret containing Atlas API private and public keys.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string | Name of the resource being referred to More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | true |
AtlasNetworkPeering.spec.externalProjectRef
externalProjectRef holds the parent Atlas project ID. Mutually exclusive with the "projectRef" field.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string |
| true |
AtlasNetworkPeering.spec.gcpConfiguration
GCPConfiguration is the specific Google Cloud settings for network peering.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string | User | true |
| string |
| true |
AtlasNetworkPeering.spec.projectRef
projectRef is a reference to the parent AtlasProject resource. Mutually exclusive with the "externalProjectRef" field.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string | Name of the Kubernetes Resource | true |
| string | Namespace of the Kubernetes Resource | false |
AtlasNetworkPeering.status
AtlasNetworkPeeringStatus is a status for the AtlasNetworkPeering Custom resource. Not the one included in the AtlasProject
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| []object | Conditions is the list of statuses showing the current state of the Atlas Custom Resource | true |
| オブジェクト | AWSStatus contains | false |
| オブジェクト |
| false |
| オブジェクト | GCPStatus contains | false |
| string |
| false |
| integer |
| false |
| string | Status describes the last | false |
AtlasNetworkPeering.status.conditions
Condition describes the state of an Atlas Custom Resource at a certain point.
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string | Status of the condition; one of True, False, Unknown. | true |
| string | Type of Atlas Custom Resource condition. | true |
| string | Last time the condition transitioned from one status to another. Represented in | false |
| string | A | false |
| string | The | false |
AtlasNetworkPeering.status.awsStatus
AWSStatus contains AWS only related status information
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string |
| false |
| string |
| false |
AtlasNetworkPeering.status.azureStatus
AzureStatus contains Azure only related status information
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string |
| false |
| string |
| false |
AtlasNetworkPeering.status.gcpStatus
GCPStatus contains GCP only related status information
Name | タイプ | 説明 | 必須 |
|---|---|---|---|
| string | GCPProjectID is | false |
| string |
| false |