@@ -78,8 +78,8 @@ Removing an old version:
78
78
If this occurs, switch back to using ` served:true ` on the old version, migrate the
79
79
remaining clients to the new version and repeat this step.
80
80
1 . Ensure the [ upgrade of existing objects to the new stored version] ( #upgrade-existing-objects-to-a-new-stored-version ) step has been completed.
81
- 1 . Verify that the ` storage ` is set to ` true ` for the new version in the ` spec.versions ` list in the CustomResourceDefinition.
82
- 1 . Verify that the old version is no longer listed in the CustomResourceDefinition ` status.storedVersions ` .
81
+ 1 . Verify that the ` storage ` is set to ` true ` for the new version in the ` spec.versions ` list in the CustomResourceDefinition.
82
+ 1 . Verify that the old version is no longer listed in the CustomResourceDefinition ` status.storedVersions ` .
83
83
1 . Remove the old version from the CustomResourceDefinition ` spec.versions ` list.
84
84
1 . Drop conversion support for the old version in conversion webhooks.
85
85
@@ -1037,7 +1037,7 @@ What happens to the object that is being returned while serving the read
1037
1037
request depends on what is specified in the CRD's `spec.conversion` :
1038
1038
- if the default `strategy` value `None` is specified, the only modifications
1039
1039
to the object are changing the `apiVersion` string and perhaps [pruning
1040
- unknown fields](/docs/concepts /extend-kubernetes/api-extension /custom-resources/custom-resource-definitions/#field-pruning)
1040
+ unknown fields](/docs/tasks /extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning)
1041
1041
(depending on the configuration). Note that this is unlikely to lead to good
1042
1042
results if the schemas differ between the storage and requested version.
1043
1043
In particular, you should not use this strategy if the same data is
@@ -1051,19 +1051,19 @@ one version to another.
1051
1051
1052
1052
To illustrate this, consider the following hypothetical series of events :
1053
1053
1054
- 1. The storage version is `v1beta1`. You create an object. It is stored at version `v1beta1`
1055
- 2. You add version `v1` to your CustomResourceDefinition and designate it as
1056
- the storage version. Here the schemas for `v1` and `v1beta1` are identical,
1057
- which is typically the case when promoting an API to stable in the
1058
- Kubernetes ecosystem.
1059
- 3. You read your object at version `v1beta1`, then you read the object again at
1060
- version `v1`. Both returned objects are identical except for the apiVersion
1061
- field.
1062
- 4. You create a new object. It is stored at version `v1`. You now
1063
- have two objects, one of which is at `v1beta1`, and the other of which is at
1064
- ` v1` .
1065
- 5. You update the first object. It is now stored at version `v1` since that
1066
- is the current storage version.
1054
+ 1. The storage version is `v1beta1`. You create an object. It is stored at version `v1beta1`
1055
+ 2. You add version `v1` to your CustomResourceDefinition and designate it as
1056
+ the storage version. Here the schemas for `v1` and `v1beta1` are identical,
1057
+ which is typically the case when promoting an API to stable in the
1058
+ Kubernetes ecosystem.
1059
+ 3. You read your object at version `v1beta1`, then you read the object again at
1060
+ version `v1`. Both returned objects are identical except for the apiVersion
1061
+ field.
1062
+ 4. You create a new object. It is stored at version `v1`. You now
1063
+ have two objects, one of which is at `v1beta1`, and the other of which is at
1064
+ ` v1` .
1065
+ 5. You update the first object. It is now stored at version `v1` since that
1066
+ is the current storage version.
1067
1067
1068
1068
# ## Previous storage versions
1069
1069
@@ -1079,19 +1079,19 @@ procedure.
1079
1079
1080
1080
*Option 1:* Use the Storage Version Migrator
1081
1081
1082
- 1. Run the [storage Version migrator](https://github.com/kubernetes-sigs/kube-storage-version-migrator)
1083
- 2. Remove the old version from the CustomResourceDefinition `status.storedVersions` field.
1082
+ 1. Run the [storage Version migrator](https://github.com/kubernetes-sigs/kube-storage-version-migrator)
1083
+ 2. Remove the old version from the CustomResourceDefinition `status.storedVersions` field.
1084
1084
1085
1085
*Option 2:* Manually upgrade the existing objects to a new stored version
1086
1086
1087
1087
The following is an example procedure to upgrade from `v1beta1` to `v1`.
1088
1088
1089
- 1. Set `v1` as the storage in the CustomResourceDefinition file and apply it
1090
- using kubectl. The `storedVersions` is now `v1beta1, v1`.
1091
- 2. Write an upgrade procedure to list all existing objects and write them with
1092
- the same content. This forces the backend to write objects in the current
1093
- storage version, which is `v1`.
1094
- 3. Remove `v1beta1` from the CustomResourceDefinition `status.storedVersions` field.
1089
+ 1. Set `v1` as the storage in the CustomResourceDefinition file and apply it
1090
+ using kubectl. The `storedVersions` is now `v1beta1, v1`.
1091
+ 2. Write an upgrade procedure to list all existing objects and write them with
1092
+ the same content. This forces the backend to write objects in the current
1093
+ storage version, which is `v1`.
1094
+ 3. Remove `v1beta1` from the CustomResourceDefinition `status.storedVersions` field.
1095
1095
1096
1096
{{< note >}}
1097
1097
The flag `--subresource` is used with the kubectl get, patch, edit, and replace commands to
0 commit comments