Repository navigation
Enhance the status structure of node tasks - #6084
Conversation
ffb73b5 to
6d2d644
Compare
57484da to
240a12e
Compare
8488e1a to
71f80a0
Compare
2d37d24 to
ca3ba55
Compare
6797709 to
0d96a98
Compare
0d96a98 to
904a0bd
Compare
001aac0 to
2056c04
Compare
| */ | ||
| package commons |
There was a problem hiding this comment.
A blank line is needed here
| if err := RunReconcile(ctx, req, c.handler); err != nil { | ||
| logger.Error(err, "failed to run reconcile, do requeue") | ||
| return controllerruntime.Result{RequeueAfter: commons.DefaultRequeueTime}, nil | ||
| } |
There was a problem hiding this comment.
There should be an error here. Should we return error instead of nil?
There was a problem hiding this comment.
Returning an error here will cause Reconcile to be triggered immediately.
| if err := v1alpha2downstream.Init(ctx); err != nil { | ||
| panic(err) | ||
| } | ||
| v1alpha2upstream.Init(ctx) | ||
| } else { | ||
| if err := tm.initV1alpha1(); err != nil { | ||
| panic(fmt.Errorf("failed to init node task v1alpha1 controller, err: %v", err)) |
There was a problem hiding this comment.
I checked similar devicecontroller and edgecontroller and found that they all exited through klog.Exitf().
https://github.com/kubeedge/kubeedge/blob/master/cloud/pkg/devicecontroller/devicecontroller.go#L67
https://github.com/kubeedge/kubeedge/blob/master/cloud/pkg/edgecontroller/edgecontroller.go#L35
Can we also use klog.Exitf() here to better preserve log information?
There was a problem hiding this comment.
Exit() will interrupt all resource release processes, which is dangerous behavior. Currently, panic error is better. The best way should be for the beehive framework to support the Start() to return an error and handle it.
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| http://www.apache.org/licenses/LICENSE-2.0 |
There was a problem hiding this comment.
Are there extra spaces added?
| @@ -0,0 +1,95 @@ | |||
| package image | |||
There was a problem hiding this comment.
it seems we need add copyright here?
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| http://www.apache.org/licenses/LICENSE-2.0 |
2056c04 to
cf78955
Compare
cf78955 to
b101fcf
Compare
2efbbdd to
dd2213c
Compare
| @@ -1,5 +1,5 @@ | |||
| /* | |||
| Copyright 2023 The KubeEdge Authors. | |||
| Copyright 2025 The KubeEdge Authors. | |||
There was a problem hiding this comment.
This date should not need to be changed.
| CRD_OUTPUTS=build/crds | ||
| DEVICES_VERSION=v1beta1 | ||
| OPERATIONS_VERSION=v1alpha1 | ||
| OPERATIONS_VERSION=v1alpha2 |
There was a problem hiding this comment.
Now we still use v1alpha1 by default? Will there be a problem with changing this to v1alpha2?
There was a problem hiding this comment.
My original idea was to gradually transition to v1alpha2, but it seems that there are not many users using node jobs now, so it's ok to use v1alpha2 by default. I just need to adjust the definition of feature-gate. Do we need to use v1alpha2 by default?
There was a problem hiding this comment.
The node jobs of the v1alph2 have been used as the default.
Signed-off-by: WillardHu <wei.hu@daocloud.io>
…ome lint issue Signed-off-by: WillardHu <wei.hu@daocloud.io>
Shelley-BaoYue
left a comment
There was a problem hiding this comment.
/approve
Related issue #6293 is used to track the CI failure.
/assign @wbc6080 @tangming1996
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Shelley-BaoYue The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #5999
Special notes for your reviewer:
Does this PR introduce a user-facing change?: