Skip to content

Commit

Permalink
cluster: add support for kind v0.21 (#328)
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Santos <[email protected]>
  • Loading branch information
nicks authored Feb 3, 2024
1 parent 52de2ed commit 2eaf424
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .circleci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apt install -y apt-transport-https gnupg \
&& apt update && apt install -y kubectl

# install Kind
ENV KIND_VERSION=v0.20.0
ENV KIND_VERSION=v0.21.0
RUN set -exu \
&& curl -fLo ./kind-linux-amd64 "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64" \
&& chmod +x ./kind-linux-amd64 \
Expand Down
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
- checkout
- run: go get -v -t -d ./...
- run: go test -v ./...
- run: cd .. && go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
- run: cd .. && go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2
- run: make golangci-lint
- slack/notify-on-failure:
only_for_branches: main

e2e-remote-docker:
docker:
- image: docker/tilt-ctlptl-ci@sha256:6e9c1ac3bf0448575c4d045d668f524edf59e7ae51d0fc80ede9812d02f1ca53
- image: docker/tilt-ctlptl-ci@sha256:40dd38829d5fc8149a41b0393f64aa911ba65c46ed953936ee15c44ca3ce0fd4
steps:
- checkout
- setup_remote_docker
Expand All @@ -43,7 +43,7 @@ jobs:
sudo mv ./minikube-linux-amd64 /usr/local/bin/minikube
- run: |
set -ex
export KIND_VERSION=v0.20.0
export KIND_VERSION=v0.21.0
curl -fLo ./kind-linux-amd64 "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64"
chmod +x ./kind-linux-amd64
sudo mv ./kind-linux-amd64 /usr/local/bin/kind
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
k8s.io/cli-runtime v0.29.1
k8s.io/client-go v0.29.1
k8s.io/klog/v2 v2.110.1
sigs.k8s.io/kind v0.18.0
sigs.k8s.io/kind v0.21.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/kind v0.18.0 h1:ahgZdVV1pdhXlYe1f+ztISakT23KdrBl/NFY9JMygzs=
sigs.k8s.io/kind v0.18.0/go.mod h1:Qqp8AiwOlMZmJWs37Hgs31xcbiYXjtXlRBSftcnZXQk=
sigs.k8s.io/kind v0.21.0 h1:QgkVrW35dMXNLkWlUkq2uFQNQbPLr0Z6RgRH5P/NzZU=
sigs.k8s.io/kind v0.21.0/go.mod h1:aBlbxg08cauDgZ612shr017/rZwqd7AS563FvpWKPVs=
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0=
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY=
Expand Down
9 changes: 9 additions & 0 deletions pkg/cluster/admin_kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,15 @@ func (a *kindAdmin) getKindVersion(ctx context.Context) (string, error) {
// This table must be built up manually from the Kind release notes each
// time a new Kind version is released :\
var kindK8sNodeTable = map[string]map[string]string{
"v0.21.0": {
"1.29": "kindest/node:v1.29.1@sha256:a0cc28af37cf39b019e2b448c54d1a3f789de32536cb5a5db61a49623e527144",
"1.28": "kindest/node:v1.28.6@sha256:b7e1cf6b2b729f604133c667a6be8aab6f4dde5bb042c1891ae248d9154f665b",
"1.27": "kindest/node:v1.27.10@sha256:3700c811144e24a6c6181065265f69b9bf0b437c45741017182d7c82b908918f",
"1.26": "kindest/node:v1.26.13@sha256:15ae92d507b7d4aec6e8920d358fc63d3b980493db191d7327541fbaaed1f789",
"1.25": "kindest/node:v1.25.16@sha256:9d0a62b55d4fe1e262953be8d406689b947668626a357b5f9d0cfbddbebbc727",
"1.24": "kindest/node:v1.24.17@sha256:ea292d57ec5dd0e2f3f5a2d77efa246ac883c051ff80e887109fabefbd3125c7",
"1.23": "kindest/node:v1.23.17@sha256:fbb92ac580fce498473762419df27fa8664dbaa1c5a361b5957e123b4035bdcf",
},
"v0.20.0": {
"1.28": "kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31",
"1.27": "kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72",
Expand Down
4 changes: 2 additions & 2 deletions test/kind/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ k8sVersion=$(ctlptl get cluster "$CLUSTER_NAME" -o go-template --template='{{.st

ctlptl delete -f cluster.yaml

if [[ "$k8sVersion" != "v1.26.6" ]]; then
echo "Expected kubernetes version v1.26.6 but got $k8sVersion"
if [[ "$k8sVersion" != "v1.26.13" ]]; then
echo "Expected kubernetes version v1.26.13 but got $k8sVersion"
exit 1
fi

Expand Down

0 comments on commit 2eaf424

Please sign in to comment.