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

Fixing EKS and performanceTracking Integration Tests #370

Merged
merged 26 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6cce7d7
added changed the OS yaml
bhanuba Oct 20, 2023
1fcb843
added changed the OS yaml
bhanuba Oct 20, 2023
358c805
added list to performance
bhanuba Oct 26, 2023
c5d78fc
added list to performance
bhanuba Oct 26, 2023
7122b9c
added list to performance
bhanuba Oct 26, 2023
5303824
added list to performance
bhanuba Oct 26, 2023
e94f1d5
added list to performance
bhanuba Oct 26, 2023
605c66e
added list to performance
bhanuba Oct 26, 2023
3f73b77
Merge remote-tracking branch 'origin/integration--failure-test' into …
bhanuba Oct 27, 2023
5f5ef54
added list to performance
bhanuba Oct 27, 2023
e6a1a32
added list to performance
bhanuba Oct 27, 2023
189fc2e
added list to performance
bhanuba Oct 27, 2023
17efc88
added list to performance
bhanuba Oct 27, 2023
8ca543a
added list to performance
bhanuba Oct 27, 2023
153f72d
added list to performance
bhanuba Oct 28, 2023
9ab860b
added list to performance
bhanuba Oct 28, 2023
791a1e4
added list to performance
bhanuba Oct 28, 2023
33cc61d
added list to performance
bhanuba Oct 30, 2023
200b5b6
added list to performance
bhanuba Oct 30, 2023
058b0f1
added list to performance
bhanuba Oct 30, 2023
9b640cf
Merge branch 'main' into integration--failure-test
bhanuba Oct 30, 2023
9b6ea4b
Merge branch 'main' into integration--failure-test
bhanuba Oct 30, 2023
777fade
added list to performance
bhanuba Oct 30, 2023
2568c33
added list to performance
bhanuba Oct 30, 2023
fc5fece
added list to performance
bhanuba Oct 30, 2023
b045d8e
Merge branch 'main' into integration--failure-test
bhanuba Nov 1, 2023
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
26 changes: 12 additions & 14 deletions terraform/eks/daemon/emf/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,19 @@ resource "aws_eks_node_group" "this" {
# EKS Node IAM Role
resource "aws_iam_role" "node_role" {
name = "cwagent-eks-Worker-Role-${module.common.testing_id}"
assume_role_policy = jsonencode({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description of the PR isn't clear so can you explain what was the reasons for this change

Version = "2012-10-17",
Statement = [
{
Effect = "Allow",
Principal = {
Service = "ec2.amazonaws.com"
},
Action = "sts:AssumeRole"
}
]
})

assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
POLICY
}

resource "aws_iam_role_policy_attachment" "node_AmazonEKSWorkerNodePolicy" {
Expand Down
27 changes: 12 additions & 15 deletions terraform/eks/daemon/fluent/common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,18 @@ resource "aws_eks_node_group" "node_group" {
# EKS Node IAM Role
resource "aws_iam_role" "node_role" {
name = "cwagent-eks-Worker-Role-${module.common.testing_id}"

assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
POLICY
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Effect = "Allow",
Principal = {
Service = "ec2.amazonaws.com"
},
Action = "sts:AssumeRole"
}
]
})
}

resource "aws_iam_role_policy_attachment" "node_AmazonEKSWorkerNodePolicy" {
Expand Down
28 changes: 13 additions & 15 deletions terraform/eks/daemon/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,21 @@ resource "aws_eks_node_group" "this" {
# EKS Node IAM Role
resource "aws_iam_role" "node_role" {
name = "cwagent-eks-Worker-Role-${module.common.testing_id}"

assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
POLICY
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Effect = "Allow",
Principal = {
Service = "ec2.amazonaws.com"
},
Action = "sts:AssumeRole"
}
]
})
}


resource "aws_iam_role_policy_attachment" "node_AmazonEKSWorkerNodePolicy" {
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy"
role = aws_iam_role.node_role.name
Expand Down
28 changes: 13 additions & 15 deletions terraform/eks/daemon/statsd/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,21 @@ resource "aws_eks_node_group" "this" {
# EKS Node IAM Role
resource "aws_iam_role" "node_role" {
name = "cwagent-eks-Worker-Role-${module.common.testing_id}"

assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
POLICY
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Effect = "Allow",
Principal = {
Service = "ec2.amazonaws.com"
},
Action = "sts:AssumeRole"
}
]
})
}


resource "aws_iam_role_policy_attachment" "node_AmazonEKSWorkerNodePolicy" {
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy"
role = aws_iam_role.node_role.name
Expand Down
27 changes: 12 additions & 15 deletions terraform/eks/deployment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,18 @@ resource "aws_eks_node_group" "this" {
# EKS Node IAM Role
resource "aws_iam_role" "node_role" {
name = "cwagent-eks-Worker-Role-${module.common.testing_id}"

assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
POLICY
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Effect = "Allow",
Principal = {
Service = "ec2.amazonaws.com"
},
Action = "sts:AssumeRole"
}
]
})
}

resource "aws_iam_role_policy_attachment" "node_AmazonEKSWorkerNodePolicy" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/performance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ resource "null_resource" "validator_linux" {
"git clone --branch ${var.github_test_repo_branch} ${var.github_test_repo}",
var.run_mock_server ? "cd mockserver && sudo docker build -t mockserver . && cd .." : "echo skipping mock server build",
var.run_mock_server ? "sudo docker run --name mockserver -d -p 8080:8080 -p 443:443 mockserver" : "echo skipping mock server run",
"cd ..", # return to root , two copy xray configs next to validator
"cp -r amazon-cloudwatch-agent-test/test/xray/resources /home/ec2-user/",
"export AWS_REGION=${var.region}",
"cd ./validator/validators",
"sudo chmod +x ./${local.install_validator}",
"./${local.install_validator} --validator-config=${module.validator.instance_validator_config} --preparation-mode=true",
local.start_command,
Expand Down