v1alpha1

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 35

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the analysis API. +k8s:deepcopy-gen=package,register +groupName=analysis.crane.io

Index

Constants

View Source
const (
	// ReplicasRecommender name
	ReplicasRecommender string = "Replicas"

	// ResourceRecommender name
	ResourceRecommender string = "Resource"

	// HPARecommender name
	HPARecommender string = "HPA"

	// IdleNodeRecommender name
	IdleNodeRecommender string = "IdleNode"
)

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	AllRecommenderType []string
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: analysis.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AdoptionType added in v0.3.0

type AdoptionType string
const (
	AdoptionTypeStatus              AdoptionType = "Status"
	AdoptionTypeStatusAndAnnotation AdoptionType = "StatusAndAnnotation"
	AdoptionTypeAuto                AdoptionType = "Auto"
)

type AnalysisType

type AnalysisType string
const (
	AnalysisTypeReplicas AnalysisType = "Replicas"
	AnalysisTypeResource AnalysisType = "Resource"
)

type Analytics

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

	// +optional
	Spec AnalyticsSpec `json:"spec"`

	// +optional
	Status AnalyticsStatus `json:"status,omitempty"`
}

Analytics represents the configuration of an analytics object.

func (*Analytics) DeepCopy

func (in *Analytics) DeepCopy() *Analytics

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

func (*Analytics) DeepCopyInto

func (in *Analytics) DeepCopyInto(out *Analytics)

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

func (*Analytics) DeepCopyObject

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

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

type AnalyticsList

type AnalyticsList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Analytics `json:"items"`
}

AnalyticsList is a list of Analytics items.

func (*AnalyticsList) DeepCopy

func (in *AnalyticsList) DeepCopy() *AnalyticsList

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

func (*AnalyticsList) DeepCopyInto

func (in *AnalyticsList) DeepCopyInto(out *AnalyticsList)

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

func (*AnalyticsList) DeepCopyObject

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

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

type AnalyticsSpec

type AnalyticsSpec struct {
	// Type is the analysis type, including HPA and resource.
	// +required
	// +kubebuilder:validation:Required
	Type AnalysisType `json:"type"`

	// ResourceSelector indicates how to select resources(e.g. a set of Deployments) for an Analytics.
	// +required
	// +kubebuilder:validation:Required
	ResourceSelectors []ResourceSelector `json:"resourceSelectors"`

	// CompletionStrategy indicate how to complete an Analytics.
	// +optional
	CompletionStrategy CompletionStrategy `json:"completionStrategy"`

	// Override Recommendation configs
	// +optional
	Config map[string]string `json:"config,omitempty"`
}

AnalyticsSpec describes the analytics type, what the analysis is for and how often the analysis routine runs.

func (*AnalyticsSpec) DeepCopy

func (in *AnalyticsSpec) DeepCopy() *AnalyticsSpec

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

func (*AnalyticsSpec) DeepCopyInto

func (in *AnalyticsSpec) DeepCopyInto(out *AnalyticsSpec)

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

type AnalyticsStatus

type AnalyticsStatus struct {
	// LastUpdateTime is the last time the status updated.
	// +optional
	LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`

	// Conditions is an array of current analytics conditions.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Recommendations is a list of RecommendationMission that run parallel.
	// +optional
	// +listType=atomic
	Recommendations []RecommendationMission `json:"recommendations,omitempty"`
}

AnalyticsStatus represents the current state of an analytics item.

func (*AnalyticsStatus) DeepCopy

func (in *AnalyticsStatus) DeepCopy() *AnalyticsStatus

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

func (*AnalyticsStatus) DeepCopyInto

func (in *AnalyticsStatus) DeepCopyInto(out *AnalyticsStatus)

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

type CompletionStrategy

type CompletionStrategy struct {
	// CompletionStrategy indicate the strategy to request an Analytics or Recommendation, value can be "Once" and "Periodical"
	// the default CompletionStrategy is Once.
	// +optional
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Enum=Once;Periodical
	// +kubebuilder:default=Once
	CompletionStrategyType CompletionStrategyType `json:"completionStrategyType,omitempty"`

	// PeriodSeconds is the duration in seconds for an Analytics or Recommendation.
	// +optional
	PeriodSeconds *int64 `json:"periodSeconds,omitempty"`
}

CompletionStrategy presents how to complete a recommendation or a recommendation request.

func (*CompletionStrategy) DeepCopy

func (in *CompletionStrategy) DeepCopy() *CompletionStrategy

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

func (*CompletionStrategy) DeepCopyInto

func (in *CompletionStrategy) DeepCopyInto(out *CompletionStrategy)

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

type CompletionStrategyType

type CompletionStrategyType string
const (
	CompletionStrategyPeriodical CompletionStrategyType = "Periodical"
	CompletionStrategyOnce       CompletionStrategyType = "Once"
)

type Config

type Config struct {
	// +optional
	Targets    []Target          `json:"targets,omitempty"`
	Properties map[string]string `json:"properties,omitempty"`
}

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

type ConfigSet

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

	Configs []Config `json:"configs,omitempty"`
}

ConfigSet represents the configuration set for recommendation.

func (*ConfigSet) DeepCopy

func (in *ConfigSet) DeepCopy() *ConfigSet

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

func (*ConfigSet) DeepCopyInto

func (in *ConfigSet) DeepCopyInto(out *ConfigSet)

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

func (*ConfigSet) DeepCopyObject

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

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

type ConfigSetList

type ConfigSetList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Items []ConfigSet `json:"items" protobuf:"bytes,2,rep,name=items"`
}

ConfigSetList is a list of ConfigSet.

func (*ConfigSetList) DeepCopy

func (in *ConfigSetList) DeepCopy() *ConfigSetList

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

func (*ConfigSetList) DeepCopyInto

func (in *ConfigSetList) DeepCopyInto(out *ConfigSetList)

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

func (*ConfigSetList) DeepCopyObject

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

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

type ContainerRecommendation added in v0.9.0

type ContainerRecommendation struct {
	ContainerName string       `json:"containerName,omitempty"`
	Target        ResourceList `json:"target,omitempty"`
}

func (*ContainerRecommendation) DeepCopy added in v0.9.0

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

func (*ContainerRecommendation) DeepCopyInto added in v0.9.0

func (in *ContainerRecommendation) DeepCopyInto(out *ContainerRecommendation)

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

type EffectiveHorizontalPodAutoscalerRecommendation added in v0.9.0

type EffectiveHorizontalPodAutoscalerRecommendation struct {
	MinReplicas *int32                     `json:"minReplicas,omitempty"`
	MaxReplicas *int32                     `json:"maxReplicas,omitempty"`
	Metrics     []autoscalingv2.MetricSpec `json:"metrics,omitempty"`
	Prediction  *autoscalingapi.Prediction `json:"prediction,omitempty"`
}

func (*EffectiveHorizontalPodAutoscalerRecommendation) DeepCopy added in v0.9.0

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

func (*EffectiveHorizontalPodAutoscalerRecommendation) DeepCopyInto added in v0.9.0

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

type NamespaceSelector added in v0.7.0

type NamespaceSelector struct {
	// Select all namespace if true
	Any bool `json:"any,omitempty"`
	// List of namespace names to select from.
	MatchNames []string `json:"matchNames,omitempty"`
}

NamespaceSelector describes how to select namespaces for recommend

func (*NamespaceSelector) DeepCopy added in v0.7.0

func (in *NamespaceSelector) DeepCopy() *NamespaceSelector

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

func (*NamespaceSelector) DeepCopyInto added in v0.7.0

func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)

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

type PatchReplicas added in v0.9.0

type PatchReplicas struct {
	Spec PatchReplicasSpec `json:"spec,omitempty"`
}

func (*PatchReplicas) DeepCopy added in v0.9.0

func (in *PatchReplicas) DeepCopy() *PatchReplicas

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

func (*PatchReplicas) DeepCopyInto added in v0.9.0

func (in *PatchReplicas) DeepCopyInto(out *PatchReplicas)

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

type PatchReplicasSpec added in v0.9.0

type PatchReplicasSpec struct {
	Replicas *int32 `json:"replicas,omitempty"`
}

func (*PatchReplicasSpec) DeepCopy added in v0.9.0

func (in *PatchReplicasSpec) DeepCopy() *PatchReplicasSpec

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

func (*PatchReplicasSpec) DeepCopyInto added in v0.9.0

func (in *PatchReplicasSpec) DeepCopyInto(out *PatchReplicasSpec)

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

type PatchResource added in v0.9.0

type PatchResource struct {
	Spec PatchResourceSpec `json:"spec,omitempty"`
}

func (*PatchResource) DeepCopy added in v0.9.0

func (in *PatchResource) DeepCopy() *PatchResource

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

func (*PatchResource) DeepCopyInto added in v0.9.0

func (in *PatchResource) DeepCopyInto(out *PatchResource)

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

type PatchResourcePodSpec added in v0.9.0

type PatchResourcePodSpec struct {
	// +patchMergeKey=name
	// +patchStrategy=merge
	Containers []corev1.Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name"`
}

func (*PatchResourcePodSpec) DeepCopy added in v0.9.0

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

func (*PatchResourcePodSpec) DeepCopyInto added in v0.9.0

func (in *PatchResourcePodSpec) DeepCopyInto(out *PatchResourcePodSpec)

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

type PatchResourcePodTemplateSpec added in v0.9.0

type PatchResourcePodTemplateSpec struct {
	Spec PatchResourcePodSpec `json:"spec,omitempty"`
}

func (*PatchResourcePodTemplateSpec) DeepCopy added in v0.9.0

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

func (*PatchResourcePodTemplateSpec) DeepCopyInto added in v0.9.0

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

type PatchResourceSpec added in v0.9.0

type PatchResourceSpec struct {
	Template PatchResourcePodTemplateSpec `json:"template"`
}

func (*PatchResourceSpec) DeepCopy added in v0.9.0

func (in *PatchResourceSpec) DeepCopy() *PatchResourceSpec

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

func (*PatchResourceSpec) DeepCopyInto added in v0.9.0

func (in *PatchResourceSpec) DeepCopyInto(out *PatchResourceSpec)

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

type ProposedRecommendation added in v0.9.0

type ProposedRecommendation struct {
	// EffectiveHPA is the proposed recommendation for type Replicas
	EffectiveHPA *EffectiveHorizontalPodAutoscalerRecommendation `json:"effectiveHPA,omitempty"`

	// ReplicasRecommendation is the proposed replicas for type Replicas
	ReplicasRecommendation *ReplicasRecommendation `json:"replicasRecommendation,omitempty"`

	// ResourceRequest is the proposed recommendation for type Resource
	ResourceRequest *ResourceRequestRecommendation `json:"resourceRequest,omitempty"`
}

ProposedRecommendation is the result for one recommendation

func (*ProposedRecommendation) DeepCopy added in v0.9.0

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

func (*ProposedRecommendation) DeepCopyInto added in v0.9.0

func (in *ProposedRecommendation) DeepCopyInto(out *ProposedRecommendation)

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

type Recommendation

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

	// +optional
	Spec RecommendationSpec `json:"spec,omitempty"`

	// +optional
	Status RecommendationStatus `json:"status,omitempty"`
}

Recommendation represents the configuration of a single recommendation.

func (*Recommendation) DeepCopy

func (in *Recommendation) DeepCopy() *Recommendation

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

func (*Recommendation) DeepCopyInto

func (in *Recommendation) DeepCopyInto(out *Recommendation)

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

func (*Recommendation) DeepCopyObject

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

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

type RecommendationContent added in v0.7.0

type RecommendationContent struct {
	// +optional
	RecommendedValue string `json:"recommendedValue,omitempty"`
	// +optional
	TargetRef corev1.ObjectReference `json:"targetRef"`
	// +optional
	RecommendedInfo string `json:"recommendedInfo,omitempty"`
	// +optional
	CurrentInfo string `json:"currentInfo,omitempty"`
	// +optional
	Action string `json:"action,omitempty"`
	// +optional
	Description string `json:"description,omitempty"`
}

RecommendationContent contains results for one recommendation

func (*RecommendationContent) DeepCopy added in v0.7.0

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

func (*RecommendationContent) DeepCopyInto added in v0.7.0

func (in *RecommendationContent) DeepCopyInto(out *RecommendationContent)

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

type RecommendationList

type RecommendationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Recommendation `json:"items"`
}

RecommendationList is a list of recommendations

func (*RecommendationList) DeepCopy

func (in *RecommendationList) DeepCopy() *RecommendationList

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

func (*RecommendationList) DeepCopyInto

func (in *RecommendationList) DeepCopyInto(out *RecommendationList)

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

func (*RecommendationList) DeepCopyObject

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

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

type RecommendationMission added in v0.5.0

type RecommendationMission struct {
	corev1.ObjectReference `json:",inline"`

	// +optional
	TargetRef corev1.ObjectReference `json:"targetRef"`

	// LastStartTime is last time we start a recommendation mission.
	// +optional
	LastStartTime *metav1.Time `json:"lastStartTime,omitempty"`

	// Message presents the running message for this mission
	// +optional
	Message string `json:"message,omitempty"`

	// RecommenderRef presents recommender info for recommendation mission.
	// +optional
	RecommenderRef Recommender `json:"recommenderRef"`
}

func (*RecommendationMission) DeepCopy added in v0.5.0

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

func (*RecommendationMission) DeepCopyInto added in v0.5.0

func (in *RecommendationMission) DeepCopyInto(out *RecommendationMission)

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

type RecommendationRule added in v0.7.0

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

	// +optional
	Spec RecommendationRuleSpec `json:"spec"`

	// +optional
	Status RecommendationRuleStatus `json:"status,omitempty"`
}

RecommendationRule represents the configuration of an RecommendationRule object.

func (*RecommendationRule) DeepCopy added in v0.7.0

func (in *RecommendationRule) DeepCopy() *RecommendationRule

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

func (*RecommendationRule) DeepCopyInto added in v0.7.0

func (in *RecommendationRule) DeepCopyInto(out *RecommendationRule)

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

func (*RecommendationRule) DeepCopyObject added in v0.7.0

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

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

type RecommendationRuleList added in v0.7.0

type RecommendationRuleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []RecommendationRule `json:"items"`
}

RecommendationRuleList is a list of RecommendationRule items.

func (*RecommendationRuleList) DeepCopy added in v0.7.0

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

func (*RecommendationRuleList) DeepCopyInto added in v0.7.0

func (in *RecommendationRuleList) DeepCopyInto(out *RecommendationRuleList)

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

func (*RecommendationRuleList) DeepCopyObject added in v0.7.0

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

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

type RecommendationRuleSpec added in v0.7.0

type RecommendationRuleSpec struct {
	// ResourceSelector indicates how to select resources(e.g. a set of Deployments) for a Recommendation.
	// +required
	// +kubebuilder:validation:Required
	ResourceSelectors []ResourceSelector `json:"resourceSelectors"`

	// NamespaceSelector indicates resource namespaces to select from
	NamespaceSelector NamespaceSelector `json:"namespaceSelector"`

	// RunInterval between two recommendation
	RunInterval string `json:"runInterval,omitempty"`

	// List of recommender type to run
	Recommenders []Recommender `json:"recommenders"`
}

RecommendationRuleSpec defines resources and runInterval to recommend

func (*RecommendationRuleSpec) DeepCopy added in v0.7.0

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

func (*RecommendationRuleSpec) DeepCopyInto added in v0.7.0

func (in *RecommendationRuleSpec) DeepCopyInto(out *RecommendationRuleSpec)

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

type RecommendationRuleStatus added in v0.7.0

type RecommendationRuleStatus struct {
	// LastUpdateTime is the last time the status updated.
	// +optional
	LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`

	// Recommendations is a list of RecommendationMission that run parallel.
	// +optional
	// +listType=atomic
	Recommendations []RecommendationMission `json:"recommendations,omitempty"`

	// RunNumber is the numbers of runs
	// +optional
	RunNumber int32 `json:"runNumber,omitempty"`
}

RecommendationRuleStatus represents the current state of an RecommendationRule item.

func (*RecommendationRuleStatus) DeepCopy added in v0.7.0

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

func (*RecommendationRuleStatus) DeepCopyInto added in v0.7.0

func (in *RecommendationRuleStatus) DeepCopyInto(out *RecommendationRuleStatus)

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

type RecommendationSpec

type RecommendationSpec struct {
	// +required
	// +kubebuilder:validation:Required
	TargetRef corev1.ObjectReference `json:"targetRef"`

	// +required
	// +kubebuilder:validation:Required
	Type AnalysisType `json:"type"`

	// CompletionStrategy indicate how to complete a recommendation.
	// the default CompletionStrategy is Once.
	// +optional
	CompletionStrategy CompletionStrategy `json:"completionStrategy,omitempty"`

	// AdoptionType indicate how to adopt recommendation value to target.
	// the default AdoptionType is StatusAndAnnotation.
	// +optional
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Enum=Status;StatusAndAnnotation;Auto
	// +kubebuilder:default=StatusAndAnnotation
	AdoptionType AdoptionType `json:"adoptionType,omitempty"`
}

RecommendationSpec describes the recommendation type and what the recommendation is for.

func (*RecommendationSpec) DeepCopy

func (in *RecommendationSpec) DeepCopy() *RecommendationSpec

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

func (*RecommendationSpec) DeepCopyInto

func (in *RecommendationSpec) DeepCopyInto(out *RecommendationSpec)

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

type RecommendationStatus

type RecommendationStatus struct {
	RecommendationContent `json:",inline"`

	// Conditions is an array of current recommendation conditions.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// LastUpdateTime is last time we got an update on this status.
	// +optional
	LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
}

RecommendationStatus represents the current state of a recommendation.

func (*RecommendationStatus) DeepCopy

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

func (*RecommendationStatus) DeepCopyInto

func (in *RecommendationStatus) DeepCopyInto(out *RecommendationStatus)

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

type Recommender added in v0.7.0

type Recommender struct {

	// Recommender's Name
	Name string `json:"name"`
	// Override Recommendation configs
	// +optional
	Config map[string]string `json:"config,omitempty"`
}

Recommender referring to the Recommender in RecommendationConfiguration

func (*Recommender) DeepCopy added in v0.7.0

func (in *Recommender) DeepCopy() *Recommender

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

func (*Recommender) DeepCopyInto added in v0.7.0

func (in *Recommender) DeepCopyInto(out *Recommender)

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

type ReplicasRecommendation added in v0.9.0

type ReplicasRecommendation struct {
	Replicas *int32 `json:"replicas,omitempty"`
}

func (*ReplicasRecommendation) DeepCopy added in v0.9.0

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

func (*ReplicasRecommendation) DeepCopyInto added in v0.9.0

func (in *ReplicasRecommendation) DeepCopyInto(out *ReplicasRecommendation)

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

type ResourceList added in v0.9.0

type ResourceList map[corev1.ResourceName]string

func (ResourceList) DeepCopy added in v0.9.0

func (in ResourceList) DeepCopy() ResourceList

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

func (ResourceList) DeepCopyInto added in v0.9.0

func (in ResourceList) DeepCopyInto(out *ResourceList)

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

type ResourceRequestRecommendation added in v0.9.0

type ResourceRequestRecommendation struct {
	Containers []ContainerRecommendation `json:"containers,omitempty"`
}

func (*ResourceRequestRecommendation) DeepCopy added in v0.9.0

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

func (*ResourceRequestRecommendation) DeepCopyInto added in v0.9.0

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

type ResourceSelector

type ResourceSelector struct {
	// Kind of the resource, e.g. Deployment
	Kind string `json:"kind"`

	// API version of the resource, e.g. "apps/v1"
	// +optional
	APIVersion string `json:"apiVersion"`

	// Name of the resource.
	// +optional
	Name string `json:"name,omitempty"`

	// +optional
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
}

ResourceSelector describes how the resources will be selected.

func (*ResourceSelector) DeepCopy

func (in *ResourceSelector) DeepCopy() *ResourceSelector

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

func (*ResourceSelector) DeepCopyInto

func (in *ResourceSelector) DeepCopyInto(out *ResourceSelector)

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

type Target

type Target struct {
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// +optional
	Kind string `json:"kind,omitempty"`
	// +optional
	Name string `json:"name,omitempty"`
}

func (*Target) DeepCopy

func (in *Target) DeepCopy() *Target

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

func (*Target) DeepCopyInto

func (in *Target) DeepCopyInto(out *Target)

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