v1alpha2

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 10 Imported by: 12

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the machinelearning v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/seldonio/seldon-operator/pkg/apis/machinelearning +k8s:defaulter-gen=TypeMeta +groupName=machinelearning.seldon.io

Package v1alpha2 contains API Schema definitions for the machinelearning v1alpha2 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/seldonio/seldon-operator/pkg/apis/machinelearning +k8s:defaulter-gen=TypeMeta +groupName=machinelearning.seldon.io

Index

Constants

View Source
const (
	Label_seldon_id  = "seldon-deployment-id"
	Label_seldon_app = "seldon-app"
	Label_svc_orch   = "seldon-deployment-contains-svcorch"

	PODINFO_VOLUME_NAME = "podinfo"
	PODINFO_VOLUME_PATH = "/etc/podinfo"

	ENV_PREDICTIVE_UNIT_SERVICE_PORT = "PREDICTIVE_UNIT_SERVICE_PORT"
	ENV_PREDICTIVE_UNIT_PARAMETERS   = "PREDICTIVE_UNIT_PARAMETERS"
	ENV_PREDICTIVE_UNIT_ID           = "PREDICTIVE_UNIT_ID"
	ENV_PREDICTOR_ID                 = "PREDICTOR_ID"
	ENV_SELDON_DEPLOYMENT_ID         = "SELDON_DEPLOYMENT_ID"

	ANNOTATION_JAVA_OPTS       = "seldon.io/engine-java-opts"
	ANNOTATION_SEPARATE_ENGINE = "seldon.io/engine-separate-pod"
	ANNOTATION_HEADLESS_SVC    = "seldon.io/headless-svc"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "machinelearning.seldon.io", Version: "v1alpha2"}

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

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func GetContainerServiceName

func GetContainerServiceName(mlDep *SeldonDeployment, predictorSpec PredictorSpec, c *v1.Container) string

func GetDeploymentName

func GetDeploymentName(mlDep *SeldonDeployment, predictorSpec PredictorSpec, podSpec *SeldonPodSpec) string

func GetPredictorServiceNameKey

func GetPredictorServiceNameKey(c *v1.Container) string

func GetSeldonDeploymentName

func GetSeldonDeploymentName(mlDep *SeldonDeployment) string

func GetServiceOrchestratorName

func GetServiceOrchestratorName(mlDep *SeldonDeployment, p *PredictorSpec) string

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type DeploymentStatus

type DeploymentStatus struct {
	Name              string `json:"name,omitempty" protobuf:"string,1,opt,name=name"`
	Status            string `json:"status,omitempty" protobuf:"string,2,opt,name=status"`
	Description       string `json:"description,omitempty" protobuf:"string,3,opt,name=description"`
	Replicas          int32  `json:"replicas,omitempty" protobuf:"string,4,opt,name=replicas"`
	AvailableReplicas int32  `json:"availableReplicas,omitempty" protobuf:"string,5,opt,name=availableRelicas"`
}

func (*DeploymentStatus) DeepCopy

func (in *DeploymentStatus) DeepCopy() *DeploymentStatus

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

func (*DeploymentStatus) DeepCopyInto

func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus)

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

type Endpoint

type Endpoint struct {
	ServiceHost string       `json:"service_host,omitempty" protobuf:"string,1,opt,name=service_host"`
	ServicePort int32        `json:"service_port,omitempty" protobuf:"int32,2,opt,name=service_port"`
	Type        EndpointType `json:"type,omitempty" protobuf:"int,3,opt,name=type"`
}

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

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

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

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

type EndpointType

type EndpointType string
const (
	REST EndpointType = "REST"
	GRPC EndpointType = "GRPC"
)

type Parameter

type Parameter struct {
	Name  string       `json:"name,omitempty" protobuf:"string,1,opt,name=name"`
	Value string       `json:"value,omitempty" protobuf:"string,2,opt,name=value"`
	Type  ParmeterType `json:"type,omitempty" protobuf:"int,3,opt,name=type"`
}

func (*Parameter) DeepCopy

func (in *Parameter) DeepCopy() *Parameter

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

func (*Parameter) DeepCopyInto

func (in *Parameter) DeepCopyInto(out *Parameter)

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

type ParmeterType

type ParmeterType string
const (
	INT    ParmeterType = "INT"
	FLOAT  ParmeterType = "FLOAT"
	DOUBLE ParmeterType = "DOUBLE"
	STRING ParmeterType = "STRING"
	BOOL   ParmeterType = "BOOL"
)

type PredictiveUnit

type PredictiveUnit struct {
	Name           string                        `json:"name,omitempty" protobuf:"string,1,opt,name=name"`
	Children       []PredictiveUnit              `json:"children,omitempty" protobuf:"bytes,2,opt,name=children"`
	Type           *PredictiveUnitType           `json:"type,omitempty" protobuf:"int,3,opt,name=type"`
	Implementation *PredictiveUnitImplementation `json:"implementation,omitempty" protobuf:"int,4,opt,name=implementation"`
	Methods        *[]PredictiveUnitMethod       `json:"methods,omitempty" protobuf:"int,5,opt,name=methods"`
	Endpoint       *Endpoint                     `json:"endpoint,omitempty" protobuf:"bytes,6,opt,name=endpoint"`
	Parameters     []Parameter                   `json:"parameters,omitempty" protobuf:"bytes,7,opt,name=parameters"`
}

func GetPredcitiveUnit

func GetPredcitiveUnit(pu *PredictiveUnit, name string) *PredictiveUnit

func (*PredictiveUnit) DeepCopy

func (in *PredictiveUnit) DeepCopy() *PredictiveUnit

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

func (*PredictiveUnit) DeepCopyInto

func (in *PredictiveUnit) DeepCopyInto(out *PredictiveUnit)

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

type PredictiveUnitImplementation

type PredictiveUnitImplementation string
const (
	UNKNOWN_IMPLEMENTATION PredictiveUnitImplementation = "UNKNOWN_IMPLEMENTATION"
	SIMPLE_MODEL           PredictiveUnitImplementation = "SIMPLE_MODEL"
	SIMPLE_ROUTER          PredictiveUnitImplementation = "SIMPLE_ROUTER"
	RANDOM_ABTEST          PredictiveUnitImplementation = "RANDOM_ABTEST"
	AVERAGE_COMBINER       PredictiveUnitImplementation = "AVERAGE_COMBINER"
)

type PredictiveUnitMethod

type PredictiveUnitMethod string
const (
	TRANSFORM_INPUT  PredictiveUnitMethod = "TRANSFORM_INPUT"
	TRANSFORM_OUTPUT PredictiveUnitMethod = "TRANSFORM_OUTPUT"
	ROUTE            PredictiveUnitMethod = "ROUTE"
	AGGREGATE        PredictiveUnitMethod = "AGGREGATE"
	SEND_FEEDBACK    PredictiveUnitMethod = "SEND_FEEDBACK"
)

type PredictiveUnitType

type PredictiveUnitType string
const (
	UNKNOWN_TYPE       PredictiveUnitType = "UNKNOWN_TYPE"
	ROUTER             PredictiveUnitType = "ROUTER"
	COMBINER           PredictiveUnitType = "COMBINER"
	MODEL              PredictiveUnitType = "MODEL"
	TRANSFORMER        PredictiveUnitType = "TRANSFORMER"
	OUTPUT_TRANSFORMER PredictiveUnitType = "OUTPUT_TRANSFORMER"
)

type PredictorSpec

type PredictorSpec struct {
	Name            string                  `json:"name,omitempty" protobuf:"string,1,opt,name=name"`
	Graph           *PredictiveUnit         `json:"graph,omitempty" protobuf:"bytes,2,opt,name=predictiveUnit"`
	ComponentSpecs  []*SeldonPodSpec        `json:"componentSpecs,omitempty" protobuf:"bytes,3,opt,name=componentSpecs"`
	Replicas        int32                   `json:"replicas,omitempty" protobuf:"string,4,opt,name=replicas"`
	Annotations     map[string]string       `json:"annotations,omitempty" protobuf:"bytes,5,opt,name=annotations"`
	EngineResources v1.ResourceRequirements `json:"engineResources,omitempty" protobuf:"bytes,6,opt,name=engineResources"`
	Labels          map[string]string       `json:"labels,omitempty" protobuf:"bytes,7,opt,name=labels"`
	SvcOrchSpec     SvcOrchSpec             `json:"svcOrchSpec,omitempty" protobuf:"bytes,8,opt,name=svcOrchSpec"`
	Traffic         int32                   `json:"traffic,omitempty" protobuf:"bytes,9,opt,name=traffic"`
}

func (*PredictorSpec) DeepCopy

func (in *PredictorSpec) DeepCopy() *PredictorSpec

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

func (*PredictorSpec) DeepCopyInto

func (in *PredictorSpec) DeepCopyInto(out *PredictorSpec)

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

type SeldonDeployment

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

	Spec   SeldonDeploymentSpec   `json:"spec,omitempty"`
	Status SeldonDeploymentStatus `json:"status,omitempty"`
}

SeldonDeployment is the Schema for the seldondeployments API +k8s:openapi-gen=true +kubebuilder:resource:shortName=sdep +kubebuilder:subresource:status

func (*SeldonDeployment) DeepCopy

func (in *SeldonDeployment) DeepCopy() *SeldonDeployment

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

func (*SeldonDeployment) DeepCopyInto

func (in *SeldonDeployment) DeepCopyInto(out *SeldonDeployment)

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

func (*SeldonDeployment) DeepCopyObject

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

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

type SeldonDeploymentList

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

SeldonDeploymentList contains a list of SeldonDeployment

func (*SeldonDeploymentList) DeepCopy

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

func (*SeldonDeploymentList) DeepCopyInto

func (in *SeldonDeploymentList) DeepCopyInto(out *SeldonDeploymentList)

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

func (*SeldonDeploymentList) DeepCopyObject

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

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

type SeldonDeploymentSpec

type SeldonDeploymentSpec struct {
	Name        string            `json:"name,omitempty" protobuf:"string,1,opt,name=name"`
	Predictors  []PredictorSpec   `json:"predictors,omitempty" protobuf:"bytes,2,opt,name=name"`
	OauthKey    string            `json:"oauth_key,omitempty" protobuf:"string,3,opt,name=oauth_key"`
	OauthSecret string            `json:"oauth_secret,omitempty" protobuf:"string,4,opt,name=oauth_secret"`
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,5,opt,name=annotations"`
}

SeldonDeploymentSpec defines the desired state of SeldonDeployment

func (*SeldonDeploymentSpec) DeepCopy

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

func (*SeldonDeploymentSpec) DeepCopyInto

func (in *SeldonDeploymentSpec) DeepCopyInto(out *SeldonDeploymentSpec)

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

type SeldonDeploymentStatus

type SeldonDeploymentStatus struct {
	State            string                      `json:"state,omitempty" protobuf:"string,1,opt,name=state"`
	Description      string                      `json:"description,omitempty" protobuf:"string,2,opt,name=description"`
	DeploymentStatus map[string]DeploymentStatus `json:"deploymentStatus,omitempty" protobuf:"bytes,3,opt,name=deploymentStatus"`
	ServiceStatus    map[string]ServiceStatus    `json:"serviceStatus,omitempty" protobuf:"bytes,4,opt,name=serviceStatus"`
}

SeldonDeploymentStatus defines the observed state of SeldonDeployment

func (*SeldonDeploymentStatus) DeepCopy

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

func (*SeldonDeploymentStatus) DeepCopyInto

func (in *SeldonDeploymentStatus) DeepCopyInto(out *SeldonDeploymentStatus)

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

type SeldonHpaSpec

type SeldonHpaSpec struct {
	MinReplicas *int32                          `json:"minReplicas,omitempty" protobuf:"int,1,opt,name=minReplicas"`
	MaxReplicas int32                           `json:"maxReplicas,omitempty" protobuf:"int,2,opt,name=maxReplicas"`
	Metrics     []autoscalingv2beta2.MetricSpec `json:"metrics,omitempty" protobuf:"bytes,3,opt,name=metrics"`
}

func (*SeldonHpaSpec) DeepCopy

func (in *SeldonHpaSpec) DeepCopy() *SeldonHpaSpec

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

func (*SeldonHpaSpec) DeepCopyInto

func (in *SeldonHpaSpec) DeepCopyInto(out *SeldonHpaSpec)

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

type SeldonPodSpec

type SeldonPodSpec struct {
	Metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Spec     v1.PodSpec        `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	HpaSpec  *SeldonHpaSpec    `json:"hpaSpec,omitempty" protobuf:"bytes,3,opt,name=hpaSpec"`
}

func (*SeldonPodSpec) DeepCopy

func (in *SeldonPodSpec) DeepCopy() *SeldonPodSpec

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

func (*SeldonPodSpec) DeepCopyInto

func (in *SeldonPodSpec) DeepCopyInto(out *SeldonPodSpec)

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

type ServiceStatus

type ServiceStatus struct {
	SvcName      string `json:"svcName,omitempty" protobuf:"string,1,opt,name=svcName"`
	HttpEndpoint string `json:"httpEndpoint,omitempty" protobuf:"string,2,opt,name=httpEndpoint"`
	GrpcEndpoint string `json:"grpcEndpoint,omitempty" protobuf:"string,3,opt,name=grpcEndpoint"`
}

func (*ServiceStatus) DeepCopy

func (in *ServiceStatus) DeepCopy() *ServiceStatus

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

func (*ServiceStatus) DeepCopyInto

func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus)

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

type SvcOrchSpec

type SvcOrchSpec struct {
	Resources *v1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,1,opt,name=resources"`
	Env       []*v1.EnvVar             `json:"env,omitempty" protobuf:"bytes,2,opt,name=env"`
}

func (*SvcOrchSpec) DeepCopy

func (in *SvcOrchSpec) DeepCopy() *SvcOrchSpec

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

func (*SvcOrchSpec) DeepCopyInto

func (in *SvcOrchSpec) DeepCopyInto(out *SvcOrchSpec)

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