Commit graph

16 commits

Author SHA1 Message Date
e490b9a7f3
fix: timeout while waiting for SSH to become available (#92)
In #68 I reduced the general limits for the back off, thinking that it
would speed up the upload on average because it was retrying faster. But
because it was retrying faster, the 10 available retries were used up
before SSH became available.

The new 100 retries match the 3 minutes of total timeout that the
previous solution had, and should fix all issues.

In addition, I discovered that my implementation in
`hcloudimages/backoff.ExponentialBackoffWithLimit` has a bug where the
calculated offset could overflow before the limit was applied, resulting
in negative durations. I did not fix the issue because `hcloud-go`
provides such a method natively nowadays. Instead, I marked the method
as deprecated, to be removed in a later release.
2025-05-09 16:15:07 +02:00
ac3e9dd7ec
feat: upload qcow2 images (#69)
It is now possible to upload qcow2 images. These images will be
converted to raw disk images on the cloud server.

In the CLI you can use the new `--format=qcow2` flag to upload qcow2
images. In the library you can set `UploadOptions.ImageFormat` to
`FormatQCOW2`.

Because of the underlying process, qcow2 images need to be written to a
file first. This limits their size to 960 MB at the moment. The CLI
automatically checks the file size (if possible) and shows a warning if
this limit would be triggered. The library accepts an input with the
file size and logs a warning if the limit would be triggered.

Closes #44
2025-05-04 00:28:11 +02:00
renovate[bot]
489ece1798
chore(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.15.0 (#41) 2024-11-02 22:10:18 +01:00
4e24d83c7a
docs: add generated CLI help output to repo (#46)
Generate the help pages using `cobras` builtin functionality and commit
them to the repository. This gives users to ability to review the
options of `hcloud-upload-image` without having to install it first.
2024-11-02 21:57:53 +01:00
42eeb00a07
feat: set server type explicitly (#36)
- **CLI**: New flag `--server-type` that overrides the `--architecture`
flag and allows users to specify the server type they want
- **Lib**: New field in `UploadOptions`: `ServerType *hcloud.ServerType`
that overrides the `Architecture` field and allows users to specify the
server type they want

Closes #30
2024-06-23 16:21:14 +02:00
bb2ca48200
fix(cli): completion requires HCLOUD_TOKEN (#19)
The current setup of the CLI requires the user to set HCLOUD_TOKEN for
every single invocation of the binary. Even if we just want to
autocomplete some arguments or even generate the completion scripts in
CI.

This fixes the bug by only initializing the hcloud-go client in the
"cleanup" and "upload" subcommands.
2024-05-10 18:06:38 +02:00
1c943e4480
feat: upload xz compressed images (#16)
Required for Talos images:
https://www.talos.dev/v1.7/talos-guides/install/cloud-platforms/hetzner/#rescue-mode
2024-05-09 19:15:54 +02:00
fcea3e3c6e
feat: upload local disk images (#15)
The new options/flag enables users to use a local file as the image,
instead of a publicly available file from a web server.
2024-05-09 16:16:37 +00:00
b17857c1fe
fix: update user-agent in CLI (#5) 2024-05-05 01:10:06 +02:00
847b696c74 feat(cli): docs grouping and version 2024-05-05 00:05:09 +02:00
9e654521ae feat(cli): hide redundant log attributes 2024-05-04 23:45:58 +02:00
c9ab40b539 feat: documentation and cleanup command 2024-05-04 22:13:33 +02:00
d0729e1cb5 chore: cleanup before publishing 2024-05-02 22:12:29 +02:00
4b77b81689 refactor: change package names 2024-05-02 21:42:36 +02:00
62578ad5c5 refactor: yeet util/ subdirs 2024-05-02 21:18:20 +02:00
b6ae95f55b feat(cli): upload command 2024-05-02 20:19:25 +02:00