summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorShelley-BaoYue <baoyue2@huawei.com>2024-01-03 10:49:28 +0800
committerShelley-BaoYue <baoyue2@huawei.com>2024-01-03 11:44:15 +0800
commitc5a307193a8a4494e921a25edca37216d8c14653 (patch)
tree612ed95f31cd244023d2699a89ab40e20a849d77 /common
parentadd image prepull api (diff)
downloadkubeedge-c5a307193a8a4494e921a25edca37216d8c14653.tar.gz
support imageprepull feature
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
Diffstat (limited to 'common')
-rw-r--r--common/constants/default.go5
-rw-r--r--common/types/types.go19
2 files changed, 24 insertions, 0 deletions
diff --git a/common/constants/default.go b/common/constants/default.go
index d3ecf7203..361c66a83 100644
--- a/common/constants/default.go
+++ b/common/constants/default.go
@@ -118,6 +118,11 @@ const (
DefaultNodeUpgradeJobEventBuffer = 1
DefaultNodeUpgradeJobWorkers = 1
+ // ImagePrePullController
+ DefaultImagePrePullJobStatusBuffer = 1024
+ DefaultImagePrePullJobEventBuffer = 1
+ DefaultImagePrePullJobWorkers = 1
+
// Resource sep
ResourceSep = "/"
diff --git a/common/types/types.go b/common/types/types.go
index 33a709bff..e03667a1b 100644
--- a/common/types/types.go
+++ b/common/types/types.go
@@ -5,6 +5,8 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
+
+ "github.com/kubeedge/kubeedge/pkg/apis/operations/v1alpha1"
)
// PodStatusRequest is Message.Content which comes from edge
@@ -53,3 +55,20 @@ type ObjectResp struct {
Object metaV1.Object
Err error
}
+
+// ImagePrePullJobRequest is image prepull msg from cloud to edge
+type ImagePrePullJobRequest struct {
+ Images []string
+ NodeName string
+ Secret string
+ RetryTimes int32
+ CheckItems []string
+}
+
+// ImagePrePullJobResponse is used to report status msg to cloudhub https service from each node
+type ImagePrePullJobResponse struct {
+ NodeName string
+ State v1alpha1.PrePullState
+ Reason string
+ ImageStatus []v1alpha1.ImageStatus
+}