Skip to content
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

extension-api: Add a registration of a loadImage/copyImage provider #2623

Closed
benoitf opened this issue May 24, 2023 · 12 comments
Closed

extension-api: Add a registration of a loadImage/copyImage provider #2623

benoitf opened this issue May 24, 2023 · 12 comments

Comments

@benoitf
Copy link
Collaborator

benoitf commented May 24, 2023

Is your feature request related to a problem? Please describe

For now, some extensions are loading the image from the local registry into a remote registry.
For example kind nodes have their own registries (and then extension use kind load image-archive)

devsandbox extension needs to tag the image using the OpenShift registry URL prefix
minikube configuration with a registry would want to use $(minikube ip):5000/ as well to push the image, etc.

And now each extension contributes its own action 'Push image to ...' and provide their own workflows/notifications/icons

When we deploy a pod yaml to a cluster, we would need to update the YAML with the updated image name as well if they're not already public, ask the user, etc.

Describe the solution you'd like

Add a 'loadImageProvider' option when registering a Kubernetes endpoint connection.

The callback will notify Podman Desktop that the kubernetes endpoint handle the load of an image;

Then, Podman Desktop can register a single or dropdown 'Push to' and Push to Kind, Push to Minikube, Push to DevSandbox, Push to OpenShift Local actions in the images list for each supported running endpoints.

When using the 'Deploy Pod.yaml', user may be asked if he wants to transfer images if they're not public images (Can check if all images are in quay .io do nothing or we can also check the sha of the public image and local image to see if they're the same, etc) and then each extension will be responsible to handle the upload/tag

Podman Desktop will receive the name of the updated image and update accordingly the pod.yaml before submitting it remotely.

Then, experience will be the same for all providers, Kind, OpenShift Local, devSandbox, Minikube, etc and they'll only need to implement a very small subset of only handling the push and returning the name of the image.

Describe alternatives you've considered

No response

Additional context

No response

@afbjorklund
Copy link
Contributor

afbjorklund commented May 24, 2023

For example kind nodes have their own registries (and then extension use kind load image-archive)

minikube configuration with a registry would want to use $(minikube ip):5000/ as well to push the image, etc.

minikube uses the minikube image load command, in order to load an existing image to the cluster node(s)

You can deploy a private registry as an alternative, but it might be overkill for users of simple clusters

@afbjorklund
Copy link
Contributor

afbjorklund commented May 24, 2023

@benoitf : you might want to consider also a buildImage endpoint, if supported by the provider?

if the build context is small compared to the container image, it might be a quicker turnaround

minikube provides this feature (i.e. both "load" and "build"):

https://minikube.sigs.k8s.io/docs/handbook/pushing/

@benoitf
Copy link
Collaborator Author

benoitf commented May 24, 2023

It's just to illustrate that minikube extension would be responsible to either call minikube image load or use a local registry or something else ( extension do the specifics, podman desktop the generics)

@benoitf
Copy link
Collaborator Author

benoitf commented May 24, 2023

Yes it would be possible to consider the build image on k8s clusters as well to have remote build options. We already do that for podman/docker rest API

@benoitf
Copy link
Collaborator Author

benoitf commented Jun 15, 2023

From #2866 it would be interesting as well to have a always-on sync running in the background and reporting status of the sync through image list indicators

@deboer-tim
Copy link
Contributor

Or build could have some advanced options for 'when done, push to these registries'.

@benoitf
Copy link
Collaborator Author

benoitf commented Jun 15, 2023

@deboer-tim it means using the CLI won't do the trick

@afbjorklund
Copy link
Contributor

The use of the word "registry" is somewhat confusing here. Using one is rather optional, at least for kind/minikube.

It might be recommended, but it is usually also possible to save from the host and load in the cluster? No registry.

@nichjones1 nichjones1 moved this from 📋 Backlog to 📅 Planned in Podman Desktop Planning Jul 12, 2023
@afbjorklund

This comment was marked as resolved.

@benoitf benoitf moved this from 📅 Planned to ⏱Postponed in Podman Desktop Planning Jul 20, 2023
@nichjones1 nichjones1 moved this from ⏱Postponed to 📅 Planned in Podman Desktop Planning Jul 26, 2023
@benoitf benoitf moved this from 📅 Planned to ⏱Postponed in Podman Desktop Planning Aug 8, 2023
@benoitf benoitf moved this from ⏱Postponed to 📋 Backlog in Podman Desktop Planning Aug 16, 2023
@benoitf benoitf removed their assignment Aug 16, 2023
@benoitf benoitf moved this from 📋 Backlog to 📅 Planned in Podman Desktop Planning Sep 27, 2023
@afbjorklund

This comment was marked as off-topic.

Copy link
Contributor

github-actions bot commented May 4, 2024

This issue has been automatically marked as stale because it has not had activity in the last 6 months. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

Copy link
Contributor

github-actions bot commented Jun 3, 2024

This issue has been automatically closed because it has not had any further activity in the last 30 days. Thank you for your contributions!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@github-project-automation github-project-automation bot moved this from 📅 Planned to ✔️ Done in Podman Desktop Planning Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants