-
Notifications
You must be signed in to change notification settings - Fork 296
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
Enable hardware Provisioning through ISO booting for baremetal Provider #9213
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9213 +/- ##
==========================================
- Coverage 72.37% 72.32% -0.05%
==========================================
Files 585 587 +2
Lines 45708 46056 +348
==========================================
+ Hits 33079 33309 +230
- Misses 10890 10998 +108
- Partials 1739 1749 +10 ☔ View full report in Codecov by Sentry. |
7dde957
to
a76cb90
Compare
/retest |
/test eks-anywhere-release-tooling-test-presubmit |
@rahulbabu95: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
5f4532c
to
bfa2b34
Compare
if config.Spec.IsoBoot { | ||
if config.Spec.HookIsoURL != "" { | ||
if _, err := url.ParseRequestURI(config.Spec.HookIsoURL); err != nil { | ||
return fmt.Errorf("parsing isoURL: %v", err) |
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.
nothing to hold up the PR, but something to think about. Because our code base doesn't have a good presentation layer, error messages like this most of the time get surfaced to the user. So while normally an error message that references some internal or local field or variable name is ok, you should think about what name makes sense from the user's perspective.
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 think providing the exact field name does help from a user's perspective in the sense that they can go back to the spec to the exact field that causes the error. That being said i will add more context around the error.
@@ -26,6 +26,13 @@ type TinkerbellDatacenterConfigSpec struct { | |||
SkipLoadBalancerDeployment bool `json:"skipLoadBalancerDeployment,omitempty"` | |||
// LoadBalancerInterface can be used to configure a load balancer interface for the Tinkerbell stack. | |||
LoadBalancerInterface string `json:"loadBalancerInterface,omitempty"` | |||
// IsoBoot can be used to indicate that the hardware must boot using an ISO. |
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.
must
-> should
// IsoBoot can be used to indicate that the hardware must boot using an ISO. | ||
//+optional | ||
IsoBoot bool `json:"isoBoot,omitempty"` | ||
// HookIsoURL is the URL of ISO image that will one time boot. |
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.
one time boot
is indeed accurate but is this how you would describe this to a user? is there other ways to describe the ISO, like being used during the provisioning process, etc.
Install(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, tinkerbellIP, kubeconfig, hookOverride, isoOverride string, opts ...InstallOption) error | ||
UninstallLocal(ctx context.Context) error | ||
Uninstall(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string) error | ||
Upgrade(_ context.Context, _ releasev1alpha1.TinkerbellBundle, tinkerbellIP, kubeconfig, hookOverride string, opts ...InstallOption) error | ||
Upgrade(_ context.Context, _ releasev1alpha1.TinkerbellBundle, tinkerbellIP, kubeconfig, hookOverride, isoOverride string, opts ...InstallOption) error |
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.
These two interface methods have ...InstallOption
. This should allow extending these methods without modifying their function signatures.
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.
Added the field to the Installer struct and updated using the functional options pattern!
@@ -11,6 +11,9 @@ import ( | |||
"github.com/aws/eks-anywhere/pkg/constants" | |||
) | |||
|
|||
// GofishProviderOption is the provider name for Redfish Provider in Rufio. | |||
const GofishProviderOption = "gofish" |
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.
Does this need to be exported?
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.
Good qn. the test file uses this constant to test providerOptions. i do not want to maintain two copies of this constant value hence chose to export it.
Upstream CAPT/Tink recently added support for booting the hardware through ISO. This change adds the necessary changes to our cluster spec notably TinkerbellDataCenterConfig to be able to provision the hardware using an ISO. ISO booting removes the dependency of the admin machine to provision the cluster to be in the same L2 as the hardware. Additionally offers static IPAM. The PR adds necessary changes required in our TinkerbellmachineTemplate to be able to ISO boot. The default behavior would still be to netboot. PR also adds required changes at the time of Tinkerbell stack installation so that Smee has all the required flags set to be able to serve ISO and handles toggling between the bootstrap IP and the actual TinkerbelIP. Signed-off-by: Rahul Ganesh <rahulgab@amazon.com>
bfa2b34
to
d360b25
Compare
/unhold |
/override codecov/patch |
@rahulbabu95: /override requires failed status contexts, check run or a prowjob name to operate on.
Only the following failed contexts/checkruns were expected:
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:
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. |
Issue #, if available:
https://github.com/aws/eks-anywhere-internal/issues/2212
Description of changes:
Upstream CAPT/Tink recently added support for booting the hardware through ISO. This change adds the necessary changes to our cluster spec notably TinkerbellDataCenterConfig to be able to provision the hardware using an ISO. ISO booting removes the dependency of the admin machine to provision the cluster to be in the same L2 as the hardware. Additionally offers static IPAM. The PR adds necessary changes required in our TinkerbellmachineTemplate to be able to ISO boot. The default behavior would still be to netboot. PR also adds required changes at the time of Tinkerbell stack installation so that Smee has all the required flags set to be able to serve ISO and handles toggling between the bootstrap IP and the actual TinkerbelIP.
Additionally, the previous implementation to handle the toggling between the Bootstrap IP to the actual Tinkerbell IP when moving the cluster from kind to the actual CAPI workload cluster had a bug in the sense the underlying eks-a cluster object always had the bootstrap-ip annotation, which meant the controller always also picked up the host IP for the Hegel URLs. This change also fixes that bug by actually updating the underlying eks-a cluster object.
Testing (if applicable):
Manually created a cluster using an Hook ISO image.
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.