Skip to content

Commit

Permalink
bump kind to 0.22.0 / kubectl and general housekeeping (#107)
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed Apr 22, 2024
1 parent d821386 commit 2a7d25f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 16 deletions.
16 changes: 11 additions & 5 deletions .github/dependabot.yml
@@ -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
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
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
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}"
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

0 comments on commit 2a7d25f

Please sign in to comment.