-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature | Merge EKS clusters into one (#659)
Angelo, the author of this PR, shared the following message with me: "This is now fully tested, it just needs approval to be merged. I won’t be available tomorrow, but feel free to merge it on my behalf if everything looks good." Since it’s ready to go and fully tested, I’ll proceed to merge the PR. * Drop config for argocd exclusive nodes * Drop unused namespaces * Upgrade Argo and add nodeSelector and tolerations * Typos * Configure Slack notifications for ArgoCD * Change switchboard layout * Fix cert manager reference * Add Alertmanager and Grafana implementation to Kube Prom Stack * Make Fluent-Bit use IRSA and OpenSearch * Add IAM roles for grafana and fluent-bit * Add Goldilocks * Add Gatus * Fix ArgoCD definition * Conform keda to switchboard * Bump terraform version CC: @binbashar/leverage-ref-architecture-aws-admin @binbashar/leverage-ref-architecture-aws-dev
- Loading branch information
1 parent
f8929ce
commit ea9fe27
Showing
35 changed files
with
1,121 additions
and
512 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
apps-devstg/us-east-1/k8s-eks-demoapps/identities/ids_fluentbit.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
# Fluent-bit Roles & Policies | ||
# | ||
module "role_fluent_bit" { | ||
source = "github.com/binbashar/terraform-aws-iam.git//modules/iam-assumable-role-with-oidc?ref=v5.2.0" | ||
|
||
providers = { | ||
aws = aws.shared | ||
} | ||
|
||
create_role = true | ||
role_name = "${local.environment}-fluent-bit" | ||
provider_url = replace(data.terraform_remote_state.cluster.outputs.cluster_oidc_issuer_url, "https://", "") | ||
|
||
role_policy_arns = [ | ||
aws_iam_policy.fluent_bit.arn | ||
] | ||
oidc_fully_qualified_subjects = [ | ||
"system:serviceaccount:monitoring-logging:fluent-bit" | ||
] | ||
|
||
tags = local.tags_fluent_bit | ||
} | ||
|
||
resource "aws_iam_policy" "fluent_bit" { | ||
provider = aws.shared | ||
name = "${local.environment}-fluent-bit" | ||
description = "Fluent Bit" | ||
tags = local.tags_fluent_bit | ||
policy = <<-EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"es:ESHttp*" | ||
], | ||
"Resource": "arn:aws:es:${var.region}:${var.accounts.shared.id}:domain/example-domain" | ||
} | ||
] | ||
} | ||
EOF | ||
} |
70 changes: 70 additions & 0 deletions
70
apps-devstg/us-east-1/k8s-eks-demoapps/identities/ids_grafana.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# | ||
# Grafana Roles & Policies | ||
# | ||
module "role_grafana" { | ||
source = "github.com/binbashar/terraform-aws-iam.git//modules/iam-assumable-role-with-oidc?ref=v5.2.0" | ||
|
||
create_role = true | ||
role_name = "${local.environment}-grafana" | ||
provider_url = replace(data.terraform_remote_state.cluster.outputs.cluster_oidc_issuer_url, "https://", "") | ||
|
||
role_policy_arns = [ | ||
aws_iam_policy.grafana.arn | ||
] | ||
oidc_fully_qualified_subjects = [ | ||
"system:serviceaccount:monitoring-metrics:grafana" | ||
] | ||
|
||
tags = local.tags_grafana | ||
} | ||
|
||
resource "aws_iam_policy" "grafana" { | ||
name = "${local.environment}-grafana" | ||
description = "Grafana permissions for fetching data from Cloudwatch" | ||
tags = local.tags_grafana | ||
policy = <<-EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid": "AllowReadingMetricsFromCloudWatch", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"cloudwatch:DescribeAlarmsForMetric", | ||
"cloudwatch:DescribeAlarmHistory", | ||
"cloudwatch:DescribeAlarms", | ||
"cloudwatch:ListMetrics", | ||
"cloudwatch:GetMetricData", | ||
"cloudwatch:GetInsightRuleReport" | ||
], | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "AllowReadingLogsFromCloudWatch", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"logs:DescribeLogGroups", | ||
"logs:GetLogGroupFields", | ||
"logs:StartQuery", | ||
"logs:StopQuery", | ||
"logs:GetQueryResults", | ||
"logs:GetLogEvents" | ||
], | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "AllowReadingTagsInstancesRegionsFromEC2", | ||
"Effect": "Allow", | ||
"Action": ["ec2:DescribeTags", "ec2:DescribeInstances", "ec2:DescribeRegions"], | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "AllowReadingResourcesForTags", | ||
"Effect": "Allow", | ||
"Action": "tag:GetResources", | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
EOF | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.