v1

package
v0.0.0-...-b4f3a91 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1 contains PaddleService +groupName=serving.paddlepaddle.org +k8s:openapi-gen=true

Package v1 contains API Schema definitions for the serving v1 API group +kubebuilder:object:generate=true +groupName=serving.paddlepaddle.org

Index

Constants

View Source
const (
	// RoutesReady is set when network configuration has completed.
	RoutesReady apis.ConditionType = "RoutesReady"
	// DefaultEndpointReady is set when default PaddleService Endpoint has reported readiness.
	DefaultEndpointReady apis.ConditionType = "DefaultEndpointReady"
	// CanaryEndpointReady is set when canary PaddleService Endpoint has reported readiness.
	CanaryEndpointReady apis.ConditionType = "CanaryEndpointReady"
)

ConditionType represents a Service condition value

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "serving.paddlepaddle.org", Version: "v1"}

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

type Autoscaler string

Autoscaler defines the autoscaler class +kubebuilder:validation:Enum=kpa.autoscaling.knative.dev;hpa.autoscaling.knative.dev

type AutoscalerMetric

type AutoscalerMetric string

AutoscalerMetric defines the metric for the autoscaler +kubebuilder:validation:Enum=concurrency;rps;cpu

type EndpointSpec

type EndpointSpec struct {
	// +required
	ContainerImage string `json:"containerImage"`
	// +required
	Tag string `json:"tag"`
	// +required
	Port int32 `json:"port"`
	// +optional
	Argument string `json:"arg,omitempty"`
}

EndpointSpec defines the running containers

func (*EndpointSpec) DeepCopy

func (in *EndpointSpec) DeepCopy() *EndpointSpec

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

func (*EndpointSpec) DeepCopyInto

func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec)

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

type PaddleService

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

	Spec   PaddleServiceSpec   `json:"spec,omitempty"`
	Status PaddleServiceStatus `json:"status,omitempty"`
}

PaddleService is the Schema for the paddles API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas +genclient

func (*PaddleService) DeepCopy

func (in *PaddleService) DeepCopy() *PaddleService

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

func (*PaddleService) DeepCopyInto

func (in *PaddleService) DeepCopyInto(out *PaddleService)

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

func (*PaddleService) DeepCopyObject

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

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

type PaddleServiceList

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

PaddleServiceList contains a list of PaddleService

func (*PaddleServiceList) DeepCopy

func (in *PaddleServiceList) DeepCopy() *PaddleServiceList

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

func (*PaddleServiceList) DeepCopyInto

func (in *PaddleServiceList) DeepCopyInto(out *PaddleServiceList)

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

func (*PaddleServiceList) DeepCopyObject

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

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

type PaddleServiceSpec

type PaddleServiceSpec struct {

	// Version of the service
	RuntimeVersion string `json:"runtimeVersion,omitempty"`
	// Defaults to requests and limits of 1CPU, 2Gb MEM.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// DefaultTag defines default PaddleService endpoints
	// +required
	Default *EndpointSpec `json:"default"`
	// CanaryTag defines an alternative PaddleService endpoints
	// +optional
	Canary *EndpointSpec `json:"canary,omitempty"`
	// CanaryTrafficPercent defines the percentage of traffic going to canary PaddleService endpoints
	// +optional
	CanaryTrafficPercent *int `json:"canaryTrafficPercent,omitempty"`
	// +optional
	Service ServiceSpec `json:"service,omitempty"`
	// Container's working directory.
	// If not specified, the container runtime's default will be used, which
	// might be configured in the container image.
	// Cannot be updated.
	// +optional
	WorkingDir string `json:"workingDir,omitempty"`
	// Pod volumes to mount into the container's filesystem.
	// Cannot be updated.
	// +optional
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
	// List of volumes that can be mounted by containers belonging to the pod.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes
	// +optional
	Volumes []corev1.Volume `json:"volumes,omitempty"`
}

PaddleServiceSpec defines the desired state of PaddleService

func (*PaddleServiceSpec) DeepCopy

func (in *PaddleServiceSpec) DeepCopy() *PaddleServiceSpec

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

func (*PaddleServiceSpec) DeepCopyInto

func (in *PaddleServiceSpec) DeepCopyInto(out *PaddleServiceSpec)

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

type PaddleServiceStatus

type PaddleServiceStatus struct {
	duckv1.Status `json:",inline"`
	// URL of the PaddleService
	URL string `json:"url,omitempty"`
	// Statuses for the default endpoints of the PaddleService
	Default *StatusConfigurationSpec `json:"default,omitempty"`
	// Statuses for the canary endpoints of the PaddleService
	Canary *StatusConfigurationSpec `json:"canary,omitempty"`

	// +optional
	// +kubebuilder:validation:Minimum=0
	Replicas int32 `json:"replicas,omitempty"`
}

PaddleServiceStatus defines the observed state of PaddleService

func (*PaddleServiceStatus) DeepCopy

func (in *PaddleServiceStatus) DeepCopy() *PaddleServiceStatus

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

func (*PaddleServiceStatus) DeepCopyInto

func (in *PaddleServiceStatus) DeepCopyInto(out *PaddleServiceStatus)

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

func (*PaddleServiceStatus) GetCondition

func (ss *PaddleServiceStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*PaddleServiceStatus) InitializeConditions

func (ss *PaddleServiceStatus) InitializeConditions()

func (*PaddleServiceStatus) IsReady

func (ss *PaddleServiceStatus) IsReady() bool

IsReady returns if the service is ready to serve the requested configuration.

func (*PaddleServiceStatus) PropagateStatus

func (ss *PaddleServiceStatus) PropagateStatus(serviceStatus *knservingv1.ServiceStatus)

type ServiceSpec

type ServiceSpec struct {
	//+optional
	Autoscaler Autoscaler `json:"autoscaler,omitempty"`
	//+optional
	Metric AutoscalerMetric `json:"metric,omitempty"`
	//+optional
	Window string `json:"window,omitempty"`
	//+optional
	PanicWindow string `json:"panicWindow,omitempty"`
	//+optional
	PanicThreshold string `json:"panicThreshold,omitempty"`
	//+optional
	MinScale *int `json:"minScale,omitempty"`
	//+optional
	MaxScale int `json:"maxScale,omitempty"`
	//+optional
	Target int `json:"target,omitempty"`
	//+optional
	TargetUtilization string `json:"targetUtilization,omitempty"`
}

ServiceSpec defines the configuration for Knative Service.

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

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

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

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

type StatusConfigurationSpec

type StatusConfigurationSpec struct {
	// Latest revision name that is in ready state
	Name string `json:"name,omitempty"`
}

StatusConfigurationSpec describes the state of the configuration receiving traffic.

func (*StatusConfigurationSpec) DeepCopy

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

func (*StatusConfigurationSpec) DeepCopyInto

func (in *StatusConfigurationSpec) DeepCopyInto(out *StatusConfigurationSpec)

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