-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add Hop Limit Test For EKS metric_value_benchmark Test #401
Conversation
"ami": "AL2_x86_64", | ||
"instanceType":"t3a.medium", | ||
"instanceType":"t3.medium", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were testing against t3.medium since it was hard coded into the test
@@ -44,13 +45,14 @@ type testConfig struct { | |||
runMockServer bool | |||
// define target matrix field as set(s) | |||
// empty map means a testConfig will be created with a test entry for each entry from *_test_matrix.json | |||
targets map[string]map[string]struct{} | |||
targets map[string]map[any]struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hop limit is an int and not a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was curious if it were plausible and better practice to parse hop_limit into a string, but it makes sense to validate hop_limit as an int.
} | ||
|
||
variable "hop_limit" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these are here because we pass in hop limit through the gha and w/o this the tests will not execute
capacity_type = "ON_DEMAND" | ||
disk_size = 20 | ||
instance_types = ["t3.medium"] | ||
instance_types = [var.instance_type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instance type needs to come from the input
@@ -47,10 +47,10 @@ resource "aws_eks_node_group" "this" { | |||
min_size = 1 | |||
} | |||
|
|||
ami_type = "AL2_x86_64" | |||
ami_type = var.ami_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ami needs to come from the input
] | ||
provisioner "local-exec" { | ||
command = <<-EOT | ||
go run ./modify_hop_limit ${aws_eks_cluster.this.name} ${var.hop_limit} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was having issues creating a launch template so I created a function that will change the hop limit after nodes are already created
de70588
to
efaae09
Compare
if err != nil { | ||
log.Fatalf("could not get instances for input %v %v", instanceInput, err) | ||
} | ||
for _, reservation := range instanceOutput.Reservations { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easier to do this with structs than cli commands
efaae09
to
1430a36
Compare
Do not merge until @jefchien finishes the eks get metadata w/o imds changes are done |
Description of the issue
There is no way to test what happens when hop limit is 1 for EKS
Description of changes
Add hop limit 1 EKS test
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
https://github.com/aws/amazon-cloudwatch-agent/actions/runs/8726746471/job/23943412898