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

Return an error when container runtime and overrideBootstrapCommand are defined together #5365

Merged
merged 7 commits into from
Jun 8, 2022
Merged

Return an error when container runtime and overrideBootstrapCommand are defined together #5365

merged 7 commits into from
Jun 8, 2022

Conversation

Skarlso
Copy link
Contributor

@Skarlso Skarlso commented Jun 1, 2022

Description

Closes #5363

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

Copy link
Contributor

@Himangini Himangini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the output of manual test run?

Small nit for the title to go in release notes :
Return an error in case container runtime and overrideBootstrapCommand is defined should be
Return an error when container runtime and overrideBootstrapCommand are defined together

@Skarlso Skarlso changed the title Return an error in case container runtime and overrideBootstrapCommand is defined Return an error when container runtime and overrideBootstrapCommand are defined together Jun 8, 2022
@Skarlso
Copy link
Contributor Author

Skarlso commented Jun 8, 2022

Manual run:

eksctl create cluster -f cluster-managed.yaml
Error: overrideBootstrapCommand overwrites container runtime setting; please use --container-runtime in the boostrap script instead

config:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: gb-test-cluster-2
  region: us-west-2
  version: '1.22'

nodeGroups:
  - name: managed-ng-1
    ami: ami-12345
    amiFamily: AmazonLinux2
    minSize: 1
    maxSize: 4
    desiredCapacity: 1
    containerRuntime: containerd
    overrideBootstrapCommand: |
      #!/bin/bash

      source /var/lib/cloud/scripts/eksctl/bootstrap.helper.sh

      # Note "--node-labels=${NODE_LABELS}" needs the above helper sourced to work, otherwise will have to be defined manually.
      /etc/eks/bootstrap.sh test-override-11 --container-runtime containerd --kubelet-extra-args "--node-labels=${NODE_LABELS}"

Copy link
Contributor

@Himangini Himangini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@Skarlso Skarlso enabled auto-merge (squash) June 8, 2022 14:07
@Skarlso Skarlso merged commit d82964a into eksctl-io:main Jun 8, 2022
@steffakasid
Copy link

This seems to be broken in 0.105.0-dev+aa76f1d4.2022-07-08T14:38:11Z I've not set the containerRuntime config option and instead set it viw overrideBootstrapComman. But I still see the error message: "Error: overrideBootstrapCommand overwrites container runtime setting; please use --container-runtime in the bootsrap script instead".

@steffakasid
Copy link

Little correction it seems it throws the error when using the eksctl scale nodegroup command creation of nodegroups eksctl create nodegroup works fine. Should I create an issue for that?

@Skarlso
Copy link
Contributor Author

Skarlso commented Jul 14, 2022

Hello @steffakasid!

Yes, please! Thank you! :)

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 this pull request may close these issues.

[Bug] Containerd setting should emit a warning if custom AMI is used
4 participants