|
| 1 | +--- |
| 2 | +apiVersion: apiextensions.k8s.io/v1 |
| 3 | +kind: CustomResourceDefinition |
| 4 | +metadata: |
| 5 | + name: neutronsegmentranges.neutron.understack.rackspace.net |
| 6 | +spec: |
| 7 | + group: neutron.understack.rackspace.net |
| 8 | + names: |
| 9 | + kind: NeutronSegmentRange |
| 10 | + listKind: NeutronSegmentRangeList |
| 11 | + plural: neutronsegmentranges |
| 12 | + shortNames: |
| 13 | + - nsr |
| 14 | + singular: neutronsegmentrange |
| 15 | + scope: Namespaced |
| 16 | + versions: |
| 17 | + - name: v1alpha1 |
| 18 | + served: true |
| 19 | + storage: true |
| 20 | + additionalPrinterColumns: |
| 21 | + - name: Name |
| 22 | + type: string |
| 23 | + jsonPath: .spec.name |
| 24 | + - name: Type |
| 25 | + type: string |
| 26 | + jsonPath: .spec.network_type |
| 27 | + - name: Physical |
| 28 | + type: string |
| 29 | + jsonPath: .spec.physical_network |
| 30 | + - name: Min |
| 31 | + type: integer |
| 32 | + jsonPath: .spec.minimum |
| 33 | + - name: Max |
| 34 | + type: integer |
| 35 | + jsonPath: .spec.maximum |
| 36 | + - name: Shared |
| 37 | + type: boolean |
| 38 | + jsonPath: .spec.shared |
| 39 | + - name: SyncStatus |
| 40 | + type: string |
| 41 | + jsonPath: .status.syncStatus |
| 42 | + - name: Age |
| 43 | + type: date |
| 44 | + jsonPath: .metadata.creationTimestamp |
| 45 | + schema: |
| 46 | + openAPIV3Schema: |
| 47 | + description: >- |
| 48 | + NeutronSegmentRange defines one Neutron network segment range |
| 49 | + (``openstack network segment range``). The operator finds, adopts, or |
| 50 | + creates the range identified by ``spec.name`` and reconciles its |
| 51 | + network type, physical network, and minimum/maximum segmentation IDs |
| 52 | + toward the spec. Creating a CR claims ownership of the matching |
| 53 | + OpenStack segment range. Neutron does not allow updating the |
| 54 | + ``network_type`` or ``physical_network`` of an existing range, so a |
| 55 | + CR that disagrees with an existing range on either field fails loudly |
| 56 | + rather than silently diverging. |
| 57 | + type: object |
| 58 | + required: |
| 59 | + - spec |
| 60 | + properties: |
| 61 | + apiVersion: |
| 62 | + type: string |
| 63 | + kind: |
| 64 | + type: string |
| 65 | + metadata: |
| 66 | + type: object |
| 67 | + spec: |
| 68 | + type: object |
| 69 | + required: |
| 70 | + - name |
| 71 | + - network_type |
| 72 | + - minimum |
| 73 | + - maximum |
| 74 | + - cloudCredentialsRef |
| 75 | + properties: |
| 76 | + cloudCredentialsRef: |
| 77 | + description: >- |
| 78 | + cloudCredentialsRef points to a Kubernetes Secret containing |
| 79 | + an OpenStack clouds.yaml file. The operator reads this secret |
| 80 | + directly at reconcile time; no volume mount is required. |
| 81 | + type: object |
| 82 | + required: |
| 83 | + - secretName |
| 84 | + - cloudName |
| 85 | + properties: |
| 86 | + secretName: |
| 87 | + description: >- |
| 88 | + Name of a Secret in the same namespace as this resource. |
| 89 | + The Secret must contain a key named clouds.yaml holding |
| 90 | + an OpenStack clouds.yaml file. |
| 91 | + type: string |
| 92 | + minLength: 1 |
| 93 | + maxLength: 253 |
| 94 | + cloudName: |
| 95 | + description: >- |
| 96 | + Name of the cloud entry within the clouds.yaml to |
| 97 | + authenticate as. |
| 98 | + type: string |
| 99 | + minLength: 1 |
| 100 | + maxLength: 256 |
| 101 | + name: |
| 102 | + description: >- |
| 103 | + Neutron network segment range name. This is the identity the |
| 104 | + operator uses to find, adopt, create, and prune the range, so |
| 105 | + it must be unique per cloud. |
| 106 | + type: string |
| 107 | + minLength: 1 |
| 108 | + maxLength: 255 |
| 109 | + pattern: ^[A-Za-z0-9._/-]+$ |
| 110 | + network_type: |
| 111 | + description: >- |
| 112 | + The network type of the segment range. VLAN IDs apply to the |
| 113 | + ``vlan`` type; tunnel IDs apply to ``geneve``, ``gre`` and |
| 114 | + ``vxlan``. |
| 115 | + type: string |
| 116 | + enum: |
| 117 | + - vlan |
| 118 | + - vxlan |
| 119 | + - gre |
| 120 | + - geneve |
| 121 | + minLength: 1 |
| 122 | + maxLength: 32 |
| 123 | + physical_network: |
| 124 | + description: >- |
| 125 | + The physical network the segment range is bound to. Required |
| 126 | + for ``vlan`` ranges and must be omitted for the tunnelled |
| 127 | + types (``vxlan``, ``gre``, ``geneve``); the operator enforces |
| 128 | + this at reconcile time. |
| 129 | + type: string |
| 130 | + minLength: 1 |
| 131 | + maxLength: 255 |
| 132 | + minimum: |
| 133 | + description: >- |
| 134 | + The minimum segmentation ID in the range (inclusive). Must be |
| 135 | + less than or equal to ``maximum``. |
| 136 | + type: integer |
| 137 | + format: int64 |
| 138 | + minimum: 1 |
| 139 | + maximum: |
| 140 | + description: >- |
| 141 | + The maximum segmentation ID in the range (inclusive). Must be |
| 142 | + greater than or equal to ``minimum``. |
| 143 | + type: integer |
| 144 | + format: int64 |
| 145 | + minimum: 1 |
| 146 | + shared: |
| 147 | + description: >- |
| 148 | + Whether the segment range is shared with all projects. When |
| 149 | + false the range is scoped to ``project_id``, which then |
| 150 | + becomes required. |
| 151 | + type: boolean |
| 152 | + default: true |
| 153 | + project_id: |
| 154 | + description: >- |
| 155 | + The project the range is scoped to when ``shared`` is false. |
| 156 | + Ignored for shared ranges. |
| 157 | + type: string |
| 158 | + minLength: 1 |
| 159 | + maxLength: 255 |
| 160 | + x-kubernetes-validations: |
| 161 | + - rule: self.maximum >= self.minimum |
| 162 | + message: maximum must be greater than or equal to minimum |
| 163 | + - rule: "self.shared || has(self.project_id)" |
| 164 | + message: project_id is required when shared is false |
| 165 | + status: |
| 166 | + description: NeutronSegmentRangeStatus defines the observed sync state. |
| 167 | + type: object |
| 168 | + properties: |
| 169 | + syncStatus: |
| 170 | + description: SyncStatus indicates the synchronization state with Neutron. |
| 171 | + type: string |
| 172 | + enum: |
| 173 | + - Synced |
| 174 | + - Failed |
| 175 | + - Unknown |
| 176 | + lastSyncTime: |
| 177 | + description: LastSyncTime is the last time the operator attempted to sync the range. |
| 178 | + type: string |
| 179 | + format: date-time |
| 180 | + observedGeneration: |
| 181 | + description: ObservedGeneration is the metadata generation last processed by the operator. |
| 182 | + type: integer |
| 183 | + format: int64 |
| 184 | + message: |
| 185 | + description: Message provides details about the last sync attempt. |
| 186 | + type: string |
| 187 | + maxLength: 2048 |
| 188 | + conditions: |
| 189 | + description: Conditions describe current observed state. |
| 190 | + type: array |
| 191 | + items: |
| 192 | + type: object |
| 193 | + required: |
| 194 | + - type |
| 195 | + - status |
| 196 | + properties: |
| 197 | + type: |
| 198 | + type: string |
| 199 | + status: |
| 200 | + type: string |
| 201 | + enum: |
| 202 | + - "True" |
| 203 | + - "False" |
| 204 | + - Unknown |
| 205 | + reason: |
| 206 | + type: string |
| 207 | + message: |
| 208 | + type: string |
| 209 | + maxLength: 2048 |
| 210 | + lastTransitionTime: |
| 211 | + type: string |
| 212 | + format: date-time |
| 213 | + subresources: |
| 214 | + status: {} |
0 commit comments