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

AtlasPrivateEndpoint 自定义资源

重要

旧版子资源自相应的 CRD发布以来已被弃用。如果您的配置当前依赖于此资源定义的子资源形式,请迁移到 CRD。

AtlasPrivateEndpoint自定义资源为Atlas项目配置 私有端点。这样,您就可以将云提供商连接到Atlas,而无需通过公共网络发送信息。 私有端点是从虚拟网络到Atlas的单向连接。

重要

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

  • 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 私有端点服务API资源:执行以下操作之一:

  • 创建新的私有端点服务。

  • 更新现有的私有端点服务。

要学习;了解有关在Atlas Kubernetes Operator中实施私有端点的更多信息,请参阅管理私有端点。

以下示例显示了一个 自定义资源,该资源在 项目中定义了 AtlasPrivateEndpointAmazon Web Services私有端点。my-project

apiVersion: atlas.mongodb.com/v1
kind: AtlasPrivateEndpoint
metadata:
name: my-atlas-pe1
spec:
projectRef:
name: my-project
namespace: my-operator-namespace
provider: AWS
region: US_EAST_1
awsConfiguration:
- id: vpcpe-xyz

以下示例显示了一个独立于AtlasPrivateEndpoint 的 CRD,它定义了基本示例中定义的相同私有端点。通过此自定义资源定义,您可以在某个项目中创建此私有端点,而该项目并非在您定义此资源的Atlas Kubernetes Operator实例中管理。 要启用独立操作,必须使用 externalProjectRef 而不是 projectRef,并且必须直接提供 connectionSecret,因为此资源无法从其父项目继承API凭证。

apiVersion: atlas.mongodb.com/v1
kind: AtlasPrivateEndpoint
metadata:
name: my-atlas-pe1
spec:
externalProjectRef:
projectID: 66e2f2b621571b7e69a89b66
connectionSecret:
name: atlas-connection-secret
provider: AWS
region: US_EAST_1
awsConfiguration:
- id: vpcpe-xyz

The AtlasPrivateEndpoint custom resource definition (CRD) defines a desired Private Endpoint configuration for an Atlas project. It allows a private connection between your cloud provider and Atlas that doesn't send information through a public network.

您可以使用私有终结点,创建从虚拟网络到 Atlas 集群的单向连接。

Name
类型
说明
必需

apiVersion

字符串

atlas.mongodb.com/v1

true

kind

字符串

AtlasPrivateEndpoint

true

metadata

对象

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

true

spec

对象

AtlasPrivateEndpointSpec is the specification of the desired configuration of a project private endpoint 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

false

status

对象

AtlasPrivateEndpointStatus is the most recent observed status of the AtlasPrivateEndpoint cluster. Read-only.

false

AtlasPrivateEndpointSpec is the specification of the desired configuration of a project private endpoint

Name
类型
说明
必需

provider

枚举

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

true

region

字符串

Region of the chosen cloud provider in which you want to create the private endpoint service.

true

awsConfiguration

[]object

AWSConfiguration is the specific AWS settings for the private endpoint.

false

azureConfiguration

[]object

AzureConfiguration is the specific Azure settings for the private endpoint.

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

[]object

GCPConfiguration is the specific Google Cloud settings for the private endpoint.

false

projectRef

对象

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

false

AWSPrivateEndpointConfiguration holds the AWS configuration done on customer network.

Name
类型
说明
必需

id

字符串

ID that identifies the private endpoint's network interface that someone added to this private endpoint service.

true

AzurePrivateEndpointConfiguration holds the Azure configuration done on customer network.

Name
类型
说明
必需

id

字符串

ID that identifies the private endpoint's network interface that someone added to this private endpoint service.

true

ipAddress

字符串

IP address of the private endpoint in your Azure VNet that someone added to this private endpoint service.

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

字符串

ID is the Atlas project ID.

true

GCPPrivateEndpointConfiguration holds the GCP configuration done on customer network.

Name
类型
说明
必需

endpoints

[]object

Endpoints is the list of individual private endpoints that comprise this endpoint group.

true

groupName

字符串

GroupName is the label that identifies a set of endpoints.

true

projectId

字符串

ProjectID that identifies the Google Cloud project in which you created the endpoints.

true

GCPPrivateEndpoint holds the GCP forwarding rules configured on customer network.

Name
类型
说明
必需

ipAddress

字符串

IP address to which this Google Cloud consumer forwarding rule resolves.

true

name

字符串

Name that identifies the Google Cloud consumer forwarding rule that you created.

true

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

Name
类型
说明
必需

name

字符串

Name of the Kubernetes Resource

true

namespace

字符串

Namespace of the Kubernetes Resource

false

AtlasPrivateEndpointStatus is the most recent observed status of the AtlasPrivateEndpoint cluster. Read-only.

Name
类型
说明
必需

conditions

[]object

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

true

endpoints

[]object

Endpoints are the status of the endpoints connected to the service

false

error

字符串

Error is the description of the failure occurred when configuring the private endpoint

false

observedGeneration

整型

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

resourceId

字符串

ResourceID is the root-relative path that identifies of the Atlas Azure Private Link Service

false

serviceAttachmentNames

[]string

ServiceAttachmentNames is the list of URLs that identifies endpoints that Atlas can use to access one service across the private connection

false

serviceId

字符串

ServiceID is the unique identifier of the private endpoint service in Atlas

false

serviceName

字符串

ServiceName is the unique identifier of the Amazon Web Services (AWS) PrivateLink endpoint service or Azure Private Link Service managed by Atlas

false

serviceStatus

字符串

ServiceStatus is the state of the private endpoint service

false

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

Name
类型
说明
必需

status

字符串

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

true

type

字符串

Type of Atlas Custom Resource condition.

true

lastTransitionTime

字符串

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

false

message

字符串

A message providing details about the transition.

false

reason

字符串

The reason for the condition's last transition.

false

EndpointInterfaceStatus is the most recent observed status the interfaces attached to the configured service. Read-only.

Name
类型
说明
必需

ID

字符串

ID is the external identifier set on the specification to configure the interface

false

InterfaceStatus

字符串

InterfaceStatus is the state of the private endpoint interface

false

connectionName

字符串

ConnectionName is the label that Atlas generates that identifies the Azure private endpoint connection

false

error

字符串

Error is the description of the failure occurred when configuring the private endpoint

false

gcpForwardingRules

[]object

GCPForwardingRules is the status of the customer GCP private endpoint(forwarding rules)

false

GCPForwardingRule is the most recent observed status the GCP forwarding rules configured for an interface. Read-only.

Name
类型
说明
必需

name

字符串

人类可读标签,用于标识您创建的 Google Cloud 消费者转发规则。

false

status

字符串

State of the MongoDB Atlas endpoint group.

false

后退

AtlasOrgSettings

在此页面上