Skip to content

Commit

Permalink
Add Support for EKS 1.31 (#243)
Browse files Browse the repository at this point in the history
* add tests for eks 1.31

* update core components to support eks 1.31

* fix indentation in eks/sync_test.go

* fix AddOn versions in eks sync tests
  • Loading branch information
ABHISHEKVALSAN authored Oct 30, 2024
1 parent 656fcd7 commit 564f324
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
21 changes: 12 additions & 9 deletions eks/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ const (

var (
// NOTE: Ensure that there is an entry for each supported version in the following tables.
supportedVersions = []string{"1.30", "1.29", "1.28", "1.27", "1.26", "1.25"}
supportedVersions = []string{"1.31", "1.30", "1.29", "1.28", "1.27", "1.26", "1.25"}

// Reference: https://docs.aws.amazon.com/eks/latest/userguide/managing-coredns.html
coreDNSVersionLookupTable = map[string]string{
"1.30": "1.11.1-eksbuild",
"1.29": "1.11.1-eksbuild",
"1.31": "1.11.3-eksbuild",
"1.30": "1.11.3-eksbuild",
"1.29": "1.11.3-eksbuild",
"1.28": "1.10.1-eksbuild",
"1.27": "1.10.1-eksbuild",
"1.26": "1.9.3-eksbuild",
Expand All @@ -53,6 +54,7 @@ var (

// Reference: https://docs.aws.amazon.com/eks/latest/userguide/managing-kube-proxy.html#updating-kube-proxy-add-on
kubeProxyVersionLookupTable = map[string]string{
"1.31": "1.31.0-minimal-eksbuild",
"1.30": "1.30.3-minimal-eksbuild",
"1.29": "1.29.7-minimal-eksbuild",
"1.28": "1.28.12-minimal-eksbuild",
Expand All @@ -63,12 +65,13 @@ var (

// Reference: https://docs.aws.amazon.com/eks/latest/userguide/managing-vpc-cni.html
amazonVPCCNIVersionLookupTable = map[string]string{
"1.30": "1.18.3",
"1.29": "1.18.3",
"1.28": "1.18.3",
"1.27": "1.18.3",
"1.26": "1.18.3",
"1.25": "1.18.3",
"1.31": "1.18.5",
"1.30": "1.18.5",
"1.29": "1.18.5",
"1.28": "1.18.5",
"1.27": "1.18.5",
"1.26": "1.18.5",
"1.25": "1.18.5",
}

defaultContainerImageAccount = "602401143452"
Expand Down
26 changes: 14 additions & 12 deletions eks/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,20 @@ func TestFindLatestEKSBuilds(t *testing.T) {
region string
expectedVersion string
}{
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.30", "us-east-1", "1.11.1-eksbuild.12"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.29", "us-east-1", "1.11.1-eksbuild.12"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.28", "us-east-1", "1.10.1-eksbuild.14"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.27", "us-east-1", "1.10.1-eksbuild.14"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.26", "us-east-1", "1.9.3-eksbuild.18"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.25", "us-east-1", "1.9.3-eksbuild.18"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.30", "us-east-1", "1.30.3-minimal-eksbuild.6"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.29", "us-east-1", "1.29.7-minimal-eksbuild.6"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.28", "us-east-1", "1.28.12-minimal-eksbuild.6"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.27", "us-east-1", "1.27.16-minimal-eksbuild.6"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.26", "us-east-1", "1.26.15-minimal-eksbuild.11"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.25", "us-east-1", "1.25.16-minimal-eksbuild.14"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.31", "us-east-1", "1.11.3-eksbuild.2"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.30", "us-east-1", "1.11.3-eksbuild.2"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.29", "us-east-1", "1.11.3-eksbuild.2"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.28", "us-east-1", "1.10.1-eksbuild.15"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.27", "us-east-1", "1.10.1-eksbuild.15"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.26", "us-east-1", "1.9.3-eksbuild.19"},
{coreDNSVersionLookupTable, coreDNSRepoPath, "1.25", "us-east-1", "1.9.3-eksbuild.19"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.31", "us-east-1", "1.31.0-minimal-eksbuild.6"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.30", "us-east-1", "1.30.3-minimal-eksbuild.10"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.29", "us-east-1", "1.29.7-minimal-eksbuild.9"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.28", "us-east-1", "1.28.12-minimal-eksbuild.11"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.27", "us-east-1", "1.27.16-minimal-eksbuild.11"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.26", "us-east-1", "1.26.15-minimal-eksbuild.16"},
{kubeProxyVersionLookupTable, kubeProxyRepoPath, "1.25", "us-east-1", "1.25.16-minimal-eksbuild.19"},
}

for _, tc := range testCase {
Expand Down

0 comments on commit 564f324

Please sign in to comment.