Skip to content

Commit 03cd53e

Browse files
committed
fix(eks): remove aws-auth ConfigMap and update AMI types to AL2023
- Remove explicit aws-auth ConfigMap resources from Windows clusters (EKS managed node groups handle node auth automatically) - Update test matrix from AL2_x86_64 to AL2023_x86_64_STANDARD for K8s 1.35 - Update GPU AMI from AL2_x86_64_GPU to AL2023_x86_64_NVIDIA - Replace hardcoded ami_type with var.ami_type in node groups
1 parent 9a2c3c7 commit 03cd53e

9 files changed

Lines changed: 11 additions & 69 deletions

File tree

generator/resources/eks_daemon_test_matrix.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[
22
{
33
"k8sVersion": "1.35",
4-
"ami": "AL2_x86_64",
4+
"ami": "AL2023_x86_64_STANDARD",
55
"instanceType":"t3.medium",
66
"arc": "amd64"
77
},
88
{
99
"k8sVersion": "1.35",
10-
"ami": "AL2_ARM_64",
10+
"ami": "AL2023_ARM_64_STANDARD",
1111
"instanceType":"m6g.large",
1212
"arc": "arm64"
1313
}

generator/test_case_generator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ var testTypeToTestConfig = map[string][]testConfig{
356356
testDir: "./test/metric_value_benchmark",
357357
targets: map[string]map[string]struct{}{"arc": {"amd64": {}}},
358358
instanceType: "g4dn.xlarge",
359-
ami: "AL2_x86_64_GPU",
359+
ami: "AL2023_x86_64_NVIDIA",
360360
},
361361
{
362362
testDir: "./test/metric_value_benchmark",
@@ -386,13 +386,13 @@ var testTypeToTestConfig = map[string][]testConfig{
386386
testDir: "./test/gpu", terraformDir: "terraform/eks/daemon/gpu",
387387
targets: map[string]map[string]struct{}{"arc": {"amd64": {}}},
388388
instanceType: "g4dn.xlarge",
389-
ami: "AL2_x86_64_GPU",
389+
ami: "AL2023_x86_64_NVIDIA",
390390
},
391391
{
392392
testDir: "./test/gpu_high_frequency_metrics", terraformDir: "terraform/eks/daemon/gpu",
393393
targets: map[string]map[string]struct{}{"arc": {"amd64": {}}},
394394
instanceType: "g4dn.xlarge",
395-
ami: "AL2_x86_64_GPU",
395+
ami: "AL2023_x86_64_NVIDIA",
396396
},
397397
{
398398
testDir: "./test/awsneuron", terraformDir: "terraform/eks/daemon/awsneuron",

terraform/eks/daemon/app_signals/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource "aws_eks_node_group" "this" {
4747
min_size = 1
4848
}
4949

50-
ami_type = "AL2_x86_64"
50+
ami_type = var.ami_type
5151
capacity_type = "ON_DEMAND"
5252
disk_size = 20
5353
instance_types = ["t3.medium"]

terraform/eks/daemon/awsneuron/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource "aws_eks_node_group" "this" {
4747
min_size = 1
4848
}
4949

50-
ami_type = "AL2_x86_64"
50+
ami_type = var.ami_type
5151
capacity_type = "ON_DEMAND"
5252
disk_size = 20
5353
instance_types = ["t3.medium"]

terraform/eks/daemon/emf/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource "aws_eks_node_group" "this" {
4747
min_size = 1
4848
}
4949

50-
ami_type = "AL2_x86_64"
50+
ami_type = var.ami_type
5151
capacity_type = "ON_DEMAND"
5252
disk_size = 20
5353
instance_types = ["t3.medium"]

terraform/eks/daemon/fluent/windows/main.tf

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -83,35 +83,6 @@ resource "aws_iam_role" "node_role" {
8383
})
8484
}
8585

86-
## AWS CONFIGMAP
87-
88-
resource "kubernetes_config_map" "configmap" {
89-
data = {
90-
"mapRoles" = <<EOT
91-
- groups:
92-
- system:bootstrappers
93-
- system:nodes
94-
rolearn: arn:aws:iam::${data.aws_caller_identity.account_id.account_id}:role/${aws_iam_role.node_role.name}
95-
username: system:node:{{EC2PrivateDNSName}}
96-
- groups:
97-
- eks:kube-proxy-windows
98-
- system:bootstrappers
99-
- system:nodes
100-
rolearn: arn:aws:iam::${data.aws_caller_identity.account_id.account_id}:role/${aws_iam_role.node_role.name}
101-
username: system:node:{{EC2PrivateDNSName}}
102-
- groups:
103-
- system:masters
104-
rolearn: arn:aws:iam::${data.aws_caller_identity.account_id.account_id}:role/Admin-Windows
105-
106-
EOT
107-
}
108-
109-
metadata {
110-
name = "aws-auth"
111-
namespace = "kube-system"
112-
}
113-
}
114-
11586
# EKS Node Groups
11687
resource "aws_eks_node_group" "node_group" {
11788
cluster_name = aws_eks_cluster.cluster.name

terraform/eks/daemon/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource "aws_eks_node_group" "this" {
4747
min_size = 1
4848
}
4949

50-
ami_type = "AL2_x86_64"
50+
ami_type = var.ami_type
5151
capacity_type = "ON_DEMAND"
5252
disk_size = 20
5353
instance_types = ["t3.medium"]

terraform/eks/daemon/statsd/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource "aws_eks_node_group" "this" {
4747
min_size = 1
4848
}
4949

50-
ami_type = "AL2_x86_64"
50+
ami_type = var.ami_type
5151
capacity_type = "ON_DEMAND"
5252
disk_size = 20
5353
instance_types = ["t3.medium"]

terraform/eks/daemon/windows/main.tf

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -75,35 +75,6 @@ resource "kubernetes_config_map_v1_data" "amazon_vpc_cni_windows" {
7575
}
7676
}
7777

78-
## AWS CONFIGMAP
79-
80-
resource "kubernetes_config_map" "configmap" {
81-
data = {
82-
"mapRoles" = <<EOT
83-
- groups:
84-
- system:bootstrappers
85-
- system:nodes
86-
rolearn: arn:aws:iam::${data.aws_caller_identity.account_id.account_id}:role/cwagent-eks-Worker-Role-${module.common.testing_id}
87-
username: system:node:{{EC2PrivateDNSName}}
88-
- groups:
89-
- eks:kube-proxy-windows
90-
- system:bootstrappers
91-
- system:nodes
92-
rolearn: arn:aws:iam::${data.aws_caller_identity.account_id.account_id}:role/cwagent-eks-Worker-Role-${module.common.testing_id}
93-
username: system:node:{{EC2PrivateDNSName}}
94-
- groups:
95-
- system:masters
96-
rolearn: arn:aws:iam::${data.aws_caller_identity.account_id.account_id}:role/Admin-Windows
97-
98-
EOT
99-
}
100-
101-
metadata {
102-
name = "aws-auth"
103-
namespace = "kube-system"
104-
}
105-
}
106-
10778
# EKS Node Groups
10879
resource "aws_eks_node_group" "this" {
10980
cluster_name = aws_eks_cluster.this.name
@@ -117,7 +88,7 @@ resource "aws_eks_node_group" "this" {
11788
min_size = 1
11889
}
11990

120-
ami_type = "AL2_x86_64"
91+
ami_type = var.ami_type
12192
capacity_type = "ON_DEMAND"
12293
disk_size = 20
12394
instance_types = ["t3.medium"]

0 commit comments

Comments
 (0)