Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the cronhpa v1alpha1 API group +kubebuilder:object:generate=true +groupName=cron-hpa.ubie-oss.github.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "cron-hpa.ubie-oss.github.com", Version: "v1alpha1"}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)
Functions ¶
This section is empty.
Types ¶
type CronHorizontalPodAutoscaler ¶
type CronHorizontalPodAutoscaler struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CronHorizontalPodAutoscalerSpec `json:"spec,omitempty"`
Status CronHorizontalPodAutoscalerStatus `json:"status,omitempty"`
}
CronHorizontalPodAutoscaler is the Schema for the cronhorizontalpodautoscalers API.
func (*CronHorizontalPodAutoscaler) DeepCopy ¶
func (in *CronHorizontalPodAutoscaler) DeepCopy() *CronHorizontalPodAutoscaler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronHorizontalPodAutoscaler.
func (*CronHorizontalPodAutoscaler) DeepCopyInto ¶
func (in *CronHorizontalPodAutoscaler) DeepCopyInto(out *CronHorizontalPodAutoscaler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CronHorizontalPodAutoscaler) DeepCopyObject ¶
func (in *CronHorizontalPodAutoscaler) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CronHorizontalPodAutoscalerList ¶
type CronHorizontalPodAutoscalerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CronHorizontalPodAutoscaler `json:"items"`
}
CronHorizontalPodAutoscalerList contains a list of CronHorizontalPodAutoscaler
func (*CronHorizontalPodAutoscalerList) DeepCopy ¶
func (in *CronHorizontalPodAutoscalerList) DeepCopy() *CronHorizontalPodAutoscalerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronHorizontalPodAutoscalerList.
func (*CronHorizontalPodAutoscalerList) DeepCopyInto ¶
func (in *CronHorizontalPodAutoscalerList) DeepCopyInto(out *CronHorizontalPodAutoscalerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CronHorizontalPodAutoscalerList) DeepCopyObject ¶
func (in *CronHorizontalPodAutoscalerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CronHorizontalPodAutoscalerScheduledPatch ¶
type CronHorizontalPodAutoscalerScheduledPatch struct {
// Name is the name of this schedule.
// +kubebuilder:validation:MaxLength=16
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:Pattern=[a-zA-Z0-9\-]+
Name string `json:"name"`
// Schedule is a schedule to apply the HPA in the cron format like `0 */2 * * *`.
// See https://pkgo.dev/github.com/robfig/cron
Schedule string `json:"schedule"`
// Timezone is a timezone of the schedule
Timezone string `json:"timezone"`
// Patch is a patch to apply to the template at the schedule.
Patch *HPAPatch `json:"patch,omitempty"`
}
CronHorizontalPodAutoscalerScheduledPatch is a patch w/ schedule to apply.
func (*CronHorizontalPodAutoscalerScheduledPatch) DeepCopy ¶
func (in *CronHorizontalPodAutoscalerScheduledPatch) DeepCopy() *CronHorizontalPodAutoscalerScheduledPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronHorizontalPodAutoscalerScheduledPatch.
func (*CronHorizontalPodAutoscalerScheduledPatch) DeepCopyInto ¶
func (in *CronHorizontalPodAutoscalerScheduledPatch) DeepCopyInto(out *CronHorizontalPodAutoscalerScheduledPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronHorizontalPodAutoscalerSpec ¶
type CronHorizontalPodAutoscalerSpec struct {
// Template is the template of HPA.
Template HPATemplate `json:"template"`
// schedules contain the specifications of HPA with a schedule.
ScheduledPatches []CronHorizontalPodAutoscalerScheduledPatch `json:"scheduledPatches"`
}
CronHorizontalPodAutoscalerSpec defines the desired state of CronHorizontalPodAutoscaler
func (*CronHorizontalPodAutoscalerSpec) DeepCopy ¶
func (in *CronHorizontalPodAutoscalerSpec) DeepCopy() *CronHorizontalPodAutoscalerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronHorizontalPodAutoscalerSpec.
func (*CronHorizontalPodAutoscalerSpec) DeepCopyInto ¶
func (in *CronHorizontalPodAutoscalerSpec) DeepCopyInto(out *CronHorizontalPodAutoscalerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronHorizontalPodAutoscalerStatus ¶
type CronHorizontalPodAutoscalerStatus struct {
// LastCronTimestamp is the time of last cron job.
LastCronTimestamp *metav1.Time `json:"lastCronTimestamp,omitempty"`
// LastScheduledPatchName is the last patch name applied to the HPA.
LastScheduledPatchName string `json:"lastScheduledPatchName,omitempty"`
}
CronHorizontalPodAutoscalerStatus defines the observed state of CronHorizontalPodAutoscaler.
func (*CronHorizontalPodAutoscalerStatus) DeepCopy ¶
func (in *CronHorizontalPodAutoscalerStatus) DeepCopy() *CronHorizontalPodAutoscalerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronHorizontalPodAutoscalerStatus.
func (*CronHorizontalPodAutoscalerStatus) DeepCopyInto ¶
func (in *CronHorizontalPodAutoscalerStatus) DeepCopyInto(out *CronHorizontalPodAutoscalerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HPAPatch ¶
type HPAPatch struct {
// minReplicas is the lower limit for the number of replicas to which the autoscaler
// can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
// metric is configured. Scaling is active as long as at least one metric value is
// available.
// +optional
MinReplicas *int32 `json:"minReplicas,omitempty"`
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
// It cannot be less that minReplicas.
// +optional
MaxReplicas *int32 `json:"maxReplicas,omitempty"`
// metrics contains the specifications for which to use to calculate the
// desired replica count (the maximum replica count across all metrics will
// be used). The desired replica count is calculated multiplying the
// ratio between the target value and the current value by the current
// number of pods. Ergo, metrics used must decrease as the pod count is
// increased, and vice-versa. See the individual metric source types for
// more information about how each type of metric must respond.
// +optional
Metrics []autoscalingv2.MetricSpec `json:"metrics,omitempty"`
}
HPAPatch is a patch applied to the template.
func (*HPAPatch) DeepCopy ¶
func (in *HPAPatch) DeepCopy() *HPAPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HPAPatch.
func (*HPAPatch) DeepCopyInto ¶
func (in *HPAPatch) DeepCopyInto(out *HPAPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HPATemplate ¶
type HPATemplate struct {
Metadata *TemplateMetadata `json:"metadata,omitempty"`
Spec autoscalingv2.HorizontalPodAutoscalerSpec `json:"spec"`
}
HPATemplate is the template of HPA to create.
func (*HPATemplate) DeepCopy ¶
func (in *HPATemplate) DeepCopy() *HPATemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HPATemplate.
func (*HPATemplate) DeepCopyInto ¶
func (in *HPATemplate) DeepCopyInto(out *HPATemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplateMetadata ¶
type TemplateMetadata struct {
// Map of string keys and values that can be used to organize and categorize
// (scope and select) objects. May match selectors of replication controllers
// and services.
// More info: http://kubernetes.io/docs/user-guide/labels
// +optional
Labels map[string]string `json:"labels,omitempty"`
// Annotations is an unstructured key value map stored with a resource that may be
// set by external tools to store and retrieve arbitrary metadata. They are not
// queryable and should be preserved when modifying objects.
// More info: http://kubernetes.io/docs/user-guide/annotations
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}
TemplateMetadata is a metadata type only for labels and annotations.
func (*TemplateMetadata) DeepCopy ¶
func (in *TemplateMetadata) DeepCopy() *TemplateMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateMetadata.
func (*TemplateMetadata) DeepCopyInto ¶
func (in *TemplateMetadata) DeepCopyInto(out *TemplateMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.