Skip to content

Commit 3b59c4a

Browse files
committed
release(v0.6.0-alpha.2): prepare release
This is the official v0.6.0-alpha.2 release. Signed-off-by: Noel Georgi <[email protected]>
1 parent 858f7f3 commit 3b59c4a

File tree

2 files changed

+194
-4
lines changed

2 files changed

+194
-4
lines changed

CHANGELOG.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,111 @@
1+
## [terraform-provider-talos 0.6.0-alpha.2](https://github.com/siderolabs/terraform-provider-talos/releases/tag/v0.6.0-alpha.2) (2024-09-02)
2+
3+
Welcome to the v0.6.0-alpha.2 release of terraform-provider-talos!
4+
*This is a pre-release of terraform-provider-talos*
5+
6+
7+
8+
Please try out the release binaries and report any issues at
9+
https://github.com/siderolabs/terraform-provider-talos/issues.
10+
11+
### Image Factory
12+
13+
Support for querying info from Image Factory and registering schematics is now supported via new Terraform resources.
14+
15+
16+
### Talos Cluster Health
17+
18+
`talos_cluster_health` data source now has a way to skip running the Kubernetes components health check by setting `skip_kubernetes_checks` to `true`.
19+
20+
21+
### Talos Cluster Kubeconfig
22+
23+
`talos_cluster_kubeconfig` data source is now deprecated and will be removed in the next minor release.
24+
Use `talos_cluster_kubeconfig` resource instead.
25+
The `talos_cluster_kubeconfig` resource will regenerate kubernetes client config when the time to expiry is less than a month.
26+
27+
28+
### Talos Machine Configuration Data Source
29+
30+
`talos_machine_configuration` data source now defaults to generating config with documentation and examples disabled.
31+
32+
To restore the previous behavior, set `docs` and `examples` attributes to `true`.
33+
34+
35+
### Talos Machine Configuration Apply
36+
37+
`talos_machine_configuration_apply` resource now optionally supports resetting the machine back to maintenance mode.
38+
39+
40+
### Talos Machine Secrets
41+
42+
`talos_machine_secrets` resource now regenerates client config when the time to expiry is less than a month.
43+
44+
45+
### Component Updates
46+
47+
Talos sdk: v1.8.0-alpha.1
48+
49+
50+
### Contributors
51+
52+
* Noel Georgi
53+
* Hippie Hacker
54+
55+
### Changes
56+
<details><summary>16 commits</summary>
57+
<p>
58+
59+
* [`858f7f3`](https://github.com/siderolabs/terraform-provider-talos/commit/858f7f3de9368604b8f18125420d6888606b21be) chore: bump deps
60+
* [`7af49b3`](https://github.com/siderolabs/terraform-provider-talos/commit/7af49b315e4b37b7a165c6ef5d5dc2830dc00a6f) chore: better health checks from talos sdk
61+
* [`063b7ae`](https://github.com/siderolabs/terraform-provider-talos/commit/063b7aeb9dc69782ec7cf541433f7b1eb92e4197) chore: default talos_machine_configuration docs and examples to false
62+
* [`80c5534`](https://github.com/siderolabs/terraform-provider-talos/commit/80c5534fbd876506201f21b50c950ce053402a55) chore: support filtering stable version
63+
* [`b9c7f5f`](https://github.com/siderolabs/terraform-provider-talos/commit/b9c7f5f8aedaca50a4e694e022cae456cd44d065) release(v0.6.0-alpha.1): prepare release
64+
* [`92fcb70`](https://github.com/siderolabs/terraform-provider-talos/commit/92fcb70cd9c1d6cfb5bd3ea159e56fa493fe62db) feat: add `talos_image_factory_url` data source
65+
* [`ffc8102`](https://github.com/siderolabs/terraform-provider-talos/commit/ffc8102dd7f7b0929dc54fa1f50afd9b2cfda6be) feat: add factory support
66+
* [`d6c2a0b`](https://github.com/siderolabs/terraform-provider-talos/commit/d6c2a0bc939de41252d97f09b8e9dfcff3377450) chore: fix goreleaser config
67+
* [`dcdcee6`](https://github.com/siderolabs/terraform-provider-talos/commit/dcdcee62f8d9429cc0416dfdb92dfc27391da0ee) release(v0.6.0-alpha.0): prepare release
68+
* [`d962913`](https://github.com/siderolabs/terraform-provider-talos/commit/d9629133c03ef09d5a6136b0e6cc1624a7ef4c28) chore: reset options for `machine_configuration_apply` resource
69+
* [`f26a591`](https://github.com/siderolabs/terraform-provider-talos/commit/f26a5911bdd243fd384a353de1c0140de256211c) chore: data source -> resource `talos_cluster_kubeconfig`
70+
* [`78fd0d3`](https://github.com/siderolabs/terraform-provider-talos/commit/78fd0d369ff401fbd795609cbbc2275f7d108bb0) chore: ignore version prefix for `talos_version`
71+
* [`11ae330`](https://github.com/siderolabs/terraform-provider-talos/commit/11ae33002bee7a3e319bc7f9ea7555ca3ebaa120) feat: support skipping k8s health checks
72+
* [`0fe1a6f`](https://github.com/siderolabs/terraform-provider-talos/commit/0fe1a6fe8d4440f72d7c553cf961b0de7267404b) docs: update description of `talos_cluster_health`
73+
* [`f6f1811`](https://github.com/siderolabs/terraform-provider-talos/commit/f6f1811e90c9eef91f562f1f8b15f78e984315a0) feat: regenerate talosconfig
74+
* [`501c78e`](https://github.com/siderolabs/terraform-provider-talos/commit/501c78eb7403012c90229bfc24399d0e1603289b) chore: bump deps
75+
</p>
76+
</details>
77+
78+
### Changes since v0.6.0-alpha.1
79+
<details><summary>4 commits</summary>
80+
<p>
81+
82+
* [`858f7f3`](https://github.com/siderolabs/terraform-provider-talos/commit/858f7f3de9368604b8f18125420d6888606b21be) chore: bump deps
83+
* [`7af49b3`](https://github.com/siderolabs/terraform-provider-talos/commit/7af49b315e4b37b7a165c6ef5d5dc2830dc00a6f) chore: better health checks from talos sdk
84+
* [`063b7ae`](https://github.com/siderolabs/terraform-provider-talos/commit/063b7aeb9dc69782ec7cf541433f7b1eb92e4197) chore: default talos_machine_configuration docs and examples to false
85+
* [`80c5534`](https://github.com/siderolabs/terraform-provider-talos/commit/80c5534fbd876506201f21b50c950ce053402a55) chore: support filtering stable version
86+
</p>
87+
</details>
88+
89+
### Dependency Changes
90+
91+
* **github.com/blang/semver/v4** v4.0.0 **_new_**
92+
* **github.com/hashicorp/terraform-plugin-docs** v0.19.0 -> v0.19.4
93+
* **github.com/hashicorp/terraform-plugin-framework** v1.7.0 -> v1.11.0
94+
* **github.com/hashicorp/terraform-plugin-framework-validators** v0.12.0 -> v0.13.0
95+
* **github.com/hashicorp/terraform-plugin-go** v0.22.1 -> v0.23.0
96+
* **github.com/hashicorp/terraform-plugin-log** v0.9.0 **_new_**
97+
* **github.com/hashicorp/terraform-plugin-sdk/v2** v2.33.0 -> v2.34.0
98+
* **github.com/hashicorp/terraform-plugin-testing** v1.7.0 -> v1.10.0
99+
* **github.com/siderolabs/gen** v0.4.8 -> v0.5.0
100+
* **github.com/siderolabs/image-factory** 9687413a9a85 **_new_**
101+
* **github.com/siderolabs/talos** v1.8.0-alpha.2 **_new_**
102+
* **github.com/siderolabs/talos/pkg/machinery** v1.7.0 -> v1.8.0-alpha.2
103+
* **golang.org/x/mod** v0.17.0 -> v0.20.0
104+
* **google.golang.org/grpc** v1.63.2 -> v1.66.0
105+
* **k8s.io/client-go** v0.29.3 -> v0.31.0
106+
107+
Previous release can be found at [v0.5.0](https://github.com/siderolabs/terraform-provider-talos/releases/tag/v0.5.0)
108+
1109
## [terraform-provider-talos 0.6.0-alpha.1](https://github.com/siderolabs/terraform-provider-talos/releases/tag/v0.6.0-alpha.1) (2024-07-18)
2110

3111
Welcome to the v0.6.0-alpha.1 release of terraform-provider-talos!

hack/release.sh

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2022-09-08T16:40:48Z by kres 871f67c-dirty.
5+
# Generated on 2024-08-29T12:20:48Z by kres b5ca957.
66

77
set -e
88

@@ -44,9 +44,92 @@ function commit {
4444
exit 1
4545
fi
4646

47+
if is_on_main_branch; then
48+
update_license_files
49+
fi
50+
4751
git commit -s -m "release($1): prepare release" -m "This is the official $1 release."
4852
}
4953

54+
function is_on_main_branch {
55+
main_remotes=("upstream" "origin")
56+
branch_names=("main" "master")
57+
current_branch=$(git rev-parse --abbrev-ref HEAD)
58+
59+
echo "Check current branch: $current_branch"
60+
61+
for remote in "${main_remotes[@]}"; do
62+
echo "Fetch remote $remote..."
63+
64+
if ! git fetch --quiet "$remote" &>/dev/null; then
65+
echo "Failed to fetch $remote, skip..."
66+
67+
continue
68+
fi
69+
70+
for branch_name in "${branch_names[@]}"; do
71+
if ! git rev-parse --verify "$branch_name" &>/dev/null; then
72+
echo "Branch $branch_name does not exist, skip..."
73+
74+
continue
75+
fi
76+
77+
echo "Branch $remote/$branch_name exists, comparing..."
78+
79+
merge_base=$(git merge-base "$current_branch" "$remote/$branch_name")
80+
latest_main=$(git rev-parse "$remote/$branch_name")
81+
82+
if [ "$merge_base" = "$latest_main" ]; then
83+
echo "Current branch is up-to-date with $remote/$branch_name"
84+
85+
return 0
86+
else
87+
echo "Current branch is not on $remote/$branch_name"
88+
89+
return 1
90+
fi
91+
done
92+
done
93+
94+
echo "No main or master branch found on any remote"
95+
96+
return 1
97+
}
98+
99+
function update_license_files {
100+
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
101+
parent_dir="$(dirname "$script_dir")"
102+
current_year=$(date +"%Y")
103+
change_date=$(date -v+4y +"%Y-%m-%d" 2>/dev/null || date -d "+4 years" +"%Y-%m-%d" 2>/dev/null || date --date="+4 years" +"%Y-%m-%d")
104+
105+
# Find LICENSE and .kres.yaml files recursively in the parent directory (project root)
106+
find "$parent_dir" \( -name "LICENSE" -o -name ".kres.yaml" \) -type f | while read -r file; do
107+
temp_file="${file}.tmp"
108+
109+
if [[ $file == *"LICENSE" ]]; then
110+
if grep -q "^Business Source License" "$file"; then
111+
sed -e "s/The Licensed Work is (c) [0-9]\{4\}/The Licensed Work is (c) $current_year/" \
112+
-e "s/Change Date: [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/Change Date: $change_date/" \
113+
"$file" >"$temp_file"
114+
else
115+
continue # Not a Business Source License file
116+
fi
117+
elif [[ $file == *".kres.yaml" ]]; then
118+
sed -E 's/^([[:space:]]*)ChangeDate:.*$/\1ChangeDate: "'"$change_date"'"/' "$file" >"$temp_file"
119+
fi
120+
121+
# Check if the file has changed
122+
if ! cmp -s "$file" "$temp_file"; then
123+
mv "$temp_file" "$file"
124+
echo "Updated: $file"
125+
git add "$file"
126+
else
127+
echo "No changes: $file"
128+
rm "$temp_file"
129+
fi
130+
done
131+
}
132+
50133
if declare -f "$1" > /dev/null
51134
then
52135
cmd="$1"
@@ -55,12 +138,11 @@ then
55138
else
56139
cat <<EOF
57140
Usage:
58-
commit: Create the official release commit message.
141+
commit: Create the official release commit message (updates BUSL license dates if there is any).
59142
cherry-pick: Cherry-pick a commit into a release branch.
60143
changelog: Update the specified CHANGELOG.
61144
release-notes: Create release notes for GitHub release.
62145
EOF
63146

64147
exit 1
65148
fi
66-

0 commit comments

Comments
 (0)