-
Notifications
You must be signed in to change notification settings - Fork 263
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
"kn service export --with-revisions" should create revision COs directly #728
Comments
/assign @itsmurugappan |
@rhuss looked at this today. |
Correct.
Yes, that's correct. Sticking the owner-reference together properly is the task of However, we could also export the |
My 2 cents, this approach works if the intention is to export the current state of the service and let 'kn import' do some extra work to import. But if we want to import as it is, there is some problem with this approach. Please see the below example. Exporting the service with 3 revisions(2 active) will result in the below artifacts
When we create the service again , a new uid and a configuration will be generated, so the exported configuration cannot be used. Now the uid in owner references of the revision has to be changed to the newly generated configuration. With that being said we can export the service with revisions(without configuration) and kn import can update the uid in the owner references. This will result in only one pod starting. With the current approach of exporting services, more pods will be created but it can be used by kubectl also and the generation number will be clean. |
That sounds like a good approach. I have to understand the uid bit a bit better, I wonder whether we could just strip it out ? (and let the controller add it). Sure what the uid is for as the other coordinates are already sufficient for uniquely identifying the service. |
UIDs are decribed here but it not clear whether a UID is mandatory. Would be interesting to see what happens if one just remove the UID. Would this work ? Otherwise I agree that we should rely on |
Another interesting issue is that we would have to create the I wonder whether a service side solution wouldn't be better ? E.g. allowing a |
After some discussion slack discussion with @markusthoemmes I think we should allow those two mode for
|
I tried the above steps. Please let me know if i am missing something
I dont see istio virtual service getting created. |
Yes, looks like a serving issue when reconciling a service with an initial not-owned configuration and then updated to an owned configuration by setting the configuration's ownerRef. I would expect the service to eventually reconcile to the ready state, including working routes. @mattmoor is this a correct assumption ? If so I would carry that specific issue over to serving. |
This alone is not what we want. This might be avoided if the start-with-scale-0 feature comes, so that not pod gets started (also important to avoid any application specific side effects). |
@rhuss i think we can go ahead with the below 2 options you had mentioned.
|
@itsmurugappan Yes, that looks fine for me. Another idea by @evankanderson:
The challenge would be how to deal with the traffic (route) configuration of the service when its not pointing 100% to latest. The question is how can the traffic configuration then be added as a last step without serving any data in the meantime, Is there kind of a service setting that indicates the service to be inactive ? Except maybe to use an always-false readiness probe for the initial during the import action, but that would affect the latest revision, too. Would be cool to have an field in service to deactivate it which is not reflected in a revision (i.e. does not create a new revision if changed) Of course that export format can be only imported again by |
@itsmurugappan also you might want to have a look into this PR which introduces a migration feature to |
@rhuss the approach used by @zhangtbj is similar to what we discussed #728 (comment) and #728 (comment) This is the import flow,
@zhanggbj please correct me if i am wrong. |
I had tried this approach earlier and it works. create service with traffic split (eventhough revisions doesnt exist) -> get config uuid plug in to revisions which were not created and create it. This exactly creates one pod only and traffic split seemed to work correctly. |
Sounds good, so we might want to try todo this. |
…ve#728) Coverage completion marker is used in pre-submit workflow to find most recent healthy post-submit coverage result as a basis for comparison. We are adding the marker now regardless of unit test failure, to prevent stale comparison baseline knative#679
Currently,
kn service export --with-revisions
exports only services which are update one after each other. However, as it is allowed to create revisions directly it makes more sense to export those directly, with the proper owner-references.An
kn service import
then could then also adapt the revision names in case of collisions.The text was updated successfully, but these errors were encountered: