-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Migrated away from old EKS blueprints repository (#437)
- Loading branch information
1 parent
d15bc7d
commit e96dba0
Showing
26 changed files
with
612 additions
and
136 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
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 |
---|---|---|
|
@@ -6,6 +6,8 @@ instrumentation: | |
port: 4317 | ||
|
||
collector: | ||
create: true | ||
|
||
replicaCount: 1 | ||
|
||
image: | ||
|
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
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
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 |
---|---|---|
@@ -1,38 +1,38 @@ | ||
module "iam_assumable_role_adot_xray" { | ||
source = "terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc" | ||
version = "~> v5.5.0" | ||
create_role = true | ||
role_name = "${var.environment_name}-opentelemetry-collector" | ||
provider_url = module.retail_app_eks.eks_oidc_issuer_url | ||
role_policy_arns = ["arn:aws:iam::aws:policy/AWSXRayDaemonWriteAccess"] | ||
oidc_fully_qualified_subjects = ["system:serviceaccount:opentelemetry:opentelemetry-collector"] | ||
|
||
tags = module.tags.result | ||
} | ||
|
||
resource "kubernetes_namespace_v1" "opentelemetry" { | ||
resource "kubectl_manifest" "otel_instrumentation" { | ||
count = var.opentelemetry_enabled ? 1 : 0 | ||
|
||
depends_on = [ | ||
null_resource.addons_blocker | ||
time_sleep.workloads | ||
] | ||
|
||
metadata { | ||
name = "opentelemetry" | ||
} | ||
} | ||
|
||
resource "helm_release" "opentelemetry" { | ||
count = var.opentelemetry_enabled ? 1 : 0 | ||
|
||
name = "opentelemetry" | ||
chart = "../../../kubernetes/charts/opentelemetry" | ||
|
||
namespace = kubernetes_namespace_v1.opentelemetry[0].metadata[0].name | ||
yaml_body = yamlencode({ | ||
"apiVersion" = "opentelemetry.io/v1alpha1" | ||
"kind" = "Instrumentation" | ||
"metadata" = { | ||
"name" = "default-instrumentation" | ||
"namespace" = "${module.retail_app_eks.adot_namespace}" | ||
} | ||
"spec" = { | ||
"env" = [ | ||
{ | ||
"name" = "OTEL_JAVAAGENT_ENABLED" | ||
"value" = "true" | ||
}, | ||
] | ||
"exporter" = { | ||
"endpoint" = "http://adot-col-otlp-ingest-collector.${module.retail_app_eks.adot_namespace}:4317" | ||
} | ||
"propagators" = [ | ||
"tracecontext", | ||
"baggage", | ||
] | ||
"sampler" = { | ||
"type" = "always_on" | ||
} | ||
} | ||
}) | ||
} | ||
|
||
values = [ | ||
templatefile("${path.module}/values/opentelemetry.yaml", { | ||
adot_xray_role_arn = module.iam_assumable_role_adot_xray.iam_role_arn | ||
}) | ||
] | ||
} | ||
locals { | ||
opentelemetry_instrumentation = var.opentelemetry_enabled ? "${module.retail_app_eks.adot_namespace}/${yamldecode(kubectl_manifest.otel_instrumentation[0].yaml_body_parsed).metadata.name}" : "" | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
output "configure_kubectl" { | ||
description = "Command to update kubeconfig for this cluster" | ||
value = module.retail_app_eks.configure_kubectl | ||
} | ||
} |
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.