Commit graph

116 commits

Author SHA1 Message Date
d87db70674
chore(deps): update module github.com/apricote/hcloud-upload-image/hcloudimages to v1.2.0 (#131) 2025-11-06 20:12:50 +00:00
5bbd840ea7
chore(main): release hcloudimages 1.2.0 (#127)
## [1.2.0](https://github.com/apricote/hcloud-upload-image/compare/hcloudimages/v1.1.0...hcloudimages/v1.2.0) (2025-11-06)


### Features

* change minimum required Go version to 1.24
([#130](https://github.com/apricote/hcloud-upload-image/issues/130))
([5eba2d5](5eba2d52fe))
* support zstd compression
([#125](https://github.com/apricote/hcloud-upload-image/issues/125))
([37ebbce](37ebbce517)),
closes
[#122](https://github.com/apricote/hcloud-upload-image/issues/122)
* update default x86 server type to cx23
([#129](https://github.com/apricote/hcloud-upload-image/issues/129))
([a205619](a20561944d))
2025-11-06 21:09:44 +01:00
renovate[bot]
92e0397f7c
chore(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.29.0 (#120) 2025-11-06 21:05:52 +01:00
5eba2d52fe
feat: change minimum required Go version to 1.24 (#130)
Required for some dependency updates (#88, #120)
2025-11-06 21:03:08 +01:00
a20561944d
feat: update default x86 server type to cx23 (#129)
`cx22` is deprecated and will be removed in January 2026.

Changelog:
https://docs.hetzner.cloud/changelog#2025-10-16-server-types-deprecated
2025-11-06 21:02:59 +01:00
renovate[bot]
43d0405d2b
chore(deps): update dependency golangci/golangci-lint to v2.6.1 (#121) 2025-11-06 20:56:59 +01:00
renovate[bot]
27916d2c94
chore(deps): update docker/login-action digest to 28fdb31 (#123) 2025-11-06 20:56:38 +01:00
renovate[bot]
04bfe9bcfa
chore(deps): update dependency go to v1.25.4 (#124) 2025-11-06 20:56:21 +01:00
Leon Schuermann
7537226258
cmd/upload: document "raw" default for --format argument (#126)
When first using the tool, based on the `--help` output I did not
realize that `raw` was a supported format. Then, upon stumbling on a
GitHub issue that documents this format as being able to stream larger
images directly to disk, I found out that specifying `--format raw` does
not work, and leads to a failure relatively late in the image upload
process.

This documents that, when not specifying `--format`, a default format of
`raw` is assumed.
2025-11-06 20:55:39 +01:00
Peter Fern
37ebbce517
feat: support zstd compression (#125)
Closes #122
2025-11-06 20:48:58 +01:00
renovate[bot]
921d688fd4
chore(deps): update docker/login-action digest to 5b7b28b (#119) 2025-09-15 14:48:10 +02:00
renovate[bot]
fbd639ba59
chore(deps): update dependency go to v1.25.1 (#106) 2025-09-13 10:25:46 +02:00
George Gaál
b877383556
docs: update README (#116)
small beautiful changes
2025-09-13 09:31:05 +02:00
renovate[bot]
b5abcc149a
chore(deps): update docker/login-action digest to 65c0768 (#107) 2025-09-13 09:27:43 +02:00
renovate[bot]
892b806470
chore(deps): update actions/setup-go action to v6 (#118) 2025-09-11 19:20:20 +02:00
renovate[bot]
b64a100eff
chore(deps): update actions/checkout action to v5 (#112) 2025-09-11 19:19:47 +02:00
renovate[bot]
4167a5c27b
chore(deps): update module github.com/spf13/cobra to v1.10.1 (#117) 2025-09-11 18:13:52 +02:00
renovate[bot]
3c0dd7bf51
chore(deps): update actions/upload-pages-artifact action to v4 (#113) 2025-09-11 13:31:39 +02:00
renovate[bot]
cbcfd7d007
chore(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.23.0 (#105) 2025-09-11 13:30:13 +02:00
renovate[bot]
b2c2c8e979
chore(deps): update dependency golangci/golangci-lint to v2.4.0 (#108) 2025-09-11 12:21:19 +02:00
renovate[bot]
bcf19efc64
chore(deps): update actions/checkout digest to 08eba0b (#111) 2025-09-11 12:19:42 +02:00
renovate[bot]
8a03eb9e9b
chore(deps): update dependency rust-lang/mdbook to v0.4.52 (#104) 2025-09-11 11:54:06 +02:00
b9af8855d5
chore(main): release 1.1.0 (#99)
## 1.1.0 (2025-05-10)

### Features

* smaller snapshots by zeroing disk first (#101) (fdfb284)

### Bug Fixes

* upload from local image generates broken command (#98) (420dcf9)
2025-05-10 14:27:47 +02:00
6f949a2ba7
chore(deps): update module github.com/apricote/hcloud-upload-image/hcloudimages to v1.1.0 (#102) 2025-05-10 12:27:03 +00:00
03f08da8a3
chore(main): release hcloudimages 1.1.0 (#100)
## 1.1.0 (2025-05-10)

### Features

* smaller snapshots by zeroing disk first (#101) (fdfb284)

### Bug Fixes

* upload from local image generates broken command (#98) (420dcf9)
2025-05-10 14:24:05 +02:00
fdfb284533
feat: smaller snapshots by zeroing disk first (#101)
The base image used requires ~0.42Gi. Even if the uploaded image is
smaller, those bytes are currently not overwritten and still part of the
stored snapshot.

By zeroing the root disk first, those unwanted bytes are removed and not
stored with the snapshot.

This has two benefits:

1. Snapshots are billed by their compressed (shown) size, so small
images are now a bit cheaper.
2. The time it takes to create a server from the snapshot scales with
the snapshot size, so smaller snapshots means the server can start more
quickly.

This reduces the size of an example Talos x86 image from 0.42Gi before,
to 0.2Gi afterwards. An example Flatcar image was 0.47Gi before, and
still has that size with this patch.

There are two ways to zero out the disk:

- `dd if=/dev/zero of=/dev/sda` actually writes zeroes to every block on
the device. This takes around a minute to do.
- `blkdiscard /dev/sda` talks to the disk direclty and instructs it to
discard all blocks. This only takes around 5 seconds.

As both have the same effect on image size, but `blkdiscard` is SO MUCH
faster, I have decided to use it.

Even though only small images benefit from this, this is now enabled by
default as the downside (5 second slower upload) does not justify
additional flags or options to enable/disable this.

Closes #96
2025-05-10 14:21:31 +02:00
420dcf94c9
fix: upload from local image generates broken command (#98)
While adding support for qcow2 images in #69 I broke support for local
images. Building a shell pipeline through string concatenation is not a
good idea...

The specific issue was fixed and I also moved building the shell
pipeline to a separate function and added unit tests for all cases, so
it should be easier to spot these issues in the future.

Closes #97
2025-05-09 21:22:24 +00:00
28bf5380f3
chore(main): release 1.0.1 (#93)
## 1.0.1 (2025-05-09)

### Bug Fixes

* timeout while waiting for SSH to become available (#92) (e490b9a)
2025-05-09 15:24:55 +00:00
4ff1883fd0
chore(deps): update module github.com/apricote/hcloud-upload-image/hcloudimages to v1.0.1 (#95) 2025-05-09 14:29:27 +00:00
7f10f7b253
chore(main): release hcloudimages 1.0.1 (#94)
## 1.0.1 (2025-05-09)

### Bug Fixes

* timeout while waiting for SSH to become available (#92) (e490b9a)
2025-05-09 16:17:27 +02:00
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
renovate[bot]
b093e1eda8
chore(deps): update golangci/golangci-lint-action action to v8 (#86) 2025-05-09 16:03:49 +02:00
renovate[bot]
f12b6b076b
chore(deps): update dependency golangci/golangci-lint to v2.1.6 (#85) 2025-05-09 16:03:33 +02:00
renovate[bot]
7cffed4ba7
chore(deps): update dependency rust-lang/mdbook to v0.4.49 (#87) 2025-05-09 16:03:18 +02:00
renovate[bot]
19f1e085e9
chore(deps): update dependency go to v1.24.3 (#91) 2025-05-09 16:03:07 +02:00
ba421d7dd8
chore(main): release 1.0.0 (#79)
## 1.0.0[0] (2025-05-04)

### Features

* **deps:** require Go 1.23 (#70[1])
* docs website (#80[2])
* publish container image (#82[3])
* upload qcow2 images ([#69[4])

[0] https://github.com/apricote/hcloud-upload-image/compare/v0.3.1...v1.0.0
[1] https://github.com/apricote/hcloud-upload-image/issues/70
[2] https://github.com/apricote/hcloud-upload-image/issues/80
[3] https://github.com/apricote/hcloud-upload-image/issues/82
[4] https://github.com/apricote/hcloud-upload-image/issues/69
2025-05-04 02:40:17 +02:00
f481f20a33
chore(deps): update module github.com/apricote/hcloud-upload-image/hcloudimages to v1.0.0 (#84) 2025-05-04 00:34:02 +00:00
9611d091a8
chore(main): release hcloudimages 1.0.0 (#78)
🤖 I have created a release *beep* *boop*
---


## 1.0.0[0] (2025-05-04)

### Features

* upload qcow2 images (#69[1])

[0] https://github.com/apricote/hcloud-upload-image/compare/hcloudimages/v0.3.1...hcloudimages/v1.0.0
[1] https://github.com/apricote/hcloud-upload-image/issues/69
2025-05-04 02:30:16 +02:00
renovate[bot]
80f8291cac
chore(deps): update docker/login-action digest to 6d4b68b (#83) 2025-05-04 00:24:36 +00:00
91df729f1c
feat: publish container image (#82)
Use `goreleaser` and `ko` to automatically build and publish container
images in the release workflow. The images are published to
`ghcr.io/apricote/hcloud-upload-image`.

Co-authored-by: Ilja Malachowski <malahovskiy.in@gmail.com>
2025-05-04 00:23:20 +00:00
renovate[bot]
02e80b277f
chore(deps): update dependency rust-lang/mdbook to v0.4.48 (#81) 2025-05-04 02:20:30 +02:00
d144b85e3d
feat: docs website (#80)
Deploy the documentation to GitHub Pages using `mdbook` and a little
more content for it. Can be visited at https://apricote.github.io/hcloud-upload-image.
2025-05-04 02:18:47 +02:00
c175ca0352
chore(release): disable version link between lib and cli (#77)
Needed to be able to release lib first.
2025-05-04 00:54:29 +02:00
renovate[bot]
2df6fdd850
chore(deps): update module golang.org/x/crypto to v0.37.0 (#72) 2025-05-04 00:49:36 +02:00
0cff95bab8
chore(release): open separate prs for lib and cli (#75)
The CLI depends on the lib, and to make sure that users who install
through `go install` use the correct version, we need to cut a release
for the lib first, bump in CLI and then release CLI.
2025-05-04 00:49:28 +02:00
e253df6fe9
chore(renovate): make sure to bump dependencies in lib too (#74) 2025-05-03 22:41:42 +00:00
renovate[bot]
4829843c2e
chore(deps): update dependency golangci/golangci-lint to v2 (#66) 2025-05-04 00:40:35 +02:00
renovate[bot]
cef79b943c
chore(config): migrate renovate config (#73) 2025-05-03 22:34:17 +00:00
renovate[bot]
df19de506c
chore(deps): update module golang.org/x/net to v0.38.0 [security] (#63) 2025-05-04 00:31:44 +02:00
renovate[bot]
099ae2d061
chore(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.21.0 (#62) 2025-05-04 00:28:39 +02:00