v1alpha1

package
v0.0.0-...-a69a52a Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Package v1alpha1 contains API Schema definitions for the data v1alpha1 API group +kubebuilder:object:generate=true +groupName=data.kuda.io

Index

Constants

View Source
const (
	KudaKeyPod     = "kuda.io/pod"
	KudaKeyDataSet = "kuda.io/dataset"
	KudaKeyDigest  = "kuda.io/data-digest"

	KudaRuntimeEnvDataSetName       = "KUDA_DATASET_NAME"
	KudaRuntimeEnvDataSetNamespace  = "KUDA_DATASET_NAMESPACE"
	KudaRuntimeEnvPodName           = "MY_POD_NAME"
	KudaRuntimeEnvMainContainerName = "MAIN_CONTAINER_NAME"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "data.kuda.io", Version: "v1alpha1"}

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

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme

	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = GroupVersion
)

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AlluxioDataSource

type AlluxioDataSource struct {
	Host    string `json:"host"`
	Port    int    `json:"port"`
	Timeout int    `json:"timeout,omitempty"`
}

AlluxioDataSource defines the information of the alluxio data source.

func (*AlluxioDataSource) DeepCopy

func (in *AlluxioDataSource) DeepCopy() *AlluxioDataSource

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

func (*AlluxioDataSource) DeepCopyInto

func (in *AlluxioDataSource) DeepCopyInto(out *AlluxioDataSource)

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

type Data

type Data struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the Data.
	Spec DataSpec `json:"spec,omitempty"`

	// Most recently observed status of the Data.
	Status DataStatus `json:"status,omitempty"`
}

Data is the Schema for the data API

func (*Data) DeepCopy

func (in *Data) DeepCopy() *Data

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

func (*Data) DeepCopyInto

func (in *Data) DeepCopyInto(out *Data)

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

func (*Data) DeepCopyObject

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

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

type DataItem

type DataItem struct {
	// Name of the data item. Each data item has a unique name in the same namespace.
	Name string `json:"name"`
	// Namespace defines the space within which each name must be unique.
	Namespace string `json:"namespace"`
	// RemotePath defines the path of data on the remote storage.
	RemotePath string `json:"remotePath"`
	// LocalPath defines the path of data in app container.
	LocalPath string `json:"localPath"`
	// Version defines the version number of the data.
	Version string `json:"version"`
	// The type of data source for the data.
	DataSourceType string `json:"dataSourceType"`
	// Actions should be taken for the data.
	Lifecycle *Lifecycle `json:"lifecycle,omitempty"`
}

DataItem describes the fields that each data item should have.

func (*DataItem) DeepCopy

func (in *DataItem) DeepCopy() *DataItem

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

func (*DataItem) DeepCopyInto

func (in *DataItem) DeepCopyInto(out *DataItem)

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

type DataItemStatus

type DataItemStatus struct {
	Name      string      `json:"name"`
	Namespace string      `json:"namespace"`
	Version   string      `json:"version"`
	Phase     DataPhase   `json:"phase"`
	StartTime metav1.Time `json:"startTime"`
	Message   string      `json:"message,omitempty"`
}

DataItemStatus defines status fields for each data item.

func (*DataItemStatus) DeepCopy

func (in *DataItemStatus) DeepCopy() *DataItemStatus

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

func (*DataItemStatus) DeepCopyInto

func (in *DataItemStatus) DeepCopyInto(out *DataItemStatus)

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

type DataItemsStatus

type DataItemsStatus []DataItemStatus

func (DataItemsStatus) DeepCopy

func (in DataItemsStatus) DeepCopy() DataItemsStatus

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

func (DataItemsStatus) DeepCopyInto

func (in DataItemsStatus) DeepCopyInto(out *DataItemsStatus)

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

type DataList

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

DataList contains a list of Data

func (*DataList) DeepCopy

func (in *DataList) DeepCopy() *DataList

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

func (*DataList) DeepCopyInto

func (in *DataList) DeepCopyInto(out *DataList)

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

func (*DataList) DeepCopyObject

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

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

type DataPhase

type DataPhase string
const (
	DataWaiting     DataPhase = "waiting"
	DataDownloading DataPhase = "downloading"
	DataSuccess     DataPhase = "success"
	DataFailed      DataPhase = "failed"
)

type DataSet

type DataSet struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the DataSet.
	Spec DataSetSpec `json:"spec,omitempty"`

	// Most recently observed status of the DataSet.
	Status DataSetStatus `json:"status,omitempty"`
}

DataSet is the Schema for the datasets API

func (*DataSet) DeepCopy

func (in *DataSet) DeepCopy() *DataSet

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

func (*DataSet) DeepCopyInto

func (in *DataSet) DeepCopyInto(out *DataSet)

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

func (*DataSet) DeepCopyObject

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

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

type DataSetList

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

DataSetList contains a list of DataSet

func (*DataSetList) DeepCopy

func (in *DataSetList) DeepCopy() *DataSetList

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

func (*DataSetList) DeepCopyInto

func (in *DataSetList) DeepCopyInto(out *DataSetList)

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

func (*DataSetList) DeepCopyObject

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

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

type DataSetSpec

type DataSetSpec struct {

	// Template describes the data resource that will be created.
	Template DataTemplateSpec `json:"template"`

	// Label selector for workloads. The DataSet will be applied to all workloads
	// matching the selector.
	WorkloadSelector map[string]string `json:"workloadSelector"`
}

DataSetSpec defines the desired state of DataSet

func (*DataSetSpec) DeepCopy

func (in *DataSetSpec) DeepCopy() *DataSetSpec

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

func (*DataSetSpec) DeepCopyInto

func (in *DataSetSpec) DeepCopyInto(out *DataSetSpec)

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

type DataSetStatus

type DataSetStatus struct {
	DataItems       int    `json:"dataItems"`
	Replicas        int    `json:"replicas"`
	SuccessReplicas int    `json:"success"`
	Ready           string `json:"ready"`
}

DataSetStatus defines the observed state of DataSet

func (*DataSetStatus) DeepCopy

func (in *DataSetStatus) DeepCopy() *DataSetStatus

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

func (*DataSetStatus) DeepCopyInto

func (in *DataSetStatus) DeepCopyInto(out *DataSetStatus)

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

type DataSources

type DataSources struct {
	Hdfs    *HdfsDataSource    `json:"hdfs,omitempty"`
	Alluxio *AlluxioDataSource `json:"alluxio,omitempty"`
}

DataSources defines the attribute information of the related data sources.

func (*DataSources) DeepCopy

func (in *DataSources) DeepCopy() *DataSources

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

func (*DataSources) DeepCopyInto

func (in *DataSources) DeepCopyInto(out *DataSources)

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

type DataSpec

type DataSpec struct {
	DataItems   []DataItem   `json:"dataItems"`
	Lifecycle   *Lifecycle   `json:"lifecycle,omitempty"`
	DataSources *DataSources `json:"dataSources"`
}

DataSpec defines the desired state of Data

func (*DataSpec) DeepCopy

func (in *DataSpec) DeepCopy() *DataSpec

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

func (*DataSpec) DeepCopyInto

func (in *DataSpec) DeepCopyInto(out *DataSpec)

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

type DataStatus

type DataStatus struct {
	DataItemsStatus DataItemsStatus `json:"dataItemsStatus"`
	DataItems       int             `json:"dataItems"`
	Success         int             `json:"success"`
	Waiting         int             `json:"waiting"`
	Downloading     int             `json:"downloading"`
	Failed          int             `json:"failed"`
	Ready           string          `json:"ready"`
}

DataStatus defines the observed state of Data

func (*DataStatus) DeepCopy

func (in *DataStatus) DeepCopy() *DataStatus

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

func (*DataStatus) DeepCopyInto

func (in *DataStatus) DeepCopyInto(out *DataStatus)

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

type DataTemplateSpec

type DataTemplateSpec struct {
	// List of data items belonging to the data resource.
	DataItems []DataItem `json:"dataItems"`
	// Actions that the kube runtime should take in response to data events.
	Lifecycle *Lifecycle `json:"lifecycle,omitempty"`
	// List of data sources related to data storage.
	DataSources *DataSources `json:"dataSources"`
}

DataTemplateSpec describes the fields a data resource should have when created from a template.

func (*DataTemplateSpec) DeepCopy

func (in *DataTemplateSpec) DeepCopy() *DataTemplateSpec

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

func (*DataTemplateSpec) DeepCopyInto

func (in *DataTemplateSpec) DeepCopyInto(out *DataTemplateSpec)

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

type HdfsDataSource

type HdfsDataSource struct {
	Addresses []string `json:"addresses"`
	UserName  string   `json:"userName"`
}

HdfsDataSource defines the information of the hdfs data source.

func (*HdfsDataSource) DeepCopy

func (in *HdfsDataSource) DeepCopy() *HdfsDataSource

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

func (*HdfsDataSource) DeepCopyInto

func (in *HdfsDataSource) DeepCopyInto(out *HdfsDataSource)

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

type Lifecycle

type Lifecycle struct {
	// PreDownload is called before data downloaded.
	PreDownload *LifecycleHandler `json:"preDownload,omitempty"`
	// PostDownload is called after data downloaded.
	PostDownload *LifecycleHandler `json:"postDownload,omitempty"`
}

Lifecycle describes actions that the kuda runtime should take in response to data lifecycle events.

func (*Lifecycle) DeepCopy

func (in *Lifecycle) DeepCopy() *Lifecycle

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

func (*Lifecycle) DeepCopyInto

func (in *Lifecycle) DeepCopyInto(out *Lifecycle)

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

type LifecycleHandler

type LifecycleHandler struct {
	Exec    *v1.ExecAction    `json:"exec,omitempty"`
	HTTPGet *v1.HTTPGetAction `json:"httpGet,omitempty"`
}

LifecycleHandler defines a specific action that should be token.

func (*LifecycleHandler) DeepCopy

func (in *LifecycleHandler) DeepCopy() *LifecycleHandler

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

func (*LifecycleHandler) DeepCopyInto

func (in *LifecycleHandler) DeepCopyInto(out *LifecycleHandler)

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

type UpdateStrategy

type UpdateStrategy struct {
	Type string `json:"type"`
	Gray int    `json:"gray"`
}

UpdateStrategy is currently not implemented

func (*UpdateStrategy) DeepCopy

func (in *UpdateStrategy) DeepCopy() *UpdateStrategy

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

func (*UpdateStrategy) DeepCopyInto

func (in *UpdateStrategy) DeepCopyInto(out *UpdateStrategy)

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