summaryrefslogtreecommitdiff
path: root/build
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 /build
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 'build')
-rw-r--r--build/crd-samples/operations/imageprepulljob.yaml2
-rw-r--r--build/crd-samples/operations/nodeupgradejob.yaml11
-rw-r--r--build/crds/operations/operations_v1alpha1_imageprepulljob.yaml88
-rw-r--r--build/crds/operations/operations_v1alpha1_nodeupgradejob.yaml108
4 files changed, 124 insertions, 85 deletions
diff --git a/build/crd-samples/operations/imageprepulljob.yaml b/build/crd-samples/operations/imageprepulljob.yaml
index cebfbe27f..940a99975 100644
--- a/build/crd-samples/operations/imageprepulljob.yaml
+++ b/build/crd-samples/operations/imageprepulljob.yaml
@@ -11,4 +11,4 @@ spec:
nodes:
- edgenode1 # Need to replaced with your own node name
timeoutSecondsOnEachNode: 300
- retryTimesOnEachNode: 1 \ No newline at end of file
+ retryTimes: 1 \ No newline at end of file
diff --git a/build/crd-samples/operations/nodeupgradejob.yaml b/build/crd-samples/operations/nodeupgradejob.yaml
index 5b97287d7..2f5f730c8 100644
--- a/build/crd-samples/operations/nodeupgradejob.yaml
+++ b/build/crd-samples/operations/nodeupgradejob.yaml
@@ -5,10 +5,15 @@ metadata:
labels:
description: upgrade-label
spec:
- version: "v1.10.0"
- timeoutSeconds: 60
+ version: "v1.16.0"
+ checkItems:
+ - "cpu"
+ - "mem"
+ - "disk"
+ failureTolerate: "0.3"
+ concurrency: 2
+ timeoutSeconds: 180
labelSelector:
matchLabels:
"node-role.kubernetes.io/edge": ""
node-role.kubernetes.io/agent: ""
-
diff --git a/build/crds/operations/operations_v1alpha1_imageprepulljob.yaml b/build/crds/operations/operations_v1alpha1_imageprepulljob.yaml
index 903516d32..a044a1532 100644
--- a/build/crds/operations/operations_v1alpha1_imageprepulljob.yaml
+++ b/build/crds/operations/operations_v1alpha1_imageprepulljob.yaml
@@ -48,6 +48,16 @@ spec:
items:
type: string
type: array
+ concurrency:
+ description: Concurrency specifies the maximum number of edge
+ nodes that can pull images at the same time. The default Concurrency
+ value is 1.
+ format: int32
+ type: integer
+ failureTolerate:
+ description: FailureTolerate specifies the task tolerance failure
+ ratio. The default FailureTolerate value is 0.1.
+ type: string
imageSecrets:
description: ImageSecret specifies the secret for image pull if
private registry used. Use {namespace}/{secretName} in format.
@@ -119,10 +129,10 @@ spec:
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 360.
+ timeoutSeconds:
+ description: TimeoutSeconds limits the duration of the node prepull
+ job on each edgenode. Default to 300. If set to 0, we'll use
+ the default value 300.
format: int32
type: integer
type: object
@@ -130,14 +140,21 @@ spec:
status:
description: Status represents the status of ImagePrePullJob.
properties:
+ action:
+ description: 'Action represents for the action of the ImagePrePullJob.
+ There are two possible action values: Success, Failure.'
+ type: string
+ event:
+ description: 'Event represents for the event of the ImagePrePullJob.
+ There are four possible event values: Init, Check, Pull, TimeOut.'
+ type: string
+ reason:
+ description: Reason represents for the reason of the ImagePrePullJob.
+ type: string
state:
description: 'State represents for the state phase of the ImagePrePullJob.
- There are four possible state values: "", prechecking, prepulling,
- successful, failed.'
- enum:
- - prepulling
- - successful
- - failed
+ There are five possible state values: "", checking, pulling, successful,
+ failed.'
type: string
status:
description: Status contains image prepull status for each edge node.
@@ -163,31 +180,42 @@ spec:
description: 'State represents for the state phase of
this image pull on the edge node There are two possible
state values: successful, failed.'
- enum:
- - prepulling
- - successful
- - failed
type: string
type: object
type: array
- nodeName:
- description: NodeName is the name of edge node.
- type: string
- reason:
- description: Reason represents the fail reason if images prepull
- failed on the edge node
- type: string
- state:
- description: 'State represents for the state phase of the ImagePrepullJob
- on the edge node. There are five possible state values: "",
- prepulling, successful, failed.'
- enum:
- - prepulling
- - successful
- - failed
- type: string
+ nodeStatus:
+ description: TaskStatus represents the status for each node
+ properties:
+ action:
+ description: 'Action represents for the action of the ImagePrePullJob.
+ There are three possible action values: Success, Failure,
+ TimeOut.'
+ type: string
+ event:
+ description: 'Event represents for the event of the ImagePrePullJob.
+ There are three possible event values: Init, Check, Pull.'
+ type: string
+ nodeName:
+ description: NodeName is the name of edge node.
+ type: string
+ reason:
+ description: Reason represents for the reason of the ImagePrePullJob.
+ type: string
+ state:
+ description: 'State represents for the upgrade state phase
+ of the edge node. There are several possible state values:
+ "", Upgrading, BackingUp, RollingBack and Checking.'
+ type: string
+ time:
+ description: Time represents for the running time of the
+ ImagePrePullJob.
+ type: string
+ type: object
type: object
type: array
+ time:
+ description: Time represents for the running time of the ImagePrePullJob.
+ type: string
type: object
required:
- spec
diff --git a/build/crds/operations/operations_v1alpha1_nodeupgradejob.yaml b/build/crds/operations/operations_v1alpha1_nodeupgradejob.yaml
index 130df65ac..958272424 100644
--- a/build/crds/operations/operations_v1alpha1_nodeupgradejob.yaml
+++ b/build/crds/operations/operations_v1alpha1_nodeupgradejob.yaml
@@ -36,12 +36,22 @@ spec:
spec:
description: Specification of the desired behavior of NodeUpgradeJob.
properties:
+ checkItems:
+ description: CheckItems specifies the items need to be checked before
+ the task is executed. The default CheckItems value is nil.
+ items:
+ type: string
+ type: array
concurrency:
description: Concurrency specifies the max number of edge nodes that
can be upgraded at the same time. The default Concurrency value
is 1.
format: int32
type: integer
+ failureTolerate:
+ description: FailureTolerate specifies the task tolerance failure
+ ratio. The default FailureTolerate value is 0.1.
+ type: string
image:
description: 'Image specifies a container image name, the image contains:
keadm and edgecore. keadm is used as upgradetool, to install the
@@ -111,75 +121,71 @@ spec:
job. Default to 300. If set to 0, we'll use the default value 300.
format: int32
type: integer
- upgradeTool:
- description: UpgradeTool is a request to decide use which upgrade
- tool. If it is empty, the upgrade job simply use default upgrade
- tool keadm to do upgrade operation.
- type: string
version:
type: string
type: object
status:
description: Most recently observed status of the NodeUpgradeJob.
properties:
- state:
- description: 'State represents for the state phase of the NodeUpgradeJob.
- There are three possible state values: "", upgrading and completed.'
- enum:
- - upgrading
- - completed
+ action:
+ description: 'Action represents for the action of the ImagePrePullJob.
+ There are two possible action values: Success, Failure.'
type: string
- status:
+ currentVersion:
+ description: CurrentVersion represents for the current status of the
+ EdgeCore.
+ type: string
+ event:
+ description: 'Event represents for the event of the ImagePrePullJob.
+ There are six possible event values: Init, Check, BackUp, Upgrade,
+ TimeOut, Rollback.'
+ type: string
+ historicVersion:
+ description: HistoricVersion represents for the historic status of
+ the EdgeCore.
+ type: string
+ nodeStatus:
description: Status contains upgrade Status for each edge node.
items:
- description: UpgradeStatus stores the status of Upgrade for each
- edge node.
+ description: TaskStatus stores the status of Upgrade for each edge
+ node.
properties:
- history:
- description: History is the last upgrade result of the edge
- node.
- properties:
- fromVersion:
- description: FromVersion is the version which the edge node
- is upgraded from.
- type: string
- historyID:
- description: HistoryID is to uniquely identify an Upgrade
- Operation.
- type: string
- reason:
- description: Reason is the error reason of Upgrade failure.
- If the upgrade is successful, this reason is an empty
- string.
- type: string
- result:
- description: Result represents the result of upgrade.
- enum:
- - upgrade_success
- - upgrade_failed_rollback_success
- - upgrade_failed_rollback_failed
- type: string
- toVersion:
- description: ToVersion is the version which the edge node
- is upgraded to.
- type: string
- upgradeTime:
- description: UpgradeTime is the time of this Upgrade.
- type: string
- type: object
+ action:
+ description: 'Action represents for the action of the ImagePrePullJob.
+ There are three possible action values: Success, Failure,
+ TimeOut.'
+ type: string
+ event:
+ description: 'Event represents for the event of the ImagePrePullJob.
+ There are three possible event values: Init, Check, Pull.'
+ type: string
nodeName:
description: NodeName is the name of edge node.
type: string
+ reason:
+ description: Reason represents for the reason of the ImagePrePullJob.
+ type: string
state:
description: 'State represents for the upgrade state phase of
- the edge node. There are three possible state values: "",
- upgrading and completed.'
- enum:
- - upgrading
- - completed
+ the edge node. There are several possible state values: "",
+ Upgrading, BackingUp, RollingBack and Checking.'
+ type: string
+ time:
+ description: Time represents for the running time of the ImagePrePullJob.
type: string
type: object
type: array
+ reason:
+ description: Reason represents for the reason of the ImagePrePullJob.
+ type: string
+ state:
+ description: 'State represents for the state phase of the NodeUpgradeJob.
+ There are several possible state values: "", Upgrading, BackingUp,
+ RollingBack and Checking.'
+ type: string
+ time:
+ description: Time represents for the running time of the ImagePrePullJob.
+ type: string
type: object
type: object
served: true