@@ -310,8 +310,8 @@ func addStoreCopy(rso *flags.StoreRootOpts, ro *flags.CliRootOpts) *cobra.Comman
310310 Use : "copy" ,
311311 Short : "Copy all store content to another location" ,
312312 Example : ` # supported copy target prefixes
313- registry:// | reg:// | oci:// - Pushes the store to an OCI registry
314- directory:// | dir:// - Extracts the store to a directory` ,
313+ registry:// | reg:// | oci:// - Pushes the store to an OCI registry
314+ directory:// | dir:// - Extracts the store to a directory` ,
315315 Args : cobra .ExactArgs (1 ),
316316 RunE : func (cmd * cobra.Command , args []string ) error {
317317 ctx := cmd .Context ()
@@ -354,13 +354,13 @@ func addStoreAddFile(rso *flags.StoreRootOpts, ro *flags.CliRootOpts) *cobra.Com
354354 Use : "file" ,
355355 Short : "Add a file to the store" ,
356356 Example : ` # fetch local file
357- hauler store add file file.txt
357+ hauler store add file file.txt
358358
359- # fetch remote file
360- hauler store add file https://get.rke2.io/install.sh
359+ # fetch remote file
360+ hauler store add file https://get.rke2.io/install.sh
361361
362- # fetch remote file and assign new name
363- hauler store add file https://get.hauler.dev --name hauler-install.sh` ,
362+ # fetch remote file and assign new name
363+ hauler store add file https://get.hauler.dev --name hauler-install.sh` ,
364364 Args : cobra .ExactArgs (1 ),
365365 RunE : func (cmd * cobra.Command , args []string ) error {
366366 ctx := cmd .Context ()
@@ -384,27 +384,27 @@ func addStoreAddImage(rso *flags.StoreRootOpts, ro *flags.CliRootOpts) *cobra.Co
384384 cmd := & cobra.Command {
385385 Use : "image" ,
386386 Short : "Add a image to the store" ,
387- Example : ` # fetch image
388- hauler store add image busybox
387+ Example : ` # fetch image
388+ hauler store add image busybox
389389
390- # fetch image with repository and tag
391- hauler store add image library/busybox:stable
390+ # fetch image with repository and tag
391+ hauler store add image library/busybox:stable
392392
393- # fetch image with full image reference and specific platform
394- hauler store add image ghcr.io/hauler-dev/hauler-debug:v1.2.0 --platform linux/amd64
393+ # fetch image with full image reference and specific platform
394+ hauler store add image ghcr.io/hauler-dev/hauler-debug:v1.2.0 --platform linux/amd64
395395
396- # fetch image with full image reference via digest
397- hauler store add image gcr.io/distroless/base@sha256:7fa7445dfbebae4f4b7ab0e6ef99276e96075ae42584af6286ba080750d6dfe5
396+ # fetch image with full image reference via digest
397+ hauler store add image gcr.io/distroless/base@sha256:7fa7445dfbebae4f4b7ab0e6ef99276e96075ae42584af6286ba080750d6dfe5
398398
399- # fetch image with full image reference, specific platform, and signature verification
400- curl -sfOL https://raw.githubusercontent.com/rancherfederal/carbide-releases/main/carbide-key.pub
401- hauler store add image rgcrprod.azurecr.us/rancher/rke2-runtime:v1.31.5-rke2r1 --platform linux/amd64 --key carbide-key.pub
399+ # fetch image with full image reference, specific platform, and signature verification
400+ curl -sfOL https://raw.githubusercontent.com/rancherfederal/carbide-releases/main/carbide-key.pub
401+ hauler store add image rgcrprod.azurecr.us/rancher/rke2-runtime:v1.31.5-rke2r1 --platform linux/amd64 --key carbide-key.pub
402402
403- # fetch image and rewrite path
404- hauler store add image busybox --rewrite custom-path/busybox:latest
403+ # fetch image and rewrite path
404+ hauler store add image busybox --rewrite custom-path/busybox:latest
405405
406- # add image from local Docker daemon
407- hauler store add image my-local-app:latest --local` ,
406+ # add image from local Docker daemon
407+ hauler store add image my-local-app:latest --local` ,
408408 Args : cobra .ExactArgs (1 ),
409409 PreRunE : func (cmd * cobra.Command , args []string ) error {
410410 // Check for ca-file & insecure-skip-tls-verify env variables
@@ -417,6 +417,12 @@ func addStoreAddImage(rso *flags.StoreRootOpts, ro *flags.CliRootOpts) *cobra.Co
417417 o .InsecureSkipTLSVerify = & b
418418 }
419419 }
420+
421+ // resolve *bool: nil unless the user explicitly passed the flag
422+ if cmd .Flags ().Changed ("insecure-skip-tls-verify" ) {
423+ v , _ := cmd .Flags ().GetBool ("insecure-skip-tls-verify" )
424+ o .InsecureSkipTLSVerify = & v
425+ }
420426 return nil
421427 },
422428 RunE : func (cmd * cobra.Command , args []string ) error {
@@ -441,26 +447,26 @@ func addStoreAddChart(rso *flags.StoreRootOpts, ro *flags.CliRootOpts) *cobra.Co
441447 cmd := & cobra.Command {
442448 Use : "chart" ,
443449 Short : "Add a helm chart to the store" ,
444- Example : ` # fetch local helm chart
445- hauler store add chart path/to/chart/directory --repo .
450+ Example : ` # fetch local helm chart
451+ hauler store add chart path/to/chart/directory --repo .
446452
447- # fetch local compressed helm chart
448- hauler store add chart path/to/chart.tar.gz --repo .
453+ # fetch local compressed helm chart
454+ hauler store add chart path/to/chart.tar.gz --repo .
449455
450- # fetch remote oci helm chart
451- hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev
456+ # fetch remote oci helm chart
457+ hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev
452458
453- # fetch remote oci helm chart with version
454- hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev --version 1.2.0
459+ # fetch remote oci helm chart with version
460+ hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev --version 1.2.0
455461
456- # fetch remote helm chart
457- hauler store add chart rancher --repo https://releases.rancher.com/server-charts/stable
462+ # fetch remote helm chart
463+ hauler store add chart rancher --repo https://releases.rancher.com/server-charts/stable
458464
459- # fetch remote helm chart with specific version
460- hauler store add chart rancher --repo https://releases.rancher.com/server-charts/latest --version 2.10.1
465+ # fetch remote helm chart with specific version
466+ hauler store add chart rancher --repo https://releases.rancher.com/server-charts/latest --version 2.10.1
461467
462- # fetch remote helm chart and rewrite path
463- hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev --rewrite custom-path/hauler-chart:latest` ,
468+ # fetch remote helm chart and rewrite path
469+ hauler store add chart hauler-helm --repo oci://ghcr.io/hauler-dev --rewrite custom-path/hauler-chart:latest` ,
464470 Args : cobra .ExactArgs (1 ),
465471 PreRunE : func (cmd * cobra.Command , args []string ) error {
466472 n , err := flags .ResolveConcurrency (cmd .Flags ().Changed ("concurrency" ), o .Concurrency )
@@ -502,25 +508,25 @@ func addStoreRemove(rso *flags.StoreRootOpts, ro *flags.CliRootOpts) *cobra.Comm
502508 Use : "remove <artifact-ref>" ,
503509 Short : "Remove an artifact from the content store" ,
504510 Example : ` # remove an image using full store reference
505- hauler store info
506- hauler store remove index.docker.io/library/busybox:stable
511+ hauler store info
512+ hauler store remove index.docker.io/library/busybox:stable
507513
508- # remove a chart using full store reference
509- hauler store info
510- hauler store remove hauler/rancher:2.8.4
514+ # remove a chart using full store reference
515+ hauler store info
516+ hauler store remove hauler/rancher:2.8.4
511517
512- # remove a file using full store reference
513- hauler store info
514- hauler store remove hauler/rke2-install.sh
518+ # remove a file using full store reference
519+ hauler store info
520+ hauler store remove hauler/rke2-install.sh
515521
516- # remove any artifact with the latest tag
517- hauler store remove :latest
522+ # remove any artifact with the latest tag
523+ hauler store remove :latest
518524
519- # remove any artifact with 'busybox' in the reference
520- hauler store remove busybox
525+ # remove any artifact with 'busybox' in the reference
526+ hauler store remove busybox
521527
522- # force remove without verification
523- hauler store remove busybox:latest --force` ,
528+ # force remove without verification
529+ hauler store remove busybox:latest --force` ,
524530 Args : cobra .ExactArgs (1 ),
525531 RunE : func (cmd * cobra.Command , args []string ) error {
526532 ctx := cmd .Context ()
0 commit comments