Skip to content

Commit

Permalink
Update Docker to v20.10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bmelbourne committed Apr 11, 2021
1 parent d95cf44 commit 7c2b54c
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/kops/create_cluster_integration_test.go
Expand Up @@ -49,6 +49,7 @@ func TestCreateClusterMinimal(t *testing.T) {
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.18", "v1alpha2")
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.19", "v1alpha2")
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.20", "v1alpha2")
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.21", "v1alpha2")
}

// TestCreateClusterOverride tests the override flag
Expand Down
4 changes: 3 additions & 1 deletion pkg/model/components/docker.go
Expand Up @@ -47,7 +47,9 @@ func (b *DockerOptionsBuilder) BuildOptions(o interface{}) error {

// Set the Docker version for known Kubernetes versions
if fi.StringValue(clusterSpec.Docker.Version) == "" {
if b.IsKubernetesGTE("1.17") {
if b.IsKubernetesGTE("1.21") {
docker.Version = fi.String("20.10.5")
} else if b.IsKubernetesGTE("1.17") {
docker.Version = fi.String("19.03.15")
} else if b.IsKubernetesGTE("1.16") {
docker.Version = fi.String("18.09.9")
Expand Down
@@ -0,0 +1,94 @@
apiVersion: kops.k8s.io/v1alpha2
kind: Cluster
metadata:
creationTimestamp: "2017-01-01T00:00:00Z"
name: minimal.example.com
spec:
api:
dns: {}
authorization:
rbac: {}
channel: stable
cloudProvider: aws
configBase: memfs://tests/minimal.example.com
containerRuntime: containerd
etcdClusters:
- cpuRequest: 200m
etcdMembers:
- encryptedVolume: true
instanceGroup: master-us-test-1a
name: a
memoryRequest: 100Mi
name: main
- cpuRequest: 100m
etcdMembers:
- encryptedVolume: true
instanceGroup: master-us-test-1a
name: a
memoryRequest: 100Mi
name: events
iam:
allowContainerRegistry: true
legacy: false
kubelet:
anonymousAuth: false
kubernetesApiAccess:
- 0.0.0.0/0
kubernetesVersion: v1.21.0
masterPublicName: api.minimal.example.com
networkCIDR: 172.20.0.0/16
networking:
cni: {}
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
type: Public
zone: us-test-1a
topology:
dns:
type: Public
masters: public
nodes: public

---

apiVersion: kops.k8s.io/v1alpha2
kind: InstanceGroup
metadata:
creationTimestamp: "2017-01-01T00:00:00Z"
labels:
kops.k8s.io/cluster: minimal.example.com
name: master-us-test-1a
spec:
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20210315
machineType: m3.medium
maxSize: 1
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: master-us-test-1a
role: Master
subnets:
- us-test-1a

---

apiVersion: kops.k8s.io/v1alpha2
kind: InstanceGroup
metadata:
creationTimestamp: "2017-01-01T00:00:00Z"
labels:
kops.k8s.io/cluster: minimal.example.com
name: nodes-us-test-1a
spec:
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20210315
machineType: t2.medium
maxSize: 1
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: nodes-us-test-1a
role: Node
subnets:
- us-test-1a
6 changes: 6 additions & 0 deletions tests/integration/create_cluster/minimal-1.21/options.yaml
@@ -0,0 +1,6 @@
ClusterName: minimal.example.com
Zones:
- us-test-1a
CloudProvider: aws
Networking: cni
KubernetesVersion: v1.21.0
4 changes: 4 additions & 0 deletions upup/pkg/fi/cloudup/docker.go
Expand Up @@ -195,6 +195,8 @@ func findAllDockerHashesAmd64() map[string]string {
"20.10.1": "8790f3b94ee07ca69a9fdbd1310cbffc729af0a07e5bf9f34a79df1e13d2e50e",
"20.10.2": "97017e32a8ecbdd1826bb3c7b1424303ee0dea3f900d33591b1df5e394ed4eed",
"20.10.3": "47065a47f0692cd5af03073c7386fe090d9ef5ac88a7d8455a884d8e15809be5",
"20.10.4": "6ec28b6a251e093f5cf32569c4bfce4821eda02923b33c060694e6ca2c851daa",
"20.10.5": "3f18edc66e1faae607d428349e77f9800bdea554528521f0f6c49fc3f1de6abf",
}

return hashes
Expand Down Expand Up @@ -242,6 +244,8 @@ func findAllDockerHashesArm64() map[string]string {
"20.10.1": "ec2a42e52614e835b373f3f5c090e2f6a8a333ea52fa02ab9d8f4ac74a2f90d5",
"20.10.2": "9ea59f249ae92bbaa9831a22f2affa2edc9e824f9daaba831ca51d6d22ef2df5",
"20.10.3": "4dcd105f721297f314bb53622e67dd981a743d72f4b2bfe4f42a8790e0892c82",
"20.10.4": "bd9fb2f770eb508b3273237c5604266b6cd93789d048069bd6b16efbf8919fca",
"20.10.5": "83157b92d7469117c2720fc44074749e080b3c510ae35b8a57c66a016cf07dd5",
}

return hashes
Expand Down
5 changes: 5 additions & 0 deletions upup/pkg/fi/cloudup/populatecluster_test.go
Expand Up @@ -392,11 +392,16 @@ func TestPopulateCluster_DockerVersion(t *testing.T) {
KubernetesVersion: "1.17.0",
DockerVersion: "19.03.15",
},
{
KubernetesVersion: "1.21.0",
DockerVersion: "20.10.5",
},
}

for _, test := range grid {
_, c := buildMinimalCluster()
c.Spec.KubernetesVersion = test.KubernetesVersion
c.Spec.ContainerRuntime = "docker"

full, err := build(c)
if err != nil {
Expand Down

0 comments on commit 7c2b54c

Please sign in to comment.