v1alpha1

package
v0.0.0-...-43b513b Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the bagua v1alpha1 API group +kubebuilder:object:generate=true +groupName=bagua.kuaishou.com

Index

Constants

View Source
const (
	ErrInvalidDefinition = "InvalidDefinition"
	JobOwnerKey          = ".metadata.controller"
	DefaultContainerName = "bagua"
)
View Source
const (
	ReplicaMaster commonv1.ReplicaType = "master"
	ReplicaWorker commonv1.ReplicaType = "worker"
	ReplicaEtcd   commonv1.ReplicaType = "etcd"
)

Variables

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

	// GroupVersionKind is group version kind
	GroupVersionKind = GroupVersion.WithKind("Bagua")

	// 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
)

Functions

This section is empty.

Types

type Bagua

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

	Spec   BaguaSpec   `json:"spec,omitempty"`
	Status BaguaStatus `json:"status,omitempty"`
}

Bagua is the Schema for the baguas API

func (*Bagua) DeepCopy

func (in *Bagua) DeepCopy() *Bagua

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

func (*Bagua) DeepCopyInto

func (in *Bagua) DeepCopyInto(out *Bagua)

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

func (*Bagua) DeepCopyObject

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

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

func (Bagua) Json

func (job Bagua) Json() string

type BaguaList

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

BaguaList contains a list of Bagua

func (*BaguaList) DeepCopy

func (in *BaguaList) DeepCopy() *BaguaList

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

func (*BaguaList) DeepCopyInto

func (in *BaguaList) DeepCopyInto(out *BaguaList)

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

func (*BaguaList) DeepCopyObject

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

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

type BaguaSpec

type BaguaSpec struct {
	RunPolicy     commonv1.RunPolicy                             `json:"runPolicy,omitempty"`
	ReplicaSpecs  map[commonv1.ReplicaType]*commonv1.ReplicaSpec `json:"replicaSpecs,omitempty"`
	EnableElastic bool                                           `json:"enableElastic,omitempty"`

	// +kubebuilder:validation:Minimum=1
	MinReplicas *int32 `json:"minReplicas,omitempty"`
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`
}

********

  • Spec ********

BaguaSpec defines the desired state of Bagua

func (BaguaSpec) CheckReplicasExist

func (spec BaguaSpec) CheckReplicasExist(replicaTypes []commonv1.ReplicaType) error

func (*BaguaSpec) DeepCopy

func (in *BaguaSpec) DeepCopy() *BaguaSpec

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

func (*BaguaSpec) DeepCopyInto

func (in *BaguaSpec) DeepCopyInto(out *BaguaSpec)

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

func (BaguaSpec) GetReplicas

func (spec BaguaSpec) GetReplicas(rt commonv1.ReplicaType) int32

type BaguaStatus

type BaguaStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	commonv1.JobStatus `json:",inline"`
	Phase              commonv1.JobConditionType `json:"phase,omitempty"`
}

********

  • Status ********

BaguaStatus defines the observed state of Bagua

func (*BaguaStatus) DeepCopy

func (in *BaguaStatus) DeepCopy() *BaguaStatus

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

func (*BaguaStatus) DeepCopyInto

func (in *BaguaStatus) DeepCopyInto(out *BaguaStatus)

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