ChristofferNissen / helmper

Import Helm Charts to OCI registries, optionally with vulnerability patching
https://christoffernissen.github.io/helmper/
Apache License 2.0
122 stars 2 forks source link

Feature request: consider sub commands like export, import, and copy #34

Open brightzheng100 opened 1 month ago

brightzheng100 commented 1 month ago

I was looking for a tool that could help me easily analyze, export all artifacts from a helm, together with all images used, and then import to a desired (private) registry. This is a very common use case when we work with airgapped env.

Unfortunately, I couldn't find one that could best fit into such simple use case. So I built an incomplete tool for fun: https://github.com/brightzheng100/helm-packager, which is a toy tool and is far away from complete.

I think your tool is a good starting point and I'd suggest to have sub commands, instead of a giant command with configuration file.

For example:

# 1. To export the Helm Charts and their sub Charts to be a local gz file
helmper export [-c <config file>] [-f <exported gz file>] [--dry-run]

# 2. To import the exported gz file to a registry
helmper import [-c <config file>] [-f <exported gz file>] [--dry-run]

# 3. Copy the Helm Charts and their sub Charts to the desired registry -- this is what current helmper does
# But with the --dry-run flag, we can analyze the Helm Charts and their sub Charts without coping the actual artifacts 
helmper copy [-c <config file>] [--dry-run]
ChristofferNissen commented 1 month ago

If you specify

import:
  enabled: false

Helmper will do a dry-run.

The import and export was on my hidden list, so thanks for adding an issue tracking it 👍