sigs.k8s.io/cluster-api-provider-aws@v1.5.5/docs/adr/0004-fargate-pools.md (about)

     1  # 4. EKS AWSFargateProfiles
     2  
     3  - Status: accepted
     4  - Date: 2021-02-15
     5  - Authors: @michaelbeaumont
     6  - Deciders: @michaelbeaumont, @richardcase
     7  
     8  ## Context
     9  
    10  At the time of writing CAPA has the AWS-specific infrastructure resources `AWSMachinePool`s
    11  and `AWSManagedMachinePool`s.
    12  These are referred to in `MachinePool`s as `infrastructureRef`s. The
    13  underlying AWS resources fit the `MachinePool` model very closely. Data about
    14  the pools, such as `replicas` is reflected back to the `MachinePool` and
    15  the responsible controllers reconcile the AWS resources using data specified on the
    16  `MachinePool`, like `.spec.template.spec.version` and `.spec.template.spec.bootstrap`.
    17  
    18  Issue #1786 is concerned with supporting EKS Fargate profiles in CAPA. Fargate
    19  profiles allow users to run pods on an on-demand, serverless compute platform
    20  called Fargate.
    21  Nodes are spun up dynamically for pods in specified namespaces or with specific
    22  labels. These selectors are packaged into a "profile" that also specifies which
    23  subnets are available for pods to run in.
    24  
    25  With CAPA, users would like to create a resource representing such a profile.
    26  
    27  This ADR concerns itself with how these resources are specified. The major
    28  decision is whether a Fargate profile can be represented in the `MachinePool` abstraction.
    29  
    30  Some of the fields on `MachinePool` don't really make sense in the Fargate
    31  context, like the entire `MachineSpec` under `spec.template.spec` (`version`,
    32  `bootstrap`), `spec.strategy` and the idea of desired replicas.
    33  
    34  ## Decision
    35  
    36  The `AWSFargateProfile` resource is implemented independently from any existing CAPI resource
    37  and users must only create and manipulate `AWSFargateProfile`s to create and manage
    38  Fargate profiles. `AWSFargateProfile`s are nevertheless associated with an
    39  `AWSManagedControlPlane`/`AWSManagedCluster`/`Cluster`.
    40  
    41  ## Consequences
    42  
    43  Users don't have to create a sort of "empty" `MachinePool` resource that points
    44  to an `AWSFargateProfile` and no ambiguity or confusion arises as to the semantics of the `MachinePool`
    45  spec in a Fargate context.