Documentation ¶
Overview ¶
Package v1alpha1 contains the Autoscaling v1alpha1 API types.
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Metric
- func (m *Metric) AggregationAlgorithm() string
- func (in *Metric) DeepCopy() *Metric
- func (in *Metric) DeepCopyInto(out *Metric)
- func (in *Metric) DeepCopyObject() runtime.Object
- func (*Metric) GetConditionSet() apis.ConditionSet
- func (m *Metric) GetGroupVersionKind() schema.GroupVersionKind
- func (m *Metric) GetStatus() *duckv1.Status
- func (m *Metric) IsReady() bool
- func (m *Metric) SetDefaults(ctx context.Context)
- func (m *Metric) Validate(ctx context.Context) *apis.FieldError
- type MetricList
- type MetricSpec
- type MetricStatus
- func (in *MetricStatus) DeepCopy() *MetricStatus
- func (in *MetricStatus) DeepCopyInto(out *MetricStatus)
- func (ms *MetricStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (ms *MetricStatus) InitializeConditions()
- func (ms *MetricStatus) MarkMetricFailed(reason, message string)
- func (ms *MetricStatus) MarkMetricNotReady(reason, message string)
- func (ms *MetricStatus) MarkMetricReady()
- type PodAutoscaler
- func (pa *PodAutoscaler) ActivationScale() (int32, bool)
- func (pa *PodAutoscaler) Class() string
- func (in *PodAutoscaler) DeepCopy() *PodAutoscaler
- func (in *PodAutoscaler) DeepCopyInto(out *PodAutoscaler)
- func (in *PodAutoscaler) DeepCopyObject() runtime.Object
- func (*PodAutoscaler) GetConditionSet() apis.ConditionSet
- func (pa *PodAutoscaler) GetGroupVersionKind() schema.GroupVersionKind
- func (pa *PodAutoscaler) GetStatus() *duckv1.Status
- func (pa *PodAutoscaler) InitialScale() (int32, bool)
- func (pa *PodAutoscaler) IsReady() bool
- func (pa *PodAutoscaler) Metric() string
- func (pa *PodAutoscaler) PanicThresholdPercentage() (percentage float64, ok bool)
- func (pa *PodAutoscaler) PanicWindowPercentage() (percentage float64, ok bool)
- func (pa *PodAutoscaler) ProgressDeadline() (time.Duration, bool)
- func (pa *PodAutoscaler) ScaleBounds(asConfig *autoscalerconfig.Config) (int32, int32)
- func (pa *PodAutoscaler) ScaleDownDelay() (time.Duration, bool)
- func (pa *PodAutoscaler) ScaleToZeroPodRetention() (time.Duration, bool)
- func (pa *PodAutoscaler) SetDefaults(ctx context.Context)
- func (pa *PodAutoscaler) Target() (float64, bool)
- func (pa *PodAutoscaler) TargetBC() (float64, bool)
- func (pa *PodAutoscaler) TargetUtilization() (float64, bool)
- func (pa *PodAutoscaler) Validate(ctx context.Context) *apis.FieldError
- func (pa *PodAutoscaler) Window() (time.Duration, bool)
- type PodAutoscalerList
- type PodAutoscalerSpec
- type PodAutoscalerStatus
- func (pas *PodAutoscalerStatus) ActiveFor(now time.Time) time.Duration
- func (pas *PodAutoscalerStatus) CanFailActivation(now time.Time, idlePeriod time.Duration) bool
- func (in *PodAutoscalerStatus) DeepCopy() *PodAutoscalerStatus
- func (in *PodAutoscalerStatus) DeepCopyInto(out *PodAutoscalerStatus)
- func (pas *PodAutoscalerStatus) GetActualScale() int32
- func (pas *PodAutoscalerStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (pas *PodAutoscalerStatus) GetDesiredScale() int32
- func (pas *PodAutoscalerStatus) InactiveFor(now time.Time) time.Duration
- func (pas *PodAutoscalerStatus) InitializeConditions()
- func (pas *PodAutoscalerStatus) IsActivating() bool
- func (pas *PodAutoscalerStatus) IsActive() bool
- func (pas *PodAutoscalerStatus) IsInactive() bool
- func (pas *PodAutoscalerStatus) IsScaleTargetInitialized() bool
- func (pas *PodAutoscalerStatus) MarkActivating(reason, message string)
- func (pas *PodAutoscalerStatus) MarkActive()
- func (pas *PodAutoscalerStatus) MarkInactive(reason, message string)
- func (pas *PodAutoscalerStatus) MarkResourceFailedCreation(kind, name string)
- func (pas *PodAutoscalerStatus) MarkResourceNotOwned(kind, name string)
- func (pas *PodAutoscalerStatus) MarkSKSNotReady(mes string)
- func (pas *PodAutoscalerStatus) MarkSKSReady()
- func (pas *PodAutoscalerStatus) MarkScaleTargetInitialized()
- type PodScalable
- type PodScalableList
- type PodScalableSpec
- type PodScalableStatus
- type ReachabilityType
Constants ¶
const ( // PodAutoscalerConditionReady is set when the revision is starting to materialize // runtime resources, and becomes true when those resources are ready. PodAutoscalerConditionReady = apis.ConditionReady // PodAutoscalerConditionScaleTargetInitialized is set when the PodAutoscaler's // ScaleTargetRef was ready to serve traffic once. PodAutoscalerConditionScaleTargetInitialized apis.ConditionType = "ScaleTargetInitialized" // PodAutoscalerConditionActive is set when the PodAutoscaler's ScaleTargetRef is receiving traffic. PodAutoscalerConditionActive apis.ConditionType = "Active" // PodAutoscalerConditionSKSReady is set when SKS is ready. PodAutoscalerConditionSKSReady = "SKSReady" )
const ( // MetricConditionReady is set when the Metric's latest // underlying revision has reported readiness. MetricConditionReady = apis.ConditionReady )
Variables ¶
var ( // SchemeBuilder registers the addKnownTypes function. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme applies all the stored functions to the scheme. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: autoscaling.InternalGroupName, 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 Metric ¶ added in v0.8.0
type Metric struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the Metric (from the client). // +optional Spec MetricSpec `json:"spec,omitempty"` // Status communicates the observed state of the Metric (from the controller). // +optional Status MetricStatus `json:"status,omitempty"` }
Metric represents a resource to configure the metric collector with.
+genclient +genreconciler +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Metric) AggregationAlgorithm ¶ added in v0.28.0
func (*Metric) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metric.
func (*Metric) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Metric) DeepCopyObject ¶ added in v0.8.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Metric) GetConditionSet ¶ added in v0.15.0
func (*Metric) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Metric) GetGroupVersionKind ¶ added in v0.8.0
func (m *Metric) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind implements OwnerRefable.
func (*Metric) GetStatus ¶ added in v0.15.0
GetStatus retrieves the status of the Metric. Implements the KRShaped interface.
func (*Metric) IsReady ¶ added in v0.16.0
IsReady returns true if the Status condition MetricConditionReady is true and the latest spec has been observed.
func (*Metric) SetDefaults ¶ added in v0.8.0
SetDefaults sets defaults on the entire Metric if applicable.
type MetricList ¶ added in v0.8.0
type MetricList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Metric `json:"items"` }
MetricList is a list of Metric resources
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*MetricList) DeepCopy ¶ added in v0.8.0
func (in *MetricList) DeepCopy() *MetricList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricList.
func (*MetricList) DeepCopyInto ¶ added in v0.8.0
func (in *MetricList) DeepCopyInto(out *MetricList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricList) DeepCopyObject ¶ added in v0.8.0
func (in *MetricList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MetricSpec ¶ added in v0.8.0
type MetricSpec struct { // StableWindow is the aggregation window for metrics in a stable state. StableWindow time.Duration `json:"stableWindow"` // PanicWindow is the aggregation window for metrics where quick reactions are needed. PanicWindow time.Duration `json:"panicWindow"` // ScrapeTarget is the K8s service that publishes the metric endpoint. ScrapeTarget string `json:"scrapeTarget"` }
MetricSpec contains all values a metric collector needs to operate.
func (*MetricSpec) DeepCopy ¶ added in v0.8.0
func (in *MetricSpec) DeepCopy() *MetricSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSpec.
func (*MetricSpec) DeepCopyInto ¶ added in v0.8.0
func (in *MetricSpec) DeepCopyInto(out *MetricSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricSpec) SetDefaults ¶ added in v0.8.0
func (ms *MetricSpec) SetDefaults(ctx context.Context)
SetDefaults sets defaults on the Metric's Spec if applicable.
func (*MetricSpec) Validate ¶ added in v0.8.0
func (ms *MetricSpec) Validate(ctx context.Context) *apis.FieldError
Validate validates Metric's Spec.
type MetricStatus ¶ added in v0.8.0
MetricStatus reflects the status of metric collection for this specific entity.
func (*MetricStatus) DeepCopy ¶ added in v0.8.0
func (in *MetricStatus) DeepCopy() *MetricStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricStatus.
func (*MetricStatus) DeepCopyInto ¶ added in v0.8.0
func (in *MetricStatus) DeepCopyInto(out *MetricStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricStatus) GetCondition ¶ added in v0.9.0
func (ms *MetricStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition gets the condition `t`.
func (*MetricStatus) InitializeConditions ¶ added in v0.9.0
func (ms *MetricStatus) InitializeConditions()
InitializeConditions initializes the conditions of the Metric.
func (*MetricStatus) MarkMetricFailed ¶ added in v0.9.0
func (ms *MetricStatus) MarkMetricFailed(reason, message string)
MarkMetricFailed marks the metric status as failed
func (*MetricStatus) MarkMetricNotReady ¶ added in v0.9.0
func (ms *MetricStatus) MarkMetricNotReady(reason, message string)
MarkMetricNotReady marks the metric status as ready == Unknown
func (*MetricStatus) MarkMetricReady ¶ added in v0.9.0
func (ms *MetricStatus) MarkMetricReady()
MarkMetricReady marks the metric status as ready
type PodAutoscaler ¶
type PodAutoscaler struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the PodAutoscaler (from the client). // +optional Spec PodAutoscalerSpec `json:"spec,omitempty"` // Status communicates the observed state of the PodAutoscaler (from the controller). // +optional Status PodAutoscalerStatus `json:"status,omitempty"` }
PodAutoscaler is a Knative abstraction that encapsulates the interface by which Knative components instantiate autoscalers. This definition is an abstraction that may be backed by multiple definitions. For more information, see the Knative Pluggability presentation: https://docs.google.com/presentation/d/19vW9HFZ6Puxt31biNZF3uLRejDmu82rxJIk1cWmxF7w/edit
func (*PodAutoscaler) ActivationScale ¶ added in v0.34.0
func (pa *PodAutoscaler) ActivationScale() (int32, bool)
ActivationScale returns the min-non-zero-replicas annotation value or falise if not present or invalid.
func (*PodAutoscaler) Class ¶ added in v0.3.0
func (pa *PodAutoscaler) Class() string
Class returns the Autoscaler class from Annotation or `KPA` if none is set.
func (*PodAutoscaler) DeepCopy ¶
func (in *PodAutoscaler) DeepCopy() *PodAutoscaler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAutoscaler.
func (*PodAutoscaler) DeepCopyInto ¶
func (in *PodAutoscaler) DeepCopyInto(out *PodAutoscaler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodAutoscaler) DeepCopyObject ¶
func (in *PodAutoscaler) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PodAutoscaler) GetConditionSet ¶ added in v0.15.0
func (*PodAutoscaler) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*PodAutoscaler) GetGroupVersionKind ¶ added in v0.3.0
func (pa *PodAutoscaler) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GVK for the PodAutoscaler.
func (*PodAutoscaler) GetStatus ¶ added in v0.15.0
func (pa *PodAutoscaler) GetStatus() *duckv1.Status
GetStatus retrieves the status of the PodAutoscaler. Implements the KRShaped interface.
func (*PodAutoscaler) InitialScale ¶ added in v0.16.0
func (pa *PodAutoscaler) InitialScale() (int32, bool)
InitialScale returns the initial scale on the revision if present, or false if not present.
func (*PodAutoscaler) IsReady ¶ added in v0.16.0
func (pa *PodAutoscaler) IsReady() bool
IsReady returns true if the Status condition PodAutoscalerConditionReady is true and the latest spec has been observed.
func (*PodAutoscaler) Metric ¶ added in v0.7.0
func (pa *PodAutoscaler) Metric() string
Metric returns the contents of the metric annotation or a default.
func (*PodAutoscaler) PanicThresholdPercentage ¶ added in v0.6.0
func (pa *PodAutoscaler) PanicThresholdPercentage() (percentage float64, ok bool)
PanicThresholdPercentage returns the panic threshold annotation value, or false if not present.
func (*PodAutoscaler) PanicWindowPercentage ¶ added in v0.6.0
func (pa *PodAutoscaler) PanicWindowPercentage() (percentage float64, ok bool)
PanicWindowPercentage returns the panic window annotation value, or false if not present.
func (*PodAutoscaler) ProgressDeadline ¶ added in v0.31.0
func (pa *PodAutoscaler) ProgressDeadline() (time.Duration, bool)
ProgressDeadline returns the progress deadline annotation value, or false if not present.
func (*PodAutoscaler) ScaleBounds ¶
func (pa *PodAutoscaler) ScaleBounds(asConfig *autoscalerconfig.Config) (int32, int32)
ScaleBounds returns scale bounds annotations values as a tuple: `(min, max int32)`. The value of 0 for any of min or max means the bound is not set. Note: min will be ignored if the PA is not reachable
func (*PodAutoscaler) ScaleDownDelay ¶ added in v0.19.0
func (pa *PodAutoscaler) ScaleDownDelay() (time.Duration, bool)
ScaleDownDelay returns the scale down delay annotation, or false if not present.
func (*PodAutoscaler) ScaleToZeroPodRetention ¶ added in v0.15.0
func (pa *PodAutoscaler) ScaleToZeroPodRetention() (time.Duration, bool)
ScaleToZeroPodRetention returns the ScaleToZeroPodRetention annotation value, or false if not present.
func (*PodAutoscaler) SetDefaults ¶
func (pa *PodAutoscaler) SetDefaults(ctx context.Context)
SetDefaults sets the default values for the PodAutoscaler.
func (*PodAutoscaler) Target ¶ added in v0.4.0
func (pa *PodAutoscaler) Target() (float64, bool)
Target returns the target annotation value or false if not present, or invalid.
func (*PodAutoscaler) TargetBC ¶ added in v0.8.0
func (pa *PodAutoscaler) TargetBC() (float64, bool)
TargetBC returns the target burst capacity, if the corresponding annotation is set.
func (*PodAutoscaler) TargetUtilization ¶ added in v0.8.0
func (pa *PodAutoscaler) TargetUtilization() (float64, bool)
TargetUtilization returns the target utilization percentage as a fraction, if the corresponding annotation is set.
func (*PodAutoscaler) Validate ¶
func (pa *PodAutoscaler) Validate(ctx context.Context) *apis.FieldError
Validate implements apis.Validatable interface.
type PodAutoscalerList ¶
type PodAutoscalerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []PodAutoscaler `json:"items"` }
PodAutoscalerList is a list of PodAutoscaler resources
func (*PodAutoscalerList) DeepCopy ¶
func (in *PodAutoscalerList) DeepCopy() *PodAutoscalerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAutoscalerList.
func (*PodAutoscalerList) DeepCopyInto ¶
func (in *PodAutoscalerList) DeepCopyInto(out *PodAutoscalerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodAutoscalerList) DeepCopyObject ¶
func (in *PodAutoscalerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodAutoscalerSpec ¶
type PodAutoscalerSpec struct { // ContainerConcurrency specifies the maximum allowed // in-flight (concurrent) requests per container of the Revision. // Defaults to `0` which means unlimited concurrency. // +optional ContainerConcurrency int64 `json:"containerConcurrency,omitempty"` // ScaleTargetRef defines the /scale-able resource that this PodAutoscaler // is responsible for quickly right-sizing. ScaleTargetRef corev1.ObjectReference `json:"scaleTargetRef"` // Reachability specifies whether or not the `ScaleTargetRef` can be reached (ie. has a route). // Defaults to `ReachabilityUnknown` // +optional Reachability ReachabilityType `json:"reachability,omitempty"` // The application-layer protocol. Matches `ProtocolType` inferred from the revision spec. ProtocolType net.ProtocolType `json:"protocolType"` }
PodAutoscalerSpec holds the desired state of the PodAutoscaler (from the client).
func (*PodAutoscalerSpec) DeepCopy ¶
func (in *PodAutoscalerSpec) DeepCopy() *PodAutoscalerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAutoscalerSpec.
func (*PodAutoscalerSpec) DeepCopyInto ¶
func (in *PodAutoscalerSpec) DeepCopyInto(out *PodAutoscalerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodAutoscalerSpec) SetDefaults ¶
func (pa *PodAutoscalerSpec) SetDefaults(ctx context.Context)
SetDefaults sets the default values for the PodAutoscalerSpec.
func (*PodAutoscalerSpec) Validate ¶
func (pa *PodAutoscalerSpec) Validate(ctx context.Context) *apis.FieldError
Validate validates PodAutoscaler Spec.
type PodAutoscalerStatus ¶
type PodAutoscalerStatus struct { duckv1.Status `json:",inline"` // ServiceName is the K8s Service name that serves the revision, scaled by this PA. // The service is created and owned by the ServerlessService object owned by this PA. ServiceName string `json:"serviceName"` // MetricsServiceName is the K8s Service name that provides revision metrics. // The service is managed by the PA object. MetricsServiceName string `json:"metricsServiceName"` // DesiredScale shows the current desired number of replicas for the revision. DesiredScale *int32 `json:"desiredScale,omitempty"` // ActualScale shows the actual number of replicas for the revision. ActualScale *int32 `json:"actualScale,omitempty"` }
PodAutoscalerStatus communicates the observed state of the PodAutoscaler (from the controller).
func (*PodAutoscalerStatus) ActiveFor ¶ added in v0.8.0
func (pas *PodAutoscalerStatus) ActiveFor(now time.Time) time.Duration
ActiveFor returns the time PA spent being active.
func (*PodAutoscalerStatus) CanFailActivation ¶ added in v0.8.0
CanFailActivation checks whether the pod autoscaler has been activating for at least the specified idle period.
func (*PodAutoscalerStatus) DeepCopy ¶
func (in *PodAutoscalerStatus) DeepCopy() *PodAutoscalerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAutoscalerStatus.
func (*PodAutoscalerStatus) DeepCopyInto ¶
func (in *PodAutoscalerStatus) DeepCopyInto(out *PodAutoscalerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodAutoscalerStatus) GetActualScale ¶ added in v0.9.0
func (pas *PodAutoscalerStatus) GetActualScale() int32
GetActualScale returns the actual scale if ever set, or -1.
func (*PodAutoscalerStatus) GetCondition ¶
func (pas *PodAutoscalerStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition gets the condition `t`.
func (*PodAutoscalerStatus) GetDesiredScale ¶ added in v0.9.0
func (pas *PodAutoscalerStatus) GetDesiredScale() int32
GetDesiredScale returns the desired scale if ever set, or -1.
func (*PodAutoscalerStatus) InactiveFor ¶ added in v0.15.0
func (pas *PodAutoscalerStatus) InactiveFor(now time.Time) time.Duration
InactiveFor returns the time PA spent being inactive.
func (*PodAutoscalerStatus) InitializeConditions ¶
func (pas *PodAutoscalerStatus) InitializeConditions()
InitializeConditions initializes the conditions of the PA.
func (*PodAutoscalerStatus) IsActivating ¶ added in v0.3.0
func (pas *PodAutoscalerStatus) IsActivating() bool
IsActivating returns true if the pod autoscaler is Activating if it is neither Active nor Inactive.
func (*PodAutoscalerStatus) IsActive ¶ added in v0.16.0
func (pas *PodAutoscalerStatus) IsActive() bool
IsActive returns true if the pod autoscaler has finished scaling.
func (*PodAutoscalerStatus) IsInactive ¶ added in v0.6.0
func (pas *PodAutoscalerStatus) IsInactive() bool
IsInactive returns true if the pod autoscaler is Inactive.
func (*PodAutoscalerStatus) IsScaleTargetInitialized ¶ added in v0.17.0
func (pas *PodAutoscalerStatus) IsScaleTargetInitialized() bool
IsScaleTargetInitialized returns true if the PodAutoscaler's scale target has been initialized successfully.
func (*PodAutoscalerStatus) MarkActivating ¶
func (pas *PodAutoscalerStatus) MarkActivating(reason, message string)
MarkActivating marks the PA as activating.
func (*PodAutoscalerStatus) MarkActive ¶
func (pas *PodAutoscalerStatus) MarkActive()
MarkActive marks the PA as active.
func (*PodAutoscalerStatus) MarkInactive ¶
func (pas *PodAutoscalerStatus) MarkInactive(reason, message string)
MarkInactive marks the PA as inactive.
func (*PodAutoscalerStatus) MarkResourceFailedCreation ¶ added in v0.4.0
func (pas *PodAutoscalerStatus) MarkResourceFailedCreation(kind, name string)
MarkResourceFailedCreation changes the "Active" condition to false to reflect that a critical resource of the given kind and name was unable to be created.
func (*PodAutoscalerStatus) MarkResourceNotOwned ¶ added in v0.4.0
func (pas *PodAutoscalerStatus) MarkResourceNotOwned(kind, name string)
MarkResourceNotOwned changes the "Active" condition to false to reflect that the resource of the given kind and name has already been created, and we do not own it.
func (*PodAutoscalerStatus) MarkSKSNotReady ¶ added in v0.17.0
func (pas *PodAutoscalerStatus) MarkSKSNotReady(mes string)
MarkSKSNotReady marks the PA condition that denotes SKS is not yet ready.
func (*PodAutoscalerStatus) MarkSKSReady ¶ added in v0.17.0
func (pas *PodAutoscalerStatus) MarkSKSReady()
MarkSKSReady marks the PA condition denoting that SKS is ready.
func (*PodAutoscalerStatus) MarkScaleTargetInitialized ¶ added in v0.17.0
func (pas *PodAutoscalerStatus) MarkScaleTargetInitialized()
MarkScaleTargetInitialized marks the PA's PodAutoscalerConditionScaleTargetInitialized condition true.
type PodScalable ¶ added in v0.6.0
type PodScalable struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PodScalableSpec `json:"spec"` Status PodScalableStatus `json:"status"` }
PodScalable is a duck type that the resources referenced by the PodAutoscaler's ScaleTargetRef must implement. They must also implement the `/scale` sub-resource for use with `/scale` based implementations (e.g. HPA), but this further constrains the shape the referenced resources may take.
func (*PodScalable) DeepCopy ¶ added in v0.6.0
func (in *PodScalable) DeepCopy() *PodScalable
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodScalable.
func (*PodScalable) DeepCopyInto ¶ added in v0.6.0
func (in *PodScalable) DeepCopyInto(out *PodScalable)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodScalable) DeepCopyObject ¶ added in v0.6.0
func (in *PodScalable) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PodScalable) GetFullType ¶ added in v0.6.0
func (*PodScalable) GetFullType() duck.Populatable
GetFullType implements duck.Implementable
func (*PodScalable) GetListType ¶ added in v0.6.0
func (*PodScalable) GetListType() runtime.Object
GetListType implements apis.Listable
func (*PodScalable) Populate ¶ added in v0.6.0
func (t *PodScalable) Populate()
Populate implements duck.Populatable
type PodScalableList ¶ added in v0.6.0
type PodScalableList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []PodScalable `json:"items"` }
PodScalableList is a list of PodScalable resources
func (*PodScalableList) DeepCopy ¶ added in v0.6.0
func (in *PodScalableList) DeepCopy() *PodScalableList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodScalableList.
func (*PodScalableList) DeepCopyInto ¶ added in v0.6.0
func (in *PodScalableList) DeepCopyInto(out *PodScalableList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodScalableList) DeepCopyObject ¶ added in v0.6.0
func (in *PodScalableList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodScalableSpec ¶ added in v0.6.0
type PodScalableSpec struct { Replicas *int32 `json:"replicas,omitempty"` Selector *metav1.LabelSelector `json:"selector"` Template corev1.PodTemplateSpec `json:"template"` }
PodScalableSpec is the specification for the desired state of a PodScalable (or at least our shared portion).
func (*PodScalableSpec) DeepCopy ¶ added in v0.6.0
func (in *PodScalableSpec) DeepCopy() *PodScalableSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodScalableSpec.
func (*PodScalableSpec) DeepCopyInto ¶ added in v0.6.0
func (in *PodScalableSpec) DeepCopyInto(out *PodScalableSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodScalableStatus ¶ added in v0.6.0
type PodScalableStatus struct {
Replicas int32 `json:"replicas,omitempty"`
}
PodScalableStatus is the observed state of a PodScalable (or at least our shared portion).
func (*PodScalableStatus) DeepCopy ¶ added in v0.6.0
func (in *PodScalableStatus) DeepCopy() *PodScalableStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodScalableStatus.
func (*PodScalableStatus) DeepCopyInto ¶ added in v0.6.0
func (in *PodScalableStatus) DeepCopyInto(out *PodScalableStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReachabilityType ¶ added in v0.9.0
type ReachabilityType string
ReachabilityType is the enumeration type for the different states of reachability to the `ScaleTarget` of a `PodAutoscaler`
const ( // ReachabilityUnknown means the reachability of the `ScaleTarget` is unknown. // Used when the reachability cannot be determined, eg. during activation. ReachabilityUnknown ReachabilityType = "" // ReachabilityReachable means the `ScaleTarget` is reachable, ie. it has an active route. ReachabilityReachable ReachabilityType = "Reachable" // ReachabilityUnreachable means the `ScaleTarget` is not reachable, ie. it does not have an active route. ReachabilityUnreachable ReachabilityType = "Unreachable" )