Skip to content

Phase 1: Controller Skeleton & Prometheus Integration #1

Description

@diranged

Goal

Build the basic controller infrastructure that can query Lumina (RFC-0002) metrics from Prometheus.

Deliverables

  • Kubernetes controller with leader election
  • Prometheus client configuration
  • Query RFC-0002 metrics: savings_plan_remaining_capacity, ec2_reserved_instance
  • Health checks and readiness endpoints (/healthz, /readyz)
  • Structured logging (zap or logrus)
  • Basic controller reconciliation loop
  • ConfigMap-based configuration (Prometheus URL, reconciliation intervals)

Technology Stack

  • Go with kubebuilder/controller-runtime
  • Prometheus client (prometheus/client_golang)
  • Follow Lumina's project structure patterns

Success Criteria

  • Controller successfully queries Prometheus metrics
  • Logs show SP/RI capacity data every 5 minutes
  • Leader election working with 2 replicas
  • Health endpoints return 200 OK
  • No errors in logs during normal operation

Dependencies

  • RFC-0002 (Lumina) Phase 3 completed (metrics available)
  • Access to Prometheus with Lumina metrics

Testing Requirements

  • Unit tests for Prometheus client
  • Integration tests with mock Prometheus
  • Leader election tests
  • 100% code coverage required

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-1Phase 1: Controller Skeleton & Prometheus Integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions