Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the spanner v1alpha1 API group +kubebuilder:object:generate=true +groupName=spanner.mercari.com
Index ¶
- Variables
- type ImpersonateConfig
- type InstanceState
- type ScaleTargetRef
- type ServiceAccountSecretRef
- type SpannerAutoscaler
- func (dst *SpannerAutoscaler) ConvertFrom(srcRaw conversion.Hub) error
- func (src *SpannerAutoscaler) ConvertTo(dstRaw conversion.Hub) error
- func (in *SpannerAutoscaler) DeepCopy() *SpannerAutoscaler
- func (in *SpannerAutoscaler) DeepCopyInto(out *SpannerAutoscaler)
- func (in *SpannerAutoscaler) DeepCopyObject() runtime.Object
- func (r *SpannerAutoscaler) SetupWebhookWithManager(mgr ctrl.Manager) error
- type SpannerAutoscalerList
- type SpannerAutoscalerSpec
- type SpannerAutoscalerStatus
- type TargetCPUUtilization
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "spanner.mercari.com", 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 ImpersonateConfig ¶
type ImpersonateConfig struct {
TargetServiceAccount string `json:"targetServiceAccount"`
// +kubebuilder:validation:Optional
Delegates []string `json:"delegates,omitempty"`
}
func (*ImpersonateConfig) DeepCopy ¶
func (in *ImpersonateConfig) DeepCopy() *ImpersonateConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImpersonateConfig.
func (*ImpersonateConfig) DeepCopyInto ¶
func (in *ImpersonateConfig) DeepCopyInto(out *ImpersonateConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstanceState ¶
type InstanceState string
const ( InstanceStateUnspecified InstanceState = "unspecified" // The instance is still being created. Resources may not be // available yet, and operations such as database creation may not // work. InstanceStateCreating InstanceState = "creating" // The instance is fully created and ready to do work such as // creating databases. InstanceStateReady InstanceState = "ready" )
type ScaleTargetRef ¶
type ScaleTargetRef struct {
// +kubebuilder:validation:MinLength=1
ProjectID *string `json:"projectId"`
// +kubebuilder:validation:MinLength=1
InstanceID *string `json:"instanceId"`
}
ScaleTargetRef defines the target reference for scaling.
func (*ScaleTargetRef) DeepCopy ¶
func (in *ScaleTargetRef) DeepCopy() *ScaleTargetRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleTargetRef.
func (*ScaleTargetRef) DeepCopyInto ¶
func (in *ScaleTargetRef) DeepCopyInto(out *ScaleTargetRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceAccountSecretRef ¶
type ServiceAccountSecretRef struct {
// +kubebuilder:validation:MinLength=1
Name *string `json:"name"`
Namespace *string `json:"namespace,omitempty"`
// +kubebuilder:validation:MinLength=1
Key *string `json:"key"`
}
func (*ServiceAccountSecretRef) DeepCopy ¶
func (in *ServiceAccountSecretRef) DeepCopy() *ServiceAccountSecretRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountSecretRef.
func (*ServiceAccountSecretRef) DeepCopyInto ¶
func (in *ServiceAccountSecretRef) DeepCopyInto(out *ServiceAccountSecretRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SpannerAutoscaler ¶
type SpannerAutoscaler struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec SpannerAutoscalerSpec `json:"spec,omitempty"`
Status SpannerAutoscalerStatus `json:"status,omitempty"`
}
SpannerAutoscaler is the Schema for the spannerautoscalers API
func (*SpannerAutoscaler) ConvertFrom ¶ added in v0.3.0
func (dst *SpannerAutoscaler) ConvertFrom(srcRaw conversion.Hub) error
func (*SpannerAutoscaler) ConvertTo ¶ added in v0.3.0
func (src *SpannerAutoscaler) ConvertTo(dstRaw conversion.Hub) error
func (*SpannerAutoscaler) DeepCopy ¶
func (in *SpannerAutoscaler) DeepCopy() *SpannerAutoscaler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerAutoscaler.
func (*SpannerAutoscaler) DeepCopyInto ¶
func (in *SpannerAutoscaler) DeepCopyInto(out *SpannerAutoscaler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SpannerAutoscaler) DeepCopyObject ¶
func (in *SpannerAutoscaler) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*SpannerAutoscaler) SetupWebhookWithManager ¶ added in v0.3.0
func (r *SpannerAutoscaler) SetupWebhookWithManager(mgr ctrl.Manager) error
type SpannerAutoscalerList ¶
type SpannerAutoscalerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []SpannerAutoscaler `json:"items"`
}
SpannerAutoscalerList contains a list of SpannerAutoscaler
func (*SpannerAutoscalerList) DeepCopy ¶
func (in *SpannerAutoscalerList) DeepCopy() *SpannerAutoscalerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerAutoscalerList.
func (*SpannerAutoscalerList) DeepCopyInto ¶
func (in *SpannerAutoscalerList) DeepCopyInto(out *SpannerAutoscalerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SpannerAutoscalerList) DeepCopyObject ¶
func (in *SpannerAutoscalerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SpannerAutoscalerSpec ¶
type SpannerAutoscalerSpec struct {
// target reference for scaling.
ScaleTargetRef ScaleTargetRef `json:"scaleTargetRef"`
// +kubebuilder:validation:Optional
// reference for service account secret.
// If not specified, use ADC of the controller.
ServiceAccountSecretRef *ServiceAccountSecretRef `json:"serviceAccountSecretRef"`
// +kubebuilder:validation:Optional
ImpersonateConfig *ImpersonateConfig `json:"impersonateConfig,omitempty"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Optional
// lower limit for the number of nodes that can be set by the autoscaler.
MinNodes *int32 `json:"minNodes,omitempty"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Optional
// upper limit for the number of nodes that can be set by the autoscaler.
// It cannot be smaller than MinNodes.
MaxNodes *int32 `json:"maxNodes,omitempty"`
// +kubebuilder:validation:Minimum=100
// +kubebuilder:validation:MultipleOf=100
// +kubebuilder:validation:Optional
// lower limit for the number of nodes that can be set by the autoscaler.
MinProcessingUnits *int32 `json:"minProcessingUnits,omitempty"`
// +kubebuilder:validation:Minimum=100
// +kubebuilder:validation:MultipleOf=100
// +kubebuilder:validation:Optional
// upper limit for the number of nodes that can be set by the autoscaler.
// It cannot be smaller than minProcessingUnits.
MaxProcessingUnits *int32 `json:"maxProcessingUnits,omitempty"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Optional
// upper limit for the number of nodes when autoscaler scaledown.
MaxScaleDownNodes *int32 `json:"maxScaleDownNodes"`
// target average CPU utilization for Spanner.
TargetCPUUtilization TargetCPUUtilization `json:"targetCPUUtilization"`
}
SpannerAutoscalerSpec defines the desired state of SpannerAutoscaler
func (*SpannerAutoscalerSpec) DeepCopy ¶
func (in *SpannerAutoscalerSpec) DeepCopy() *SpannerAutoscalerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerAutoscalerSpec.
func (*SpannerAutoscalerSpec) DeepCopyInto ¶
func (in *SpannerAutoscalerSpec) DeepCopyInto(out *SpannerAutoscalerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SpannerAutoscalerStatus ¶
type SpannerAutoscalerStatus struct {
// last time the SpannerAutoscaler scaled the number of Spanner nodes.
// used by the autoscaler to control how often the number of nodes is changed.
LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty"`
// last time the SpannerAutoscaler synced the Spanner status.
LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`
// current number of nodes of Spanner managed by this autoscaler.
CurrentNodes *int32 `json:"currentNodes,omitempty"`
// current number of nodes of Spanner managed by this autoscaler.
CurrentProcessingUnits *int32 `json:"currentProcessingUnits,omitempty"`
// desired number of nodes of Spanner managed by this autoscaler.
DesiredNodes *int32 `json:"desiredNodes,omitempty"`
// desired number of nodes of Spanner managed by this autoscaler.
DesiredProcessingUnits *int32 `json:"desiredProcessingUnits,omitempty"`
// +kubebuilder:validation:Type=string
InstanceState InstanceState `json:"instanceState"`
// current average CPU utilization for high priority task, represented as a percentage.
CurrentHighPriorityCPUUtilization *int32 `json:"currentHighPriorityCPUUtilization,omitempty"`
}
SpannerAutoscalerStatus defines the observed state of SpannerAutoscaler
func (*SpannerAutoscalerStatus) DeepCopy ¶
func (in *SpannerAutoscalerStatus) DeepCopy() *SpannerAutoscalerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerAutoscalerStatus.
func (*SpannerAutoscalerStatus) DeepCopyInto ¶
func (in *SpannerAutoscalerStatus) DeepCopyInto(out *SpannerAutoscalerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetCPUUtilization ¶
type TargetCPUUtilization struct {
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=100
// fraction of the requested CPU that should be utilized/used,
// e.g. 70 means that 70% of the requested CPU should be in use.
HighPriority *int32 `json:"highPriority"`
}
TargetCPUUtilization defines the utilization of Cloud Spanner CPU
func (*TargetCPUUtilization) DeepCopy ¶
func (in *TargetCPUUtilization) DeepCopy() *TargetCPUUtilization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetCPUUtilization.
func (*TargetCPUUtilization) DeepCopyInto ¶
func (in *TargetCPUUtilization) DeepCopyInto(out *TargetCPUUtilization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.