Skip to content
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

Possibility to set preBootstrapCommands when using custom ami with managed nodegroups #4032

Closed
kishoregv opened this issue Jul 30, 2021 · 4 comments · Fixed by #4065
Closed
Assignees
Labels

Comments

@kishoregv
Copy link
Contributor

What feature/behavior/change do you want?

When pinning AMI for a managed nodegroup, currently eksctl ignores preBootstrapCommands. It would nice to have preBoostrapCommands.

AWS blog talks about the workflow with eksctl, but eksctl does not respect preBootstrapCommands when using custom AMI.

image

Why do you want this feature?

This will allow us to do additional configuration before bootstrapping.

@kishoregv kishoregv added the kind/feature New feature or request label Jul 30, 2021
@niroowns
Copy link

niroowns commented Jul 30, 2021

Is this a bug? eksctl docs/examples state this is possible:

https://github.com/weaveworks/eksctl/blob/51b66753f000e0c6881c0883b55524ab27d09754/examples/15-managed-nodes.yaml#L47

https://eksctl.io/usage/schema/#managedNodeGroups-preBootstrapCommands

Tracking the code base, it appears that makeCustomAMIUserData (https://github.com/weaveworks/eksctl/blob/main/pkg/nodebootstrap/managed_al2.go#L38) only respects the OverrideBootstrapCommand function (not preBootstrap):
https://github.com/weaveworks/eksctl/blob/main/pkg/nodebootstrap/managed_al2.go#L86-L90

@tanvp112
Copy link

the example from aws blog is not valid; overrideBootstrapCommand is not a sub-key of preBootstrapCommands.

@cPu1
Copy link
Collaborator

cPu1 commented Aug 2, 2021

Is this a bug? eksctl docs/examples state this is possible:

https://github.com/weaveworks/eksctl/blob/51b66753f000e0c6881c0883b55524ab27d09754/examples/15-managed-nodes.yaml#L47

https://eksctl.io/usage/schema/#managedNodeGroups-preBootstrapCommands

Tracking the code base, it appears that makeCustomAMIUserData (https://github.com/weaveworks/eksctl/blob/main/pkg/nodebootstrap/managed_al2.go#L38) only respects the OverrideBootstrapCommand function (not preBootstrap):
https://github.com/weaveworks/eksctl/blob/main/pkg/nodebootstrap/managed_al2.go#L86-L90

You're right, preBootstrapCommands is being ignored when a custom AMI is supplied. This is a bug and we're going to look into it.

@kishoregv, additionally, as @tanvp112 noted, the example in the AWS blog post is incorrect, overrideBootstrapCommand is a top-level field of nodegroup.

@cPu1 cPu1 self-assigned this Aug 3, 2021
@Callisto13 Callisto13 added kind/bug and removed kind/feature New feature or request labels Aug 6, 2021
@kishoregv
Copy link
Contributor Author

@kishoregv, additionally, as @tanvp112 noted, the example in the AWS blog post is incorrect, overrideBootstrapCommand is a top-level field of nodegroup.

Agree, did not go with it literally I have considered the indentation issue in my test. I should have already called it out in my issue report.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants