Skip to content

Commit

Permalink
fix(eks): incorrect enableDockerBridge value when enabled (#8895)
Browse files Browse the repository at this point in the history
When `enableDockerBridge` is enabled in `BootstrapOptions`, pass the value correctly to user-data.

Fixes: #5786 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
pahud authored Jul 5, 2020
1 parent a732d14 commit ea0552a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-eks/lib/user-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function renderAmazonLinuxUserData(clusterName: string, autoScalingGroup:
}

if (options.enableDockerBridge) {
extraArgs.push('--enable-docker-bridge');
extraArgs.push('--enable-docker-bridge true');
}

if (options.dockerConfigJson) {
Expand Down Expand Up @@ -67,4 +67,4 @@ export enum LifecycleLabel {
* spot instances
*/
SPOT = 'Ec2Spot'
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-eks/test/test.user-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export = {
}));

// THEN
test.deepEqual(userData[1], '/etc/eks/bootstrap.sh my-cluster-name --kubelet-extra-args "--node-labels lifecycle=OnDemand" --use-max-pods true --enable-docker-bridge');
test.deepEqual(userData[1], '/etc/eks/bootstrap.sh my-cluster-name --kubelet-extra-args "--node-labels lifecycle=OnDemand" --use-max-pods true --enable-docker-bridge true');
test.done();
},

Expand Down

0 comments on commit ea0552a

Please sign in to comment.