Draft: Use a pipeline to load images into kind #9902
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the issue when kind runs in podman instead of docker
See: kubernetes-sigs/kind#2038
Fixes: #9901
Description
Because
kind load docker-imagedoesn't work if kind is running with podman and the image to load is created with podman as well, the concept to load the image has to be changed. This problem is described in kubernetes-sigs/kind#2038. An "easy fix" for this is to save the image with the corresponding container engine as a docker-image to stdout and pass it tokind image-load /dev/stdin. By usinglocalDockerlike the builder does, podman can be selected by settingDOCKER_HOSTto a podman-socket.This implementation is more like a proof of concept than anything else. As everyone easily can see, I'm not a go-developer ;-)
This was tested as in "works on my machine". My machine at the moment:
systemctls--user podman.socketis enabled and startedDOCKER_HOST=unix:///var/run/user/$(id -u)/podman/podman.sockUser facing changes (remove if N/A)
If implemented correctly, nothing changes for docker users
Follow-up Work (remove if N/A)
Do a real implementation ;-)