Skip to content

Commit

Permalink
release(v0.6.0-alpha.2): prepare release
Browse files Browse the repository at this point in the history
This is the official v0.6.0-alpha.2 release.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Sep 2, 2024
1 parent 858f7f3 commit 3b59c4a
Show file tree
Hide file tree
Showing 2 changed files with 194 additions and 4 deletions.
108 changes: 108 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,111 @@
## [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)

Welcome to the v0.6.0-alpha.2 release of terraform-provider-talos!
*This is a pre-release of terraform-provider-talos*



Please try out the release binaries and report any issues at
https://github.com/siderolabs/terraform-provider-talos/issues.

### Image Factory

Support for querying info from Image Factory and registering schematics is now supported via new Terraform resources.


### Talos Cluster Health

`talos_cluster_health` data source now has a way to skip running the Kubernetes components health check by setting `skip_kubernetes_checks` to `true`.


### Talos Cluster Kubeconfig

`talos_cluster_kubeconfig` data source is now deprecated and will be removed in the next minor release.
Use `talos_cluster_kubeconfig` resource instead.
The `talos_cluster_kubeconfig` resource will regenerate kubernetes client config when the time to expiry is less than a month.


### Talos Machine Configuration Data Source

`talos_machine_configuration` data source now defaults to generating config with documentation and examples disabled.

To restore the previous behavior, set `docs` and `examples` attributes to `true`.


### Talos Machine Configuration Apply

`talos_machine_configuration_apply` resource now optionally supports resetting the machine back to maintenance mode.


### Talos Machine Secrets

`talos_machine_secrets` resource now regenerates client config when the time to expiry is less than a month.


### Component Updates

Talos sdk: v1.8.0-alpha.1


### Contributors

* Noel Georgi
* Hippie Hacker

### Changes
<details><summary>16 commits</summary>
<p>

