Skip to content

Commit bc61b5d

Browse files
authored
Merge pull request #38593 from windsonsea/defvere
Fix link and bullets in custom-resource-definition-versioning
2 parents 64f0303 + 0cfca02 commit bc61b5d

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Removing an old version:
7878
If this occurs, switch back to using `served:true` on the old version, migrate the
7979
remaining clients to the new version and repeat this step.
8080
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`.
8383
1. Remove the old version from the CustomResourceDefinition `spec.versions` list.
8484
1. Drop conversion support for the old version in conversion webhooks.
8585

@@ -1037,7 +1037,7 @@ What happens to the object that is being returned while serving the read
10371037
request depends on what is specified in the CRD's `spec.conversion`:
10381038
- if the default `strategy` value `None` is specified, the only modifications
10391039
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)
10411041
(depending on the configuration). Note that this is unlikely to lead to good
10421042
results if the schemas differ between the storage and requested version.
10431043
In particular, you should not use this strategy if the same data is
@@ -1051,19 +1051,19 @@ one version to another.
10511051

10521052
To illustrate this, consider the following hypothetical series of events:
10531053

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.
10671067

10681068
### Previous storage versions
10691069

@@ -1079,19 +1079,19 @@ procedure.
10791079

10801080
*Option 1:* Use the Storage Version Migrator
10811081

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.
10841084

10851085
*Option 2:* Manually upgrade the existing objects to a new stored version
10861086

10871087
The following is an example procedure to upgrade from `v1beta1` to `v1`.
10881088

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.
10951095

10961096
{{< note >}}
10971097
The flag `--subresource` is used with the kubectl get, patch, edit, and replace commands to

0 commit comments

Comments
 (0)