-
Notifications
You must be signed in to change notification settings - Fork 31
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
wip: add images from helm chart template #380
base: main
Are you sure you want to change the base?
Conversation
hey @wcrum... I do like the idea of being able to include images referenced in Additionally, a lot of Maybe more reliable results would come from zackbradys@Zacks-MacBook-Pro hauler % ./dist/hauler_darwin_arm64_v8.0/hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev --add-ima
ges
2024-12-13 23:03:57 INF adding 'chart' [hauler-helm] to the store
Pulled: ghcr.io/hauler-dev/hauler-helm:1.1.1
Digest: sha256:3957fc2bf560f2ccd64e38b59651b097dddb38863124745df264053cae1b807a
2024-12-13 23:03:58 INF successfully added 'chart' [hauler/hauler-helm:1.1.1]
2024-12-13 23:03:58 INF adding 'image' [hauler/hauler-debug:1.1.1] to the store
2024-12-13 23:04:04 INF successfully added 'image' [index.docker.io/hauler/hauler-debug:1.1.1]
2024-12-13 23:04:04 INF adding 'image' [hauler/hauler:1.1.1] to the store
2024-12-13 23:04:09 INF successfully added 'image' [index.docker.io/hauler/hauler:1.1.1]
2024-12-13 23:04:09 INF adding 'image' [rancher/kubectl:v1.31.3] to the store
2024-12-13 23:04:12 INF successfully added 'image' [index.docker.io/rancher/kubectl:v1.31.3]
zackbradys@Zacks-MacBook-Pro hauler % ./dist/hauler_darwin_arm64_v8.0/hauler store info
+-------------------------------------------+-------+-----------------+----------+----------+
| REFERENCE | TYPE | PLATFORM | # LAYERS | SIZE |
+-------------------------------------------+-------+-----------------+----------+----------+
| hauler/hauler-helm:1.1.1 | chart | - | 1 | 3.8 kB |
| index.docker.io/hauler/hauler-debug:1.1.1 | image | linux/amd64 | 8 | 73.0 MB |
| | image | linux/arm64 | 8 | 68.7 MB |
| index.docker.io/hauler/hauler:1.1.1 | image | linux/amd64 | 9 | 67.1 MB |
| | image | linux/arm64 | 9 | 62.4 MB |
| index.docker.io/rancher/kubectl:v1.31.3 | image | linux/amd64 | 3 | 17.2 MB |
| | image | linux/arm64 | 3 | 15.7 MB |
| | image | unknown/unknown | 1 | 8.4 kB |
| | image | unknown/unknown | 1 | 8.4 kB |
+-------------------------------------------+-------+-----------------+----------+----------+
| TOTAL | 304.0 MB |
+-------------------------------------------+-------+-----------------+----------+----------+
zackbradys@Zacks-MacBook-Pro hauler % ./dist/hauler_darwin_arm64_v8.0/hauler store add chart rancher --repo https://releases.rancher.com/server-charts/stable --add-images
2024-12-13 23:07:23 INF adding 'chart' [rancher] to the store
2024-12-13 23:07:25 INF successfully added 'chart' [hauler/rancher:2.10.0]
2024-12-13 23:07:25 INF adding 'image' ["rancher/shell:v0.3.0"] to the store
2024-12-13 23:07:25 ERR unable to parse 'image' ["rancher/shell:v0.3.0"]: could not parse reference: "rancher/shell:v0.3.0"
zackbradys@Zacks-MacBook-Pro hauler % ./dist/hauler_darwin_arm64_v8.0/hauler store add chart vault --repo https://helm.releases.hashicorp.com --add-images
2024-12-13 23:20:31 INF adding 'chart' [vault] to the store
2024-12-13 23:20:32 INF successfully added 'chart' [hauler/vault:0.29.1]
Error: template: vault/templates/server-statefulset.yaml:27:14: executing "vault/templates/server-statefulset.yaml" at <semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version>: error calling semverCompare: Invalid Semantic Version
Usage:
hauler store add chart [flags]
Examples:
# fetch local helm chart
hauler store add chart path/to/chart/directory --repo .
# fetch local compressed helm chart
hauler store add chart path/to/chart.tar.gz --repo .
# fetch remote oci helm chart
hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev
# fetch remote oci helm chart with version
hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev --version 1.0.6
# fetch remote helm chart
hauler store add chart rancher --repo https://releases.rancher.com/server-charts/stable
# fetch remote helm chart with specific version
hauler store add chart rancher --repo https://releases.rancher.com/server-charts/latest --version 2.9.1
Flags:
--add-images (Optional) Add images referenced in helm template
--ca-file string (Optional) Location of CA Bundle to enable certification verification
--cert-file string (Optional) Location of the TLS Certificate to use for client authenication
-h, --help help for chart
--insecure-skip-tls-verify (Optional) Skip TLS certificate verification
--key-file string (Optional) Location of the TLS Key to use for client authenication
--password string (Optional) Password to use for authentication
--repo string Location of the chart (https:// | http:// | oci://)
--username string (Optional) Username to use for authentication
--verify (Optional) Verify the chart before fetching it
--version string (Optional) Specifiy the version of the chart (v1.0.0 | 2.0.0 | ^2.0.0)
Global Flags:
-d, --haulerdir string Set the location of the hauler directory (default $HOME/.hauler)
--ignore-errors Ignore/Bypass errors (i.e. warn on error) (defaults false)
-l, --log-level string Set the logging level (i.e. info, debug, warn) (default "info")
-r, --retries int Set the number of retries for operations (default 3)
-s, --store string Set the directory to use for the content store
2024-12-13 23:20:32 ERR template: vault/templates/server-statefulset.yaml:27:14: executing "vault/templates/server-statefulset.yaml" at <semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version>: error calling semverCompare: Invalid Semantic Version
zackbradys@Zacks-MacBook-Pro hauler % ./dist/hauler_darwin_arm64_v8.0/hauler store add chart gitea --repo https://dl.gitea.com/charts --add-images
2024-12-13 23:22:24 INF adding 'chart' [gitea] to the store
2024-12-13 23:22:25 INF successfully added 'chart' [hauler/gitea:10.6.0]
Error: template: gitea/charts/redis/templates/master/service.yaml:23:10: executing "gitea/charts/redis/templates/master/service.yaml" at <semverCompare ">=1.22-0" (include "common.capabilities.kubeVersion" .)>: error calling semverCompare: Invalid Semantic Version
Usage:
hauler store add chart [flags]
Examples:
# fetch local helm chart
hauler store add chart path/to/chart/directory --repo .
# fetch local compressed helm chart
hauler store add chart path/to/chart.tar.gz --repo .
# fetch remote oci helm chart
hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev
# fetch remote oci helm chart with version
hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev --version 1.0.6
# fetch remote helm chart
hauler store add chart rancher --repo https://releases.rancher.com/server-charts/stable
# fetch remote helm chart with specific version
hauler store add chart rancher --repo https://releases.rancher.com/server-charts/latest --version 2.9.1
Flags:
--add-images (Optional) Add images referenced in helm template
--ca-file string (Optional) Location of CA Bundle to enable certification verification
--cert-file string (Optional) Location of the TLS Certificate to use for client authenication
-h, --help help for chart
--insecure-skip-tls-verify (Optional) Skip TLS certificate verification
--key-file string (Optional) Location of the TLS Key to use for client authenication
--password string (Optional) Password to use for authentication
--repo string Location of the chart (https:// | http:// | oci://)
--username string (Optional) Username to use for authentication
--verify (Optional) Verify the chart before fetching it
--version string (Optional) Specifiy the version of the chart (v1.0.0 | 2.0.0 | ^2.0.0)
Global Flags:
-d, --haulerdir string Set the location of the hauler directory (default $HOME/.hauler)
--ignore-errors Ignore/Bypass errors (i.e. warn on error) (defaults false)
-l, --log-level string Set the logging level (i.e. info, debug, warn) (default "info")
-r, --retries int Set the number of retries for operations (default 3)
-s, --store string Set the directory to use for the content store
2024-12-13 23:22:25 ERR template: gitea/charts/redis/templates/master/service.yaml:23:10: executing "gitea/charts/redis/templates/master/service.yaml" at <semverCompare ">=1.22-0" (include "common.capabilities.kubeVersion" .)>: error calling semverCompare: Invalid Semantic Version |
Hey @zackbradys - I am pretty easily able to fix all of these things. 9e0a56b fixes an issue with my strip image logic, just forgot to remove / replace double quotes. b6faa3c somewhat resolves the issue seen within your shared logs. When using the helm function What would you think is the best way forward on this? |
🐛 @zackbradys there is a bug around the search for
|
Please check below, if the PR fulfills these requirements:
Associated Links:
Types of Changes:
Proposed Changes:
Verification/Testing of Changes:
--add-images
flag tohauler store add chart [chart]
-f/--values
to allow hauler user to pass values into template. Similar to helm.Additional Context: