diff options
| author | KubeEdge Bot <48982446+kubeedge-bot@users.noreply.github.com> | 2024-01-15 21:18:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-15 21:18:26 +0800 |
| commit | 88e4b1ec243d9049de9be28c8ea4dd3c0612f07d (patch) | |
| tree | 770598173cdf13db42b9a61849e6651b2ad2749c /common | |
| parent | Merge pull request #5353 from WillardHu/approver (diff) | |
| parent | support enable imagePrePullController through helm (diff) | |
| download | kubeedge-88e4b1ec243d9049de9be28c8ea4dd3c0612f07d.tar.gz | |
Merge pull request #5331 from Shelley-BaoYue/image-prepull
support image prepull feature
Diffstat (limited to 'common')
| -rw-r--r-- | common/constants/default.go | 5 | ||||
| -rw-r--r-- | common/types/types.go | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/common/constants/default.go b/common/constants/default.go index d75d3c795..07b642816 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 +} |
