cdk-eks-blueprints icon indicating copy to clipboard operation
cdk-eks-blueprints copied to clipboard

[BUG] Fargate only cluster creates "default" fargate profile without asking/configuring it

Open tsahiduek opened this issue 3 years ago • 3 comments

Trying to create a Fargate only cluster with single fargate profile, results in 2 fargate profiles that are being created: the configured one, and another one called default targeting kube-system and default namespaces

Configurations snippet


        const fargateProfiles: Map<string, eks.FargateProfileOptions> = new Map([
            ["base-profile", { selectors: [{ namespace: "kube-system" }, { namespace: "karpenter" }] }],

        ]);
        const fargateClusterProvider = new ssp.FargateClusterProvider({
            fargateProfiles,
            version: clusterVersion
        });

        const blueprint = ssp.EksBlueprint.builder()
            .account(PIPELINE_ENV.account)
            .region(PIPELINE_ENV.region)
            .withBlueprintProps({
                version: clusterVersion,
            })
            .clusterProvider(fargateClusterProvider)

tsahiduek avatar Mar 27 '22 12:03 tsahiduek

Same happened to me..

maxritter avatar Mar 27 '22 19:03 maxritter

This works as designed. The behavior is similar to ekscstl --fargate behavior. See more here.

You can leverage the generic cluster provider to configure arbitrary fargate profiles (no default). Please let me know if you have any questions. I will keep the issue to make sure the docs reflect it properly.

shapirov103 avatar Mar 28 '22 13:03 shapirov103

I was facing the same today. I don't want a default Fargate profile (Only one for the Karpenter namespace). Using the generic Cluster Provider it's easy to solve this:

    const clusterProvider = new blueprints.GenericClusterProvider({
      version: eks.KubernetesVersion.V1_21,
      fargateProfiles: {
        karpenter: {
          fargateProfileName: 'karpenter',
          selectors: [{ namespace: 'karpenter' }],
        },
      },
    });

However, we might want to explicitly call out the 'default' behaviour in the documentation when leveraging. FargateClusterProvider

javydekoning avatar Aug 08 '22 15:08 javydekoning

This issue has been automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] avatar Jul 20 '23 00:07 github-actions[bot]

Issue closed due to inactivity.

github-actions[bot] avatar Sep 18 '23 00:09 github-actions[bot]