Skip to content

Latest commit

 

History

History
265 lines (147 loc) · 10.8 KB

crd-reference.md

File metadata and controls

265 lines (147 loc) · 10.8 KB

API Reference

Packages

spanner.mercari.com/v1beta1

Package v1beta1 contains API Schema definitions for the spanner v1beta1 API group

Resource Types

ActiveSchedule

A SpannerAutoscaleSchedule which is currently active and will be used for calculating the autoscaling range.

Appears in:

Field Description
name string Name of the SpannerAutoscaleSchedule
endTime Time The time until when this schedule will remain active
additionalPU integer The extra compute capacity which will be added because of this schedule

Authentication

Authentication details for the Spanner instance

Appears in:

Field Description
type AuthType Authentication method to be used for GCP authentication. If ImpersonateConfig as well as IAMKeySecret is nil, this will be set to use ADC be default.
impersonateConfig ImpersonateConfig Details of the GCP service account which will be impersonated, for authentication to GCP. This can used only on GKE clusters, when workload identity is enabled. [Ref]. This is a pointer because structs with string slices can not be compared for zero values
iamKeySecret IAMKeySecret Details of the k8s secret which contains the GCP service account authentication key (in JSON). [Ref]. This is a pointer because structs with string slices can not be compared for zero values

IAMKeySecret

Details of the secret which has the GCP service account key for authentication

Appears in:

Field Description
name string Name of the secret which contains the authentication key
namespace string Namespace of the secret which contains the authentication key
key string Name of the yaml 'key' under which the authentication value is stored

ImpersonateConfig

Details of the impersonation service account for GCP authentication

Appears in:

Field Description
targetServiceAccount string The service account which will be impersonated
delegates string array Delegation chain for the service account impersonation. [Ref]

ScaleConfig

Details of the autoscaling parameters for the Spanner instance

Appears in:

Field Description
computeType ComputeType Whether to use nodes or processing-units for scaling. This is only used at the time of CustomResource creation. If compute capacity is provided in nodes, then it is automatically converted to processing-units at the time of resource creation, and internally, only ProcessingUnits are used for computations and scaling.
nodes ScaleConfigNodes If nodes are provided at the time of resource creation, then they are automatically converted to processing-units. So it is recommended to use only the processing units. Ref: Spanner Compute Capacity
processingUnits ScaleConfigPUs ProcessingUnits for scaling of the Spanner instance. Ref: Spanner Compute Capacity
scaledownStepSize integer The maximum number of processing units which can be deleted in one scale-down operation. It can be a multiple of 100 for values < 1000, or a multiple of 1000 otherwise.
scaledownInterval Duration How often autoscaler is reevaluated for scale down. The cool down period between two consecutive scaledown operations. If this option is omitted, the value of the --scale-down-interval command line option is taken as the default value. Duration string is a possibly sequence of decimal numbers, each with unit suffix, such as "300m", "1.5h" or "2h45m".
scaleupStepSize integer The maximum number of processing units which can be added in one scale-up operation. It can be a multiple of 100 for values < 1000, or a multiple of 1000 otherwise.
scaleupInterval Duration How often autoscaler is reevaluated for scale up. The warm up period between two consecutive scaleup operations. If this option is omitted, the value of the --scale-up-interval command line option is taken as the default value. Duration string is a possibly sequence of decimal numbers, each with unit suffix, such as "300m", "1.5h" or "2h45m".
targetCPUUtilization TargetCPUUtilization The CPU utilization which the autoscaling will try to achieve. Ref: Spanner CPU utilization

ScaleConfigNodes

Compute capacity in terms of Nodes

Appears in:

Field Description
min integer Minimum number of Nodes for the autoscaling range
max integer Maximum number of Nodes for the autoscaling range

ScaleConfigPUs

Compute capacity in terms of Processing Units

Appears in:

Field Description
min integer Minimum number of Processing Units for the autoscaling range
max integer Maximum number of Processing Units for the autoscaling range

Schedule

The recurring frequency and the length of time for which a schedule will remain active

Appears in:

Field Description
cron string The recurring frequency of the schedule in standard cron format. Examples and verification utility: https://crontab.guru
duration string The length of time for which this schedule will remain active each time the cron is triggered.

SpannerAutoscaleSchedule

SpannerAutoscaleSchedule is the Schema for the spannerautoscaleschedules API

Field Description
apiVersion string spanner.mercari.com/v1beta1
kind string SpannerAutoscaleSchedule
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec SpannerAutoscaleScheduleSpec
status SpannerAutoscaleScheduleStatus

SpannerAutoscaleScheduleSpec

SpannerAutoscaleScheduleSpec defines the desired state of SpannerAutoscaleSchedule

Appears in:

Field Description
targetResource string The SpannerAutoscaler resource name with which this schedule will be registered
additionalProcessingUnits integer The extra compute capacity which will be added when this schedule is active
schedule Schedule The details of when and for how long this schedule will be active

SpannerAutoscaler

SpannerAutoscaler is the Schema for the spannerautoscalers API

Field Description
apiVersion string spanner.mercari.com/v1beta1
kind string SpannerAutoscaler
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec SpannerAutoscalerSpec
status SpannerAutoscalerStatus

SpannerAutoscalerSpec

SpannerAutoscalerSpec defines the desired state of SpannerAutoscaler

Appears in:

Field Description
targetInstance TargetInstance The Spanner instance which will be managed for autoscaling
authentication Authentication Authentication details for the Spanner instance
scaleConfig ScaleConfig Details of the autoscaling parameters for the Spanner instance

SpannerAutoscalerStatus

SpannerAutoscalerStatus defines the observed state of SpannerAutoscaler

Appears in:

Field Description
schedules string array List of schedules which are registered with this spanner-autoscaler instance
currentlyActiveSchedules ActiveSchedule array List of all the schedules which are currently active and will be used in calculating compute capacity
lastScaleTime Time Last time the SpannerAutoscaler scaled the number of Spanner nodes. Used by the autoscaler to control how often the number of nodes are changed
lastSyncTime Time Last time the SpannerAutoscaler fetched and synced the metrics from Spanner
currentProcessingUnits integer Current number of processing-units in the Spanner instance
desiredProcessingUnits integer Desired number of processing-units in the Spanner instance
desiredMinPUs integer Minimum number of processing units based on the currently active schedules
desiredMaxPUs integer Maximum number of processing units based on the currently active schedules
instanceState InstanceState State of the Cloud Spanner instance
currentHighPriorityCPUUtilization integer Current average CPU utilization for high priority task, represented as a percentage

TargetCPUUtilization

Appears in:

Field Description
highPriority integer Desired CPU utilization for 'High Priority' CPU consumption category. Ref: Spanner CPU utilization

TargetInstance

The Spanner instance which will be managed for autoscaling

Appears in:

Field Description
projectId string The GCP Project id of the Spanner instance
instanceId string The instance id of the Spanner instance