Skip to content

[ecs] Add CapacityProvider CRD and capacityProviderStrategy field support #2887

@blackdog0403

Description

@blackdog0403

Is your feature request related to a problem?

The ACK ECS controller currently supports Cluster, Service, and TaskDefinition CRDs, but does not support CapacityProvider as a CRD. Additionally, the Service CRD does not expose the capacityProviderStrategy field, and the Cluster CRD does not support capacityProviders or defaultCapacityProviderStrategy.

Data platforms (Spark, Kafka, etc.) running on ECS use CapacityProviders to dynamically scale compute resources (ASG-based EC2 or Fargate) based on workload demands. Without ACK support, teams cannot manage this critical infrastructure entirely through Kubernetes manifests, breaking the fully declarative GitOps workflow.

Describe the solution you'd like

We need:

  1. A CapacityProvider CRD to create and manage capacity providers
  2. capacityProviderStrategy field support in the Service CRD
  3. capacityProviders and defaultCapacityProviderStrategy support in the Cluster CRD

Expected CRD behavior:

apiVersion: ecs.services.k8s.aws/v1alpha1
kind: CapacityProvider
metadata:
  name: spark-compute-cp
spec:
  name: spark-compute-cp
  autoScalingGroupProvider:
    autoScalingGroupARN: arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:...
    managedScaling:
      status: ENABLED
      targetCapacity: 80
      minimumScalingStepSize: 1
      maximumScalingStepSize: 10
    managedTerminationProtection: ENABLED
apiVersion: ecs.services.k8s.aws/v1alpha1
kind: Service
metadata:
  name: spark-job-service
spec:
  name: spark-job-service
  clusterName: data-platform-cluster
  taskDefinition: spark-job-taskdef
  desiredCount: 10
  capacityProviderStrategy:
    - capacityProvider: spark-compute-cp
      weight: 1
      base: 5

Describe alternatives you've considered

Currently managing CapacityProviders via Terraform or AWS CLI outside of ACK, which breaks the single-source-of-truth model for infrastructure managed through Kubernetes.

AWS API References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/new-fieldCategorizes issue or PR as related to a new fieldkind/new-resourceCategorizes issue or PR as related to a new resource.service/ecsIndicates issues or PRs that are related to ecs-controller.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions