summaryrefslogtreecommitdiff
path: root/common/types
diff options
context:
space:
mode:
authorzhengxinwei <zhengxinwei@huawei.com>2024-01-04 15:28:35 +0800
committerzhengxinwei-f <zhengxinwei@huawei.com>2024-01-16 20:18:43 +0800
commitd091c086a5c8620bf43c90a64835d55253227005 (patch)
treefaa19b8f9a64684541631e1580e9dc7d78a63f48 /common/types
parentImplement task manager to complete cloud edge task execution (diff)
downloadkubeedge-d091c086a5c8620bf43c90a64835d55253227005.tar.gz
support edge nodes upgrade and image pre pull
Signed-off-by: zhengxinwei-f <zhengxinwei@huawei.com>
Diffstat (limited to 'common/types')
-rw-r--r--common/types/types.go23
1 files changed, 22 insertions, 1 deletions
diff --git a/common/types/types.go b/common/types/types.go
index 5cf6856e4..dfe14dad1 100644
--- a/common/types/types.go
+++ b/common/types/types.go
@@ -6,6 +6,7 @@ import (
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
+ api "github.com/kubeedge/kubeedge/pkg/apis/fsm/v1alpha1"
"github.com/kubeedge/kubeedge/pkg/apis/operations/v1alpha1"
)
@@ -62,6 +63,26 @@ type NodeTaskRequest struct {
Item interface{}
}
+type NodeTaskResponse struct {
+ // NodeName is the name of edge node.
+ NodeName string
+ // State represents for the upgrade state phase of the edge node.
+ // There are several possible state values: "", Upgrading, BackingUp, RollingBack and Checking.
+ State api.State
+ // Event represents for the event of the ImagePrePullJob.
+ // There are three possible event values: Init, Check, Pull.
+ Event string
+ // Action represents for the action of the ImagePrePullJob.
+ // There are three possible action values: Success, Failure, TimeOut.
+ Action api.Action
+ // Reason represents for the reason of the ImagePrePullJob.
+ Reason string
+ // Time represents for the running time of the ImagePrePullJob.
+ Time string
+
+ ExternalMessage string
+}
+
// ObjectResp is the object that api-server response
type ObjectResp struct {
Object metaV1.Object
@@ -80,7 +101,7 @@ type ImagePrePullJobRequest struct {
// ImagePrePullJobResponse is used to report status msg to cloudhub https service from each node
type ImagePrePullJobResponse struct {
NodeName string
- State v1alpha1.PrePullState
+ State string
Reason string
ImageStatus []v1alpha1.ImageStatus
}