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

(feat): Add tar.gz support #355

Open
secat opened this issue Dec 5, 2022 · 0 comments
Open

(feat): Add tar.gz support #355

secat opened this issue Dec 5, 2022 · 0 comments

Comments

@secat
Copy link

secat commented Dec 5, 2022

Summary

It would be great to have a tar and gzip functions in order archive and compress string content to a tar.gz binary. This would mostly be useful to embed string content that is over the Kubernetes ConfigMap size limit of 1MBytes.

Proposal

The tar function would take as input a map[string][]byte where the key represents a file name and the value represents the file content.

The gzip function would take an array of bytes as input.

Usage Example

It could be used as follow in a Helm chart template:

my_compressed_files.tar.gz: |
  {{ .Files.Glob("foo/**") | tar | gzip }}

NOTE: The go standard library already provides a "archive/tar" package and a "compress/gzip" package.

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

No branches or pull requests

1 participant