Skip to content

Commit

Permalink
Merge pull request #958 from Hounddog/bugfix/cluster-autoscaler
Browse files Browse the repository at this point in the history
ClusterAutoScalerAddOn: Bug Fix on Namespace dependency #957
  • Loading branch information
shapirov103 authored Mar 15, 2024
2 parents a7c7991 + 75c8505 commit 88b3162
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/addons/cluster-autoscaler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,16 @@ export class ClusterAutoScalerAddOn extends HelmAddOn {
Tags.of(ng).add(`k8s.io/cluster-autoscaler/${clusterName}`, "owned", { applyToLaunchedInstances: true });
Tags.of(ng).add("k8s.io/cluster-autoscaler/enabled", "true", { applyToLaunchedInstances: true });
}

// Create namespace
if (this.options.createNamespace) {
createNamespace(namespace, cluster, true);
}

// Create IRSA
const sa = createServiceAccount(cluster, RELEASE, namespace, autoscalerPolicyDocument);

// Create namespace
if (this.options.createNamespace) {
const ns = createNamespace(namespace, cluster, true);
sa.node.addDependency(ns);
}

// Create Helm Chart
setPath(values, "cloudProvider", "aws");
setPath(values, "autoDiscovery.clusterName", cluster.clusterName);
Expand Down

0 comments on commit 88b3162

Please sign in to comment.