v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the database v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/crossplaneio/crossplane/pkg/apis/gcp/database +k8s:defaulter-gen=TypeMeta +groupName=database.gcp.crossplane.io

Package v1alpha1 contains API Schema definitions for the database v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/crossplaneio/crossplane/pkg/gcp/apis/gcp/database +k8s:defaulter-gen=TypeMeta +groupName=database.gcp.crossplane.io

Index

Constants

View Source
const (
	// StateRunnable represents a CloudSQL instance in a running, available, and ready state
	StateRunnable = "RUNNABLE"

	// StatePendingCreate represents a CloudSQL instance that is in the process of being created
	StatePendingCreate = "PENDING_CREATE"

	// StateFailed  represents a CloudSQL instance has failed in some way
	StateFailed = "FAILED"
)

CloudSQL instance states

View Source
const (
	MysqlDBVersionPrefix      = "MYSQL"
	PostgresqlDBVersionPrefix = "POSTGRES"
)

CloudSQL version prefixes.

View Source
const (
	Group                          = "database.gcp.crossplane.io"
	Version                        = "v1alpha1"
	APIVersion                     = Group + "/" + Version
	CloudsqlInstanceKind           = "cloudsqlinstance"
	CloudsqlInstanceKindAPIVersion = CloudsqlInstanceKind + "." + APIVersion
)

Kubernetes Group, Version, and Kind metadata.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

Functions

This section is empty.

Types

type CloudsqlInstance

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

	Spec   CloudsqlInstanceSpec   `json:"spec,omitempty"`
	Status CloudsqlInstanceStatus `json:"status,omitempty"`
}

CloudsqlInstance is the Schema for the instances API +k8s:openapi-gen=true +groupName=database.gcp +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.bindingPhase" +kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.state" +kubebuilder:printcolumn:name="CLASS",type="string",JSONPath=".spec.classRef.name" +kubebuilder:printcolumn:name="VERSION",type="string",JSONPath=".spec.databaseVersion" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

func (*CloudsqlInstance) ConnectionSecretName

func (c *CloudsqlInstance) ConnectionSecretName() string

ConnectionSecretName returns a secret name from the reference

func (*CloudsqlInstance) DeepCopy

func (in *CloudsqlInstance) DeepCopy() *CloudsqlInstance

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

func (*CloudsqlInstance) DeepCopyInto

func (in *CloudsqlInstance) DeepCopyInto(out *CloudsqlInstance)

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

func (*CloudsqlInstance) DeepCopyObject

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

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

func (*CloudsqlInstance) IsAvailable

func (c *CloudsqlInstance) IsAvailable() bool

IsAvailable for usage/binding

func (*CloudsqlInstance) IsBound

func (c *CloudsqlInstance) IsBound() bool

IsBound determines if the resource is in a bound binding state

func (*CloudsqlInstance) ObjectReference

func (c *CloudsqlInstance) ObjectReference() *v1.ObjectReference

ObjectReference to this CloudSQL instance instance

func (*CloudsqlInstance) OwnerReference

func (c *CloudsqlInstance) OwnerReference() metav1.OwnerReference

OwnerReference to use this instance as an owner

func (*CloudsqlInstance) SetBound

func (c *CloudsqlInstance) SetBound(bound bool)

SetBound sets the binding state of this resource

type CloudsqlInstanceList

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

CloudsqlInstanceList contains a list of CloudsqlInstance

func (*CloudsqlInstanceList) DeepCopy

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

func (*CloudsqlInstanceList) DeepCopyInto

func (in *CloudsqlInstanceList) DeepCopyInto(out *CloudsqlInstanceList)

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

func (*CloudsqlInstanceList) DeepCopyObject

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

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

type CloudsqlInstanceSpec

type CloudsqlInstanceSpec struct {
	Region      string `json:"region"`
	StorageType string `json:"storageType"`
	StorageGB   int64  `json:"storageGB"`

	// The database engine (MySQL or PostgreSQL) and its specific version to use, e.g., MYSQL_5_7 or POSTGRES_9_6.
	DatabaseVersion string `json:"databaseVersion"`

	// MySQL and PostgreSQL use different machine types.  MySQL only allows a predefined set of machine types,
	// while PostgreSQL can only use custom machine instance types and shared-core instance types. For the full
	// set of MySQL machine types, see https://cloud.google.com/sql/pricing#2nd-gen-instance-pricing. For more
	// information on custom machine types that can be used with PostgreSQL, see the examples on
	// https://cloud.google.com/sql/docs/postgres/create-instance?authuser=1#machine-types and the naming rules
	// on https://cloud.google.com/sql/docs/postgres/create-instance#create-2ndgen-curl.
	Tier string `json:"tier"`

	// Kubernetes object references
	ClaimRef            *v1.ObjectReference     `json:"claimRef,omitempty"`
	ClassRef            *v1.ObjectReference     `json:"classRef,omitempty"`
	ProviderRef         v1.LocalObjectReference `json:"providerRef"`
	ConnectionSecretRef v1.LocalObjectReference `json:"connectionSecretRef,omitempty"`

	// ReclaimPolicy identifies how to handle the cloud resource after the deletion of this type
	ReclaimPolicy corev1alpha1.ReclaimPolicy `json:"reclaimPolicy,omitempty"`
}

CloudsqlInstanceSpec defines the desired state of CloudsqlInstance

func NewCloudSQLInstanceSpec

func NewCloudSQLInstanceSpec(properties map[string]string) *CloudsqlInstanceSpec

NewCloudSQLInstanceSpec creates a new CloudSQLInstanceSpec based on the given properties map

func (*CloudsqlInstanceSpec) DeepCopy

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

func (*CloudsqlInstanceSpec) DeepCopyInto

func (in *CloudsqlInstanceSpec) DeepCopyInto(out *CloudsqlInstanceSpec)

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

type CloudsqlInstanceStatus

type CloudsqlInstanceStatus struct {
	corev1alpha1.ConditionedStatus
	corev1alpha1.BindingStatusPhase
	State   string `json:"state,omitempty"`
	Message string `json:"message,omitempty"`

	// the external ID to identify this resource in the cloud provider
	ProviderID string `json:"providerID,omitempty"`

	// Endpoint of the Cloud SQL instance used in connection strings.
	Endpoint string `json:"endpoint,omitempty"`

	// Name of the Cloud SQL instance. This does not include the project ID.
	InstanceName string `json:"instanceName,omitempty"`
}

CloudsqlInstanceStatus defines the observed state of CloudsqlInstance

func (*CloudsqlInstanceStatus) DeepCopy

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

func (*CloudsqlInstanceStatus) DeepCopyInto

func (in *CloudsqlInstanceStatus) DeepCopyInto(out *CloudsqlInstanceStatus)

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