Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3640883
feat(otel): add Karpenter integration test and Terraform setup
vaishnavi-30-beep Jun 25, 2026
eb630c0
revert locals refactor, keep original cluster name inline
vaishnavi-30-beep Jun 25, 2026
7d1c3b6
removed data "aws_partition" "current" from main.tf
vaishnavi-30-beep Jun 25, 2026
28cf6b5
test: added instrumentation consistency check
vaishnavi-30-beep Jun 25, 2026
cf9a4f4
edited comment
vaishnavi-30-beep Jun 26, 2026
ec89087
refactor: consolidate resource attribute tests into single test
vaishnavi-30-beep Jun 26, 2026
db96765
test(karpenter): Added value assertions for cloud and K8s resource at…
vaishnavi-30-beep Jul 2, 2026
a1009f4
fix : renamed flag name in main.tf
vaishnavi-30-beep Jul 6, 2026
15652d2
fix: update karpenter to 1.13.0, remove SQS queue
vaishnavi-30-beep Jul 8, 2026
260dda5
ci: temporarily point helm chart to fork for testing
vaishnavi-30-beep Jul 8, 2026
556c4fc
fix: remove scheduler metrics that require pod scheduling activity
vaishnavi-30-beep Jul 8, 2026
2270369
fix: rename helm_chart_branch to avoid CI override, remove scheduler …
vaishnavi-30-beep Jul 8, 2026
156d112
fix: rename to karpenter_chart_ref to avoid CI grep override
vaishnavi-30-beep Jul 8, 2026
abc9d22
revert: remove temporary fork/branch overrides
vaishnavi-30-beep Jul 9, 2026
83fbe85
Merge remote-tracking branch 'origin/main' into feature/karpenter-int…
vaishnavi-30-beep Jul 14, 2026
8b04833
Merge remote-tracking branch 'origin/main' into feature/karpenter-int…
vaishnavi-30-beep Jul 21, 2026
12ceb37
rename: move karpenter tests from integrations/ to solutions/
vaishnavi-30-beep Jul 21, 2026
33caed0
Merge remote-tracking branch 'origin/main' into feature/karpenter-int…
vaishnavi-30-beep Jul 23, 2026
b71f8b0
feat(otel): Add KEDA integration tests
vaishnavi-30-beep Jul 24, 2026
9a5dd37
fix(otel): Correct KEDA metric names to match actual operator output
vaishnavi-30-beep Jul 24, 2026
c52cba9
fix(otel): Remove 'resource' from keda_resource_registered_total labels
vaishnavi-30-beep Jul 24, 2026
468f434
test(keda): Add KEDA integration test infrastructure
vaishnavi-30-beep Jul 24, 2026
c7591b1
fix(keda): Enable Prometheus metrics in KEDA helm install
vaishnavi-30-beep Jul 27, 2026
c0ff802
fix(otel): Add propagation wait for KEDA tests and use fork helm chart
vaishnavi-30-beep Jul 27, 2026
c2e2747
feat(keda): Remove Karpenter, add ScaledJob, and metric value assertions
vaishnavi-30-beep Jul 28, 2026
027c3b1
fix(ci): Add destroy provisioners for KEDA CRs to prevent helm uninst…
vaishnavi-30-beep Jul 28, 2026
203ae12
chore: Remove Karpenter test files from KEDA branch
vaishnavi-30-beep Jul 28, 2026
d768743
chore: Remove SourceKarpenter from source registry enum
vaishnavi-30-beep Jul 28, 2026
e62f127
chore: Point keda_chart_ref to main
vaishnavi-30-beep Jul 28, 2026
52d30c4
chore: Use standard helm_chart_branch variable pointing to aws-observ…
vaishnavi-30-beep Jul 28, 2026
a5985fa
fix: Use standard ./helm-charts path for clone and chart reference
vaishnavi-30-beep Jul 28, 2026
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
138 changes: 138 additions & 0 deletions terraform/eks/daemon/otel/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,131 @@ resource "null_resource" "kubectl" {
}
}

# --- KEDA Helm install ---

resource "helm_release" "keda" {
name = "keda"
repository = "https://kedacore.github.io/charts"
chart = "keda"
version = var.keda_version
namespace = "keda"
create_namespace = true

set = [
{ name = "resources.operator.requests.cpu", value = "100m" },
{ name = "resources.operator.requests.memory", value = "128Mi" },
{ name = "prometheus.metricServer.enabled", value = "true" },
{ name = "prometheus.operator.enabled", value = "true" },
]

depends_on = [
aws_eks_node_group.this,
null_resource.kubectl,
]
}

# --- KEDA test workload: nginx-keda with cron ScaledObject ---

resource "kubernetes_deployment_v1" "nginx_keda" {
depends_on = [aws_eks_node_group.this]
metadata {
name = "nginx-keda"
namespace = "default"
}
spec {
replicas = 1
selector { match_labels = { app = "nginx-keda" } }
template {
metadata { labels = { app = "nginx-keda" } }
spec {
node_selector = { "ci-test.example.com/node-color" = "blue" }
container {
name = "nginx"
image = "public.ecr.aws/nginx/nginx:latest"
port { container_port = 80 }
resources { requests = { cpu = "10m", memory = "32Mi" } }
}
}
}
}
}

resource "null_resource" "keda_scaled_object" {
depends_on = [helm_release.keda, kubernetes_deployment_v1.nginx_keda]
provisioner "local-exec" {
command = <<-EOT
cat <<'EOF' | kubectl apply -f -
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: nginx-keda-scaledobject
namespace: default
spec:
scaleTargetRef:
name: nginx-keda
minReplicaCount: 1
maxReplicaCount: 3
pollingInterval: 15
triggers:
- type: cron
metadata:
timezone: "UTC"
start: "0 0 * * *"
end: "59 23 * * *"
desiredReplicas: "1"
EOF
EOT
}
provisioner "local-exec" {
when = destroy
command = "kubectl delete scaledobject nginx-keda-scaledobject -n default --timeout=60s 2>/dev/null || true"
}
}

resource "null_resource" "keda_scaled_job" {
depends_on = [helm_release.keda, null_resource.kubectl]
provisioner "local-exec" {
command = <<-EOT
cat <<'EOF' | kubectl apply -f -
apiVersion: keda.sh/v1alpha1
kind: ScaledJob
metadata:
name: keda-test-scaledjob
namespace: default
spec:
jobTargetRef:
template:
spec:
nodeSelector:
ci-test.example.com/node-color: blue
containers:
- name: echo
image: busybox:1.36
command: ["echo", "keda-scaled-job-test"]
resources:
requests:
cpu: 10m
memory: 16Mi
restartPolicy: Never
backoffLimit: 1
pollingInterval: 30
maxReplicaCount: 1
triggers:
- type: cron
metadata:
timezone: "UTC"
start: "0 0 * * *"
end: "59 23 * * *"
desiredReplicas: "1"
EOF
EOT
}
provisioner "local-exec" {
when = destroy
command = "kubectl delete scaledjob keda-test-scaledjob -n default --timeout=60s 2>/dev/null || true"
}
}

# --- Helm chart install ---

data "external" "clone_helm_chart" {
Expand All @@ -140,12 +265,14 @@ resource "helm_release" "aws_observability" {
{ name = "clusterName", value = aws_eks_cluster.this.name },
{ name = "region", value = var.region },
{ name = "otelContainerInsights.enabled", value = "true" },
{ name = "otelContainerInsights.solutions.keda.enabled", value = "true" },
]

depends_on = [
aws_eks_addon.pod_identity_agent,
null_resource.kubectl,
data.external.clone_helm_chart,
helm_release.keda,
]
}

Expand Down Expand Up @@ -351,6 +478,8 @@ resource "null_resource" "validator" {
depends_on = [
null_resource.restart_pods,
kubernetes_deployment_v1.nginx_test,
null_resource.keda_scaled_object,
null_resource.keda_scaled_job,
]

triggers = { always_run = timestamp() }
Expand All @@ -368,6 +497,15 @@ resource "null_resource" "validator" {
-computeType=EKS \
-eksDeploymentStrategy=DAEMON \
-region=${var.region}

echo "Running OTEL solutions tests (KEDA)..."
echo "Waiting 2 additional minutes for KEDA metrics to propagate..."
sleep 120
go test -tags integration -timeout 1h -v ./test/otel/solutions/keda/... \
-eksClusterName=${aws_eks_cluster.this.name} \
-computeType=EKS \
-eksDeploymentStrategy=DAEMON \
-region=${var.region}
EOT
}
}
5 changes: 5 additions & 0 deletions terraform/eks/daemon/otel/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ variable "instance_type" {
type = string
default = "t3.medium"
}

variable "keda_version" {
type = string
default = "2.16.1"
}
Loading
Loading