-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Implement upgrade procedure for SMI TrafficSplit v1alpha2 #3962
Comments
Linkerd does not manage traffic split resources. In other words, it reads them but doesn't create, update, or delete them. Therefore, I don't think Linkerd should upgrade traffic split resources in the cluster from v1alpha1 to v1alpha2: that should be the operator's responsibility. I think we probably need a conversion webhook that can serve v1alpha2 traffic splits which are stored as v1alpha1 traffic splits. In other words:
|
A conversion webhook is the best option but this implies switching to |
I spent a bunch of time thinking about this and coming up with what I think the next steps should be here and wrote them in a comment on this issue. However, it appears that the comment never posted. 😭 I'll try to remember what I came up with... In order to accomplish this migration without downtime, I think we need to go through a deprecation cycle: phase 1:
phase 2:
|
I implemented phase 1 as described here. For reference the code is available at https://github.com/linkerd/linkerd2/compare/alex/ts-v1alpha2?expand=1 Unfortunately, I don't think this approach will work. Linkerd fails to start because the TrafficSplit v1alpha3 and v1alpha2 clients fail to sync their caches. This is because when they attempt to fetch TrafficSplits at versions v1alpha2 or v1alpha3 respectively, the traffic split that was previously stored at version v1alpha1 is returned at the newer version. However, this TrafficSplit object is still in the v1alpha1 format and cannot be parsed by these clients. Thus the caches can't be synced and Linkerd fails to start. This is a fundamental property of how CRD versioning and client-go work. If a CRD exists that has been stored at a previous (backwards incompatible) version, newer informers cannot be started. I really don't see any path forward here other than to use conversion webhooks. Conversion webhooks became stable in Kuberenetes 1.16 so we must wait until 1.16 is Linkerd's minimum Kubernetes version before we can upgrade onto the newer version of trafficsplit. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Another option would be to abandon the typed code-generated clients for TrafficSplit and instead use an untyped dynamic client (as we do for the Link CRD, see: #4710). This would allow us to write custom deserialization logic that can account for the weight field being either an |
any news? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Hello! Disabling of using header l5d-dst-override in linkerd 2.9 makes it impossible to get in to green/canary service by header for running complience tests. We definetly need some alternative way how to get in to the green/canary service for testing it, so implementing TrafficSplit.specs.smi-spec.io/v1alpha4 is requred for running A/B, B/G, Canary complience tests. |
The upgrade from TrafficSplit v1alpha1 to v1alpha2 can't be done in place by Kubernetes since the weight type changed from
resource.Quantity
toint
.In order to ship #3951 the Linkerd CLI could implement the following upgrade procedure:
creationTimestamp
,generation
,resourceVersion
,selfLink
anduid
from the TrafficSplit objectsresource.Quantity
(YAML string) toint
(YAML number)PS. The upgrade procedure describe here is just a wild guess, I haven't tested/implemented this so some experimentation with #3951 is required to validate my assumptions.
The text was updated successfully, but these errors were encountered: