Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kubernetes-sigs/kind
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.22.0
Choose a base ref
...
head repository: kubernetes-sigs/kind
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.23.0
Choose a head ref

Commits on Feb 14, 2024

  1. version v0.23.0-alpha

    BenTheElder committed Feb 14, 2024
    Copy the full SHA
    9ca71dd View commit details
  2. Merge pull request #3523 from BenTheElder/mark-0220-rel

    Mark 0.22.0 release
    BenTheElder authored Feb 14, 2024
    Copy the full SHA
    bbe2c28 View commit details
  3. bump docs to 0.22.0

    BenTheElder committed Feb 14, 2024
    Copy the full SHA
    04d361c View commit details
  4. Merge pull request #3524 from BenTheElder/install-0220

    bump docs to 0.22.0
    BenTheElder authored Feb 14, 2024
    Copy the full SHA
    7c2f6c1 View commit details

Commits on Feb 16, 2024

  1. Initial provider for nerdctl/Finch

    Adds implementation for a provider based on nerdctl. Several todos
    in the code but the core functionality of creating/deleting clusters
    is working and a simple application deployed works properly
    
    Signed-off-by: Phil Estes <estesp@gmail.com>
    estesp committed Feb 16, 2024
    Copy the full SHA
    86c7c2e View commit details
  2. support minimal nerdctl testing in CI

    Signed-off-by: Kay Yan <kay.yan@daocloud.io>
    Signed-off-by: Phil Estes <estesp@gmail.com>
    yankay authored and estesp committed Feb 16, 2024
    Copy the full SHA
    76511b1 View commit details

Commits on Feb 22, 2024

  1. Add ipFamily validation

    Setting ipFamily to invalid value didn't return any error and kind just
    created an ipv4 cluster silently. It could be a bit confusing when it is
    set to some plausible but invalid values like IPv4, IPv6, Dual, ds.
    
    Signed-off-by: Quan Tian <qtian@vmware.com>
    tnqn committed Feb 22, 2024
    Copy the full SHA
    396586f View commit details
  2. Fix Podman test failures caused by kernel update

    Newer linux kernels like 5.15.0-1056-azure used by Github action runner
    doesn't allow mode changes of symlinks, leading to failure when creating
    cluster using Podman with crun < 1.9.1.
    
    The patch fixes it by upgrading crun to newer version when setting up
    the test env for Podman.
    
    Signed-off-by: Quan Tian <qtian@vmware.com>
    tnqn committed Feb 22, 2024
    Copy the full SHA
    62a9420 View commit details
  3. Merge pull request #3527 from tnqn/fix-podman-test

    Fix Podman test failures caused by kernel update
    k8s-ci-robot authored Feb 22, 2024
    Copy the full SHA
    d59e2ce View commit details
  4. Merge pull request #3483 from tnqn/validate-ip-family

    Add ipFamily validation
    BenTheElder authored Feb 22, 2024
    Copy the full SHA
    2fb3f42 View commit details

Commits on Feb 27, 2024

  1. Merge pull request #3429 from estesp/add-nerdctl

    Initial provider implementation for nerdctl (+finch)
    k8s-ci-robot authored Feb 27, 2024
    Copy the full SHA
    7c3e01f View commit details

Commits on Feb 28, 2024

  1. update docs for nerdctl support

    Co-authored-by: Sean McGinnis <sean.mcginnis@gmail.com>
    Signed-off-by: Kay Yan <kay.yan@daocloud.io>
    yankay and stmcginnis committed Feb 28, 2024
    Copy the full SHA
    974fa25 View commit details

Commits on Feb 29, 2024

  1. Merge pull request #3532 from yankay/update-docs

    Docs: Add docs for nerdctl support
    k8s-ci-robot authored Feb 29, 2024
    Copy the full SHA
    c3029ff View commit details

Commits on Mar 3, 2024

  1. fix ci multi node cluster error

    Signed-off-by: Kay Yan <kay.yan@daocloud.io>
    yankay committed Mar 3, 2024
    Copy the full SHA
    bf3bd25 View commit details
  2. Merge pull request #3534 from yankay/fix-ci

    Fix CI create multi node cluster failures by nerdctl
    k8s-ci-robot authored Mar 3, 2024
    Copy the full SHA
    6c8c0f0 View commit details

Commits on Mar 4, 2024

  1. Bump actions/checkout from 3.5.3 to 4.1.1

    Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 4.1.1.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v3.5.3...b4ffde6)
    
    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 4, 2024
    Copy the full SHA
    186c864 View commit details
  2. Bump actions/upload-artifact from 3.1.3 to 4.3.1

    Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.3.1.
    - [Release notes](https://github.com/actions/upload-artifact/releases)
    - [Commits](actions/upload-artifact@v3.1.3...5d5d22a)
    
    ---
    updated-dependencies:
    - dependency-name: actions/upload-artifact
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 4, 2024
    Copy the full SHA
    42f7e63 View commit details
  3. Merge pull request #3539 from kubernetes-sigs/dependabot/github_actio…

    …ns/actions/checkout-4.1.1
    
    Bump actions/checkout from 3.5.3 to 4.1.1
    k8s-ci-robot authored Mar 4, 2024
    Copy the full SHA
    75c5c02 View commit details
  4. Merge pull request #3540 from kubernetes-sigs/dependabot/github_actio…

    …ns/actions/upload-artifact-4.3.1
    
    Bump actions/upload-artifact from 3.1.3 to 4.3.1
    k8s-ci-robot authored Mar 4, 2024
    Copy the full SHA
    c83316d View commit details

Commits on Mar 13, 2024

  1. bump containerd to 1.7.14

    https://github.com/containerd/containerd/releases/tag/v1.7.14
    
    Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
    AkihiroSuda committed Mar 13, 2024
    Copy the full SHA
    58e30d9 View commit details
  2. bump cri-tools to v1.29.0

    https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.29.0
    
    Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
    AkihiroSuda committed Mar 13, 2024
    Copy the full SHA
    e86d486 View commit details
  3. Copy the full SHA
    e734c71 View commit details
  4. Copy the full SHA
    483f235 View commit details

Commits on Mar 18, 2024

  1. Bump actions/checkout from 4.1.1 to 4.1.2

    Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@b4ffde6...9bb5618)
    
    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 18, 2024
    Copy the full SHA
    d2951c9 View commit details
  2. Merge pull request #3552 from kubernetes-sigs/dependabot/github_actio…

    …ns/actions/checkout-4.1.2
    
    Bump actions/checkout from 4.1.1 to 4.1.2
    k8s-ci-robot authored Mar 18, 2024
    Copy the full SHA
    9ea8a59 View commit details

Commits on Mar 25, 2024

  1. Determine which nerdctl implementation

    When called via the library path, the nerdctl provider is
    instantiated without a binary name. We still need to do
    a lookup to determine if finch or nerdctl is the installed
    binary to provide the local runtime command line
    
    Signed-off-by: Phil Estes <estesp@gmail.com>
    estesp committed Mar 25, 2024
    Copy the full SHA
    1759f35 View commit details
  2. Merge pull request #3557 from estesp/fix-binary-lookup-via-library

    Determine which nerdctl implementation
    k8s-ci-robot authored Mar 25, 2024
    Copy the full SHA
    a64c3ab View commit details

Commits on Apr 1, 2024

  1. add nftables to the base image

    aojea committed Apr 1, 2024
    Copy the full SHA
    9b7b41b View commit details
  2. Copy the full SHA
    1a9dd8a View commit details
  3. Merge pull request #3563 from aojea/nftables

    add nftables to the base image
    k8s-ci-robot authored Apr 1, 2024
    Copy the full SHA
    f2cae93 View commit details
  4. bump base image

    aojea committed Apr 1, 2024
    Copy the full SHA
    0495a44 View commit details
  5. Merge pull request #3564 from aojea/bump_base_image

    bump base image
    k8s-ci-robot authored Apr 1, 2024
    Copy the full SHA
    508143d View commit details
  6. Merge pull request #3548 from AkihiroSuda/containerd-1.7.14

    bump containerd, cri-tools, CNI plugins, and containerd-fuse-overlayfs
    k8s-ci-robot authored Apr 1, 2024
    Copy the full SHA
    3a80749 View commit details
  7. Require go 1.17+

    This enables better dependency management via  https://go.dev/ref/mod#graph-pruning
    
    We previously required 1.16+
    
    We don't want to require especially recent versions because that will break users with `go install` using older packaged golang.
    
    We use currently supported much more recent go for our own builds.
    BenTheElder committed Apr 1, 2024
    Copy the full SHA
    4121af1 View commit details
  8. Copy the full SHA
    a8ee57f View commit details
  9. Copy the full SHA
    7c05010 View commit details
  10. Copy the full SHA
    5f59a83 View commit details
  11. switch kindnetd to generic sets

    kindnetd is typically pre-compiled and not installed with "go get", kind development already uses much more recent go so requiring 1.18 for kindnetd is fine
    BenTheElder committed Apr 1, 2024
    Copy the full SHA
    f9a254d View commit details
  12. upgrade to go1.21

    BenTheElder committed Apr 1, 2024
    Copy the full SHA
    2b793f9 View commit details
  13. force GOTOOLCHAIN="go${GO_VERSION}" for now

    TODO: look at using deprecating .go-version in favor of GOTOOLCHAIN existing knobs
    BenTheElder committed Apr 1, 2024
    Copy the full SHA
    3652d39 View commit details
  14. add missing GOTOOLCHAIN

    BenTheElder committed Apr 1, 2024
    Copy the full SHA
    738f237 View commit details
  15. Copy the full SHA
    58508bc View commit details
  16. Merge pull request #3335 from BenTheElder/go1.17+

    Require go 1.17+
    k8s-ci-robot authored Apr 1, 2024
    Copy the full SHA
    506824a View commit details

Commits on Apr 3, 2024

  1. using no concrrent create container with nerdctl

    Signed-off-by: Kay Yan <kay.yan@daocloud.io>
    yankay committed Apr 3, 2024
    Copy the full SHA
    a73cd97 View commit details

Commits on Apr 5, 2024

  1. Bump containerd to 1.7.15

    Avoid the regression on exec containerd/containerd#10039
    aojea authored Apr 5, 2024
    Copy the full SHA
    9228b09 View commit details

Commits on Apr 6, 2024

  1. Merge pull request #3568 from kubernetes-sigs/aojea-patch-1

    Bump containerd to 1.7.15
    k8s-ci-robot authored Apr 6, 2024
    Copy the full SHA
    f47a5c6 View commit details
  2. bump base image

    BenTheElder committed Apr 6, 2024
    Copy the full SHA
    0de81b3 View commit details
  3. Merge pull request #3570 from BenTheElder/new-base

    bump base image
    k8s-ci-robot authored Apr 6, 2024
    Copy the full SHA
    f905e73 View commit details

Commits on Apr 7, 2024

  1. Update pkg/cluster/internal/providers/nerdctl/provider.go

    Add todo nerdctl handles concurrency better
    
    Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
    Signed-off-by: Kay Yan <kay.yan@daocloud.io>
    yankay and aojea committed Apr 7, 2024
    Copy the full SHA
    724ea1a View commit details
  2. Merge pull request #3567 from yankay/fix-concurrent-crate-node

    Fix nerdctl create multi-node cluster fail by do not create container concurrently
    k8s-ci-robot authored Apr 7, 2024
    Copy the full SHA
    915b13a View commit details
Showing with 2,294 additions and 905 deletions.
  1. +1 −1 .github/ISSUE_TEMPLATE/bug-report.md
  2. +2 −2 .github/workflows/docker.yaml
  3. +121 −0 .github/workflows/nerdctl.yaml
  4. +7 −2 .github/workflows/podman.yml
  5. +2 −2 .github/workflows/vm.yaml
  6. +1 −1 .go-version
  7. +2 −1 Makefile
  8. +8 −7 README.md
  9. +16 −1 go.mod
  10. +3 −1 go.sum
  11. +23 −0 hack/build/gotoolchain.sh
  12. +2 −1 hack/build/setup-go.sh
  13. +10 −8 hack/tools/.golangci.yml
  14. +189 −4 hack/tools/go.mod
  15. +242 −240 hack/tools/go.sum
  16. +11 −5 images/base/Dockerfile
  17. +2 −0 images/kindnetd/Dockerfile
  18. +3 −3 images/kindnetd/cmd/kindnetd/main.go
  19. +43 −6 images/kindnetd/go.mod
  20. +75 −503 images/kindnetd/go.sum
  21. +1 −0 images/local-path-provisioner/Dockerfile
  22. +1 −1 pkg/apis/config/defaults/image.go
  23. +3 −1 pkg/apis/config/v1alpha4/types.go
  24. +1 −1 pkg/build/nodeimage/const_cni.go
  25. +1 −1 pkg/build/nodeimage/const_storage.go
  26. +1 −1 pkg/build/nodeimage/defaults.go
  27. +15 −3 pkg/cluster/internal/kubeadm/config.go
  28. +1 −4 pkg/cluster/internal/providers/docker/provision.go
  29. +2 −0 pkg/cluster/internal/providers/nerdctl/OWNERS
  30. +24 −0 pkg/cluster/internal/providers/nerdctl/constants.go
  31. +91 −0 pkg/cluster/internal/providers/nerdctl/images.go
  32. +187 −0 pkg/cluster/internal/providers/nerdctl/network.go
  33. +68 −0 pkg/cluster/internal/providers/nerdctl/network_test.go
  34. +175 −0 pkg/cluster/internal/providers/nerdctl/node.go
  35. +392 −0 pkg/cluster/internal/providers/nerdctl/provider.go
  36. +388 −0 pkg/cluster/internal/providers/nerdctl/provision.go
  37. +52 −0 pkg/cluster/internal/providers/nerdctl/util.go
  38. +1 −4 pkg/cluster/internal/providers/podman/provision.go
  39. +13 −2 pkg/cluster/provider.go
  40. +1 −1 pkg/cmd/kind/build/nodeimage/nodeimage.go
  41. +2 −2 pkg/cmd/kind/version/version.go
  42. +45 −20 pkg/cmd/kind/version/version_test.go
  43. +4 −4 pkg/fs/fs.go
  44. +3 −1 pkg/internal/apis/config/types.go
  45. +6 −1 pkg/internal/apis/config/validate.go
  46. +10 −0 pkg/internal/apis/config/validate_test.go
  47. +3 −0 pkg/internal/runtime/runtime.go
  48. +1 −1 site/config.toml
  49. +2 −1 site/content/_index.md
  50. +1 −1 site/content/docs/contributing/development.md
  51. +3 −3 site/content/docs/user/configuration.md
  52. +1 −1 site/content/docs/user/known-issues.md
  53. +9 −48 site/content/docs/user/loadbalancer.md
  54. +6 −0 site/content/docs/user/quick-start.md
  55. +6 −0 site/content/docs/user/resources.md
  56. +11 −1 site/content/docs/user/rootless.md
  57. +0 −14 site/static/examples/loadbalancer/metallb-config.yaml
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ labels: kind/bug
**Environment:**

