Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump kind to 0.22.0 / kubectl and general housekeeping #107

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
groups:
actions:
update-types:
- "minor"
- "patch"
21 changes: 19 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,23 @@ jobs:
run: |
[[ $(kind get clusters | wc -l) -eq 0 ]]

test-with-custom-kind-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Create kind cluster with custom name
uses: ./
with:
version: "v0.21.0"

- name: Test
run: |
kind version
kubectl cluster-info
kubectl get nodes

test-with-custom-kubectl-version:
runs-on: ubuntu-latest
steps:
Expand All @@ -78,7 +95,7 @@ jobs:
- name: Create kind cluster with custom name
uses: ./
with:
kubectl_version: "v1.27.1"
kubectl_version: "v1.29.3"

- name: Test
run: |
Expand Down Expand Up @@ -110,7 +127,7 @@ jobs:
- name: Create kind cluster with custom name
uses: ./
with:
kubectl_version: "v1.24.6"
kubectl_version: "v1.29.3"
ignore_failed_clean: true

- name: Test
Expand Down
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ branding:
icon: box
inputs:
version:
description: "The kind version to use (default: v0.21.0)"
description: "The kind version to use (default: v0.22.0)"
required: false
default: "v0.21.0"
default: "v0.22.0"
config:
description: "The path to the kind config file"
required: false
Expand All @@ -28,15 +28,15 @@ inputs:
default: "0"
required: false
kubectl_version:
description: "The kubectl version to use (default: v1.28.6)"
description: "The kubectl version to use (default: v1.29.3)"
required: false
default: "v1.28.6"
default: "v1.29.3"
install_only:
description: "Skips cluster creation, only install kind (default: false)"
required: false
ignore_failed_clean:
description: "Whether to ignore the post-delete the cluster (default: false)"
default: false
default: "false"
required: false
runs:
using: "node20"
Expand Down
15 changes: 11 additions & 4 deletions kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ set -o errexit
set -o nounset
set -o pipefail

DEFAULT_KIND_VERSION=v0.21.0
DEFAULT_KIND_VERSION=v0.22.0
DEFAULT_CLUSTER_NAME=chart-testing
DEFAULT_KUBECTL_VERSION=v1.28.6
DEFAULT_KUBECTL_VERSION=v1.29.3

show_help() {
cat << EOF
Expand Down Expand Up @@ -62,6 +62,7 @@ main() {
i686) arch="386" ;;
x86_64) arch="amd64" ;;
arm|aarch64|arm64) arch="arm64" ;;
*) exit 1 ;;
esac
local cache_dir="${RUNNER_TOOL_CACHE}/kind/${version}/${arch}"

Expand Down Expand Up @@ -188,8 +189,14 @@ install_kind() {

mkdir -p "${kind_dir}"

curl -sSLo "${kind_dir}/kind" "https://github.com/kubernetes-sigs/kind/releases/download/${version}/kind-linux-${arch}"
chmod +x "${kind_dir}/kind"
pushd "${kind_dir}"
wget --quiet "https://github.com/kubernetes-sigs/kind/releases/download/${version}/kind-linux-${arch}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why switch from curl to wget? this will break my workflow because no wget.

This is somehow a breaking change 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't remember exaclty, but would you like to move back to curl and open a pr?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I added wget to my runner now 🤗

you should probably update release notes and add a note about the new wget requirements 🙃

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did this pr #110

wget --quiet "https://github.com/kubernetes-sigs/kind/releases/download/${version}/kind-linux-${arch}.sha256sum"
grep "kind-linux-${arch}" < "kind-linux-${arch}.sha256sum" | sha256sum -c
mv "kind-linux-${arch}" kind
rm -f "kind-linux-${arch}.sha256sum"
chmod +x kind
popd
}

install_kubectl() {
Expand Down