v1beta1

package
v1.125.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

+kcc:proto=google.spanner.admin.instance.v1

+kubebuilder:object:generate=true +groupName=spanner.cnrm.cloud.google.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "spanner.cnrm.cloud.google.com", Version: "v1beta1"}

	// 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
)
View Source
var SpannerInstanceGVK = GroupVersion.WithKind("SpannerInstance")

Functions

This section is empty.

Types

type AutoscalingConfig

type AutoscalingConfig struct {
	// Required. Autoscaling limits for an instance.
	AutoscalingLimits *AutoscalingConfig_AutoscalingLimits `json:"autoscalingLimits,omitempty"`

	// Required. The autoscaling targets for an instance.
	AutoscalingTargets *AutoscalingConfig_AutoscalingTargets `json:"autoscalingTargets,omitempty"`

	// Optional. Optional asymmetric autoscaling options.
	//  Replicas matching the replica selection criteria will be autoscaled
	//  independently from other replicas. The autoscaler will scale the replicas
	//  based on the utilization of replicas identified by the replica selection.
	//  Replica selections should not overlap with each other.
	//
	//  Other replicas (those do not match any replica selection) will be
	//  autoscaled together and will have the same compute capacity allocated to
	//  them.
	AsymmetricAutoscalingOptions []AutoscalingConfig_AsymmetricAutoscalingOption `json:"asymmetricAutoscalingOptions,omitempty"`
}

+kcc:proto=google.spanner.admin.instance.v1.AutoscalingConfig

func (*AutoscalingConfig) DeepCopy

func (in *AutoscalingConfig) DeepCopy() *AutoscalingConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingConfig.

func (*AutoscalingConfig) DeepCopyInto

func (in *AutoscalingConfig) DeepCopyInto(out *AutoscalingConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoscalingConfig_AsymmetricAutoscalingOption

type AutoscalingConfig_AsymmetricAutoscalingOption struct {
	// Required. Selects the replicas to which this AsymmetricAutoscalingOption
	//  applies. Only read-only replicas are supported.
	ReplicaSelection *ReplicaSelection `json:"replicaSelection,omitempty"`

	// Optional. Overrides applied to the top-level autoscaling configuration
	//  for the selected replicas.
	Overrides *AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides `json:"overrides,omitempty"`
}

+kcc:proto=google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption

func (*AutoscalingConfig_AsymmetricAutoscalingOption) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingConfig_AsymmetricAutoscalingOption.

func (*AutoscalingConfig_AsymmetricAutoscalingOption) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides

type AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides struct {
	// Optional. If specified, overrides the min/max limit in the top-level
	//  autoscaling configuration for the selected replicas.
	AutoscalingLimits *AutoscalingConfig_AutoscalingLimits `json:"autoscalingLimits,omitempty"`

	// Optional. If specified, overrides the autoscaling target
	//  high_priority_cpu_utilization_percent in the top-level autoscaling
	//  configuration for the selected replicas.
	AutoscalingTargetHighPriorityCpuUtilizationPercent *int32 `json:"autoscalingTargetHighPriorityCpuUtilizationPercent,omitempty"`
}

+kcc:proto=google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides

func (*AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides.

func (*AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoscalingConfig_AutoscalingLimits

type AutoscalingConfig_AutoscalingLimits struct {
	// Minimum number of nodes allocated to the instance. If set, this number
	//  should be greater than or equal to 1.
	MinNodes *int32 `json:"minNodes,omitempty"`

	// Minimum number of processing units allocated to the instance. If set,
	//  this number should be multiples of 1000.
	MinProcessingUnits *int32 `json:"minProcessingUnits,omitempty"`

	// Maximum number of nodes allocated to the instance. If set, this number
	//  should be greater than or equal to min_nodes.
	MaxNodes *int32 `json:"maxNodes,omitempty"`

	// Maximum number of processing units allocated to the instance. If set,
	//  this number should be multiples of 1000 and be greater than or equal to
	//  min_processing_units.
	MaxProcessingUnits *int32 `json:"maxProcessingUnits,omitempty"`
}

+kcc:proto=google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits

func (*AutoscalingConfig_AutoscalingLimits) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingConfig_AutoscalingLimits.

func (*AutoscalingConfig_AutoscalingLimits) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoscalingConfig_AutoscalingTargets

type AutoscalingConfig_AutoscalingTargets struct {
	// Required. The target high priority cpu utilization percentage that the
	//  autoscaler should be trying to achieve for the instance. This number is
	//  on a scale from 0 (no utilization) to 100 (full utilization). The valid
	//  range is [10, 90] inclusive.
	HighPriorityCpuUtilizationPercent *int32 `json:"highPriorityCpuUtilizationPercent,omitempty"`

	// Required. The target storage utilization percentage that the autoscaler
	//  should be trying to achieve for the instance. This number is on a scale
	//  from 0 (no utilization) to 100 (full utilization). The valid range is
	//  [10, 100] inclusive.
	StorageUtilizationPercent *int32 `json:"storageUtilizationPercent,omitempty"`
}

+kcc:proto=google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets

func (*AutoscalingConfig_AutoscalingTargets) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingConfig_AutoscalingTargets.

func (*AutoscalingConfig_AutoscalingTargets) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Instance

type Instance struct {
	// Required. A unique identifier for the instance, which cannot be changed
	//  after the instance is created. Values are of the form
	//  `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
	//  segment of the name must be between 2 and 64 characters in length.
	Name *string `json:"name,omitempty"`

	// Required. The name of the instance's configuration. Values are of the form
	//  `projects/<project>/instanceConfigs/<configuration>`. See
	//  also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
	//  [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
	Config *string `json:"config,omitempty"`

	// Required. The descriptive name for this instance as it appears in UIs.
	//  Must be unique per project and between 4 and 30 characters in length.
	DisplayName *string `json:"displayName,omitempty"`

	// The number of nodes allocated to this instance. At most, one of either
	//  `node_count` or `processing_units` should be present in the message.
	//
	//  Users can set the `node_count` field to specify the target number of nodes
	//  allocated to the instance.
	//
	//  If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
	//  field and reflects the current number of nodes allocated to the instance.
	//
	//  This might be zero in API responses for instances that are not yet in the
	//  `READY` state.
	//
	//  If the instance has varying node count across replicas (achieved by
	//  setting asymmetric_autoscaling_options in autoscaling config), the
	//  node_count here is the maximum node count across all replicas.
	//
	//  For more information, see
	//  [Compute capacity, nodes, and processing
	//  units](https://cloud.google.com/spanner/docs/compute-capacity).
	NodeCount *int32 `json:"nodeCount,omitempty"`

	// The number of processing units allocated to this instance. At most, one of
	//  either `processing_units` or `node_count` should be present in the message.
	//
	//  Users can set the `processing_units` field to specify the target number of
	//  processing units allocated to the instance.
	//
	//  If autoscaling is enabled, `processing_units` is treated as an
	//  `OUTPUT_ONLY` field and reflects the current number of processing units
	//  allocated to the instance.
	//
	//  This might be zero in API responses for instances that are not yet in the
	//  `READY` state.
	//
	//  If the instance has varying processing units per replica
	//  (achieved by setting asymmetric_autoscaling_options in autoscaling config),
	//  the processing_units here is the maximum processing units across all
	//  replicas.
	//
	//  For more information, see
	//  [Compute capacity, nodes and processing
	//  units](https://cloud.google.com/spanner/docs/compute-capacity).
	ProcessingUnits *int32 `json:"processingUnits,omitempty"`

	// Output only. Lists the compute capacity per ReplicaSelection. A replica
	//  selection identifies a set of replicas with common properties. Replicas
	//  identified by a ReplicaSelection are scaled with the same compute capacity.
	ReplicaComputeCapacity []ReplicaComputeCapacity `json:"replicaComputeCapacity,omitempty"`

	// Optional. The autoscaling configuration. Autoscaling is enabled if this
	//  field is set. When autoscaling is enabled, node_count and processing_units
	//  are treated as OUTPUT_ONLY fields and reflect the current compute capacity
	//  allocated to the instance.
	AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"`

	// Output only. The current instance state. For
	//  [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
	//  the state must be either omitted or set to `CREATING`. For
	//  [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance],
	//  the state must be either omitted or set to `READY`.
	State *string `json:"state,omitempty"`

	// Cloud Labels are a flexible and lightweight mechanism for organizing cloud
	//  resources into groups that reflect a customer's organizational needs and
	//  deployment strategies. Cloud Labels can be used to filter collections of
	//  resources. They can be used to control how resource metrics are aggregated.
	//  And they can be used as arguments to policy management rules (e.g. route,
	//  firewall, load balancing, etc.).
	//
	//   * Label keys must be between 1 and 63 characters long and must conform to
	//     the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
	//   * Label values must be between 0 and 63 characters long and must conform
	//     to the regular expression `[a-z0-9_-]{0,63}`.
	//   * No more than 64 labels can be associated with a given resource.
	//
	//  See https://goo.gl/xmQnxf for more information on and examples of labels.
	//
	//  If you plan to use labels in your own code, please note that additional
	//  characters may be allowed in the future. And so you are advised to use an
	//  internal label representation, such as JSON, which doesn't rely upon
	//  specific characters being disallowed.  For example, representing labels
	//  as the string:  name + "_" + value  would prove problematic if we were to
	//  allow "_" in a future release.
	Labels map[string]string `json:"labels,omitempty"`

	// Deprecated. This field is not populated.
	EndpointUris []string `json:"endpointUris,omitempty"`

	// Output only. The time at which the instance was created.
	CreateTime *string `json:"createTime,omitempty"`

	// Output only. The time at which the instance was most recently updated.
	UpdateTime *string `json:"updateTime,omitempty"`

	// Optional. The `Edition` of the current instance.
	Edition *string `json:"edition,omitempty"`

	// Optional. Controls the default backup behavior for new databases within the
	//  instance.
	//
	//  Note that `AUTOMATIC` is not permitted for free instances, as backups and
	//  backup schedules are not allowed for free instances.
	//
	//  In the `GetInstance` or `ListInstances` response, if the value of
	//  default_backup_schedule_type is unset or NONE, no default backup
	//  schedule will be created for new databases within the instance.
	DefaultBackupScheduleType *string `json:"defaultBackupScheduleType,omitempty"`
}

+kcc:proto=google.spanner.admin.instance.v1.Instance

func (*Instance) DeepCopy

func (in *Instance) DeepCopy() *Instance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance.

func (*Instance) DeepCopyInto

func (in *Instance) DeepCopyInto(out *Instance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReplicaComputeCapacity

type ReplicaComputeCapacity struct {
	// Required. Identifies replicas by specified properties.
	//  All replicas in the selection have the same amount of compute capacity.
	ReplicaSelection *ReplicaSelection `json:"replicaSelection,omitempty"`

	// The number of nodes allocated to each replica.
	//
	//  This may be zero in API responses for instances that are not yet in
	//  state `READY`.
	NodeCount *int32 `json:"nodeCount,omitempty"`

	// The number of processing units allocated to each replica.
	//
	//  This may be zero in API responses for instances that are not yet in
	//  state `READY`.
	ProcessingUnits *int32 `json:"processingUnits,omitempty"`
}

+kcc:proto=google.spanner.admin.instance.v1.ReplicaComputeCapacity

func (*ReplicaComputeCapacity) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaComputeCapacity.

func (*ReplicaComputeCapacity) DeepCopyInto

func (in *ReplicaComputeCapacity) DeepCopyInto(out *ReplicaComputeCapacity)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReplicaSelection

type ReplicaSelection struct {
	// Required. Name of the location of the replicas (e.g., "us-central1").
	Location *string `json:"location,omitempty"`
}

+kcc:proto=google.spanner.admin.instance.v1.ReplicaSelection

func (*ReplicaSelection) DeepCopy

func (in *ReplicaSelection) DeepCopy() *ReplicaSelection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSelection.

func (*ReplicaSelection) DeepCopyInto

func (in *ReplicaSelection) DeepCopyInto(out *ReplicaSelection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpannerInstance

type SpannerInstance struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +required
	Spec   SpannerInstanceSpec   `json:"spec,omitempty"`
	Status SpannerInstanceStatus `json:"status,omitempty"`
}

SpannerInstance is the Schema for the SpannerInstance API +k8s:openapi-gen=true

func (*SpannerInstance) DeepCopy

func (in *SpannerInstance) DeepCopy() *SpannerInstance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerInstance.

func (*SpannerInstance) DeepCopyInto

func (in *SpannerInstance) DeepCopyInto(out *SpannerInstance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpannerInstance) DeepCopyObject

func (in *SpannerInstance) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SpannerInstanceList

type SpannerInstanceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SpannerInstance `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object SpannerInstanceList contains a list of SpannerInstance

func (*SpannerInstanceList) DeepCopy

func (in *SpannerInstanceList) DeepCopy() *SpannerInstanceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerInstanceList.

func (*SpannerInstanceList) DeepCopyInto

func (in *SpannerInstanceList) DeepCopyInto(out *SpannerInstanceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpannerInstanceList) DeepCopyObject

func (in *SpannerInstanceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SpannerInstanceObservedState

type SpannerInstanceObservedState struct {
}

SpannerInstanceObservedState is the state of the SpannerInstance resource as most recently observed in GCP.

func (*SpannerInstanceObservedState) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerInstanceObservedState.

func (*SpannerInstanceObservedState) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpannerInstanceParent

type SpannerInstanceParent struct {
	ProjectID string
}

func (*SpannerInstanceParent) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerInstanceParent.

func (*SpannerInstanceParent) DeepCopyInto

func (in *SpannerInstanceParent) DeepCopyInto(out *SpannerInstanceParent)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpannerInstanceParent) String

func (p *SpannerInstanceParent) String() string

type SpannerInstanceRef

type SpannerInstanceRef struct {
	// A reference to an externally managed SpannerInstance resource.
	// Should be in the format "projects/<projectID>/instances/<instanceID>".
	External string `json:"external,omitempty"`

	// The name of a SpannerInstance resource.
	Name string `json:"name,omitempty"`

	// The namespace of a SpannerInstance resource.
	Namespace string `json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

SpannerInstanceRef defines the resource reference to SpannerInstance, which "External" field holds the GCP identifier for the KRM object.

func NewSpannerInstanceRef

func NewSpannerInstanceRef(ctx context.Context, reader client.Reader, obj *SpannerInstance, u *unstructured.Unstructured) (*SpannerInstanceRef, error)

New builds a SpannerInstanceRef from the Config Connector SpannerInstance object.

func (*SpannerInstanceRef) DeepCopy

func (in *SpannerInstanceRef) DeepCopy() *SpannerInstanceRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerInstanceRef.

func (*SpannerInstanceRef) DeepCopyInto

func (in *SpannerInstanceRef) DeepCopyInto(out *SpannerInstanceRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpannerInstanceRef) NormalizedExternal

func (r *SpannerInstanceRef) NormalizedExternal(ctx context.Context, reader client.Reader, otherNamespace string) (string, error)

NormalizedExternal provision the "External" value for other resource that depends on SpannerInstance. If the "External" is given in the other resource's spec.SpannerInstanceRef, the given value will be used. Otherwise, the "Name" and "Namespace" will be used to query the actual SpannerInstance object from the cluster.

func (*SpannerInstanceRef) Parent

type SpannerInstanceSpec

type SpannerInstanceSpec struct {
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Config field is immutable"
	/* Immutable. The name of the instance's configuration (similar but not
	quite the same as a region) which defines the geographic placement and
	replication of your databases in this instance. It determines where your data
	is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc.
	In order to obtain a valid list please consult the
	[Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). */
	Config string `json:"config"`

	/* The descriptive name for this instance as it appears in UIs. Must be
	unique per project and between 4 and 30 characters in length. */
	DisplayName string `json:"displayName"`

	// +optional
	NumNodes *int64 `json:"numNodes,omitempty"`

	// +optional
	ProcessingUnits *int64 `json:"processingUnits,omitempty"`

	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable"
	// Immutable.
	// The SpannerInstance name. If not given, the metadata.name will be used.
	ResourceID *string `json:"resourceID,omitempty"`
}

SpannerInstanceSpec defines the desired state of SpannerInstance +kcc:proto=google.spanner.admin.instance.v1.Instance

func (*SpannerInstanceSpec) DeepCopy

func (in *SpannerInstanceSpec) DeepCopy() *SpannerInstanceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerInstanceSpec.

func (*SpannerInstanceSpec) DeepCopyInto

func (in *SpannerInstanceSpec) DeepCopyInto(out *SpannerInstanceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpannerInstanceStatus

type SpannerInstanceStatus struct {
	/* Conditions represent the latest available observations of the
	   SpannerInstance's current state. */
	Conditions []v1alpha1.Condition `json:"conditions,omitempty"`
	/* ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. */
	// +optional
	ObservedGeneration *int64 `json:"observedGeneration,omitempty"`

	// A unique specifier for the SpannerInstance resource in GCP.
	ExternalRef *string `json:"externalRef,omitempty"`

	/* Instance status: 'CREATING' or 'READY'. */
	// +optional
	State *string `json:"state,omitempty"`
}

SpannerInstanceStatus defines the config connector machine state of SpannerInstance

func (*SpannerInstanceStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpannerInstanceStatus.

func (*SpannerInstanceStatus) DeepCopyInto

func (in *SpannerInstanceStatus) DeepCopyInto(out *SpannerInstanceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL