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

Add package pull and sync commands to crossplane CLI #5579

Open
bobh66 opened this issue Apr 12, 2024 · 1 comment
Open

Add package pull and sync commands to crossplane CLI #5579

bobh66 opened this issue Apr 12, 2024 · 1 comment
Labels

Comments

@bobh66
Copy link
Contributor

bobh66 commented Apr 12, 2024

What problem are you facing?

We recently discovered that our process for managing Crossplane package distribution has a flaw. We use docker pull, tag and push to move packages around, which seems to be functional but it has a problem that remains out of sight.

Crossplane uses layer annotations to find the package.yaml information in each package. These annotations are stored as Labels in the Docker Config, and crossplane xpkg push extracts the annotations from the Labels and adds them to the layers when they are pushed to a registry.

Since the docker commands don't know anything about the layer annotations, they get lost in the process of pull, tag, push.

How could Crossplane help solve your problem?

It is possible to use crane pull to retrieve the package from a registry and then crossplane xpkg push it to the target registry,
but it would be helpful to have a crossplane xpkg pull command to retrieve the package so that it can be pushed to the target registry.

And to take things one more step, it would be helpful to have a crossplane xpkg sync command which combines the pull and the push into one command, similar to what skopeo sync can do for containers.

I assume that the pull functionality already exists in the client because it has to pull the package to do an xpkg install, so it would just be a matter of separating out the pull functionality into it's own command.

Similarly the sync command would be a combination of the pull and push so it should also be fairly straightforward.

I can try to take a look at this next week but if someone is interested in the mean time please feel free.

@bobh66
Copy link
Contributor Author

bobh66 commented Apr 12, 2024

Maybe it should be crossplane xpkg copy instead of sync - crane copy will pull a package from one repo and push it to another with the annotations intact. Or maybe it's not needed at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants