v1alpha1

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 5 Imported by: 18

Documentation

Overview

Package v1alpha1 provides alpha API for Katalyst Workload API objects.

Index

Constants

View Source
const (
	// IndicatorLevelLowerBound is usually used to define the lower bound to define
	// service working states. For instance, if rpc-latency is defined as a
	// business indicator, if actual observed value is below IndicatorLevelLowerBound,
	//	it means the workload works perfectly; if observed value is above
	// 	IndicatorLevelLowerBound but below IndicatorLevelUpperBound, it means the workload
	//	works can still work, but may suffer with performance downgrade.
	IndicatorLevelLowerBound = "LowerBound"

	// IndicatorLevelUpperBound is usually used to define the upper bound that
	// the workload be bear with. For instance, if rpc-latency is defined as a
	// business indicator, if actual observed value is above IndicatorLevelUpperBound,
	// it means the workload is broken and can't serve the online traffic anymore.
	IndicatorLevelUpperBound = "UpperBound"
)
View Source
const (
	// GroupName is the group name used in this package
	GroupName string = "workload.katalyst.kubewharf.io"
)
View Source
const (
	ResourceNameServiceProfileDescriptors = "serviceprofiledescriptors"
)

ResourceNameServiceProfileDescriptors const is used to construct standard gvr

Variables

View Source
var (
	// SchemeBuilder collects schemas to build.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is used by generated client to add this scheme to the generated client.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AggPodMetrics

type AggPodMetrics struct {
	// Aggregator indicates how the metrics data in Items are calculated, i.e.
	// defines the aggregation functions.
	Aggregator Aggregator `json:"aggregator"`

	// +optional
	Items []metrics.PodMetrics `json:"items,omitempty"`
}

AggPodMetrics records the aggregated metrics based.

func (*AggPodMetrics) DeepCopy

func (in *AggPodMetrics) DeepCopy() *AggPodMetrics

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

func (*AggPodMetrics) DeepCopyInto

func (in *AggPodMetrics) DeepCopyInto(out *AggPodMetrics)

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

type Aggregator

type Aggregator string
const (
	Avg Aggregator = "avg"
	Max Aggregator = "max"
)

type Indicator added in v0.0.2

type Indicator struct {
	IndicatorLevel IndicatorLevelName `json:"indicatorLevel"`
	Value          float32            `json:"value"`
}

func (*Indicator) DeepCopy added in v0.0.2

func (in *Indicator) DeepCopy() *Indicator

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

func (*Indicator) DeepCopyInto added in v0.0.2

func (in *Indicator) DeepCopyInto(out *Indicator)

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

type IndicatorLevelName added in v0.0.2

type IndicatorLevelName string

IndicatorLevelName defines several levels for each indicator, and we will always try to keep the actual indicator in acceptable intervals instead of as an accurate value. Those intervals are marked by IndicatorLevelName.

type ServiceBusinessIndicatorName added in v0.0.2

type ServiceBusinessIndicatorName string
const (
	ServiceBusinessIndicatorNameRPCLatency ServiceBusinessIndicatorName = "RPCLatency"
)

type ServiceBusinessIndicatorSpec added in v0.0.2

type ServiceBusinessIndicatorSpec struct {
	// Name is used to define the business-related profiling indicator for the workload,
	// e.g. rpc-latency, success-rate, service-health-score and so on.
	// Users can use it as an expended way, and customize sysadvisor to adapter with it.
	Name ServiceBusinessIndicatorName `json:"name"`

	// +optional
	Indicators []Indicator `json:"indicators,omitempty"`
}

ServiceBusinessIndicatorSpec defines workload profiling in business level, such as rpc-latency, success-rate, service-health-score and so on, and general control-flow works as below

- according to workload states, user defines several key indicates - user-system calculate and update observed values in status - sysadvisor (in-tree katalyst) decides system-indicator offset according to business-indicator - sysadvisor (along with reporter and qrm) to perform resources and controlKnob actions

func (*ServiceBusinessIndicatorSpec) DeepCopy added in v0.0.2

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

func (*ServiceBusinessIndicatorSpec) DeepCopyInto added in v0.0.2

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

type ServiceBusinessIndicatorStatus added in v0.0.2

type ServiceBusinessIndicatorStatus struct {
	Name ServiceBusinessIndicatorName `json:"name"`

	// Current indicates the current observed value for this business indicator
	// +optional
	Current *float32 `json:"current,omitempty"`
}

ServiceBusinessIndicatorStatus is connected with ServiceBusinessIndicatorSpec with Name to indicate the observed info for this workload (as for this indicator).

func (*ServiceBusinessIndicatorStatus) DeepCopy added in v0.0.2

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

func (*ServiceBusinessIndicatorStatus) DeepCopyInto added in v0.0.2

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

type ServiceProfileDescriptor

type ServiceProfileDescriptor struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a ServiceProfileDescriptor.
	// +optional
	Spec ServiceProfileDescriptorSpec `json:"spec,omitempty"`

	// Status represents the concrete samples of ServiceProfileData with multiple resources.
	// +optional
	Status ServiceProfileDescriptorStatus `json:"status,omitempty"`
}

ServiceProfileDescriptor captures information about a VPA object

func (*ServiceProfileDescriptor) DeepCopy

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

func (*ServiceProfileDescriptor) DeepCopyInto

func (in *ServiceProfileDescriptor) DeepCopyInto(out *ServiceProfileDescriptor)

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

func (*ServiceProfileDescriptor) DeepCopyObject

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

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

type ServiceProfileDescriptorList

type ServiceProfileDescriptorList struct {
	metav1.TypeMeta `json:",inline"`

	// Standard list metadata
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// items is the list of SPDs
	Items []ServiceProfileDescriptor `json:"items"`
}

ServiceProfileDescriptorList is a collection of SPD objects.

func (*ServiceProfileDescriptorList) DeepCopy

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

func (*ServiceProfileDescriptorList) DeepCopyInto

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

func (*ServiceProfileDescriptorList) DeepCopyObject

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

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

type ServiceProfileDescriptorSpec

type ServiceProfileDescriptorSpec struct {
	// TargetRef points to the controller managing the set of pods for the
	// spd-controller to control - e.g. Deployment, StatefulSet.
	// SPD should have one-to-one mapping relationships with workload.
	TargetRef v1alpha1.CrossVersionObjectReference `json:"targetRef"`

	// BaselineRatio marks off a bunch of instances, and skip adjusting Knobs
	// for them; those instances are defined as baselines, and can be compared
	// with other (experimental/production) instances to demonstrate the benefits.
	// if BaselineRatio not set, it means we should take all instances as production instances.
	// +kubebuilder:validation:Minimum=0.0
	// +kubebuilder:validation:Maximum=1.0
	// +optional
	BaselineRatio *float32 `json:"baselineRatio,omitempty"`

	// if multiple BusinessIndicator are defined, it means that we should
	// try to satisfy all of those indicator targets
	// +optional
	BusinessIndicator []ServiceBusinessIndicatorSpec `json:"businessIndicator,omitempty"`

	// if multiple SystemIndicator are defined, it means that we should
	// try to satisfy all of those indicator targets
	// +optional
	SystemIndicator []ServiceSystemIndicatorSpec `json:"systemIndicator,omitempty"`
}

ServiceProfileDescriptorSpec is the specification of the behavior of the SPD.

func (*ServiceProfileDescriptorSpec) DeepCopy

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

func (*ServiceProfileDescriptorSpec) DeepCopyInto

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

type ServiceProfileDescriptorStatus

type ServiceProfileDescriptorStatus struct {
	// +optional
	AggMetrics []AggPodMetrics `json:"aggMetrics,omitempty"`

	// +optional
	BusinessStatus []ServiceBusinessIndicatorStatus `json:"businessStatus,omitempty"`
}

ServiceProfileDescriptorStatus describes the observed info of the spd.

func (*ServiceProfileDescriptorStatus) DeepCopy

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

func (*ServiceProfileDescriptorStatus) DeepCopyInto

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

type ServiceSystemIndicatorSpec added in v0.0.2

type ServiceSystemIndicatorSpec struct {
	// Name is used to define the system-related profiling indicator for the workload,
	// e.g. cpu_sched_wait、cpi、mbw ... and so on.
	// Users can use it as an expended way, and customize sysadvisor to adapter with it.
	Name TargetIndicatorName `json:"name"`

	// +optional
	Indicators []Indicator `json:"indicators,omitempty"`
}

ServiceSystemIndicatorSpec defines workload profiling in system level, such as cpu_sched_wait、cpi、mbw ... and so on, and sysadvisor (along with reporter and qrm) will try to perform resources and controlKnob actions

System-target indicator (along with its values in each level) could be difficult to pre-define, and it may have strong correlations with both workload characters and node environments, so we suggest users to run offline analysis pipelines to get those stats.

func (*ServiceSystemIndicatorSpec) DeepCopy added in v0.0.2

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

func (*ServiceSystemIndicatorSpec) DeepCopyInto added in v0.0.2

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

type TargetIndicatorName added in v0.0.2

type TargetIndicatorName string
const (
	TargetIndicatorNameCPUSchedWait TargetIndicatorName = "cpu_sched_wait"
	TargetIndicatorNameCPI          TargetIndicatorName = "cpi"
)

Jump to

Keyboard shortcuts

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