Skip to content

Commit

Permalink
fix: use mime-multipart for launch template (#1163)
Browse files Browse the repository at this point in the history
### Proposed changes

Uses best practices from
https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html
to set the LaunchTemplate configuration. Tests were passing in CI, but
failing in the upgrade snapshots workflow.

### Related issues (optional)

Fixes: #1162
  • Loading branch information
rquitales authored May 23, 2024
1 parent 6887dd0 commit 515d31f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions nodejs/eks/nodegroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1770,12 +1770,18 @@ function createMNGCustomLaunchTemplate(
args.clusterName,
])
.apply(([clusterName, clusterEndpoint, clusterCertAuthority, argsClusterName]) => {
return `#!/bin/bash
return `MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="
--==MYBOUNDARY==
Content-Type: text/x-shellscript; charset="us-ascii"
#!/bin/bash
/etc/eks/bootstrap.sh --apiserver-endpoint "${clusterEndpoint}" --b64-cluster-ca "${clusterCertAuthority}" "${
/etc/eks/bootstrap.sh --apiserver-endpoint "${clusterEndpoint}" --b64-cluster-ca "${clusterCertAuthority}" "${
argsClusterName || clusterName
}"${bootstrapExtraArgs}
`;
--==MYBOUNDARY==--`;
});

// Encode the user data as base64.
Expand Down

0 comments on commit 515d31f

Please sign in to comment.