-
Notifications
You must be signed in to change notification settings - Fork 105
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
provider: added k3d provider and node lifecycle handlers #441
base: main
Are you sure you want to change the base?
provider: added k3d provider and node lifecycle handlers #441
Conversation
0c3a6e3
to
d25b6ab
Compare
/cc @cpanato |
|
/hold Holding this under the |
3b76b81
to
a70ae18
Compare
p := commandRunner.NewProc(installCommand) | ||
p.SetStdout(&stdout) | ||
p.SetStderr(&stderr) | ||
result := p.Run() | ||
if result.Err() != nil { | ||
return "", fmt.Errorf("failed to install %s: %s: \n %s", pPath, result.Result(), stderr.String()) |
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.
Adding these to be able to capture and log the install failures better during the provider install.
/unhold |
a70ae18
to
afe220a
Compare
46696b8
to
6a755b5
Compare
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.
/lgtm
thanks
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, harshanarayana 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 |
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.
/lgtm
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.
@harshanarayana this a great (massive) PR.
Thanks for doing this and I am sure the community will appreciate the k3d integration.
I left some comments and we can work on getting this to the finish line.
4c0f410
to
3a6934c
Compare
New changes are detected. LGTM label has been removed. |
@vladimirvivien PTAL. I has pushed the requested changes. |
3a6934c
to
1597cf5
Compare
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.
LGTM
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.
Making progress @harshanarayana
Added some more comments.
pkg/utils/nodelifecycle.go
Outdated
|
||
// PerformNodeLifecycleOperation performs a node operation on a cluster. These operations can range from Add/Remove/Start/Stop. | ||
// This helper is re-used in both node lifecycle handler used as types.StepFunc or env.Func | ||
func PerformNodeLifecycleOperation(ctx context.Context, action support.NodeOperation, node *support.Node, args ...string) 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.
Does this function only applies when using K3d or do you think orther providers will use that.
If only k3d, maybe it belongs in third_party package path if that is the case.
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.
Other providers like minikube can support this.. And kwok
technically can be simulated to enable node add and remove workflows. So it can work with other providers as well. We can do that even for kind
. But we will have to use adhoc docker command to simulate power on and off kind of workflows
1597cf5
to
3d1be3f
Compare
@vladimirvivien PTAL when you can. Addressed the required changes in the message for wait for control plane. |
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.
More comments.
p = commandRunner.RunProc("ls $GOPATH/bin") | ||
if p.Err() != nil { | ||
return "", fmt.Errorf("failed to install %s: %s", pPath, p.Err()) | ||
p = commandRunner.NewProc("ls $GOPATH/bin") |
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.
Do you think gexe
could be improved to make output caputure easier ? If so, please open an issue.
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
@harshanarayana is this still on your radar for 2025? |
I will get this done before we cut the christmas release.. |
This change includes the following changes and features. 1. Added a new Interface type `E2EClusterProviderWithLifeCycle` which can be used to setup providers that extend the cluster lifecycle function around the nodes. 2. Enabled a `k3d` based provider with support for Node lifecycle management. 3. Existing Image loader related function and interfaces were augmented with `args ...string` to be able to provide additional arguments in case if the image load handlers need some of the additional config.
3d1be3f
to
6b424cb
Compare
@vladimirvivien @cpanato PTAL. I have reorganised all the providers under |
/test pull-e2e-framework-test |
1 similar comment
/test pull-e2e-framework-test |
@harshanarayana: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR enables a new
E2EClusterProvider
fork3d
based infra.E2EClusterProviderWithImageLoaderAndNodeLifecycle
which can be used to setup providers that extend the cluster lifecycle function around the nodes.k3d
based provider with support for Node lifecycle management.args ...string
to be able to provide additional arguments in case if the image load handlers need some of the additional config.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
I have also extended the
E2EClusterProviderWithImageLoader
's Image load related methods to take an additionalarg ...string
value to account for additional options that one can pass while performing image load operation alone.This comes in handy with
k3d
where it provides a few different mode of loading images and cleanup workflows.This change also doesn't break any existing API contract extended by the
envfuncs
.Does this PR introduce a user-facing change?
Additional documentation e.g., Usage docs, etc.: