-
Notifications
You must be signed in to change notification settings - Fork 296
📖 Document CRD changes from v1alpha4 to v1alpha5 #1216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+130
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # CRD Changes | ||
|
|
||
| ### Conversions | ||
|
|
||
| CAPO is able to automatically convert your old resources into new API versions. |
123 changes: 123 additions & 0 deletions
123
docs/book/src/topics/crd-changes/v1alpha4-to-v1alpha5.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
| <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
| **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* | ||
|
|
||
| - [v1alpha4 compared to v1alpha5](#v1alpha4-compared-to-v1alpha5) | ||
| - [Conversion from v1alpha4 to v1alpha5](#conversion-from-v1alpha4-to-v1alpha5) | ||
| - [API Changes](#api-changes) | ||
| - [`OpenStackCluster`](#openstackcluster) | ||
| - [Managed API LoadBalancer](#managed-api-loadbalancer) | ||
| - [Major Changes to Ports and Networks](#major-changes-to-ports-and-networks) | ||
| - [`OpenStackMachine`](#openstackmachine) | ||
| - [Rename of `status.error{Reason,Message}` to `status.failure{Reason,Message}`](#rename-of-statuserrorreasonmessage-to-statusfailurereasonmessage) | ||
| - [Changes to `rootVolume`](#changes-to-rootvolume) | ||
|
|
||
| <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
|
||
| # v1alpha4 compared to v1alpha5 | ||
|
|
||
| ## Migration | ||
|
|
||
|
|
||
| All users are encouraged to migrate their usage of the CAPO CRDs from older versions to `v1alpha5`. This includes yaml files and source code. As CAPO implements automatic conversions between the CRD versions, this migration can happen after installing the new CAPO release. | ||
|
|
||
| ## API Changes | ||
|
|
||
| This only documents backwards incompatible changes. Fields that were added to v1alpha5 are not listed here. | ||
|
|
||
| ### `OpenStackCluster` | ||
|
|
||
| #### Managed API LoadBalancer | ||
|
|
||
| The fields related to the managed API LoadBalancer were moved into a seperate object: | ||
|
|
||
| ```yaml | ||
| apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 | ||
| kind: OpenStackCluster | ||
| spec: | ||
| managedAPIServerLoadBalancer: true | ||
| apiServerLoadBalancerAdditionalPorts: [443] | ||
| ``` | ||
|
|
||
| becomes: | ||
|
|
||
| ```yaml | ||
| apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 | ||
| kind: OpenStackCluster | ||
| spec: | ||
| apiServerLoadBalancer: | ||
| enabled: true | ||
| additionalPorts: [443] | ||
| ``` | ||
|
|
||
| ### `OpenStackMachine` | ||
|
|
||
| #### Major Changes to Ports and Networks | ||
|
|
||
| When using Ports it is now possible to specify network and subnet by filter instead of just ID. As a consequence, the relevant ID fields are now moved into the new filter specifications: | ||
|
|
||
| ```yaml | ||
| ports: | ||
| - networkId: d-e-a-d | ||
| fixedIPs: | ||
| - subnetId: b-e-e-f | ||
| ``` | ||
|
|
||
| becomes: | ||
|
|
||
| ```yaml | ||
| ports: | ||
| - network: | ||
| id: d-e-a-d | ||
| fixedIPs: | ||
| subnet: | ||
| id: b-e-e-f | ||
| ``` | ||
|
|
||
| Networks are now deprecated. With one exception, all functionality of Networks is now available for Ports. Consequently, Networks will be removed from the API in a future release. | ||
|
|
||
| The ability of a Network to add multiple ports with a single directive will not be added to Ports. When moving to Ports, all ports must be added explicitly. Specifically, when evaluating the network or subnet filter of a Network, if there are multiple matches we will add all of these to the server. By contrast we raise an error if the network or subnet filter of a Port does not return exactly one result. | ||
|
|
||
| `tenantId` was previously a synonym for `projectId` in both network and subnet filters. This has now been removed. Use `projectId` instead. | ||
|
|
||
| The following fields are removed from network and subnet filters without replacement: | ||
|
|
||
| - status | ||
| - adminStateUp | ||
| - shared | ||
| - marker | ||
| - limit | ||
| - sortKey | ||
| - sortDir | ||
| - subnetPoolId | ||
|
|
||
| #### Rename of `status.error{Reason,Message}` to `status.failure{Reason,Message}` | ||
|
|
||
| The actual fields were previously already renamed, but we still used the `error` prefix in JSON. This was done to align with CAPI, where these fields were [renamed in v1alpha3](https://cluster-api.sigs.k8s.io/developer/providers/v1alpha2-to-v1alpha3.html#external-objects-will-need-to-rename-statuserrorreason-and-statuserrormessage). | ||
|
|
||
| ```yaml | ||
| apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 | ||
| kind: OpenStackMachine | ||
| status: | ||
| errorReason: UpdateError | ||
| errorMessage: Something when wrong | ||
| ``` | ||
|
|
||
| becomes: | ||
|
|
||
| ```yaml | ||
| apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 | ||
| kind: OpenStackMachine | ||
| status: | ||
| failureReason: UpdateError | ||
| failureMessage: Something when wrong | ||
| ``` | ||
|
|
||
| #### Changes to `rootVolume` | ||
|
|
||
| The following fields were removed without replacement: | ||
|
|
||
| - `rootVolume.deviceType` | ||
| - `rootVolume.sourceType` | ||
apricote marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Additionally, `rootVolume.sourceUUID` has been replaced by using `ImageUUID` or `Image` from the OpenStackMachine as appropriate. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.