Skip to content

Commit

Permalink
ctlptl: add kindest/node tags for kind 0.10.0 (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
landism authored Jan 25, 2021
1 parent 0edc8bf commit 081f4bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pkg/cluster/admin_kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import (

"github.com/blang/semver/v4"
"github.com/pkg/errors"
"github.com/tilt-dev/ctlptl/pkg/api"
"github.com/tilt-dev/localregistry-go"
"gopkg.in/yaml.v3"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/klog/v2"
"sigs.k8s.io/kind/pkg/apis/config/v1alpha4"

"github.com/tilt-dev/ctlptl/pkg/api"
)

const kindNetworkName = "kind"
Expand Down Expand Up @@ -194,6 +195,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.10.0": map[string]string{
"1.20": "kindest/node:v1.20.2@sha256:8f7ea6e7642c0da54f04a7ee10431549c0257315b3a634f6ef2fecaaedb19bab",
"1.19": "kindest/node:v1.19.7@sha256:a70639454e97a4b733f9d9b67e12c01f6b0297449d5b9cbbef87473458e26dca",
"1.18": "kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4",
"1.17": "kindest/node:v1.17.17@sha256:7b6369d27eee99c7a85c48ffd60e11412dc3f373658bc59b7f4d530b7056823e",
"1.16": "kindest/node:v1.16.15@sha256:c10a63a5bda231c0a379bf91aebf8ad3c79146daca59db816fb963f731852a99",
"1.15": "kindest/node:v1.15.12@sha256:67181f94f0b3072fb56509107b380e38c55e23bf60e6f052fbd8052d26052fb5",
"1.14": "kindest/node:v1.14.10@sha256:3fbed72bcac108055e46e7b4091eb6858ad628ec51bf693c21f5ec34578f6180",
},
"v0.9.0": map[string]string{
"1.19": "kindest/node:v1.19.1@sha256:98cf5288864662e37115e362b23e4369c8c4a408f99cbc06e58ac30ddc721600",
"1.18": "kindest/node:v1.18.8@sha256:f4bcc97a0ad6e7abaf3f643d890add7efe6ee4ab90baeb374b4f41a4c95567eb",
Expand Down
4 changes: 4 additions & 0 deletions pkg/cluster/admin_kind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func TestNodeImage(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "kindest/node:v1.19.1@sha256:98cf5288864662e37115e362b23e4369c8c4a408f99cbc06e58ac30ddc721600", img)

img, err = a.getNodeImage(ctx, "v0.10.0", "v1.20")
assert.NoError(t, err)
assert.Equal(t, "kindest/node:v1.20.2@sha256:8f7ea6e7642c0da54f04a7ee10431549c0257315b3a634f6ef2fecaaedb19bab", img)

img, err = a.getNodeImage(ctx, "v0.8.1", "v1.16.1")
assert.NoError(t, err)
assert.Equal(t, "kindest/node:v1.16.9@sha256:7175872357bc85847ec4b1aba46ed1d12fa054c83ac7a8a11f5c268957fd5765", img)
Expand Down

0 comments on commit 081f4bb

Please sign in to comment.