|
| 1 | +.. _atlasprivateendpoint-custom-resource: |
| 2 | + |
| 3 | +======================================== |
| 4 | +``AtlasPrivateEndpoint`` Custom Resource |
| 5 | +======================================== |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 2 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +The ``AtlasPrivateEndpoint`` custom resource configures a |
| 16 | +:ref:`private endpoint <private-endpoint-overview>` for a |service| |
| 17 | +project. This allows you to connect your cloud provider to |service| |
| 18 | +without sending information through a public network. Private |
| 19 | +endpoints are unidirectional connections *to* |service| *from* your |
| 20 | +virtual network. |
| 21 | + |
| 22 | +.. include:: /includes/fact-ak8so-crds.rst |
| 23 | + |
| 24 | +|ak8so| does one of the following actions using the |service| |
| 25 | +:oas-atlas-tag:`Private Endpoint Service API Resource |
| 26 | +</Private-Endpoint-Services>`: |
| 27 | + |
| 28 | +- Creates a new private endpoint service. |
| 29 | +- Updates an existing private endpoint service. |
| 30 | + |
| 31 | +To learn more about implememting private endpoints in |ak8so|, see |
| 32 | +:ref:`Manage Private Endpoints <ak8so-private-endpoint>`. |
| 33 | + |
| 34 | +Examples |
| 35 | +-------- |
| 36 | + |
| 37 | +.. _atlasprivateendpoint-example-basic: |
| 38 | + |
| 39 | +Basic Example |
| 40 | +~~~~~~~~~~~~~ |
| 41 | + |
| 42 | +The following example shows an ``AtlasPrivateEndpoint`` custom resoure |
| 43 | +that defines an |aws| private endpoint within the ``my-project`` project. |
| 44 | + |
| 45 | +.. code-block:: |
| 46 | + |
| 47 | + apiVersion: atlas.mongodb.com/v1 |
| 48 | + kind: AtlasPrivateEndpoint |
| 49 | + metadata: |
| 50 | + name: my-atlas-pe1 |
| 51 | + spec: |
| 52 | + projectRef: |
| 53 | + name: my-project |
| 54 | + namespace: my-operator-namespace |
| 55 | + provider: AWS |
| 56 | + region: us-east-1 |
| 57 | + awsConfiguration: |
| 58 | + - id: vpcpe-xyz |
| 59 | + |
| 60 | +.. _atlasprivateendpoint-example-independent: |
| 61 | + |
| 62 | +Independent CRD Example |
| 63 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 64 | + |
| 65 | +The following example shows an ``AtlasPrivateEndpoint`` |
| 66 | +:ref:`independent CRD <ak8so-independent-crd>` that defines the same |
| 67 | +private endpoint defined in the :ref:`Basic Example |
| 68 | +<atlasprivateendpoint-example-basic>`. This custom resource definition |
| 69 | +allows you to create this private endpoint in a project you don't |
| 70 | +manage in the same instance of |ak8so| with which you define this |
| 71 | +resource. To enable independent operation, you must use an |
| 72 | +``externalProjectRef`` instead of a ``projectRef``, and you must |
| 73 | +supply a ``connectionSecret`` directly since this resource can't |
| 74 | +inherit API credentials from its parent project. |
| 75 | + |
| 76 | +.. code-block:: |
| 77 | + |
| 78 | + apiVersion: atlas.mongodb.com/v1 |
| 79 | + kind: AtlasPrivateEndpoint |
| 80 | + metadata: |
| 81 | + name: my-atlas-pe1 |
| 82 | + spec: |
| 83 | + atlasRef: |
| 84 | + projectID: 66e2f2b621571b7e69a89b66 |
| 85 | + credentials: |
| 86 | + name: atlas-connection-secret |
| 87 | + provider: AWS |
| 88 | + region: us-east-1 |
| 89 | + awsConfiguration: |
| 90 | + - id: vpcpe-xyz |
| 91 | + |
| 92 | +Parameters |
| 93 | +---------- |
| 94 | + |
| 95 | +This section describes the ``AtlasPrivateEndpoint`` custom resource parameters available. |
| 96 | + |
| 97 | +.. setting:: metadata.name |
| 98 | + |
| 99 | + *Type*: string |
| 100 | + |
| 101 | + *Required* |
| 102 | + |
| 103 | + Name that the :ref:`atlasproject-custom-resource` uses to add this private endpoint to a project. |
| 104 | + |
| 105 | +.. setting:: metadata.namespace |
| 106 | + |
| 107 | + *Type*: string |
| 108 | + |
| 109 | + *Optional* |
| 110 | + |
| 111 | + Namespace other than ``default`` that you want to contain the |
| 112 | + ``atlasPrivateEndpoint`` custom resource. If you define a custom |
| 113 | + namespace, you must add it to the |
| 114 | + :ref:`atlasproject-custom-resource` in the |
| 115 | + :setting:`spec.privateEndpoint.privateEndpointRef.namespace` field. |
| 116 | + |
| 117 | +.. setting:: spec.awsConfiguration.id |
| 118 | + |
| 119 | + *Type*: string |
| 120 | + |
| 121 | + *Conditional* |
| 122 | + |
| 123 | + ID of the private endpoint network interface. This parameter is |
| 124 | + mandatory for and limited to |aws| private endpoints. |
| 125 | + |
| 126 | +.. setting:: spec.azureConfiguration.id |
| 127 | + |
| 128 | + *Type*: string |
| 129 | + |
| 130 | + *Conditional* |
| 131 | + |
| 132 | + ID of the private endpoint network interface. This parameter is |
| 133 | + mandatory for and limited to |azure| private endpoints. |
| 134 | + |
| 135 | +.. setting:: spec.azureConfiguration.ipAddress |
| 136 | + |
| 137 | + *Type*: string |
| 138 | + |
| 139 | + *Conditional* |
| 140 | + |
| 141 | + IP address of the private endpoint in your |azure| VNet. This |
| 142 | + parameter is mandatory for and limited to |azure| private |
| 143 | + endpoints. |
| 144 | + |
| 145 | +.. setting:: spec.connectionSecret.name |
| 146 | + |
| 147 | + *Type*: string |
| 148 | + |
| 149 | + *Conditional* |
| 150 | + |
| 151 | + Name of the opaque |k8s-secret| that contains the organization ID |
| 152 | + and :ref:`API keys <about-org-api-keys>` that |ak8so| uses to |
| 153 | + :ref:`connect <ak8so-access-to-atlas-ref>` to |service|. If |
| 154 | + unspecified, |ak8so| falls back to either: |
| 155 | + |
| 156 | + - The ``spec.connectionSecretRef.name`` parameter of the parent |
| 157 | + ``atlasProject`` |
| 158 | + - The default ``global`` secret, if ``spec.connectionSecretRef.name`` |
| 159 | + is undefined for the parent ``atlasProject`` |
| 160 | + |
| 161 | + This parameter is mandatory for :ref:`independent CRDs |
| 162 | + <ak8so-independent-crd>`. |
| 163 | + |
| 164 | + .. include:: /includes/fact-ak8so-label-secret.rst |
| 165 | + |
| 166 | +.. setting:: spec.externalProjectRef.id |
| 167 | + |
| 168 | + *Type*: string |
| 169 | + |
| 170 | + *Conditional* |
| 171 | + |
| 172 | + ID of the project to which the private endpoint belongs. You must |
| 173 | + specify the project ID of an existing :ref:`Atlas Project |
| 174 | + <manage-projects>`. This parameter is required for private endpoints |
| 175 | + that belong to projects managed by either: |
| 176 | + |
| 177 | + - A different instance of |ak8so| |
| 178 | + - Tooling other than |ak8so| |
| 179 | + |
| 180 | + For deployments who belong to projects managed by |
| 181 | + the same instance of |ak8so|, use ``spec.projectRef.name`` if you |
| 182 | + do not use ``spec.externalProjectRef.id``. |
| 183 | + |
| 184 | + A private endpoint can only belong to one project. To define the same |
| 185 | + private endpoint for multiple projects, create custom resource |
| 186 | + definitions for each project. |
| 187 | + |
| 188 | +.. setting:: spec.gcpConfiguration.endpoints |
| 189 | + |
| 190 | + *Type*: array |
| 191 | + |
| 192 | + *Conditional* |
| 193 | + |
| 194 | + List of individual private endpoints that comprise this endpoint |
| 195 | + group. This parameter is mandatory for and limited to {+gcp+} |
| 196 | + private endpoints. |
| 197 | + |
| 198 | +.. setting:: spec.gcpConfiguration.endpoints.[n].ipAddress |
| 199 | + |
| 200 | + *Type*: string |
| 201 | + |
| 202 | + *Conditional* |
| 203 | + |
| 204 | + IP address to which the given {+gcp+} private endpoint |
| 205 | + resolves. This parameter is mandatory for and limited to {+gcp+} |
| 206 | + private endpoints. |
| 207 | + |
| 208 | +.. setting:: spec.gcpConfiguration.endpoints.[n].name |
| 209 | + |
| 210 | + *Type*: string |
| 211 | + |
| 212 | + *Conditional* |
| 213 | + |
| 214 | + Name uniquely identifying the given {+gcp+} private endpoint. This |
| 215 | + parameter is mandatory for and limited to {+gcp+} private |
| 216 | + endpoints. |
| 217 | + |
| 218 | +.. setting:: spec.gcpConfiguration.groupName |
| 219 | + |
| 220 | + *Type*: string |
| 221 | + |
| 222 | + *Conditional* |
| 223 | + |
| 224 | + Name that uniquely identifies a set of {+gcp+} private |
| 225 | + endpoints. This parameter is mandatory for and limited to {+gcp+} |
| 226 | + private endpoints. |
| 227 | + |
| 228 | +.. setting:: spec.gcpConfiguration.projectId |
| 229 | + |
| 230 | + *Type*: string |
| 231 | + |
| 232 | + *Conditional* |
| 233 | + |
| 234 | + Unique identifier for the {+gcp+} project to which your private |
| 235 | + endpoints belong. |
| 236 | + |
| 237 | +.. setting:: spec.projectRef.name |
| 238 | + |
| 239 | + *Type*: string |
| 240 | + |
| 241 | + *Conditional* |
| 242 | + |
| 243 | + Name of the project to which the private endpoint belongs. You must |
| 244 | + specify an existing :ref:`atlasproject-custom-resource`. This |
| 245 | + parameter applies only to private endpoints that belong to projects |
| 246 | + managed by the same instance |ak8so|. |
| 247 | + |
| 248 | + For deployments that belong to projects managed by either: |
| 249 | + |
| 250 | + - a different instance of |ak8so| |
| 251 | + - tooling other than |ak8so| |
| 252 | + |
| 253 | + use ``spec.externalProjectRef.id``. |
| 254 | + |
| 255 | + A private endpoint can only belong to one project. To define the |
| 256 | + same private endpoint for multiple projects, create custom resource |
| 257 | + definitions for each project. |
| 258 | + |
| 259 | +.. setting:: spec.projectRef.namespace |
| 260 | + |
| 261 | + *Type*: string |
| 262 | + |
| 263 | + *Conditional* |
| 264 | + |
| 265 | + Namespace in which the :ref:`atlasproject-custom-resource` |
| 266 | + specified in ``spec.projectRef.name`` exists. |
| 267 | + |
| 268 | + For deployments that belong to projects managed by either: |
| 269 | + |
| 270 | + - a different instance of |ak8so| |
| 271 | + - tooling other than |ak8so| |
| 272 | + |
| 273 | + do not set this parameter. |
| 274 | + |
| 275 | +.. setting:: spec.provider |
| 276 | + |
| 277 | + *Type*: string |
| 278 | + |
| 279 | + *Required* |
| 280 | + |
| 281 | + Name of the cloud service provider for which to create a private |
| 282 | + endpoint service. |
| 283 | + |
| 284 | +.. setting:: spec.region |
| 285 | + |
| 286 | + *Type*: string |
| 287 | + |
| 288 | + *Required* |
| 289 | + |
| 290 | + Cloud provider region in which to create a private endpoint |
| 291 | + service. |
| 292 | + |
| 293 | + |
0 commit comments