-
Couldn't load subscription status.
- Fork 636
Enhance the EKSConfigTemplate and add configuration for files, mounts, users, ntp, etc for CAPI feature parity #3757
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
Enhance the EKSConfigTemplate and add configuration for files, mounts, users, ntp, etc for CAPI feature parity #3757
Conversation
|
Hi @cnmcavoy. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/ok-to-test |
42f588f to
9182683
Compare
cc8c765 to
ac91529
Compare
|
/assign |
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 can't comment on the line above, but what's missing here is to convert these values:
// WARNING: in.PreBootstrapCommands requires manual conversion: does not exist in peer-type
// WARNING: in.PostBootstrapCommands requires manual conversion: does not exist in peer-type
// WARNING: in.BootstrapCommandOverride requires manual conversion: does not exist in peer-type
// WARNING: in.Files requires manual conversion: does not exist in peer-type
// WARNING: in.DiskSetup requires manual conversion: does not exist in peer-type
// WARNING: in.Mounts requires manual conversion: does not exist in peer-type
// WARNING: in.Users requires manual conversion: does not exist in peer-type
// WARNING: in.NTP requires manual conversion: does not exist in peer-type
These should be done manually in the above ConvertTo and ConvertFrom methods.
For example, like here: https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/3741/files#diff-a86bb4e63de0ea453a7d13e98a2d9b8b7de1181d7bfa542a67e76e7d711678baR36
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.
Thanks for providing an example, I was able to fill in the ConvertTo and ConvertFrom and restore the conversion_test that I deleted to make the tests pass earlier.
Are there any additional docs on this conversion behavior? I still feel like there's a bit happening under the covers in the conversion that I don't follow.
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.
Basically, they are converted to annotations and then those annotations are restored to actual values. :)
Yeah, the conversion Fuzzy test makes sure that the conversion ( when people upgrade for example ) work in these scenarios.
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.
Just a couple little changes. This looks okay for me so far. Can you please add an e2e test for this? I can help you with how to write it. :)
Alternatively, you can create a follow up ticket to write an e2e test, in that case, please include a manual run and it's output showing that it actually works.
ac91529 to
5bbad9f
Compare
I'll gladly write an e2e test for this, but I'm not familiar with how the e2e testing works here in general so I'd need some hand holding in testing locally and writing them. To not block this, I lean towards adding the e2e test in a separate ticket.
What kind of output are you looking for? The controller doesn't log anything new, but here's an example EKSConfigTemplate which I successfully used with a MachineDeployment to create EKS workers: |
|
For output, I'm looking for something like the actual set of values applied to the cluster and the node. So I would assume a describe of the Node would show the set values. |
I dumped capi/capa resources and nodes: https://gist.github.com/cnmcavoy/52457c07ccdf07b388bf62a731c72e27 We use a helm chart internally to generate the Cluster, MachineDeployments, and other resources. I can include the output of this chart too if desired. |
|
@cnmcavoy So looking at this output, I have no idea what values you set. :)) Can you also please share your config file? |
Signed-off-by: Richard Case <[email protected]>
5bbad9f to
c869d47
Compare
Not sure what config file you are referencing. We use a custom helm chart to generate CAPI resources for each cluster, since we started using CAPI in the 0.3 days. I created a gist that also shows the output of the chart, which are effectively the inputs to CAPI: https://gist.github.com/cnmcavoy/b93420d14fc38cfe6bb080fcaac92032 |
|
Okay so I might be misunderstanding something. But I thought that with this pr you are enhancing the ability to configure bootstrapping nodes through making the bootstrap script configurable. Adding pre and post bootstrap scripts as well. What I'm looking for is using this ability to set something to see that it works. |
|
/lgtm @richardcase If you still want to take do a read on this. :) |
…ata instead of bash-style script
c869d47 to
9b8b5af
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Skarlso The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
|
/test ? |
|
@Skarlso: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/test pull-cluster-api-provider-aws-e2e |
|
/unhold |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Enhances the EKSConfigTemplate cloud-init to expose many more userdata features when bootstrapping EKS nodes in a EKS managed cluster. CAPI already exposes these configuration in the KubeadmConfigTemplate. Feature parity makes it easier for users coming from a self-managed clusters to switch and adopt EKS clusters.
Enhances the EKSConfigTemplate cloud-init, which currently uses a bash-style cloud-init user data to the YAML-based cloud-init data format, which has exposes more capabilities than can easily be accomplished with bash. CAPI's KubeadmConfigTemplate uses the YAML data format of cloud-init, which allows it to have additional capabilities in disk, mount, and filesystem layouts, amongst other things. This PR adds the same capabilities to CAPA and exposes them as configuration in the EKSConfigTemplate.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #3756
Special notes for your reviewer:
This PR was rebased off of an existing PR, #3341, which exposed more commands to the user, but did not switch the cloud-init away from a bash format.
Checklist: