kptdev / kpt

Automate Kubernetes Configuration Editing
https://kpt.dev
Apache License 2.0
1.68k stars 226 forks source link

Pull and push package commands #2557

Open bgrant0607 opened 2 years ago

bgrant0607 commented 2 years ago

Once kpt supports multiple storage types, it would be useful to abstract it more.

Pkg get changes upstream info. I just want to get the bits without using git or other storage command. Read-only use cases like GitOps could use this.

Push is harder, but even more useful because the git mechanics are pretty complicated, and OCI will be different. We will need to prototype a couple options for deciding on the recommended approach.

Cc @justinsb

droot commented 2 years ago

push seems to have an overlap with kpt pkg publish command we have thought about in the past.

Pkg get changes upstream info. I just want to get the bits without using git or other storage command.

Can you tell more about the use-cases here (especially not updating the bits in the kpt metadata) ? In the git-ops case, if one wants ignore kptfile, then having storage metadata doesn't hurt much.

bgrant0607 commented 2 years ago

I don't want to ignore the Kptfile. I want to preserve the Kptfile as is.

The GitOps use case is basically: while true ; do kpt pkg pull package/version && kpt live apply ; done

My other use cases are for changing the package itself:

bgrant0607 commented 2 years ago

imgpkg has an interesting push/pull model. https://github.com/vmware-tanzu/carvel-imgpkg https://carvel.dev/imgpkg/

bgrant0607 commented 2 years ago

Interestingly, adding support for more storage backends, including OCI, is what motivated helm to add push: https://github.com/helm/community/blob/main/hips/hip-0006.md