Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Support for 1.12 #680

Merged
merged 4 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pkg/ami/auto_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ var ImageSearchPatterns = map[string]map[string]map[int]string{
ImageClassGeneral: "ubuntu-eks/1.11.5/*",
},
},
"1.12": {
ImageFamilyAmazonLinux2: {
ImageClassGeneral: "amazon-eks-node-1.12-v*",
ImageClassGPU: "amazon-eks-gpu-node-1.12-*",
},
ImageFamilyUbuntu1804: {
ImageClassGeneral: "ubuntu-eks/1.12.6/*",
},
},
}

// AutoResolver resolves the AMi to the defaults for the region
Expand Down
153 changes: 101 additions & 52 deletions pkg/ami/static_resolver_ami.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ var StaticImages = map[string]map[string]map[int]map[string]string{
"1.10": {
"AmazonLinux2": {
ImageClassGPU: {
"ap-northeast-1": "ami-0bb5892624403ca87",
"ap-northeast-2": "ami-02ef4162c5ee1e443",
"ap-south-1": "",
"ap-southeast-1": "ami-09496affecfe51b86",
"ap-southeast-2": "ami-0dae5c0d203e32e9f",
"eu-central-1": "ami-0290406a183d6587d",
"eu-north-1": "ami-d3169fad",
"eu-west-1": "ami-086252e9df9c3a21e",
"eu-west-2": "",
"eu-west-3": "",
"us-east-1": "ami-0c67dfb2298cf554a",
"us-east-2": "ami-0fb4bb0f84f4a0049",
"us-west-2": "ami-003a551d4d2e5c75d",
"ap-northeast-1": "ami-073f06a1edd22ae2e",
"ap-northeast-2": "ami-0baff950f5217e54e",
"ap-south-1": "ami-033bd2c2a3431923e",
"ap-southeast-1": "ami-09defa93988984fa1",
"ap-southeast-2": "ami-00d9364d705e902c9",
"eu-central-1": "ami-0a8536a894bd4ea06",
"eu-north-1": "ami-05baf7a6c293fe2ed",
"eu-west-1": "ami-0f6f3929a9d7a418e",
"eu-west-2": "ami-0a12396b818bc2383",
"eu-west-3": "ami-086d5edcaacd0ccfd",
"us-east-1": "ami-00f74c3728d4ca27d",
"us-east-2": "ami-0a788defb66cdfffb",
"us-west-2": "ami-0901518d7557125c8",
},
ImageClassGeneral: {
"ap-northeast-1": "ami-0e831f9f650f2f8ab",
"ap-northeast-2": "ami-0378f1fac83cbf438",
"ap-south-1": "ami-0ac369c3b2206d2ea",
"ap-southeast-1": "ami-0fa3f3282eb89b795",
"ap-southeast-2": "ami-01d0ab2e9506b8db0",
"eu-central-1": "ami-0b8d223ce03e6fabc",
"eu-north-1": "ami-09be5053dbb1a515d",
"eu-west-1": "ami-0103822d44fc52f97",
"eu-west-2": "ami-017c4d847b606e125",
"eu-west-3": "ami-0c7fc5c0784b58207",
"us-east-1": "ami-09a7630ca9ee4ee22",
"us-east-2": "ami-02a8a05e480e902e2",
"us-west-2": "ami-0e7ee8863c8536cce",
"ap-northeast-1": "ami-03369a2944c03ae53",
"ap-northeast-2": "ami-0ca1094d32581b205",
"ap-south-1": "ami-098f3355716dc7c52",
"ap-southeast-1": "ami-08a61d1ed70bf3ba0",
"ap-southeast-2": "ami-0dcfe3046280fa25a",
"eu-central-1": "ami-06ea1cef40712a9bd",
"eu-north-1": "ami-0c80681b735cff50a",
"eu-west-1": "ami-03baa6e9348518a1b",
"eu-west-2": "ami-096f6e3e9e7a928bb",
"eu-west-3": "ami-08a11cb1923d28574",
"us-east-1": "ami-00c495fbee7666f8c",
"us-east-2": "ami-038743557a1f4a244",
"us-west-2": "ami-023785df2ca7ef563",
},
},
"Ubuntu1804": {ImageClassGeneral: {
Expand All @@ -56,34 +56,83 @@ var StaticImages = map[string]map[string]map[int]map[string]string{
"1.11": {
"AmazonLinux2": {
ImageClassGPU: {
"ap-northeast-1": "ami-0ed8c50e848425cb3",
"ap-northeast-2": "ami-042e93c5dc384f6b8",
"ap-south-1": "",
"ap-southeast-1": "ami-0c1b23fe04eafb5a0",
"ap-southeast-2": "ami-0fe2e260f573c02a8",
"eu-central-1": "ami-0b82a79b011122da0",
"eu-north-1": "ami-d6159ca8",
"eu-west-1": "ami-0fab91784768ff07a",
"eu-west-2": "",
"eu-west-3": "",
"us-east-1": "ami-000412c12949aa8dd",
"us-east-2": "ami-018bc34828bcbf65e",
"us-west-2": "ami-0805ff53a28e7b904",
"ap-northeast-1": "ami-07fc636e8f6d3e18b",
"ap-northeast-2": "ami-002057772097fcef9",
"ap-south-1": "ami-04fe7f4c75aac7196",
"ap-southeast-1": "ami-08d5da0b12751a31f",
"ap-southeast-2": "ami-04024dd8e0b9e36ff",
"eu-central-1": "ami-0bf09c13f4204ce9d",
"eu-north-1": "ami-0a1714bb5be631b59",
"eu-west-1": "ami-0b4d0f56587640d5a",
"eu-west-2": "ami-00e98f9e6fd2319e5",
"eu-west-3": "ami-0039e2556e6290828",
"us-east-1": "ami-06ec2ea207616c078",
"us-east-2": "ami-0e6993a35aae3407b",
"us-west-2": "ami-08377056d89909b2a",
},
ImageClassGeneral: {
"ap-northeast-1": "ami-07fdc9272ce5b0ce5",
"ap-northeast-2": "ami-091e0e1906e653417",
"ap-south-1": "ami-0b6f791fc54125a8a",
"ap-southeast-1": "ami-038d55c26bf01998f",
"ap-southeast-2": "ami-0e07b5081bb77d540",
"eu-central-1": "ami-032ed5525d4df2de3",
"eu-north-1": "ami-0154b2479ba20f8bb",
"eu-west-1": "ami-098fb7e9b507904e7",
"eu-west-2": "ami-0d69ab00cb41d6eda",
"eu-west-3": "ami-018ebb030cf6ae00b",
"us-east-1": "ami-0535079027b14e972",
"us-east-2": "ami-0484545fe7d3da96f",
"us-west-2": "ami-0c28139856aaf9c3b",
"ap-northeast-1": "ami-02ce8113c735194cc",
"ap-northeast-2": "ami-0c7972077aa002104",
"ap-south-1": "ami-009648cf312f3b45b",
"ap-southeast-1": "ami-096fafef94b361398",
"ap-southeast-2": "ami-05eeee15533223d5a",
"eu-central-1": "ami-07c77043ca4cb9123",
"eu-north-1": "ami-059fed250df668dd2",
"eu-west-1": "ami-08dbb8e69f6565a0b",
"eu-west-2": "ami-02a28cb577cff1b98",
"eu-west-3": "ami-0810b9e54d8a7eb2f",
"us-east-1": "ami-05fe3f841ac4df3bb",
"us-east-2": "ami-06640f41bbd6653bb",
"us-west-2": "ami-0ed0fe5ff74520950",
},
},
"Ubuntu1804": {ImageClassGeneral: {
"ap-northeast-1": "",
"ap-northeast-2": "",
"ap-south-1": "",
"ap-southeast-1": "",
"ap-southeast-2": "",
"eu-central-1": "",
"eu-north-1": "",
"eu-west-1": "",
"eu-west-2": "",
"eu-west-3": "",
"us-east-1": "",
"us-east-2": "",
"us-west-2": "",
}},
},
"1.12": {
"AmazonLinux2": {
ImageClassGPU: {
"ap-northeast-1": "ami-08e41cc84f4b3f27f",
"ap-northeast-2": "ami-0c43b885e33fdc29e",
"ap-south-1": "ami-0d3ecaf4f3318c714",
"ap-southeast-1": "ami-0655b4dbbe2d46703",
"ap-southeast-2": "ami-07079cd9ff1b312da",
"eu-central-1": "ami-0c57db5b204001099",
"eu-north-1": "ami-09354b076296f5946",
"eu-west-1": "ami-0fbc930681258db86",
"eu-west-2": "ami-0d832fced2cfe0f7b",
"eu-west-3": "ami-0f8fa088b406ebba2",
"us-east-1": "ami-0cb7959f92429410a",
"us-east-2": "ami-0118b61dc2312dee2",
"us-west-2": "ami-0bebf2322fd52a42e",
},
ImageClassGeneral: {
"ap-northeast-1": "ami-074cb31c3b27144d4",
"ap-northeast-2": "ami-079f4c4bc181015df",
"ap-south-1": "ami-0cbfa6ae8b7820648",
"ap-southeast-1": "ami-0b320f92501448c3d",
"ap-southeast-2": "ami-06b5bb4c738fed87f",
"eu-central-1": "ami-094325c8eed41efa8",
"eu-north-1": "ami-0db83844f3b515138",
"eu-west-1": "ami-0a55a9c72a7c212dd",
"eu-west-2": "ami-0dad546eb1b5db222",
"eu-west-3": "ami-0dead7a5e30e976f5",
"us-east-1": "ami-0d9f458329e942f90",
"us-east-2": "ami-0e17dd7eeae729d78",
"us-west-2": "ami-0280ac619ed294a8a",
},
},
"Ubuntu1804": {ImageClassGeneral: {
Expand Down
12 changes: 6 additions & 6 deletions pkg/ami/static_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ var _ = Describe("AMI Static Resolution", func() {
Version: "1.10",
InstanceType: "t2.medium",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-0e7ee8863c8536cce",
ExpectedAMI: "ami-023785df2ca7ef563",
ExpectError: false,
}),
Entry("with non-gpu instance and us-east-1", ResolveCase{
Region: "us-east-1",
Version: "1.10",
InstanceType: "t2.medium",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-09a7630ca9ee4ee22",
ExpectedAMI: "ami-00c495fbee7666f8c",
ExpectError: false,
}),
Entry("with non-gpu instance and eu-west-1", ResolveCase{
Region: "eu-west-1",
Version: "1.10",
InstanceType: "t2.medium",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-0103822d44fc52f97",
ExpectedAMI: "ami-03baa6e9348518a1b",
ExpectError: false,
}),
Entry("with non-gpu instance and non-eks enabled region", ResolveCase{
Expand All @@ -69,23 +69,23 @@ var _ = Describe("AMI Static Resolution", func() {
Version: "1.10",
InstanceType: "p2.xlarge",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-003a551d4d2e5c75d",
ExpectedAMI: "ami-0901518d7557125c8",
ExpectError: false,
}),
Entry("with gpu (p3) instance and us-east-1", ResolveCase{
Region: "us-east-1",
Version: "1.10",
InstanceType: "p3.2xlarge",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-0c67dfb2298cf554a",
ExpectedAMI: "ami-00f74c3728d4ca27d",
ExpectError: false,
}),
Entry("with gpu (p2) instance and eu-west-1", ResolveCase{
Region: "eu-west-1",
Version: "1.10",
InstanceType: "p2.xlarge",
ImageFamily: "AmazonLinux2",
ExpectedAMI: "ami-086252e9df9c3a21e",
ExpectedAMI: "ami-0f6f3929a9d7a418e",
ExpectError: false,
}),
Entry("with gpu (p3) instance and non-eks enabled region", ResolveCase{
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/eksctl.io/v1alpha4/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ const (
// Version1_11 represents Kubernetes version 1.11.x
Version1_11 = "1.11"

// Version1_12 represents Kubernetes version 1.12.x
Version1_12 = "1.12"

// LatestVersion represents latest Kubernetes version supported by EKS
LatestVersion = Version1_11

Expand Down Expand Up @@ -158,6 +161,7 @@ func SupportedVersions() []string {
return []string{
Version1_10,
Version1_11,
Version1_12,
}
}

Expand Down
6 changes: 4 additions & 2 deletions pkg/ctl/update/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ func doUpdateClusterCmd(p *api.ProviderConfig, cfg *api.ClusterConfig, nameArg s
return fmt.Errorf("unable to get control plane version")
case api.Version1_10:
cfg.Metadata.Version = api.Version1_11
case api.LatestVersion:
cfg.Metadata.Version = api.LatestVersion
case api.Version1_11:
cfg.Metadata.Version = api.Version1_12
case api.Version1_12:
cfg.Metadata.Version = api.Version1_12
default:
// version of control is not known to us, maybe we are just too old...
return fmt.Errorf("control plane version version %q is known to this version of eksctl, try to upgrade eksctl first", currentVersion)
Expand Down