Skip to content

eks: Creating a Pod Identity service account should check if the Pod Identity Agent is already installed #32580

@dms486

Description

@dms486

Describe the bug

If the Pod Identity Agent add-on is already created

new Addon(this, 'podIdentityAgent', {
  addonName: 'eks-pod-identity-agent',
  cluster: cluster,
  addonVersion: 'v1.3.4-eksbuild.1'
});

Then adding a new Pod Identity service account will fail because the add-on is already installed

const serviceAccount = new ServiceAccount(this, 'testServiceAccount', {
  cluster: cluster,
  name: 'test-sa',
  namespace: 'default',
  identityType: IdentityType.POD_IDENTITY
});

Error message: "eks-pod-identity-agent already exists in stack"

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

The creation of the Pod Identity service account would detect that the Pod Identity Agent is already installed and skip that step

Current Behavior

The creation of the Pod Identity service does not detect that the Pod Identity Agent is already installed and the deployment fails

Reproduction Steps

Create the Pod Identity Agent add-on

new Addon(this, 'podIdentityAgent', {
  addonName: 'eks-pod-identity-agent',
  cluster: cluster,
  addonVersion: 'v1.3.4-eksbuild.1'
});

Then add a new Pod Identity service account

const serviceAccount = new ServiceAccount(this, 'testServiceAccount', {
  cluster: cluster,
  name: 'test-sa',
  namespace: 'default',
  identityType: IdentityType.POD_IDENTITY
});

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.167.1

Framework Version

No response

Node.js Version

18.20.4

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions