v1alpha1

package
v1.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 8

Documentation

Overview

+k8s:openapi-gen=true +k8s:deepcopy-gen=package

Package v1alpha1 contains API Schema definitions for the Operations v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=kubeedge/pkg/apis/operations +k8s:defaulter-gen=TypeMeta +groupName=operations.kubeedge.io

Index

Constants

View Source
const (
	// GroupName is the group name use in this package.
	GroupName = "operations.kubeedge.io"
	// Version is the API version.
	Version = "v1alpha1"
)

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var (
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type ImageDigestGatter

type ImageDigestGatter struct {
	// Value used to directly set a value to check image
	// +optional
	Value *string `json:"value,omitempty"`

	// RegistryAPI define registry v2 interface access configuration
	// +optional
	RegistryAPI *RegistryAPI `json:"registryAPI,omitempty"`
}

ImageDigestGatter used to define a method for getting the image digest

func (*ImageDigestGatter) DeepCopy

func (in *ImageDigestGatter) DeepCopy() *ImageDigestGatter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageDigestGatter.

func (*ImageDigestGatter) DeepCopyInto

func (in *ImageDigestGatter) DeepCopyInto(out *ImageDigestGatter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImagePrePullJob

type ImagePrePullJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec represents the specification of the desired behavior of ImagePrePullJob.
	// +required
	Spec ImagePrePullJobSpec `json:"spec"`

	// Status represents the status of ImagePrePullJob.
	// +optional
	Status ImagePrePullJobStatus `json:"status,omitempty"`
}

ImagePrePullJob is used to prepull images on edge node. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster

func (*ImagePrePullJob) DeepCopy

func (in *ImagePrePullJob) DeepCopy() *ImagePrePullJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullJob.

func (*ImagePrePullJob) DeepCopyInto

func (in *ImagePrePullJob) DeepCopyInto(out *ImagePrePullJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ImagePrePullJob) DeepCopyObject

func (in *ImagePrePullJob) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ImagePrePullJobList

type ImagePrePullJobList struct {
	// Standard type metadata.
	metav1.TypeMeta `json:",inline"`

	// Standard list metadata.
	metav1.ListMeta `json:"metadata,omitempty"`

	// List of ImagePrePullJob.
	Items []ImagePrePullJob `json:"items"`
}

ImagePrePullJobList is a list of ImagePrePullJob.

func (*ImagePrePullJobList) DeepCopy

func (in *ImagePrePullJobList) DeepCopy() *ImagePrePullJobList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullJobList.

func (*ImagePrePullJobList) DeepCopyInto

func (in *ImagePrePullJobList) DeepCopyInto(out *ImagePrePullJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ImagePrePullJobList) DeepCopyObject

func (in *ImagePrePullJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ImagePrePullJobSpec

type ImagePrePullJobSpec struct {
	// ImagePrepullTemplate represents original templates of imagePrePull
	ImagePrePullTemplate ImagePrePullTemplate `json:"imagePrePullTemplate,omitempty"`
}

ImagePrePullSpec represents the specification of the desired behavior of ImagePrePullJob.

func (*ImagePrePullJobSpec) DeepCopy

func (in *ImagePrePullJobSpec) DeepCopy() *ImagePrePullJobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullJobSpec.

func (*ImagePrePullJobSpec) DeepCopyInto

func (in *ImagePrePullJobSpec) DeepCopyInto(out *ImagePrePullJobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImagePrePullJobStatus

type ImagePrePullJobStatus struct {
	// State represents for the state phase of the ImagePrePullJob.
	// There are five possible state values: "", checking, pulling, successful, failed.
	State api.State `json:"state,omitempty"`

	// Event represents for the event of the ImagePrePullJob.
	// There are four possible event values: Init, Check, Pull, TimeOut.
	Event string `json:"event,omitempty"`

	// Action represents for the action of the ImagePrePullJob.
	// There are two possible action values: Success, Failure.
	Action api.Action `json:"action,omitempty"`

	// Reason represents for the reason of the ImagePrePullJob.
	Reason string `json:"reason,omitempty"`

	// Time represents for the running time of the ImagePrePullJob.
	Time string `json:"time,omitempty"`

	// Status contains image prepull status for each edge node.
	Status []ImagePrePullStatus `json:"status,omitempty"`
}

ImagePrePullJobStatus stores the status of ImagePrePullJob. contains images prepull status on multiple edge nodes. +kubebuilder:validation:Type=object

func (*ImagePrePullJobStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullJobStatus.

func (*ImagePrePullJobStatus) DeepCopyInto

func (in *ImagePrePullJobStatus) DeepCopyInto(out *ImagePrePullJobStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImagePrePullStatus

type ImagePrePullStatus struct {
	// TaskStatus represents the status for each node
	*TaskStatus `json:"nodeStatus,omitempty"`
	// ImageStatus represents the prepull status for each image
	ImageStatus []ImageStatus `json:"imageStatus,omitempty"`
}

ImagePrePullStatus stores image prepull status for each edge node. +kubebuilder:validation:Type=object

func (*ImagePrePullStatus) DeepCopy

func (in *ImagePrePullStatus) DeepCopy() *ImagePrePullStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullStatus.

func (*ImagePrePullStatus) DeepCopyInto

func (in *ImagePrePullStatus) DeepCopyInto(out *ImagePrePullStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImagePrePullTemplate

type ImagePrePullTemplate struct {
	// Images is the image list to be prepull
	Images []string `json:"images,omitempty"`

	// NodeNames is a request to select some specific nodes. If it is non-empty,
	// the upgrade job simply select these edge nodes to do upgrade operation.
	// Please note that sets of NodeNames and LabelSelector are ORed.
	// Users must set one and can only set one.
	// +optional
	NodeNames []string `json:"nodeNames,omitempty"`
	// LabelSelector is a filter to select member clusters by labels.
	// It must match a node's labels for the NodeUpgradeJob to be operated on that node.
	// Please note that sets of NodeNames and LabelSelector are ORed.
	// Users must set one and can only set one.
	// +optional
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`

	// CheckItems specifies the items need to be checked before the task is executed.
	// The default CheckItems value is disk.
	// +optional
	CheckItems []string `json:"checkItems,omitempty"`

	// FailureTolerate specifies the task tolerance failure ratio.
	// The default FailureTolerate value is 0.1.
	// +optional
	FailureTolerate string `json:"failureTolerate,omitempty"`

	// Concurrency specifies the maximum number of edge nodes that can pull images at the same time.
	// The default Concurrency value is 1.
	// +optional
	Concurrency int32 `json:"concurrency,omitempty"`

	// 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.
	// +optional
	TimeoutSeconds *uint32 `json:"timeoutSeconds,omitempty"`

	// ImageSecret specifies the secret for image pull if private registry used.
	// Use {namespace}/{secretName} in format.
	// +optional
	ImageSecret string `json:"imageSecrets,omitempty"`

	// RetryTimes specifies the retry times if image pull failed on each edgenode.
	// Default to 0
	// +optional
	RetryTimes int32 `json:"retryTimes,omitempty"`
}

ImagePrePullTemplate represents original templates of imagePrePull

func (*ImagePrePullTemplate) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrePullTemplate.

func (*ImagePrePullTemplate) DeepCopyInto

func (in *ImagePrePullTemplate) DeepCopyInto(out *ImagePrePullTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageStatus

type ImageStatus struct {
	// Image is the name of the image
	Image string `json:"image,omitempty"`

	// State represents for the state phase of this image pull on the edge node
	// There are two possible state values: successful, failed.
	State api.State `json:"state,omitempty"`

	// Reason represents the fail reason if image pull failed
	// +optional
	Reason string `json:"reason,omitempty"`
}

ImageStatus stores the prepull status for each image. +kubebuilder:validation:Type=object

func (*ImageStatus) DeepCopy

func (in *ImageStatus) DeepCopy() *ImageStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatus.

func (*ImageStatus) DeepCopyInto

func (in *ImageStatus) DeepCopyInto(out *ImageStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeUpgradeJob

type NodeUpgradeJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of NodeUpgradeJob.
	// +optional
	Spec NodeUpgradeJobSpec `json:"spec,omitempty"`
	// Most recently observed status of the NodeUpgradeJob.
	// +optional
	Status NodeUpgradeJobStatus `json:"status,omitempty"`
}

NodeUpgradeJob is used to upgrade edge node from cloud side. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster

func (*NodeUpgradeJob) DeepCopy

func (in *NodeUpgradeJob) DeepCopy() *NodeUpgradeJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeJob.

func (*NodeUpgradeJob) DeepCopyInto

func (in *NodeUpgradeJob) DeepCopyInto(out *NodeUpgradeJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeUpgradeJob) DeepCopyObject

func (in *NodeUpgradeJob) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeUpgradeJobList

type NodeUpgradeJobList struct {
	// Standard type metadata.
	metav1.TypeMeta `json:",inline"`

	// Standard list metadata.
	metav1.ListMeta `json:"metadata,omitempty"`

	// List of NodeUpgradeJobs.
	Items []NodeUpgradeJob `json:"items"`
}

NodeUpgradeJobList is a list of NodeUpgradeJob.

func (*NodeUpgradeJobList) DeepCopy

func (in *NodeUpgradeJobList) DeepCopy() *NodeUpgradeJobList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeJobList.

func (*NodeUpgradeJobList) DeepCopyInto

func (in *NodeUpgradeJobList) DeepCopyInto(out *NodeUpgradeJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeUpgradeJobList) DeepCopyObject

func (in *NodeUpgradeJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeUpgradeJobSpec

type NodeUpgradeJobSpec struct {
	// +Required: Version is the EdgeCore version to upgrade.
	Version string `json:"version,omitempty"`

	// TimeoutSeconds limits the duration of the node upgrade job.
	// Default to 300.
	// If set to 0, we'll use the default value 300.
	// +optional
	TimeoutSeconds *uint32 `json:"timeoutSeconds,omitempty"`

	// NodeNames is a request to select some specific nodes. If it is non-empty,
	// the upgrade job simply select these edge nodes to do upgrade operation.
	// Please note that sets of NodeNames and LabelSelector are ORed.
	// Users must set one and can only set one.
	// +optional
	NodeNames []string `json:"nodeNames,omitempty"`

	// LabelSelector is a filter to select member clusters by labels.
	// It must match a node's labels for the NodeUpgradeJob to be operated on that node.
	// Please note that sets of NodeNames and LabelSelector are ORed.
	// Users must set one and can only set one.
	// +optional
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`

	// Image specifies a container image name, the image contains: keadm and edgecore.
	// keadm is used as upgradetool, to install the new version of edgecore.
	// The image name consists of registry hostname and repository name,
	// if it includes the tag or digest, the tag or digest will be overwritten by Version field above.
	// If the registry hostname is empty, docker.io will be used as default.
	// The default image name is: kubeedge/installation-package.
	// +optional
	Image string `json:"image,omitempty"`

	// ImageDigestGatter define registry v2 interface access configuration.
	// As a transition, it is not required at first, and the image digest is checked when this field is set.
	// +optional
	ImageDigestGatter *ImageDigestGatter `json:"imageDigestGatter"`

	// Concurrency specifies the max number of edge nodes that can be upgraded at the same time.
	// The default Concurrency value is 1.
	// +optional
	Concurrency int32 `json:"concurrency,omitempty"`

	// CheckItems specifies the items need to be checked before the task is executed.
	// The default CheckItems value is nil.
	// +optional
	CheckItems []string `json:"checkItems,omitempty"`

	// FailureTolerate specifies the task tolerance failure ratio.
	// The default FailureTolerate value is 0.1.
	// +optional
	FailureTolerate string `json:"failureTolerate,omitempty"`

	// RequireConfirmation specifies whether you need to confirm the upgrade.
	// The default RequireConfirmation value is false.
	// +optional
	RequireConfirmation bool `json:"requireConfirmation,omitempty"`
}

NodeUpgradeJobSpec is the specification of the desired behavior of the NodeUpgradeJob.

func (*NodeUpgradeJobSpec) DeepCopy

func (in *NodeUpgradeJobSpec) DeepCopy() *NodeUpgradeJobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeJobSpec.

func (*NodeUpgradeJobSpec) DeepCopyInto

func (in *NodeUpgradeJobSpec) DeepCopyInto(out *NodeUpgradeJobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeUpgradeJobStatus

type NodeUpgradeJobStatus struct {
	// State represents for the state phase of the NodeUpgradeJob.
	// There are several possible state values: "", Upgrading, BackingUp, RollingBack and Checking.
	State api.State `json:"state,omitempty"`

	// CurrentVersion represents for the current status of the EdgeCore.
	CurrentVersion string `json:"currentVersion,omitempty"`
	// HistoricVersion represents for the historic status of the EdgeCore.
	HistoricVersion string `json:"historicVersion,omitempty"`
	// Event represents for the event of the ImagePrePullJob.
	// There are six possible event values: Init, Check, BackUp, Upgrade, TimeOut, Rollback.
	Event string `json:"event,omitempty"`
	// Action represents for the action of the ImagePrePullJob.
	// There are two possible action values: Success, Failure.
	Action api.Action `json:"action,omitempty"`
	// Reason represents for the reason of the ImagePrePullJob.
	Reason string `json:"reason,omitempty"`
	// Time represents for the running time of the ImagePrePullJob.
	Time string `json:"time,omitempty"`
	// Status contains upgrade Status for each edge node.
	Status []TaskStatus `json:"nodeStatus,omitempty"`
}

NodeUpgradeJobStatus stores the status of NodeUpgradeJob. contains multiple edge nodes upgrade status. +kubebuilder:validation:Type=object

func (*NodeUpgradeJobStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUpgradeJobStatus.

func (*NodeUpgradeJobStatus) DeepCopyInto

func (in *NodeUpgradeJobStatus) DeepCopyInto(out *NodeUpgradeJobStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RegistryAPI

type RegistryAPI struct {
	Host  string `json:"host"`
	Token string `json:"token"`
}

RegistryAPI used to define registry v2 interface access configuration

func (*RegistryAPI) DeepCopy

func (in *RegistryAPI) DeepCopy() *RegistryAPI

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryAPI.

func (*RegistryAPI) DeepCopyInto

func (in *RegistryAPI) DeepCopyInto(out *RegistryAPI)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskStatus

type TaskStatus struct {
	// NodeName is the name of edge node.
	NodeName string `json:"nodeName,omitempty"`
	// State represents for the upgrade state phase of the edge node.
	// There are several possible state values: "", Upgrading, BackingUp, RollingBack and Checking.
	State api.State `json:"state,omitempty"`
	// Event represents for the event of the ImagePrePullJob.
	// There are three possible event values: Init, Check, Pull.
	Event string `json:"event,omitempty"`
	// Action represents for the action of the ImagePrePullJob.
	// There are three possible action values: Success, Failure, TimeOut.
	Action api.Action `json:"action,omitempty"`
	// Reason represents for the reason of the ImagePrePullJob.
	Reason string `json:"reason,omitempty"`
	// Time represents for the running time of the ImagePrePullJob.
	Time string `json:"time,omitempty"`
}

TaskStatus stores the status of Upgrade for each edge node. +kubebuilder:validation:Type=object

func (*TaskStatus) DeepCopy

func (in *TaskStatus) DeepCopy() *TaskStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatus.

func (*TaskStatus) DeepCopyInto

func (in *TaskStatus) DeepCopyInto(out *TaskStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL