Skip to content

Commit

Permalink
moving to nodegroup is created
Browse files Browse the repository at this point in the history
  • Loading branch information
rshade committed Nov 21, 2023
1 parent 0d1b93f commit 51af1f2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions nodejs/eks/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,19 +705,6 @@ export function createCore(
{ parent: parent },
);

// Add CSI Driver for Storage
const ebsCsiDriver = new aws.eks.Addon(
`${name}-aws-ebs-csi-driver`,
{
addonName: "aws-ebs-csi-driver",
clusterName: eksCluster.name,
},
{
parent,
provider: args.creationRoleProvider ? args.creationRoleProvider.provider : provider,
},
);

// Add any requested StorageClasses.
const storageClasses = args.storageClasses || {};
const userStorageClasses = {} as UserStorageClasses;
Expand Down Expand Up @@ -1779,6 +1766,19 @@ export function createCluster(
}
}

if (defaultNodeGroup){
// Add CSI Driver for Storage
const ebsCsiDriver = new aws.eks.Addon(
`${name}-aws-ebs-csi-driver`,
{
addonName: "aws-ebs-csi-driver",
clusterName: core.cluster.name
},
{
parent: self,
},
);
}
// Export the cluster's kubeconfig with a dependency upon the cluster's autoscaling group. This will help
// ensure that the cluster's consumers do not attempt to use the cluster until its workers are attached.
const kubeconfig = pulumi.all(configDeps).apply(([kc]) => kc);
Expand Down

0 comments on commit 51af1f2

Please sign in to comment.