v1alpha1

package
v0.0.0-...-2dbac4b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "ottoscaler.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
)

Functions

This section is empty.

Types

type HPAConfiguration

type HPAConfiguration struct {
	Min               int `json:"min"`
	Max               int `json:"max"`
	TargetMetricValue int `json:"targetMetricValue"`
}

func (*HPAConfiguration) DeepCopy

func (in *HPAConfiguration) DeepCopy() *HPAConfiguration

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

func (*HPAConfiguration) DeepCopyInto

func (in *HPAConfiguration) DeepCopyInto(out *HPAConfiguration)

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

func (HPAConfiguration) DeepEquals

func (h HPAConfiguration) DeepEquals(h2 HPAConfiguration) bool

type Policy

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

	Spec   PolicySpec   `json:"spec,omitempty"`
	Status PolicyStatus `json:"status,omitempty"`
}

Policy is the Schema for the policies API +kubebuilder:printcolumn:name="Default",type=boolean,JSONPath=`.spec.isDefault` +kubebuilder:printcolumn:name="RiskIndex",type=integer,JSONPath=`.spec.riskIndex` +kubebuilder:printcolumn:name="ReplicaPercCut",type=integer,JSONPath=`.spec.minReplicaPercentageCut` +kubebuilder:printcolumn:name="TargetUtil",type=integer,JSONPath=`.spec.targetUtilization` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:shortName=opolicy,scope=Cluster

func (*Policy) DeepCopy

func (in *Policy) DeepCopy() *Policy

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

func (*Policy) DeepCopyInto

func (in *Policy) DeepCopyInto(out *Policy)

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

func (*Policy) DeepCopyObject

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

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

type PolicyList

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

PolicyList contains a list of Policy

func (*PolicyList) DeepCopy

func (in *PolicyList) DeepCopy() *PolicyList

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

func (*PolicyList) DeepCopyInto

func (in *PolicyList) DeepCopyInto(out *PolicyList)

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

func (*PolicyList) DeepCopyObject

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

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

type PolicyRecommendation

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

	Spec   PolicyRecommendationSpec   `json:"spec,omitempty"`
	Status PolicyRecommendationStatus `json:"status,omitempty"`
}

PolicyRecommendation is the Schema for the policyrecommendations API +kubebuilder:printcolumn:name="Max",type=integer,JSONPath=`.spec.targetHPAConfig.max` +kubebuilder:printcolumn:name="Min",type=integer,JSONPath=`.spec.targetHPAConfig.min` +kubebuilder:printcolumn:name="Util",type=integer,JSONPath=`.spec.targetHPAConfig.targetMetricValue` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:shortName=policyreco

func (*PolicyRecommendation) DeepCopy

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

func (*PolicyRecommendation) DeepCopyInto

func (in *PolicyRecommendation) DeepCopyInto(out *PolicyRecommendation)

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

func (*PolicyRecommendation) DeepCopyObject

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

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

type PolicyRecommendationConditionType

type PolicyRecommendationConditionType string
const (
	// PolicyRecommendation is initialized post the creation of a workload
	Initialized PolicyRecommendationConditionType = "Initialized"

	//Recommendation is queued for execution
	RecoTaskQueued PolicyRecommendationConditionType = "RecoTaskQueued"

	// Recommendation WorkFlow Progress is captured in this condition
	RecoTaskProgress PolicyRecommendationConditionType = "RecoTaskProgress"

	//Target Reco is acheived
	TargetRecoAchieved PolicyRecommendationConditionType = "TargetRecoAchieved"

	// AutoscalingPolicySynced means there's corresponding ScaledObject or HPA reflects the desired state specified in the PolicyRecommendation
	AutoscalingPolicySynced PolicyRecommendationConditionType = "AutoscalingPolicySynced"

	//Breach Condition
	HasBreached PolicyRecommendationConditionType = "HasBreached"

	// HPA Enforced condition
	HPAEnforced PolicyRecommendationConditionType = "HPAEnforced"
)

These are valid conditions of a deployment.

type PolicyRecommendationList

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

PolicyRecommendationList contains a list of PolicyRecommendation

func (*PolicyRecommendationList) DeepCopy

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

func (*PolicyRecommendationList) DeepCopyInto

func (in *PolicyRecommendationList) DeepCopyInto(out *PolicyRecommendationList)

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

func (*PolicyRecommendationList) DeepCopyObject

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

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

type PolicyRecommendationSpec

type PolicyRecommendationSpec struct {
	WorkloadMeta            WorkloadMeta     `json:"workload,omitempty"`
	TargetHPAConfiguration  HPAConfiguration `json:"targetHPAConfig,omitempty"`
	CurrentHPAConfiguration HPAConfiguration `json:"currentHPAConfig,omitempty"`
	Policy                  string           `json:"policy,omitempty"`
	GeneratedAt             *metav1.Time     `json:"generatedAt,omitempty"`
	TransitionedAt          *metav1.Time     `json:"transitionedAt,omitempty"`
	QueuedForExecution      *bool            `json:"queuedForExecution,omitempty"`
	QueuedForExecutionAt    *metav1.Time     `json:"queuedForExecutionAt,omitempty"`
}

PolicyRecommendationSpec defines the desired state of PolicyRecommendation

func (*PolicyRecommendationSpec) DeepCopy

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

func (*PolicyRecommendationSpec) DeepCopyInto

func (in *PolicyRecommendationSpec) DeepCopyInto(out *PolicyRecommendationSpec)

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

type PolicyRecommendationStatus

type PolicyRecommendationStatus struct {
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

PolicyRecommendationStatus defines the observed state of PolicyRecommendation

func (*PolicyRecommendationStatus) DeepCopy

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

func (*PolicyRecommendationStatus) DeepCopyInto

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

type PolicySpec

type PolicySpec struct {
	IsDefault               bool `json:"isDefault,omitempty"`
	RiskIndex               int  `json:"riskIndex"`
	MinReplicaPercentageCut int  `json:"minReplicaPercentageCut"`
	TargetUtilization       int  `json:"targetUtilization"`
}

PolicySpec defines the desired state of Policy

func (*PolicySpec) DeepCopy

func (in *PolicySpec) DeepCopy() *PolicySpec

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

func (*PolicySpec) DeepCopyInto

func (in *PolicySpec) DeepCopyInto(out *PolicySpec)

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

type PolicyStatus

type PolicyStatus struct {
}

PolicyStatus defines the observed state of Policy

func (*PolicyStatus) DeepCopy

func (in *PolicyStatus) DeepCopy() *PolicyStatus

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

func (*PolicyStatus) DeepCopyInto

func (in *PolicyStatus) DeepCopyInto(out *PolicyStatus)

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

type WorkloadMeta

type WorkloadMeta struct {
	metav1.TypeMeta `json:","`
	Name            string `json:"name,omitempty"`
}

func (*WorkloadMeta) DeepCopy

func (in *WorkloadMeta) DeepCopy() *WorkloadMeta

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

func (*WorkloadMeta) DeepCopyInto

func (in *WorkloadMeta) DeepCopyInto(out *WorkloadMeta)

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