-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Handling v1
storage conversion
#6382
Comments
cc @tektoncd/operator-maintainers as this is something the operator can/should take care of as well (the migration I mean) |
cc @tektoncd/core-maintainers |
@vdemeester can we use this issue to track swapping to using v1 as the storage version, or is this meant to track work (e.g. storage version migration) we'll do after that's completed? |
I am not sure to be honest. It is something we need to figure out to be able to switch the storage version safely, so imho it is part of the work for changing the storage version. |
+1
I agree we should have a StorageVersionMigrator. Could be something like a post-install job like this: https://github.com/knative/serving/blob/main/config/post-install/storage-version-migration.yaml cc @lbernick @JeromeJu |
Agreed on having a storage version migrator, but I think this can wait until after we swap the storage version, since it's not relevant until we want to remove the v1beta1 API as Vincent pointed out |
@vdemeester looking at this again - how will this happen? there is only one stored version right? We'll flip |
I am not sure if I agree but I don't have too much "strong" argument to weigh my thought 😅.
Nope,
|
Thanks @vdemeester , agree with the options and the document provided and they are good instructions to include moving forward. Whilst for the option2, I think the condition stated was when we are deprecating the old storage version (assuming for v1beta1 it would be a long time after? 🤔 ).
As for the usage of conversion webhook, according to documentation,
In terms of user-facing instructions, I am happy to include this notification in the release note of the v1 storage swap and the migration-guide as well.
|
Pipelines WG - can wait until we remove v1beta1, @lbernick will break this into multiple issue, clearing the milestone for now. |
@vdemeester I've split this issue into the following three issues:
|
When we will switch the storage version to
v1
, we need to handle the storage version migration.For context, when we switch storage version from one version to the other, all the object stored with a previous version will be stored as this until they are updated.
From Versions In CustomResourceDefinition
This is not necessarily a problem until we remove that version from the served version (aka, in the case of
v1
, whenv1beta1
is no more served). This is what happened withv1alpha1
and can cause some issues likeCustomResourceDefinition.apiextensions.k8s.io "clustertasks.tekton.dev" is invalid: status.StoredVersions[0]: Invalid value: "v1alpha1": must appear in spec.versions
.This problem is highlighted by the fact that that command we give in our release pages is
kubectl apply
which will merge they payload with previous objects in the cluster. This means, if I had an "old" version that hadstoredVersion
set tov1alpha1
, when applying a version wherestoredVersion
is now set tov1beta1
(in therelease.yaml
), it will have bothv1alpha1
andv1beta1
as storedVersion — which is a case.. we don't handle pretty well. _This is gonna happen forv1
as well, when we switch thestoredVersion
.There is a "few" things we need to cover here:
kubectl replace
instead ofkubectl apply
in our release pages (or provide a better/cleaner way to handle upgrades)kubernetes-sigs/kube-storage-version-migrator
.knative/pkg
also have some "helper"/job around this :apiextensions/storageversion/cmd/migrate
The text was updated successfully, but these errors were encountered: