-
Notifications
You must be signed in to change notification settings - Fork 119
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 archive utils with compression options #870
Conversation
Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
Thanks for making a pull request! 😃 |
Codecov ReportBase: 18.11% // Head: 18.40% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #870 +/- ##
==========================================
+ Coverage 18.11% 18.40% +0.29%
==========================================
Files 46 46
Lines 3731 3672 -59
==========================================
Hits 676 676
+ Misses 2890 2831 -59
Partials 165 165
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reuse
move2kube/environment/container/utils.go
Line 106 in 6784a98
func writeDirToTar(w *io.PipeWriter, srcDir, basePath string) error { |
Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. Some nit.
@@ -169,6 +169,7 @@ func writeTemplateToFile(tpl string, config interface{}, writepath string, | |||
"execTemplate": execTemplate(packageTemplate), | |||
"encAesCbcPbkdf": common.EncryptAesCbcWithPbkdfWrapper, | |||
"encRsaCert": common.EncryptRsaCertWrapper, | |||
"archTarGZipStr": common.CreateTarArchiveGZipStringWrapper, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to expose just tar too.
common/constants.go
Outdated
// GZipCompressionType allows archival using gzip compression format | ||
GZipCompressionType CompressionType = "GZip" | ||
// DefaultCompressionType allows archival without compression | ||
DefaultCompressionType CompressionType = "Default" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default is no compression, isn't it? I assume Tar is not a compression format. So can we possibly call it as NoCompression
= None
?
Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
Signed-off-by: Mehant Kammakomati kmehant@gmail.com