Documentation
¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the crane API. +k8s:deepcopy-gen=package,register +groupName=ensurance.crane.io
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AvoidanceAction
- type AvoidanceActionList
- type AvoidanceActionSpec
- type AvoidanceActionStatus
- type AvoidanceActionStrategy
- type CPUThrottle
- type EvictionAction
- type MemoryThrottle
- type MetricRule
- type NodeLocalGet
- type NodeQOSEnsurancePolicy
- type NodeQOSEnsurancePolicyList
- type NodeQOSEnsurancePolicySpec
- type NodeQOSEnsurancePolicyStatus
- type NodeQualityProbe
- type ObjectiveEnsurance
- type PodQOSEnsurancePolicy
- type PodQOSEnsurancePolicyList
- type PodQOSEnsurancePolicySpec
- type PodQOSEnsurancePolicyStatus
- type QualityProbe
- type ThrottleAction
Constants ¶
const GroupName = "ensurance.crane.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AvoidanceAction ¶
type AvoidanceAction struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AvoidanceActionSpec `json:"spec"`
Status AvoidanceActionStatus `json:"status,omitempty"`
}
AvoidanceAction defines Avoidance action
func (*AvoidanceAction) DeepCopy ¶
func (in *AvoidanceAction) DeepCopy() *AvoidanceAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AvoidanceAction.
func (*AvoidanceAction) DeepCopyInto ¶
func (in *AvoidanceAction) DeepCopyInto(out *AvoidanceAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AvoidanceAction) DeepCopyObject ¶
func (in *AvoidanceAction) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AvoidanceActionList ¶
type AvoidanceActionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AvoidanceAction `json:"items"`
}
AvoidanceActionList contains a list of AvoidanceAction
func (*AvoidanceActionList) DeepCopy ¶
func (in *AvoidanceActionList) DeepCopy() *AvoidanceActionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AvoidanceActionList.
func (*AvoidanceActionList) DeepCopyInto ¶
func (in *AvoidanceActionList) DeepCopyInto(out *AvoidanceActionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AvoidanceActionList) DeepCopyObject ¶
func (in *AvoidanceActionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AvoidanceActionSpec ¶
type AvoidanceActionSpec struct {
// CoolDownSeconds is the seconds for cool down when do avoidance.
// Defaults to 300. Minimum value is 1.
// +optional
// +kubebuilder:default=300
CoolDownSeconds int32 `json:"coolDownSeconds,omitempty"`
// Throttle describes the throttling action
// +optional
Throttle *ThrottleAction `json:"throttle,omitempty"`
//Eviction describes the eviction action
// +optional
Eviction *EvictionAction `json:"eviction,omitempty"`
// Description is an arbitrary string that usually provides guidelines on
// when this action should be used.
// +optional
// +kubebuilder:validation:MaxLength=1024
Description string `json:"description,omitempty"`
}
func (*AvoidanceActionSpec) DeepCopy ¶
func (in *AvoidanceActionSpec) DeepCopy() *AvoidanceActionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AvoidanceActionSpec.
func (*AvoidanceActionSpec) DeepCopyInto ¶
func (in *AvoidanceActionSpec) DeepCopyInto(out *AvoidanceActionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AvoidanceActionStatus ¶
type AvoidanceActionStatus struct {
}
AvoidanceActionStatus defines the desired status of AvoidanceAction
func (*AvoidanceActionStatus) DeepCopy ¶
func (in *AvoidanceActionStatus) DeepCopy() *AvoidanceActionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AvoidanceActionStatus.
func (*AvoidanceActionStatus) DeepCopyInto ¶
func (in *AvoidanceActionStatus) DeepCopyInto(out *AvoidanceActionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AvoidanceActionStrategy ¶
type AvoidanceActionStrategy string
const ( // AvoidanceActionStrategyNone do the action when the rules triggered. AvoidanceActionStrategyNone AvoidanceActionStrategy = "None" // AvoidanceActionStrategyPreview is the preview for QosEnsuranceStrategyNone. AvoidanceActionStrategyPreview AvoidanceActionStrategy = "Preview" )
type CPUThrottle ¶
type CPUThrottle struct {
// MinCPURatio is the min of cpu ratio for low level pods,
// for example: the pod limit is 4096, ratio is 10, the minimum is 409.
// MinCPURatio range [0,100]
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=100
MinCPURatio int32 `json:"minCPURatio,omitempty"`
// StepCPURatio is the step of cpu share and limit for once down-size.
// StepCPURatio range [0,100]
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=100
StepCPURatio int32 `json:"stepCPURatio,omitempty"`
}
func (*CPUThrottle) DeepCopy ¶
func (in *CPUThrottle) DeepCopy() *CPUThrottle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUThrottle.
func (*CPUThrottle) DeepCopyInto ¶
func (in *CPUThrottle) DeepCopyInto(out *CPUThrottle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EvictionAction ¶
type EvictionAction struct {
// TerminationGracePeriodSeconds is the duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
// If this value is nil, the pod's terminationGracePeriodSeconds will be used.
// Otherwise, this value overrides the value provided by the pod spec.
// Value must be non-negative integer. The value zero indicates delete immediately.
// +optional
TerminationGracePeriodSeconds *int32 `json:"terminationGracePeriodSeconds,omitempty"`
}
func (*EvictionAction) DeepCopy ¶
func (in *EvictionAction) DeepCopy() *EvictionAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionAction.
func (*EvictionAction) DeepCopyInto ¶
func (in *EvictionAction) DeepCopyInto(out *EvictionAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemoryThrottle ¶
type MemoryThrottle struct {
// ForceGC means force gc page cache for pods with low priority
// +optional
ForceGC bool `json:"forceGC,omitempty"`
}
func (*MemoryThrottle) DeepCopy ¶
func (in *MemoryThrottle) DeepCopy() *MemoryThrottle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryThrottle.
func (*MemoryThrottle) DeepCopyInto ¶
func (in *MemoryThrottle) DeepCopyInto(out *MemoryThrottle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricRule ¶
type MetricRule struct {
// Name is the name of the given metric
Name string `json:"name"`
// Selector is the selector for the given metric
// it is the string-encoded form of a standard kubernetes label selector
// +optional
Selector *metav1.LabelSelector `json:"selector,omitempty"`
// Value is the target value of the metric (as a quantity).
Value resource.Quantity `json:"value,omitempty"`
}
func (*MetricRule) DeepCopy ¶
func (in *MetricRule) DeepCopy() *MetricRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricRule.
func (*MetricRule) DeepCopyInto ¶
func (in *MetricRule) DeepCopyInto(out *MetricRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeLocalGet ¶
type NodeLocalGet struct {
// LocalCacheTTLSeconds is the cache expired time.
// Defaults to 60
// +optional
// +kubebuilder:default=60
LocalCacheTTLSeconds int32 `json:"localCacheTTLSeconds,omitempty"`
}
func (*NodeLocalGet) DeepCopy ¶
func (in *NodeLocalGet) DeepCopy() *NodeLocalGet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeLocalGet.
func (*NodeLocalGet) DeepCopyInto ¶
func (in *NodeLocalGet) DeepCopyInto(out *NodeLocalGet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeQOSEnsurancePolicy ¶
type NodeQOSEnsurancePolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec NodeQOSEnsurancePolicySpec `json:"spec"`
Status NodeQOSEnsurancePolicyStatus `json:"status,omitempty"`
}
NodeQOSEnsurancePolicy is the Schema for the nodeqosensurancepolicies API
func (*NodeQOSEnsurancePolicy) DeepCopy ¶
func (in *NodeQOSEnsurancePolicy) DeepCopy() *NodeQOSEnsurancePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeQOSEnsurancePolicy.
func (*NodeQOSEnsurancePolicy) DeepCopyInto ¶
func (in *NodeQOSEnsurancePolicy) DeepCopyInto(out *NodeQOSEnsurancePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeQOSEnsurancePolicy) DeepCopyObject ¶
func (in *NodeQOSEnsurancePolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeQOSEnsurancePolicyList ¶
type NodeQOSEnsurancePolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []NodeQOSEnsurancePolicy `json:"items"`
}
NodeQOSEnsurancePolicyList contains a list of NodeQOSEnsurancePolicy
func (*NodeQOSEnsurancePolicyList) DeepCopy ¶
func (in *NodeQOSEnsurancePolicyList) DeepCopy() *NodeQOSEnsurancePolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeQOSEnsurancePolicyList.
func (*NodeQOSEnsurancePolicyList) DeepCopyInto ¶
func (in *NodeQOSEnsurancePolicyList) DeepCopyInto(out *NodeQOSEnsurancePolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeQOSEnsurancePolicyList) DeepCopyObject ¶
func (in *NodeQOSEnsurancePolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeQOSEnsurancePolicySpec ¶
type NodeQOSEnsurancePolicySpec struct {
// Selector is a label query over pods that should match the policy
// +optional
Selector *metav1.LabelSelector `json:"selector,omitempty"`
// NodeQualityProbe defines the way to probe a node
NodeQualityProbe NodeQualityProbe `json:"nodeQualityProbe,omitempty"`
// ObjectiveEnsurances is an array of ObjectiveEnsurance
ObjectiveEnsurances []ObjectiveEnsurance `json:"objectiveEnsurances,omitempty"`
}
NodeQOSEnsurancePolicySpec defines the desired status of NodeQOSEnsurancePolicy
func (*NodeQOSEnsurancePolicySpec) DeepCopy ¶
func (in *NodeQOSEnsurancePolicySpec) DeepCopy() *NodeQOSEnsurancePolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeQOSEnsurancePolicySpec.
func (*NodeQOSEnsurancePolicySpec) DeepCopyInto ¶
func (in *NodeQOSEnsurancePolicySpec) DeepCopyInto(out *NodeQOSEnsurancePolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeQOSEnsurancePolicyStatus ¶
type NodeQOSEnsurancePolicyStatus struct {
}
NodeQOSEnsurancePolicyStatus defines the observed status of NodeQOSEnsurancePolicy
func (*NodeQOSEnsurancePolicyStatus) DeepCopy ¶
func (in *NodeQOSEnsurancePolicyStatus) DeepCopy() *NodeQOSEnsurancePolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeQOSEnsurancePolicyStatus.
func (*NodeQOSEnsurancePolicyStatus) DeepCopyInto ¶
func (in *NodeQOSEnsurancePolicyStatus) DeepCopyInto(out *NodeQOSEnsurancePolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeQualityProbe ¶
type NodeQualityProbe struct {
// HTTPGet specifies the http request to perform.
// +optional
HTTPGet *corev1.HTTPGetAction `json:"httpGet,omitempty"`
// NodeLocalGet specifies how to request node local
// +optional
NodeLocalGet *NodeLocalGet `json:"nodeLocalGet,omitempty"`
// TimeoutSeconds is the timeout for request
// +optional
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
}
func (*NodeQualityProbe) DeepCopy ¶
func (in *NodeQualityProbe) DeepCopy() *NodeQualityProbe
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeQualityProbe.
func (*NodeQualityProbe) DeepCopyInto ¶
func (in *NodeQualityProbe) DeepCopyInto(out *NodeQualityProbe)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectiveEnsurance ¶
type ObjectiveEnsurance struct {
// Name of the objective ensurance
Name string `json:"name,omitempty"`
// Metric rule define the metric identifier and target
MetricRule *MetricRule `json:"metricRule,omitempty"`
// How many times the rule is reach, to trigger avoidance action.
// Defaults to 1. Minimum value is 1.
// +optional
// +kubebuilder:default=1
AvoidanceThreshold int32 `json:"avoidanceThreshold,omitempty"`
// How many times the rule can restore.
// Defaults to 1. Minimum value is 1.
// +optional
// +kubebuilder:default=1
RestoreThreshold int32 `json:"restoreThreshold,omitempty"`
// Avoidance action to be executed when the rule triggered
AvoidanceActionName string `json:"actionName"`
// Action only preview, not to do the real action.
// Default AvoidanceActionStrategy is None.
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Enum=None;Preview
// +kubebuilder:default=None
Strategy AvoidanceActionStrategy `json:"strategy,omitempty"`
}
ObjectiveEnsurance defines the policy that
func (*ObjectiveEnsurance) DeepCopy ¶
func (in *ObjectiveEnsurance) DeepCopy() *ObjectiveEnsurance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectiveEnsurance.
func (*ObjectiveEnsurance) DeepCopyInto ¶
func (in *ObjectiveEnsurance) DeepCopyInto(out *ObjectiveEnsurance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodQOSEnsurancePolicy ¶
type PodQOSEnsurancePolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec PodQOSEnsurancePolicySpec `json:"spec"`
Status PodQOSEnsurancePolicyStatus `json:"status,omitempty"`
}
PodQOSEnsurancePolicy is the Schema for the podqosensurancepolicies API
func (*PodQOSEnsurancePolicy) DeepCopy ¶
func (in *PodQOSEnsurancePolicy) DeepCopy() *PodQOSEnsurancePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodQOSEnsurancePolicy.
func (*PodQOSEnsurancePolicy) DeepCopyInto ¶
func (in *PodQOSEnsurancePolicy) DeepCopyInto(out *PodQOSEnsurancePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodQOSEnsurancePolicy) DeepCopyObject ¶
func (in *PodQOSEnsurancePolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodQOSEnsurancePolicyList ¶
type PodQOSEnsurancePolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []PodQOSEnsurancePolicy `json:"items"`
}
PodQOSEnsurancePolicyList contains a list of PodQOSEnsurancePolicy
func (*PodQOSEnsurancePolicyList) DeepCopy ¶
func (in *PodQOSEnsurancePolicyList) DeepCopy() *PodQOSEnsurancePolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodQOSEnsurancePolicyList.
func (*PodQOSEnsurancePolicyList) DeepCopyInto ¶
func (in *PodQOSEnsurancePolicyList) DeepCopyInto(out *PodQOSEnsurancePolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodQOSEnsurancePolicyList) DeepCopyObject ¶
func (in *PodQOSEnsurancePolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodQOSEnsurancePolicySpec ¶
type PodQOSEnsurancePolicySpec struct {
// Selector is a label query over pods that should match the policy
Selector metav1.LabelSelector `json:"selector,omitempty"`
//QualityProbe defines the way to probe a pod
QualityProbe QualityProbe `json:"qualityProbe,omitempty"`
// ObjectiveEnsurances is an array of ObjectiveEnsurance
ObjectiveEnsurances []ObjectiveEnsurance `json:"objectiveEnsurance,omitempty"`
}
PodQOSEnsurancePolicySpec defines the desired status of PodQOSEnsurancePolicy
func (*PodQOSEnsurancePolicySpec) DeepCopy ¶
func (in *PodQOSEnsurancePolicySpec) DeepCopy() *PodQOSEnsurancePolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodQOSEnsurancePolicySpec.
func (*PodQOSEnsurancePolicySpec) DeepCopyInto ¶
func (in *PodQOSEnsurancePolicySpec) DeepCopyInto(out *PodQOSEnsurancePolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodQOSEnsurancePolicyStatus ¶
type PodQOSEnsurancePolicyStatus struct {
}
PodQOSEnsurancePolicyStatus defines the observed status of PodQOSEnsurancePolicy
func (*PodQOSEnsurancePolicyStatus) DeepCopy ¶
func (in *PodQOSEnsurancePolicyStatus) DeepCopy() *PodQOSEnsurancePolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodQOSEnsurancePolicyStatus.
func (*PodQOSEnsurancePolicyStatus) DeepCopyInto ¶
func (in *PodQOSEnsurancePolicyStatus) DeepCopyInto(out *PodQOSEnsurancePolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QualityProbe ¶
type QualityProbe struct {
// HTTPGet specifies the http request to perform.
// +optional
HTTPGet *corev1.HTTPGetAction `json:"httpGet,omitempty"`
// Init delay time for handler
// Defaults to 5
// +optional
InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"`
// Timeout for request.
// Defaults to 0, instead not timeout
// +optional
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
}
func (*QualityProbe) DeepCopy ¶
func (in *QualityProbe) DeepCopy() *QualityProbe
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QualityProbe.
func (*QualityProbe) DeepCopyInto ¶
func (in *QualityProbe) DeepCopyInto(out *QualityProbe)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThrottleAction ¶
type ThrottleAction struct {
// +optional
CPUThrottle CPUThrottle `json:"cpuThrottle,omitempty"`
// +optional
MemoryThrottle MemoryThrottle `json:"memoryThrottle,omitempty"`
}
func (*ThrottleAction) DeepCopy ¶
func (in *ThrottleAction) DeepCopy() *ThrottleAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottleAction.
func (*ThrottleAction) DeepCopyInto ¶
func (in *ThrottleAction) DeepCopyInto(out *ThrottleAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.