v1alpha1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the atom v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=atom.supremind.com

Package v1alpha1 contains API Schema definitions for the atom v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=atom.supremind.com

Index

Constants

View Source
const (
	SourcePodNotFound       status.ConditionType = "SourcePodNotFound"
	SourceContainerNotFound status.ConditionType = "SourceContainerNotFound"
	SourcePodNotReady       status.ConditionType = "SourcePodNotReady"
	SourcePodFinishied      status.ConditionType = "SourcePodFinished"
	DockerCommitFailed      status.ConditionType = "DockerCommitFailed"
	DockerPushFailed        status.ConditionType = "DockerPushFailed"
	InvalidImage            status.ConditionType = "InvalidImage"
)

Conditions indicate errors occurred when creating or running the snapshot worker pod

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "atom.supremind.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

Functions

This section is empty.

Types

type ContainerSnapshot

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

	Spec   ContainerSnapshotSpec   `json:"spec,omitempty"`
	Status ContainerSnapshotStatus `json:"status,omitempty"`
}

ContainerSnapshot is the Schema for the containersnapshots API +kubebuilder:subresource:status +kubebuilder:resource:path=containersnapshots,scope=Namespaced +kubebuilder:printcolumn:name="Name",type="string",JSONPath=".metadata.name" +kubebuilder:printcolumn:name="Pod",type="string",JSONPath=".spec.podName",description="pod name of snapshot source" +kubebuilder:printcolumn:name="Container",type="string",JSONPath=".spec.containerName",description="container name of snapshot source" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.workerState",description="container snapshot worker state"

func (*ContainerSnapshot) DeepCopy

func (in *ContainerSnapshot) DeepCopy() *ContainerSnapshot

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

func (*ContainerSnapshot) DeepCopyInto

func (in *ContainerSnapshot) DeepCopyInto(out *ContainerSnapshot)

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

func (*ContainerSnapshot) DeepCopyObject

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

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

type ContainerSnapshotList

type ContainerSnapshotList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ContainerSnapshot `json:"items"`
}

ContainerSnapshotList contains a list of ContainerSnapshot

func (*ContainerSnapshotList) DeepCopy

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

func (*ContainerSnapshotList) DeepCopyInto

func (in *ContainerSnapshotList) DeepCopyInto(out *ContainerSnapshotList)

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

func (*ContainerSnapshotList) DeepCopyObject

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

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

type ContainerSnapshotSpec

type ContainerSnapshotSpec struct {

	// PodName+ContainerName is the name of the running container going to have a snapshot
	PodName       string `json:"podName"`
	ContainerName string `json:"containerName"`

	// Image is the snapshot image, registry host and tag are optional
	Image string `json:"image"`

	// ImagePushSecrets are references to docker-registry secret in the same namespace to use for pushing checkout image,
	// same as an ImagePullSecrets.
	// More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
	ImagePushSecrets []v1.LocalObjectReference `json:"imagePushSecrets"`
}

ContainerSnapshotSpec defines the desired state of ContainerSnapshot

func (*ContainerSnapshotSpec) DeepCopy

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

func (*ContainerSnapshotSpec) DeepCopyInto

func (in *ContainerSnapshotSpec) DeepCopyInto(out *ContainerSnapshotSpec)

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

type ContainerSnapshotStatus

type ContainerSnapshotStatus struct {

	// JobRef is a reference to the internal snapshot job which does the real commit/push works
	JobRef v1.LocalObjectReference `json:"jobRef"`

	// NodeName is the name of the node the container running on, the snapshot job must run on this node
	NodeName string `json:"nodeName"`

	// ContainerID is the docker id of the source container
	ContainerID string `json:"containerID"`

	// container snapshot worker state
	// +kubebuilder:validation:Enum=Created;Running;Complete;Failed;Unknown
	WorkerState WorkerState `json:"workerState"`

	// The latest available observations of the snapshot
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions status.Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

ContainerSnapshotStatus defines the observed state of ContainerSnapshot

func (*ContainerSnapshotStatus) DeepCopy

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

func (*ContainerSnapshotStatus) DeepCopyInto

func (in *ContainerSnapshotStatus) DeepCopyInto(out *ContainerSnapshotStatus)

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

type WorkerState

type WorkerState string

WorkerState indicates underlaying snapshot worker state

const (
	WorkerCreated  WorkerState = "Created"
	WorkerRunning  WorkerState = "Running"
	WorkerComplete WorkerState = "Complete"
	WorkerFailed   WorkerState = "Failed"
	WorkerUnknown  WorkerState = "Unknown"
)

Jump to

Keyboard shortcuts

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