-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose KubeletExtraArgs and BootstrapExtraArgs for managed nodegroups #1131
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
1e4fb97
to
5a8a4b9
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
Upgrade tests are failing due to kubeconfig diff and AMI ID diffs (see #1145). This is expected, and no other diffs are observed. |
dcaec6f
to
d3725d7
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edit: whoops ignore me
@@ -830,6 +831,30 @@ func generateSchema() schema.PackageSpec { | |||
"version": { | |||
TypeSpec: schema.TypeSpec{Type: "string"}, | |||
}, | |||
"kubeletExtraArgs": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm remembering now that TF has a ConflictsWith helper which we don't (yet?) have, could be a useful shorthand for marking mutually exclusive fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me code-wise. I don't have a good concept of the use-cases here though FWIW. I had the same question on whether string or []string
(or both?) is user friendly, sounds like it's beeing considered.
d3725d7
to
5bcd157
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
Will be leaving the input as a string in this PR to maintain consistency with the other nodegroup resource to make it less jarring for users managing both types of resources. We can look into extending the type to be a string array in the future. |
### Proposed changes Exposes a new option for ManagedNodeGroups to enable IMDSv2. This PR is stacked on top of #1131 which allows the creation of a LaunchTemplate to implement these features. Manual testing was done to ensure that we can create a ManagedNodeGroup with IMDSv2 enabled using instructions from: https://stackoverflow.com/questions/64595032/how-to-tell-what-version-of-instance-metadata-serviceimds-ec2-instance-is-usin ### Related issues (optional) Fixes: #682
@@ -1677,13 +1710,57 @@ function createManagedNodeGroupInternal( | |||
}; | |||
}), | |||
subnetIds: subnetIds, | |||
launchTemplate: launchTemplate ? { id: launchTemplate.id, version: launchTemplate.latestVersion.apply((version) => {return `${version}`})} : undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rquitales, I believe with this line you're effectively discarding args.launchTemplate
, thus causing #1193
…#1131) ### Proposed changes This PR enables setting kubelet and bootstrap extra args by creating a custom launch template if the arguments are supplied. Existing ManagedNodeGroups will not have a diff since we only create and use a custom launch template if these options are used by the Pulumi program. #### Tests: - Updated existing NodeJS and Golang test cases to ensure MNGs can supply kubelet extra args and the launch template is used - Manually tested and verified within the AWS console that the user data is set correctly when these options are supplied ### Related issues (optional) Closes: #611
### Proposed changes Exposes a new option for ManagedNodeGroups to enable IMDSv2. This PR is stacked on top of #1131 which allows the creation of a LaunchTemplate to implement these features. Manual testing was done to ensure that we can create a ManagedNodeGroup with IMDSv2 enabled using instructions from: https://stackoverflow.com/questions/64595032/how-to-tell-what-version-of-instance-metadata-serviceimds-ec2-instance-is-usin ### Related issues (optional) Fixes: #682
Proposed changes
This PR enables setting kubelet and bootstrap extra args by creating a custom launch template if the arguments are supplied. Existing ManagedNodeGroups will not have a diff since we only create and use a custom launch template if these options are used by the Pulumi program.
Tests:
Related issues (optional)
Closes: #611