Skip to content

Add KEDA integration test infrastructure - #732

Open
vaishnavi-30-beep wants to merge 31 commits into
aws:mainfrom
vaishnavi-30-beep:feature/keda-integration
Open

Add KEDA integration test infrastructure#732
vaishnavi-30-beep wants to merge 31 commits into
aws:mainfrom
vaishnavi-30-beep:feature/keda-integration

Conversation

@vaishnavi-30-beep

Copy link
Copy Markdown

Summary

Add end-to-end integration tests for KEDA solution metrics pipeline.

Changes

  • Terraform infrastructure for EKS cluster with KEDA helm install
  • ScaledObject (cron trigger) and ScaledJob test workloads
  • Integration tests validating all 11 KEDA operator metrics:
    • Metric existence, instrumentation scope, expected labels
    • K8s resource attributes (cluster, namespace, deployment, pod)
    • Cloud resource attributes (provider, platform, region, account, ARN)
    • Metric value sanity checks (build_info==1, scaler_active==1, metrics_value>=0)

Related

Testing

Screenshot 2026-07-28 at 16 19 47

Add KEDA solution integration tests following the same pattern as
Karpenter. Includes metric existence, instrumentation scope, label
decoration, K8s resource attribute, and cloud attribute validation.

Changes:
- Add test/otel/solutions/keda/ with setup, metrics, and test files
- Add SourceKEDA to otelmetrics source registry
- Add KEDA Helm install and test ScaledObject to otel terraform
- Enable KEDA solution in CloudWatch observability Helm chart
- Add keda_version variable (default 2.16.1)
- Add KEDA test runner to terraform validator
Update metric definitions based on actual KEDA operator /metrics endpoint:
- keda_scaler_errors_total -> keda_scaler_detail_errors_total
- keda_resource_totals -> keda_resource_registered_total
- Add keda_scaled_object_errors_total
- Add keda_trigger_registered_total
- Update ExpectedLabels to match actual label names
The actual KEDA metric only exposes 'type' and 'namespace' labels,
not 'resource'.
- Add 2-minute wait before KEDA tests for metric propagation in CI
- Rename helm_chart_branch to keda_chart_ref variable
- Clone helm chart from vaishnavi-30-beep/helm-charts fork
- Use path.module for chart path
- Remove all Karpenter-related terraform resources (IAM, helm, nodepool,
  subnet tags) to make this a KEDA-only branch
- Remove karpenter_version variable and Karpenter test runner step
- Add ScaledJob workload with cron trigger for keda_scaled_job_errors_total
  metric coverage
- Make cloud.account.id and cloud.resource_id assertions unconditional
- Add metric value sanity checks: keda_build_info==1, keda_scaler_active==1,
  keda_scaler_metrics_value>=0
…all timeout

KEDA finalizers deadlock during terraform destroy when the operator pods
are removed before ScaledObject/ScaledJob CRs. Add destroy-time
provisioners to explicitly delete KEDA custom resources before the helm
release is uninstalled.
@vaishnavi-30-beep
vaishnavi-30-beep requested a review from a team as a code owner July 28, 2026 15:21
@vaishnavi-30-beep
vaishnavi-30-beep changed the base branch from feature/keda-integration to main July 28, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants