You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -189,7 +190,8 @@ It is now possible to specify a `NetworkFilter` object to select the external ne
189
190
190
191
```yaml
191
192
externalNetwork:
192
-
name: "public"
193
+
filter:
194
+
name: "public"
193
195
```
194
196
195
197
If a network is provided, it'll be added to `OpenStackCluster.Status.ExternalNetwork`. If the network can't be found, an error will be returned.
@@ -239,7 +241,7 @@ The new field has IPv4 validation added.
239
241
240
242
#### Change to subnet
241
243
242
-
In v1beta1, `Subnet` of `OpenStackCluster` is modified to `Subnets` to allow specification of two existent subnets for the dual-stack scenario.
244
+
In v1beta1, `Subnet` of `OpenStackCluster` is modified to `Subnets` to allow specification of two existing subnets for the dual-stack scenario.
243
245
244
246
```yaml
245
247
subnet:
@@ -253,10 +255,12 @@ In v1beta1, this will be automatically converted to:
253
255
- id: a532beb0-c73a-4b5d-af66-3ad05b73d063
254
256
```
255
257
256
-
`Subnets`allows specifications of maximum two `SubnetFilter` one being IPv4 and the other IPv6. Both subnets must be on the same network. Any filtered subnets will be added to `OpenStackCluster.Status.Network.Subnets`.
258
+
`Subnets`allows specifications of maximum two `SubnetParam`s one being IPv4 and the other IPv6. Both subnets must be on the same network. Any filtered subnets will be added to `OpenStackCluster.Status.Network.Subnets`.
257
259
258
260
When subnets are not specified on `OpenStackCluster` and only the network is, the network is used to identify the subnets to use. If more than two subnets exist in the network, the user must specify which ones to use by defining the `OpenStackCluster.Spec.Subnets` field.
259
261
262
+
See [Filters are replaced by params with separate id and filter](#filters-are-replaced-by-params-with-separate-id-and-filter) for changes to the `SubnetFilter`.
263
+
260
264
#### Change to nodeCidr and dnsNameservers
261
265
262
266
In v1beta1, `OpenStackCluster.Spec.ManagedSubnets` array field is introduced. The `NodeCIDR` and `DNSNameservers` fields of `OpenStackCluster.Spec` are moved into that structure (renaming `NodeCIDR` to `CIDR`). For example:
@@ -386,11 +390,66 @@ spec:
386
390
bastion:
387
391
spec:
388
392
image:
389
-
name: foobar
393
+
filter:
394
+
name: foobar
390
395
```
391
396
392
397
### Changes to filters
393
398
399
+
#### Filters are replaced by params with separate id and filter
400
+
401
+
We previously defined filters for specifying each of the following:
402
+
* Images
403
+
* Networks
404
+
* Subnets
405
+
* Security Groups
406
+
* Routers
407
+
408
+
Taking Images as an example, in `OpenStackMachineSpec` the `image` parameter accepted the following fields:
409
+
* id
410
+
* name
411
+
* tags
412
+
413
+
However, there were 2 different behaviours here depending on which fields were specified. If `id` was specified we both ignored all other fields, and made no attempt to validate the id because it cannot be known unless it exists. If `id` was not specified we performed an OpenStack query using the other parameters to determine the id. This behaviour is both difficult to describe and validate, so in v1beta1 we have separated the 2 different behaviours into different fields. The `id` field remains, but all other fields become part of a new `filter` parameter. It is required to specify either `id` or `filter`. Specifying both, neither, or an empty filter, will now result in an admission failure (the API server will reject the operation immediately).
414
+
415
+
We have also added validation to the id field, which must now parse as a uuid. An id field which does not parse as a uuid will also result in an admission failure.
416
+
417
+
Specifying a filter object by id remains unchanged.
418
+
```yaml
419
+
image:
420
+
id: 02e31c38-d5ba-4c57-addb-00fc71eb5b19
421
+
```
422
+
423
+
Specifying a filter object by a filter parameter must now move filter parameters into the filter field:
424
+
```yaml
425
+
image:
426
+
name: my-image
427
+
tags:
428
+
- my-tag
429
+
```
430
+
becomes:
431
+
```yaml
432
+
image:
433
+
filter:
434
+
name: my-image
435
+
tags:
436
+
- my-tag
437
+
```
438
+
439
+
The same principle applies to all the filter types. For example:
440
+
441
+
To specify `externalNetwork` by id in `OpenStackClusterSpec`:
442
+
```yaml
443
+
externalNetwork:
444
+
id: 0a5d4e3d-0a2c-4bed-9172-72544db1f8da
445
+
```
446
+
or by name:
447
+
```yaml
448
+
externalNetwork:
449
+
filter:
450
+
name: my-external-network
451
+
```
452
+
394
453
#### Changes to filter tags
395
454
396
455
We currently define filters on 4 different Neutron resources which are used throughout the API:
0 commit comments