Documentation
¶
Index ¶
- Constants
- func FilterVersion(version string, expected string) bool
- func GetImageRepo(image string) (string, error)
- func GetNodeName(resource string) string
- func GetTaskID(resource string) string
- func IsEdgeNode(node *metav1.Node) bool
- func MergeAnnotationUpgradeHistory(origin, fromVersion, toVersion string) string
- func NodeUpdated(old, new v1alpha1.TaskStatus) bool
- func RemoveDuplicateElement(s []string) []string
- func VersionLess(version1, version2 string) (bool, error)
- type TaskMessage
Constants ¶
View Source
const ( NodeUpgradeJobStatusKey = "nodeupgradejob.operations.kubeedge.io/status" NodeUpgradeJobStatusValue = "" NodeUpgradeHistoryKey = "nodeupgradejob.operations.kubeedge.io/history" )
View Source
const ( TaskUpgrade = "upgrade" TaskRollback = "rollback" TaskBackup = "backup" TaskPrePull = "prepull" )
Variables ¶
This section is empty.
Functions ¶
func FilterVersion ¶
FilterVersion returns true only if the edge node version already on the upgrade req version is like: v1.22.6-kubeedge-v1.10.0-beta.0.185+95378fb019912a, expected is like v1.10.0
func GetImageRepo ¶
GetImageRepo gets repo from a container image
func GetNodeName ¶
func IsEdgeNode ¶
IsEdgeNode checks whether a node is an Edge Node only if label {"node-role.kubernetes.io/edge": ""} exists, it is an edge node
func MergeAnnotationUpgradeHistory ¶
MergeAnnotationUpgradeHistory constructs the new history based on the origin history and we'll only keep 3 records
func NodeUpdated ¶
func NodeUpdated(old, new v1alpha1.TaskStatus) bool
func RemoveDuplicateElement ¶
RemoveDuplicateElement deduplicate
func VersionLess ¶
Types ¶
type TaskMessage ¶
Click to show internal directories.
Click to hide internal directories.