- kind version: (use `kind version`):
- Runtime info: (use `docker info` or `podman info`):
- Runtime info: (use `docker info`, `podman info` or `nerdctl info`):
- OS (e.g. from `/etc/os-release`):
- Kubernetes version: (use `kubectl version`):
- Any proxies or other special environment settings?:
4 changes: 2 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ jobs:
IP_FAMILY: ${{ matrix.ipFamily }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Install kind
run: sudo make install INSTALL_DIR=/usr/local/bin
@@ -87,7 +87,7 @@ jobs:
- name: Upload logs
if: always()
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: /tmp/kind/logs
121 changes: 121 additions & 0 deletions .github/workflows/nerdctl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Nerdctl

on:
workflow_dispatch:
pull_request:
branches:
- main
paths-ignore:
- 'site/**'

permissions:
contents: read

jobs:
nerdctl:
name: Nerdctl
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
ipFamily: [ipv4, ipv6]
deployment: [singleNode, multiNode]
exclude:
- ipFamily: ipv6
env:
JOB_NAME: "nerdctl-${{ matrix.deployment }}-${{ matrix.ipFamily }}"
IP_FAMILY: ${{ matrix.ipFamily }}
NERDCTL_VERSION: "1.7.4"
KIND_EXPERIMENTAL_PROVIDER: "nerdctl"
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0

- name: Install kind
run: sudo make install INSTALL_DIR=/usr/local/bin

- name: Install kubectl
run: |
curl -LO https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
- name: Enable ipv4 and ipv6 forwarding
run: |
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv4.ip_forward=1
- name: Install nerdctl
run: |
# Remove Docker and Podman
sudo systemctl is-active --quiet docker.service || systemctl stop docker.service
sudo apt-get remove -y docker-ce docker-ce-cli podman containerd.io
sudo rm -rf /etc/systemd/system/containerd.service # clean up the cotnainerd systemd file
# Install nerdctl full package
sudo curl -sSL https://github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-full-${NERDCTL_VERSION}-linux-amd64.tar.gz | sudo tar -xvz -C /usr/local
# Start Containerd
sudo systemctl daemon-reload
sudo systemctl enable --now containerd
# Show Versions
sudo ctr version
sudo nerdctl version
- name: Create single node cluster
if: ${{ matrix.deployment == 'singleNode' }}
run: |
cat <<EOF | sudo /usr/local/bin/kind create cluster -v7 --wait 1m --retain --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
ipFamily: ${IP_FAMILY}
EOF
- name: Create multi node cluster
if: ${{ matrix.deployment == 'multiNode' }}
run: |
cat <<EOF | sudo /usr/local/bin/kind create cluster -v7 --wait 1m --retain --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
ipFamily: ${IP_FAMILY}
nodes:
- role: control-plane
- role: worker
- role: worker
EOF
- name: Get Cluster status
run: |
# wait network is ready
sudo kubectl wait --for=condition=ready pods --namespace=kube-system -l k8s-app=kube-dns
sudo kubectl get nodes -o wide
sudo kubectl get pods -A
# TODO: similar to podman, this fails because the imageID() code in KinD is hardcoded to run a docker command
# need to solve this code before this test will work properly
- name: Load nerdctl image
run: |
sudo nerdctl pull busybox
sudo /usr/local/bin/kind load docker-image busybox
continue-on-error: true

- name: Export logs
if: always()
run: |
sudo cat /etc/cni/net.d/*
sudo mkdir -p /tmp/kind/logs
sudo /usr/local/bin/kind export logs /tmp/kind/logs
sudo chown -R $USER:$USER /tmp/kind/logs
- name: Upload logs
if: always()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: /tmp/kind/logs

- name: Delete cluster
run: sudo /usr/local/bin/kind delete cluster
9 changes: 7 additions & 2 deletions .github/workflows/podman.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ jobs:
PODMAN_VERSION: "stable"
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0

@@ -55,6 +55,11 @@ jobs:
# https://github.com/actions/virtual-environments/issues/2708
sudo apt-get update
sudo apt-get -y install dnsmasq
# crun >= 1.9.1 is required on Ubuntu 20.04.6
# https://github.com/kubernetes-sigs/kind/issues/3526
curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64
chmod +x ./crun
sudo mv ./crun /usr/bin/crun
- name: Create single node cluster
if: ${{ matrix.deployment == 'singleNode' }}
@@ -110,7 +115,7 @@ jobs:
- name: Upload logs
if: always()
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: /tmp/kind/logs
4 changes: 2 additions & 2 deletions .github/workflows/vm.yaml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ jobs:
JOB_NAME: "cgroup2-${{ matrix.provider }}-${{ matrix.rootless }}"
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

# https://github.com/containerd/containerd/blob/420503072e58f27a7192ddea4e6e41dced911cb9/.github/workflows/ci.yml#L569-L581
- name: Set up vagrant
@@ -96,7 +96,7 @@ jobs:
- name: Upload logs
if: always()
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: /tmp/kind/logs
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.13
1.21.10
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -33,14 +33,15 @@ COMMIT_COUNT?=$(shell git describe --tags | rev | cut -d- -f2 | rev)
# ========================= Setup Go With Gimme ================================
# go version to use for build etc.
# setup correct go version with gimme
GOTOOLCHAIN:=$(shell . hack/build/gotoolchain.sh && echo "$${GOTOOLCHAIN}")
PATH:=$(shell . hack/build/setup-go.sh && echo "$${PATH}")
# go1.9+ can autodetect GOROOT, but if some other tool sets it ...
GOROOT:=
# enable modules
GO111MODULE=on
# disable CGO by default for static binaries
CGO_ENABLED=0
export PATH GOROOT GO111MODULE CGO_ENABLED
export PATH GOROOT GO111MODULE CGO_ENABLED GOTOOLCHAIN
# work around broken PATH export
SPACE:=$(subst ,, )
SHELL:=env PATH=$(subst $(SPACE),\$(SPACE),$(PATH)) $(SHELL)
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
kind is a tool for running local Kubernetes clusters using Docker container "nodes".
kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.

If you have [go] 1.16+ and [docker] or [podman] installed `go install sigs.k8s.io/kind@v0.21.0 && kind create cluster` is all you need!
If you have [go] 1.16+ and [docker], [podman] or [nerdctl] installed `go install sigs.k8s.io/kind@v0.22.0 && kind create cluster` is all you need!

![](site/static/images/kind-create-cluster.png)

@@ -23,7 +23,7 @@ kind bootstraps each "node" with [kubeadm][kubeadm]. For more details see [the d

For a complete [install guide] see [the documentation here][install guide].

You can install kind with `go install sigs.k8s.io/kind@v0.21.0`.
You can install kind with `go install sigs.k8s.io/kind@v0.22.0`.

**NOTE**: please use the latest go to do this. KIND is developed with the latest stable go, see [`.go-version`](./.go-version) for the exact version we're using.

@@ -43,9 +43,9 @@ On Linux:

```console
# For AMD64 / x86_64
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.21.0/kind-$(uname)-amd64
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-$(uname)-amd64
# For ARM64
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.21.0/kind-$(uname)-arm64
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-$(uname)-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
```
@@ -66,17 +66,17 @@ On macOS via Bash:

```console
# For Intel Macs
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.21.0/kind-darwin-amd64
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-darwin-amd64
# For M1 / ARM Macs
[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.21.0/kind-darwin-arm64
[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-darwin-arm64
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind
```

On Windows:

```powershell
curl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.21.0/kind-windows-amd64
curl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.22.0/kind-windows-amd64
Move-Item .\kind-windows-amd64.exe c:\some-dir-in-your-PATH\kind.exe
# OR via Chocolatey (https://chocolatey.org/packages/kind)
@@ -145,6 +145,7 @@ Participation in the Kubernetes community is governed by the [Kubernetes Code of
[go-supported]: https://golang.org/doc/devel/release.html#policy
[docker]: https://www.docker.com/
[podman]: https://podman.io/
[nerdctl]: https://github.com/containerd/nerdctl
[community page]: https://kubernetes.io/community/
[Kubernetes Code of Conduct]: code-of-conduct.md
[Go Report Card Badge]: https://goreportcard.com/badge/sigs.k8s.io/kind
17 changes: 16 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
module sigs.k8s.io/kind

go 1.16
// NOTE: This is the go language version, NOT the compiler version.
//
// This controls the *minimum* required go version and therefore available Go
// language features.
//
// See ./.go-version for the go compiler version used when building binaries
//
// https://go.dev/doc/modules/gomod-ref#go
go 1.17

require (
github.com/BurntSushi/toml v1.0.0
@@ -15,3 +23,10 @@ require (
gopkg.in/yaml.v3 v3.0.1
sigs.k8s.io/yaml v1.3.0
)

require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/kr/text v0.2.0 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
4 changes: 3 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi
github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0=
github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
@@ -13,8 +14,9 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
23 changes: 23 additions & 0 deletions hack/build/gotoolchain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# script to set GOTOOLCHAIN as needed
# MUST BE RUN FROM THE REPO ROOT DIRECTORY

# read go-version file unless GO_VERSION is set
GO_VERSION="${GO_VERSION:-"$(cat .go-version)"}"

GOTOOLCHAIN="go${GO_VERSION}"
export GOTOOLCHAIN GO_VERSION
3 changes: 2 additions & 1 deletion hack/build/setup-go.sh
Original file line number Diff line number Diff line change
@@ -17,7 +17,8 @@
# MUST BE RUN FROM THE REPO ROOT DIRECTORY

# read go-version file unless GO_VERSION is set
GO_VERSION="${GO_VERSION:-"$(cat .go-version)"}"
# override GOTOOLCHAIN unless set as well
. ./hack/build/gotoolchain.sh

# we don't actually care where the .env files are
# however, GIMME_SILENT_ENV doesn't trigger re-generating a .env if it
18 changes: 10 additions & 8 deletions hack/tools/.golangci.yml
Original file line number Diff line number Diff line change
@@ -4,17 +4,12 @@ run:
linters:
disable-all: true
enable:
# default golangci-lint lints
# NOTE: https://github.com/golangci/golangci-lint/issues/1841
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused

# additional lints
- gochecknoinits
- gofmt
- revive # replaces golint for now
@@ -26,6 +21,13 @@ linters-settings:
staticcheck:
checks:
- all
# TODO: require go1.16 for kind and sort out migrating without breakage
# until then, we still use io/ioutil for now
- '-SA1019'

issues:
exclude-rules:
# this requires renaming all unused parameters, we'd rather leave a preferred
# placeholder name in place when implementing an interface etc.
# we can revisit this later, right now it's generating a lot of new warnings
# after upgrading golangci-lint
- text: "^unused-parameter: .*"
linters:
- revive
Loading