* [`858f7f3`](https://github.com/siderolabs/terraform-provider-talos/commit/858f7f3de9368604b8f18125420d6888606b21be) chore: bump deps
* [`7af49b3`](https://github.com/siderolabs/terraform-provider-talos/commit/7af49b315e4b37b7a165c6ef5d5dc2830dc00a6f) chore: better health checks from talos sdk
* [`063b7ae`](https://github.com/siderolabs/terraform-provider-talos/commit/063b7aeb9dc69782ec7cf541433f7b1eb92e4197) chore: default talos_machine_configuration docs and examples to false
* [`80c5534`](https://github.com/siderolabs/terraform-provider-talos/commit/80c5534fbd876506201f21b50c950ce053402a55) chore: support filtering stable version
* [`b9c7f5f`](https://github.com/siderolabs/terraform-provider-talos/commit/b9c7f5f8aedaca50a4e694e022cae456cd44d065) release(v0.6.0-alpha.1): prepare release
* [`92fcb70`](https://github.com/siderolabs/terraform-provider-talos/commit/92fcb70cd9c1d6cfb5bd3ea159e56fa493fe62db) feat: add `talos_image_factory_url` data source
* [`ffc8102`](https://github.com/siderolabs/terraform-provider-talos/commit/ffc8102dd7f7b0929dc54fa1f50afd9b2cfda6be) feat: add factory support
* [`d6c2a0b`](https://github.com/siderolabs/terraform-provider-talos/commit/d6c2a0bc939de41252d97f09b8e9dfcff3377450) chore: fix goreleaser config
* [`dcdcee6`](https://github.com/siderolabs/terraform-provider-talos/commit/dcdcee62f8d9429cc0416dfdb92dfc27391da0ee) release(v0.6.0-alpha.0): prepare release
* [`d962913`](https://github.com/siderolabs/terraform-provider-talos/commit/d9629133c03ef09d5a6136b0e6cc1624a7ef4c28) chore: reset options for `machine_configuration_apply` resource
* [`f26a591`](https://github.com/siderolabs/terraform-provider-talos/commit/f26a5911bdd243fd384a353de1c0140de256211c) chore: data source -> resource `talos_cluster_kubeconfig`
* [`78fd0d3`](https://github.com/siderolabs/terraform-provider-talos/commit/78fd0d369ff401fbd795609cbbc2275f7d108bb0) chore: ignore version prefix for `talos_version`
* [`11ae330`](https://github.com/siderolabs/terraform-provider-talos/commit/11ae33002bee7a3e319bc7f9ea7555ca3ebaa120) feat: support skipping k8s health checks
* [`0fe1a6f`](https://github.com/siderolabs/terraform-provider-talos/commit/0fe1a6fe8d4440f72d7c553cf961b0de7267404b) docs: update description of `talos_cluster_health`
* [`f6f1811`](https://github.com/siderolabs/terraform-provider-talos/commit/f6f1811e90c9eef91f562f1f8b15f78e984315a0) feat: regenerate talosconfig
* [`501c78e`](https://github.com/siderolabs/terraform-provider-talos/commit/501c78eb7403012c90229bfc24399d0e1603289b) chore: bump deps
</p>
</details>

### Changes since v0.6.0-alpha.1
<details><summary>4 commits</summary>
<p>

* [`858f7f3`](https://github.com/siderolabs/terraform-provider-talos/commit/858f7f3de9368604b8f18125420d6888606b21be) chore: bump deps
* [`7af49b3`](https://github.com/siderolabs/terraform-provider-talos/commit/7af49b315e4b37b7a165c6ef5d5dc2830dc00a6f) chore: better health checks from talos sdk
* [`063b7ae`](https://github.com/siderolabs/terraform-provider-talos/commit/063b7aeb9dc69782ec7cf541433f7b1eb92e4197) chore: default talos_machine_configuration docs and examples to false
* [`80c5534`](https://github.com/siderolabs/terraform-provider-talos/commit/80c5534fbd876506201f21b50c950ce053402a55) chore: support filtering stable version
</p>
</details>

### Dependency Changes

* **github.com/blang/semver/v4** v4.0.0 **_new_**
* **github.com/hashicorp/terraform-plugin-docs** v0.19.0 -> v0.19.4
* **github.com/hashicorp/terraform-plugin-framework** v1.7.0 -> v1.11.0
* **github.com/hashicorp/terraform-plugin-framework-validators** v0.12.0 -> v0.13.0
* **github.com/hashicorp/terraform-plugin-go** v0.22.1 -> v0.23.0
* **github.com/hashicorp/terraform-plugin-log** v0.9.0 **_new_**
* **github.com/hashicorp/terraform-plugin-sdk/v2** v2.33.0 -> v2.34.0
* **github.com/hashicorp/terraform-plugin-testing** v1.7.0 -> v1.10.0
* **github.com/siderolabs/gen** v0.4.8 -> v0.5.0
* **github.com/siderolabs/image-factory** 9687413a9a85 **_new_**
* **github.com/siderolabs/talos** v1.8.0-alpha.2 **_new_**
* **github.com/siderolabs/talos/pkg/machinery** v1.7.0 -> v1.8.0-alpha.2
* **golang.org/x/mod** v0.17.0 -> v0.20.0
* **google.golang.org/grpc** v1.63.2 -> v1.66.0
* **k8s.io/client-go** v0.29.3 -> v0.31.0

Previous release can be found at [v0.5.0](https://github.com/siderolabs/terraform-provider-talos/releases/tag/v0.5.0)

## [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)

Welcome to the v0.6.0-alpha.1 release of terraform-provider-talos!
Expand Down
90 changes: 86 additions & 4 deletions hack/release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash

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

set -e

Expand Down Expand Up @@ -44,9 +44,92 @@ function commit {
exit 1
fi

if is_on_main_branch; then
update_license_files
fi

git commit -s -m "release($1): prepare release" -m "This is the official $1 release."
}

function is_on_main_branch {
main_remotes=("upstream" "origin")
branch_names=("main" "master")
current_branch=$(git rev-parse --abbrev-ref HEAD)

echo "Check current branch: $current_branch"

for remote in "${main_remotes[@]}"; do
echo "Fetch remote $remote..."

if ! git fetch --quiet "$remote" &>/dev/null; then
echo "Failed to fetch $remote, skip..."

continue
fi

for branch_name in "${branch_names[@]}"; do
if ! git rev-parse --verify "$branch_name" &>/dev/null; then
echo "Branch $branch_name does not exist, skip..."

continue
fi

echo "Branch $remote/$branch_name exists, comparing..."

merge_base=$(git merge-base "$current_branch" "$remote/$branch_name")
latest_main=$(git rev-parse "$remote/$branch_name")

if [ "$merge_base" = "$latest_main" ]; then
echo "Current branch is up-to-date with $remote/$branch_name"

return 0
else
echo "Current branch is not on $remote/$branch_name"

return 1
fi
done
done

echo "No main or master branch found on any remote"

return 1
}

function update_license_files {
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
parent_dir="$(dirname "$script_dir")"
current_year=$(date +"%Y")
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")

# Find LICENSE and .kres.yaml files recursively in the parent directory (project root)
find "$parent_dir" \( -name "LICENSE" -o -name ".kres.yaml" \) -type f | while read -r file; do
temp_file="${file}.tmp"

if [[ $file == *"LICENSE" ]]; then
if grep -q "^Business Source License" "$file"; then
sed -e "s/The Licensed Work is (c) [0-9]\{4\}/The Licensed Work is (c) $current_year/" \
-e "s/Change Date: [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/Change Date: $change_date/" \
"$file" >"$temp_file"
else
continue # Not a Business Source License file
fi
elif [[ $file == *".kres.yaml" ]]; then
sed -E 's/^([[:space:]]*)ChangeDate:.*$/\1ChangeDate: "'"$change_date"'"/' "$file" >"$temp_file"
fi

# Check if the file has changed
if ! cmp -s "$file" "$temp_file"; then
mv "$temp_file" "$file"
echo "Updated: $file"
git add "$file"
else
echo "No changes: $file"
rm "$temp_file"
fi
done
}

if declare -f "$1" > /dev/null
then
cmd="$1"
Expand All @@ -55,12 +138,11 @@ then
else
cat <<EOF
Usage:
commit: Create the official release commit message.
commit: Create the official release commit message (updates BUSL license dates if there is any).
cherry-pick: Cherry-pick a commit into a release branch.
changelog: Update the specified CHANGELOG.
release-notes: Create release notes for GitHub release.
EOF

exit 1
fi

0 comments on commit 3b59c4a

Please sign in to comment.