Skip to content

[deckhouse-cli] Add file flag to upload packages instead of dir specify#389

Open
haosb wants to merge 2 commits into
mainfrom
feat/tar-pusher
Open

[deckhouse-cli] Add file flag to upload packages instead of dir specify#389
haosb wants to merge 2 commits into
mainfrom
feat/tar-pusher

Conversation

@haosb

@haosb haosb commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Delete unused tasks from Taskfile.
  • Add new flag --file to specifiy platform/modules tar archives in case to simply push one archive instead of pointing to whole dir.
  • bundle dir is now optional if --file flag is specified.

Manual checks and how feature look like

  1. Bundle dir is not specified, two files are passed:
➜ deckhouse-cli (feat/tar-pusher) ✗ ./bin/d8 mirror push harbor.192.168.1.100.nip.io/dkp/ee --insecure -u admin -p ****** --file d8-trivy.tar/installer.tar --file d8-trivy.tar/security.tar
Jun 23 15:53:11.551 INFO   d8 version: local-dev
Jun 23 15:53:11.551 INFO   Validating registry access
Jun 23 15:53:12.146 INFO   Found 2 packages to unpack
Jun 23 15:53:12.147 INFO  ╔ Unpack installer
Jun 23 15:53:12.301 INFO  ╚ Unpack installer succeeded in 154.677ms
Jun 23 15:53:12.301 INFO  ╔ Unpack security
Jun 23 15:53:13.052 INFO  ╚ Unpack security succeeded in 750.730333ms
Jun 23 15:53:13.052 INFO  ╔ Push to registry
Jun 23 15:53:13.052 INFO  ║ Found 9 layouts to push
Jun 23 15:53:13.053 INFO  ║ Pushing harbor.192.168.1.100.nip.io/dkp/ee/installer
Jun 23 15:53:13.053 INFO  ║ Pushing 1 images
Jun 23 15:53:13.053 INFO  ║ [1 / 1] Pushing harbor.192.168.1.100.nip.io/dkp/ee/installer:latest
Jun 23 15:53:19.632 INFO  ║ Pushing harbor.192.168.1.100.nip.io/dkp/ee/security/trivy-bdu
Jun 23 15:53:19.633 INFO  ║ Pushing 1 images
Jun 23 15:53:19.633 INFO  ║ [1 /154.677ms / 1] Pushing harbor.192.168.1.100.nip.io/dkp/ee/security/trivy-bdu:1
Jun 23 15:53:20.059 INFO  ║ Pushing harbor.192.168.1.100.nip.io/dkp/ee/security/trivy-checks
Jun 23 15:53:20.060 INFO  ║ Pushing 1 images
Jun 23 15:53:20.060 INFO  ║ [1 / 1] Pushing harbor.192.168.1.100.nip.io/dkp/ee/security/trivy-checks:0
Jun 23 15:53:20.518 INFO  ║ Pushing harbor.192.168.1.100.nip.io/dkp/ee/security/trivy-db
Jun 23 15:53:20.518 INFO  ║ Pushing 1 images
Jun 23 15:53:20.518 INFO  ║ [1 / 1] Pushing harbor.192.168.1.100.nip.io/dkp/ee/security/trivy-db:2
  1. Both dir and --file are specified:
➜ deckhouse-cli (feat/tar-pusher) ✗ ./bin/d8 mirror push ~/d81.tar/platform.tar harbor.192.168.1.100.nip.io/dkp/ee --insecure -u admin -p ****** --file d8-trivy.tar/installer.tar         
Jun 23 15:54:35.630 INFO   d8 version: local-dev
Jun 23 15:54:35.630 INFO   Validating registry access
Jun 23 15:54:36.194 INFO   Found 2 packages to unpack
Jun 23 15:54:36.194 INFO  ╔ Unpack platform
  1. Output if --file and bundle dir are not specified:
➜ deckhouse-cli (feat/tar-pusher) ✗ ./bin/d8 mirror push dkp.ru --insecure -u admin -p ******                                  
Error executing command: repository part must be between 2 and 255 characters in length. Please specify registry repo path correctly

➜ deckhouse-cli (feat/tar-pusher) ✗ ./bin/d8 mirror push dkp.ru/dkp --insecure -u admin -p ******
Error executing command: no packages to push: specify a bundle directory before registry URL, or use --file to specify tar/chunked package

++
Signed-off-by: Ruslan Usmanov <ruslanusmanov@Ruslans-MacBook-Pro-2.local>
@haosb haosb requested a review from ldmonster as a code owner June 23, 2026 13:18
++
Signed-off-by: Ruslan Usmanov <ruslanusmanov@Ruslans-MacBook-Pro-2.local>
@haosb haosb changed the title Add file flag to upload packages instead of dir specify [deckhouse-cli] Add file flag to upload packages instead of dir specify Jun 23, 2026
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

Successfully merging this pull request may close these issues.

1 participant