|
| 1 | +apiVersion: apiextensions.k8s.io/v1 |
| 2 | +kind: CustomResourceDefinition |
| 3 | +metadata: |
| 4 | + annotations: |
| 5 | + controller-gen.kubebuilder.io/version: v0.16.1 |
| 6 | + creationTimestamp: null |
| 7 | + labels: |
| 8 | + app.kubernetes.io/component: controller |
| 9 | + app.kubernetes.io/instance: mongodb-atlas-kubernetes-operator |
| 10 | + app.kubernetes.io/name: mongodb-atlas-kubernetes-operator |
| 11 | + name: atlasnetworkcontainers.atlas.mongodb.com |
| 12 | +spec: |
| 13 | + group: atlas.mongodb.com |
| 14 | + names: |
| 15 | + categories: |
| 16 | + - atlas |
| 17 | + kind: AtlasNetworkContainer |
| 18 | + listKind: AtlasNetworkContainerList |
| 19 | + plural: atlasnetworkcontainers |
| 20 | + shortNames: |
| 21 | + - anc |
| 22 | + singular: atlasnetworkcontainer |
| 23 | + scope: Namespaced |
| 24 | + versions: |
| 25 | + - additionalPrinterColumns: |
| 26 | + - jsonPath: .status.conditions[?(@.type=="Ready")].status |
| 27 | + name: Ready |
| 28 | + type: string |
| 29 | + - jsonPath: .spec.provider |
| 30 | + name: Provider |
| 31 | + type: string |
| 32 | + - jsonPath: .status.id |
| 33 | + name: Id |
| 34 | + type: string |
| 35 | + name: v1 |
| 36 | + schema: |
| 37 | + openAPIV3Schema: |
| 38 | + description: AtlasNetworkContainer is the Schema for the AtlasNetworkContainer |
| 39 | + API |
| 40 | + properties: |
| 41 | + apiVersion: |
| 42 | + description: |- |
| 43 | + APIVersion defines the versioned schema of this representation of an object. |
| 44 | + Servers should convert recognized schemas to the latest internal value, and |
| 45 | + may reject unrecognized values. |
| 46 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| 47 | + type: string |
| 48 | + kind: |
| 49 | + description: |- |
| 50 | + Kind is a string value representing the REST resource this object represents. |
| 51 | + Servers may infer this from the endpoint the client submits requests to. |
| 52 | + Cannot be updated. |
| 53 | + In CamelCase. |
| 54 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 55 | + type: string |
| 56 | + metadata: |
| 57 | + type: object |
| 58 | + spec: |
| 59 | + description: AtlasNetworkContainerSpec defines the desired state of an |
| 60 | + AtlasNetworkContainer |
| 61 | + properties: |
| 62 | + cidrBlock: |
| 63 | + description: Atlas CIDR. It needs to be set if ContainerID is not |
| 64 | + set. |
| 65 | + type: string |
| 66 | + connectionSecret: |
| 67 | + description: Name of the secret containing Atlas API private and public |
| 68 | + keys |
| 69 | + properties: |
| 70 | + name: |
| 71 | + description: |- |
| 72 | + Name of the resource being referred to |
| 73 | + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
| 74 | + type: string |
| 75 | + required: |
| 76 | + - name |
| 77 | + type: object |
| 78 | + externalProjectRef: |
| 79 | + description: |- |
| 80 | + "externalProjectRef" holds the parent Atlas project ID. |
| 81 | + Mutually exclusive with the "projectRef" field |
| 82 | + properties: |
| 83 | + id: |
| 84 | + description: ID is the Atlas project ID |
| 85 | + type: string |
| 86 | + required: |
| 87 | + - id |
| 88 | + type: object |
| 89 | + id: |
| 90 | + description: |- |
| 91 | + ID is the container identifier for an already existent network container to be managed by the operator. |
| 92 | + This field can be used in conjunction with cidrBlock to update the cidrBlock of an existing container. |
| 93 | + This field is immutable. |
| 94 | + type: string |
| 95 | + projectRef: |
| 96 | + description: |- |
| 97 | + "projectRef" is a reference to the parent AtlasProject resource. |
| 98 | + Mutually exclusive with the "externalProjectRef" field |
| 99 | + properties: |
| 100 | + name: |
| 101 | + description: Name is the name of the Kubernetes Resource |
| 102 | + type: string |
| 103 | + namespace: |
| 104 | + description: Namespace is the namespace of the Kubernetes Resource |
| 105 | + type: string |
| 106 | + required: |
| 107 | + - name |
| 108 | + type: object |
| 109 | + provider: |
| 110 | + description: Provider is the name of the cloud provider hosting the |
| 111 | + network container |
| 112 | + enum: |
| 113 | + - AWS |
| 114 | + - GCP |
| 115 | + - AZURE |
| 116 | + type: string |
| 117 | + region: |
| 118 | + description: |- |
| 119 | + ContainerRegion is the provider region name of Atlas network peer container in Atlas region format |
| 120 | + This is required by AWS and Azure, but not used by GCP. |
| 121 | + This field is immutable, Atlas does not admit network container changes. |
| 122 | + type: string |
| 123 | + required: |
| 124 | + - provider |
| 125 | + type: object |
| 126 | + x-kubernetes-validations: |
| 127 | + - message: must define only one project reference through externalProjectRef |
| 128 | + or projectRef |
| 129 | + rule: (has(self.externalProjectRef) && !has(self.projectRef)) || (!has(self.externalProjectRef) |
| 130 | + && has(self.projectRef)) |
| 131 | + - message: must define a local connection secret when referencing an external |
| 132 | + project |
| 133 | + rule: (has(self.externalProjectRef) && has(self.connectionSecret)) || |
| 134 | + !has(self.externalProjectRef) |
| 135 | + - message: must not set region for GCP containers |
| 136 | + rule: (self.provider == 'GCP' && !has(self.region)) || (self.provider |
| 137 | + != 'GCP') |
| 138 | + - message: must set region for AWS and Azure containers |
| 139 | + rule: ((self.provider == 'AWS' || self.provider == 'AZURE') && has(self.region)) |
| 140 | + || (self.provider == 'GCP') |
| 141 | + - message: id is immutable |
| 142 | + rule: (self.id == oldSelf.id) || (!has(self.id) && !has(oldSelf.id)) |
| 143 | + - message: region is immutable |
| 144 | + rule: (self.region == oldSelf.region) || (!has(self.region) && !has(oldSelf.region)) |
| 145 | + status: |
| 146 | + description: |- |
| 147 | + AtlasNetworkContainerStatus is a status for the AtlasNetworkContainer Custom resource. |
| 148 | + Not the one included in the AtlasProject |
| 149 | + properties: |
| 150 | + conditions: |
| 151 | + description: Conditions is the list of statuses showing the current |
| 152 | + state of the Atlas Custom Resource |
| 153 | + items: |
| 154 | + description: Condition describes the state of an Atlas Custom Resource |
| 155 | + at a certain point. |
| 156 | + properties: |
| 157 | + lastTransitionTime: |
| 158 | + description: Last time the condition transitioned from one status |
| 159 | + to another. |
| 160 | + format: date-time |
| 161 | + type: string |
| 162 | + message: |
| 163 | + description: A human readable message indicating details about |
| 164 | + the transition. |
| 165 | + type: string |
| 166 | + reason: |
| 167 | + description: The reason for the condition's last transition. |
| 168 | + type: string |
| 169 | + status: |
| 170 | + description: Status of the condition, one of True, False, Unknown. |
| 171 | + type: string |
| 172 | + type: |
| 173 | + description: Type of Atlas Custom Resource condition. |
| 174 | + type: string |
| 175 | + required: |
| 176 | + - status |
| 177 | + - type |
| 178 | + type: object |
| 179 | + type: array |
| 180 | + id: |
| 181 | + description: ID record the identifier of the container in Atlas |
| 182 | + type: string |
| 183 | + observedGeneration: |
| 184 | + description: |- |
| 185 | + ObservedGeneration indicates the generation of the resource specification that the Atlas Operator is aware of. |
| 186 | + The Atlas Operator updates this field to the 'metadata.generation' as soon as it starts reconciliation of the resource. |
| 187 | + format: int64 |
| 188 | + type: integer |
| 189 | + provisioned: |
| 190 | + description: |- |
| 191 | + Provisioned is true when clusters have been deployed to the container before |
| 192 | + the last reconciliation |
| 193 | + type: boolean |
| 194 | + required: |
| 195 | + - conditions |
| 196 | + type: object |
| 197 | + type: object |
| 198 | + served: true |
| 199 | + storage: true |
| 200 | + subresources: |
| 201 | + status: {} |
| 202 | +status: |
| 203 | + acceptedNames: |
| 204 | + kind: "" |
| 205 | + plural: "" |
| 206 | + conditions: null |
| 207 | + storedVersions: null |
0 commit comments