summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley-BaoYue <baoyue2@huawei.com>2024-01-04 19:26:01 +0800
committerShelley-BaoYue <baoyue2@huawei.com>2024-01-04 19:27:53 +0800
commite404453f729bd3cd067eec9f19906cd857a928bb (patch)
tree3fd4b525e9b95003423f05587af574a49775205e
parentsupport imageprepull feature (diff)
downloadkubeedge-e404453f729bd3cd067eec9f19906cd857a928bb.tar.gz
fix imageprepull api
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
-rw-r--r--build/crds/operations/operations_v1alpha1_imageprepulljob.yaml10
-rw-r--r--cloud/pkg/imageprepullcontroller/controller/downstream.go2
-rw-r--r--manifests/charts/cloudcore/crds/operations_v1alpha1_imageprepulljob.yaml10
-rw-r--r--pkg/apis/operations/v1alpha1/imageprepull_types.go8
4 files changed, 15 insertions, 15 deletions
diff --git a/build/crds/operations/operations_v1alpha1_imageprepulljob.yaml b/build/crds/operations/operations_v1alpha1_imageprepulljob.yaml
index cdc4ac603..903516d32 100644
--- a/build/crds/operations/operations_v1alpha1_imageprepulljob.yaml
+++ b/build/crds/operations/operations_v1alpha1_imageprepulljob.yaml
@@ -114,15 +114,15 @@ spec:
items:
type: string
type: array
- retryTimesOnEachNode:
- description: RetryTimesOnEachNode specifies the retry times if
- image pull failed on each edgenode. Default to 0
+ retryTimes:
+ description: RetryTimes specifies the retry times if image pull
+ failed on each edgenode. Default to 0
format: int32
type: integer
timeoutSecondsOnEachNode:
description: TimeoutSecondsOnEachNode limits the duration of the
image prepull job on each edgenode. Default to 360. If set to
- 0, we'll use the default value 300.
+ 0, we'll use the default value 360.
format: int32
type: integer
type: object
@@ -174,7 +174,7 @@ spec:
description: NodeName is the name of edge node.
type: string
reason:
- description: Message represents the fail reason if images prepull
+ description: Reason represents the fail reason if images prepull
failed on the edge node
type: string
state:
diff --git a/cloud/pkg/imageprepullcontroller/controller/downstream.go b/cloud/pkg/imageprepullcontroller/controller/downstream.go
index f8abfd1c1..d82c58413 100644
--- a/cloud/pkg/imageprepullcontroller/controller/downstream.go
+++ b/cloud/pkg/imageprepullcontroller/controller/downstream.go
@@ -170,7 +170,7 @@ func (dc *DownstreamController) processPrePull(node string, imagePrePull *v1alph
Images: imagePrePullTemplateInfo.Images,
NodeName: node,
Secret: imagePrePullTemplateInfo.ImageSecret,
- RetryTimes: imagePrePullTemplateInfo.RetryTimesOnEachNode,
+ RetryTimes: imagePrePullTemplateInfo.RetryTimes,
CheckItems: imagePrePullTemplateInfo.CheckItems,
}
diff --git a/manifests/charts/cloudcore/crds/operations_v1alpha1_imageprepulljob.yaml b/manifests/charts/cloudcore/crds/operations_v1alpha1_imageprepulljob.yaml
index cdc4ac603..903516d32 100644
--- a/manifests/charts/cloudcore/crds/operations_v1alpha1_imageprepulljob.yaml
+++ b/manifests/charts/cloudcore/crds/operations_v1alpha1_imageprepulljob.yaml
@@ -114,15 +114,15 @@ spec:
items:
type: string
type: array
- retryTimesOnEachNode:
- description: RetryTimesOnEachNode specifies the retry times if
- image pull failed on each edgenode. Default to 0
+ retryTimes:
+ description: RetryTimes specifies the retry times if image pull
+ failed on each edgenode. Default to 0
format: int32
type: integer
timeoutSecondsOnEachNode:
description: TimeoutSecondsOnEachNode limits the duration of the
image prepull job on each edgenode. Default to 360. If set to
- 0, we'll use the default value 300.
+ 0, we'll use the default value 360.
format: int32
type: integer
type: object
@@ -174,7 +174,7 @@ spec:
description: NodeName is the name of edge node.
type: string
reason:
- description: Message represents the fail reason if images prepull
+ description: Reason represents the fail reason if images prepull
failed on the edge node
type: string
state:
diff --git a/pkg/apis/operations/v1alpha1/imageprepull_types.go b/pkg/apis/operations/v1alpha1/imageprepull_types.go
index 54f2fc0ae..0ac53a975 100644
--- a/pkg/apis/operations/v1alpha1/imageprepull_types.go
+++ b/pkg/apis/operations/v1alpha1/imageprepull_types.go
@@ -91,14 +91,14 @@ type ImagePrePullTemplate struct {
// TimeoutSecondsOnEachNode limits the duration of the image prepull job on each edgenode.
// Default to 360.
- // If set to 0, we'll use the default value 300.
+ // If set to 0, we'll use the default value 360.
// +optional
TimeoutSecondsOnEachNode *uint32 `json:"timeoutSecondsOnEachNode,omitempty"`
- // RetryTimesOnEachNode specifies the retry times if image pull failed on each edgenode.
+ // RetryTimes specifies the retry times if image pull failed on each edgenode.
// Default to 0
// +optional
- RetryTimesOnEachNode int32 `json:"retryTimesOnEachNode,omitempty"`
+ RetryTimes int32 `json:"retryTimes,omitempty"`
}
// PrePullState describe the PrePullState of image prepull operation on edge nodes.
@@ -135,7 +135,7 @@ type ImagePrePullStatus struct {
// There are five possible state values: "", prepulling, successful, failed.
State PrePullState `json:"state,omitempty"`
- // Message represents the fail reason if images prepull failed on the edge node
+ // Reason represents the fail reason if images prepull failed on the edge node
Reason string `json:"reason,omitempty"`
// ImageStatus represents the prepull status for each image