Skip to content

Commit 7680f83

Browse files
committed
Update helm chart CRDs
1 parent 3ccf2bc commit 7680f83

File tree

2 files changed

+83
-57
lines changed

2 files changed

+83
-57
lines changed

charts/atlas-operator-crds/templates/atlas.mongodb.com_atlasnetworkcontainers.yaml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ spec:
8585
required:
8686
- id
8787
type: object
88+
id:
89+
description: |-
90+
ID is the container identified for an already existent network container to be managed by the operator.
91+
This field can be used in conjunction with cidrBlock to update the cidrBlock of an existing container.
92+
This field is immutable.
93+
type: string
8894
projectRef:
8995
description: |-
9096
"projectRef" is a reference to the parent AtlasProject resource.
@@ -110,10 +116,10 @@ spec:
110116
region:
111117
description: |-
112118
ContainerRegion is the provider region name of Atlas network peer container in Atlas region format
113-
This is required by AWS and Azure, but not used by GCP
119+
This is required by AWS and Azure, but not used by GCP.
120+
This field is immutable, Atlas does not admit network container changes.
114121
type: string
115122
required:
116-
- cidrBlock
117123
- provider
118124
type: object
119125
x-kubernetes-validations:
@@ -129,13 +135,35 @@ spec:
129135
rule: (self.provider == 'GCP' && !has(self.region)) || (self.provider
130136
!= 'GCP')
131137
- message: must set region for AWS and Azure containers
132-
rule: ((self.provider == 'AWS' || self.provider == 'Azure') && has(self.region))
138+
rule: ((self.provider == 'AWS' || self.provider == 'AZURE') && has(self.region))
133139
|| (self.provider == 'GCP')
140+
- message: id is immutable
141+
rule: (self.id == oldSelf.id) || (!has(self.id) && !has(oldSelf.id))
142+
- message: region is immutable
143+
rule: (self.region == oldSelf.region) || (!has(self.region) && !has(oldSelf.region))
134144
status:
135145
description: |-
136146
AtlasNetworkContainerStatus is a status for the AtlasNetworkContainer Custom resource.
137147
Not the one included in the AtlasProject
138148
properties:
149+
awsStatus:
150+
description: AWSStatus contains AWS only related status information
151+
properties:
152+
vpcId:
153+
description: VpcID is AWS VPC id on the Atlas side
154+
type: string
155+
type: object
156+
azureStatus:
157+
description: AzureStatus contains Azure only related status information
158+
properties:
159+
azureSubscriptionIDpcId:
160+
description: AzureSubscriptionID is Azure Subscription id on the
161+
Atlas side
162+
type: string
163+
vNetName:
164+
description: VnetName is Azure network on the Atlas side
165+
type: string
166+
type: object
139167
conditions:
140168
description: Conditions is the list of statuses showing the current
141169
state of the Atlas Custom Resource
@@ -166,10 +194,16 @@ spec:
166194
- type
167195
type: object
168196
type: array
169-
containerProvisioned:
170-
description: Provisioned is true when the container has been provisioned
171-
in Atlas
172-
type: boolean
197+
gcpStatus:
198+
description: GCPStatus contains GCP only related status information
199+
properties:
200+
gcpProjectID:
201+
description: GCPProjectID is GCP project on the Atlas side
202+
type: string
203+
networkName:
204+
description: NetworkName is GCP network on the Atlas side
205+
type: string
206+
type: object
173207
id:
174208
description: ID record the identifier of the container in Atlas
175209
type: string
@@ -179,6 +213,10 @@ spec:
179213
The Atlas Operator updates this field to the 'metadata.generation' as soon as it starts reconciliation of the resource.
180214
format: int64
181215
type: integer
216+
provisioned:
217+
description: Provisioned is true when clusters have been deployed
218+
to the container
219+
type: boolean
182220
required:
183221
- conditions
184222
type: object

charts/atlas-operator-crds/templates/atlas.mongodb.com_atlasnetworkpeerings.yaml

Lines changed: 38 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ spec:
2222
- jsonPath: .status.conditions[?(@.type=="Ready")].status
2323
name: Ready
2424
type: string
25-
- jsonPath: .spec.providerName
25+
- jsonPath: .spec.provider
2626
name: Provider
2727
type: string
28-
- jsonPath: .spec.containerId
29-
name: Container ID
28+
- jsonPath: .status.id
29+
name: Id
3030
type: string
31-
- jsonPath: .spec.projectIDRef.id
32-
name: Project ID
31+
- jsonPath: .status.status
32+
name: Status
3333
type: string
3434
name: v1
3535
schema:
@@ -57,17 +57,13 @@ spec:
5757
spec:
5858
description: AtlasNetworkPeeringSpec defines the desired state of AtlasNetworkPeering
5959
properties:
60-
atlasCidrBlock:
61-
description: Atlas CIDR. It needs to be set if ContainerID is not
62-
set.
63-
type: string
6460
awsConfiguration:
6561
description: AWSConfiguration is the specific AWS settings for network
6662
peering
6763
properties:
6864
accepterRegionName:
6965
description: AccepterRegionName is the provider region name of
70-
user's vpc.
66+
user's vpc in AWS native region format
7167
type: string
7268
awsAccountId:
7369
description: AccountID of the user's vpc.
@@ -114,15 +110,21 @@ spec:
114110
required:
115111
- name
116112
type: object
117-
containerId:
118-
description: ID of the network peer container. If not set, operator
119-
will create a new container with ContainerRegion and AtlasCIDRBlock
120-
input.
121-
type: string
122-
containerRegion:
123-
description: ContainerRegion is the provider region name of Atlas
124-
network peer container.
125-
type: string
113+
containerRef:
114+
description: ContainerDualReference refers to an Network Container
115+
either by Kubernetes name or Atlas ID
116+
properties:
117+
id:
118+
description: |-
119+
ID is the Atlas identifier of the Network Container Atlas resource this Peering Connection relies on
120+
Use either name or ID, not both.
121+
type: string
122+
name:
123+
description: |-
124+
Name of the container Kubernetes resource, must be present in the same namespace
125+
Use either name or ID, not both.
126+
type: string
127+
type: object
126128
externalProjectRef:
127129
description: |-
128130
"externalProjectRef" holds the parent Atlas project ID.
@@ -168,6 +170,7 @@ spec:
168170
- AZURE
169171
type: string
170172
required:
173+
- containerRef
171174
- provider
172175
type: object
173176
x-kubernetes-validations:
@@ -179,6 +182,10 @@ spec:
179182
project
180183
rule: (has(self.externalProjectRef) && has(self.connectionSecret)) ||
181184
!has(self.externalProjectRef)
185+
- message: must either have a container Atlas id or Kubernetes name, but
186+
not both (or neither)
187+
rule: (self.containerRef.name != '' && self.containerRef.id == '') ||
188+
(self.containerRef.name == '' && self.containerRef.id != '')
182189
status:
183190
description: |-
184191
AtlasNetworkPeeringStatus is a status for the AtlasNetworkPeering Custom resource.
@@ -190,20 +197,19 @@ spec:
190197
connectionId:
191198
description: ConnectionID is the AWS VPC peering connection ID
192199
type: string
193-
containerVpcId:
194-
description: ContainerVPCId is the AWS Container VPC ID on the
195-
Atlas side
200+
vpcId:
201+
description: VpcID is AWS VPC id on the Atlas side
196202
type: string
197203
type: object
198204
azureStatus:
199205
description: AzureStatus contains Azure only related status information
200206
properties:
201-
azureSubscriptionId:
202-
description: AzureSubscriptionID is the Azure subcription id on
203-
the Atlas container
207+
azureSubscriptionIDpcId:
208+
description: AzureSubscriptionID is Azure Subscription id on the
209+
Atlas side
204210
type: string
205-
vnetName:
206-
description: VnetName is the Azure network name on the Atlas container
211+
vNetName:
212+
description: VnetName is Azure network on the Atlas side
207213
type: string
208214
type: object
209215
conditions:
@@ -236,32 +242,14 @@ spec:
236242
- type
237243
type: object
238244
type: array
239-
containerId:
240-
description: ContainerID records the ID of the container created by
241-
atlas for this peering
242-
type: string
243-
containerProvisioned:
244-
description: ContainerProvisioned is true when the container has been
245-
provisioned in Atlas
246-
type: boolean
247-
containerStatus:
248-
description: ContainerStatus records the last container status seen
249-
for the network container
250-
type: string
251-
error:
252-
description: Error refers to the last error seen in the network peering
253-
setup
254-
type: string
255-
googleStatus:
256-
description: GoogleStatus contains Google only related status information
245+
gcpStatus:
246+
description: GCPStatus contains GCP only related status information
257247
properties:
258-
gcpProjectId:
259-
description: GCPProjectID is the Google Cloud Platform project
260-
id on the Atlas container
248+
gcpProjectID:
249+
description: GCPProjectID is GCP project on the Atlas side
261250
type: string
262251
networkName:
263-
description: NetworkName is the Google network name on the Atlas
264-
container
252+
description: NetworkName is GCP network on the Atlas side
265253
type: string
266254
type: object
267255
id:

0 commit comments

Comments
 (0)