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

Update generate cluster config command for Tinkerbell #8226

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

rahulbabu95
Copy link
Member

Issue #, if available:
Update generate command for Tinkerbell to populate Tinkerbell IP in the Datacenter config and OSImage URL in Machine config object as we have defaulted the OS from BR to Ubuntu. This change also adds a check when a modular K8s version is specified with a value above 1.28 and the OS family is set to BR.

Description of changes:

Testing (if applicable):

Documentation added/planned (if applicable):

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: Rahul Ganesh <rahulgab@amazon.com>
@eks-distro-bot eks-distro-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 29, 2024
Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.41%. Comparing base (249f20d) to head (65a6d63).
Report is 14 commits behind head on main.

Files Patch % Lines
pkg/api/v1alpha1/tinkerbelldatacenterconfig.go 0.00% 3 Missing ⚠️
pkg/api/v1alpha1/tinkerbellmachineconfig.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8226      +/-   ##
==========================================
- Coverage   73.42%   73.41%   -0.01%     
==========================================
  Files         577      577              
  Lines       35944    35947       +3     
==========================================
  Hits        26391    26391              
- Misses       7884     7887       +3     
  Partials     1669     1669              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Rahul Ganesh <rahulgab@amazon.com>
@@ -18,7 +18,7 @@ type TinkerbellMachineConfigSpec struct {
// OSImageURL is a URL to the OS image used during provisioning. It must include
// the Kubernetes version(s). For example, a URL used for Kubernetes 1.27 could
// be http://localhost:8080/ubuntu-2204-1.27.tgz
OSImageURL string `json:"osImageURL,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Some versions of bottlerocket are still supported so we shouldn't do this until we stop supporting them fully

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, they are still supported. But we already made that API change on data center config in this PR . So this PR is merely trying to make it consistent. And don't think again toggling them back to optional makes sense here given we are eventually deprecating.

@@ -27,6 +27,7 @@ func NewTinkerbellMachineConfigGenerate(name string, opts ...TinkerbellMachineCo
Spec: TinkerbellMachineConfigSpec{
HardwareSelector: HardwareSelector{},
OSFamily: Ubuntu,
OSImageURL: "",
Copy link
Member

Choose a reason for hiding this comment

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

any reason why we are exposing this in the machine config instead of datacenter config? I would think most users would use OSImageURL there generally

Copy link
Member Author

Choose a reason for hiding this comment

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

So basically when we defaulted to ubuntu we missed adding OSImageURL field. For modular upgrades machine configs is expected in OSImageURL field. Also, this is more akin to how we set templated at machine config level in other providers. Once we introduced OSImageURL on machine config level the plan was to give preference to this field and eventually deprecate OSImageURL field at Datacenter config. But we haven't reached there yet!

@rahulbabu95
Copy link
Member Author

/hold

Copy link
Member

@abhinavmpandey08 abhinavmpandey08 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavmpandey08

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rahulbabu95
Copy link
Member Author

/override codecov/patch

@eks-distro-bot
Copy link
Collaborator

@rahulbabu95: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • codecov/patch

Only the following failed contexts/checkruns were expected:

  • eks-anywhere-cli-attribution-presubmit
  • eks-anywhere-e2e-presubmit
  • eks-anywhere-generate-files-presubmit
  • eks-anywhere-presubmit
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/override codecov/patch

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.

@rahulbabu95 rahulbabu95 merged commit 337d0af into aws:main Jun 4, 2024
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved do-not-merge/hold lgtm size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants