You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
What problem are you facing?
We recently discovered that our process for managing Crossplane package distribution has a flaw. We use
docker pull
,tag
andpush
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 asLabels
in the DockerConfig
, andcrossplane xpkg push
extracts the annotations from theLabels
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 ofpull
,tag
,push
.How could Crossplane help solve your problem?
It is possible to use
crane pull
to retrieve the package from a registry and thencrossplane 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 thepull
and thepush
into one command, similar to whatskopeo 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 anxpkg install
, so it would just be a matter of separating out thepull
functionality into it's own command.Similarly the
sync
command would be a combination of thepull
andpush
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.
The text was updated successfully, but these errors were encountered: