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: 9 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	Group                                  = "cache.gcp.crossplane.io"
	Version                                = "v1alpha1"
	APIVersion                             = Group + "/" + Version
	CloudMemorystoreInstanceKind           = "cloudmemorystoreinstance"
	CloudMemorystoreInstanceKindAPIVersion = CloudMemorystoreInstanceKind + "." + APIVersion
)

Kubernetes Group, Version, and Kind metadata.

Variables

View Source
var (
	StateUnspecified = redis.Instance_STATE_UNSPECIFIED.String()
	StateCreating    = redis.Instance_CREATING.String()
	StateReady       = redis.Instance_READY.String()
	StateUpdating    = redis.Instance_UPDATING.String()
	StateDeleting    = redis.Instance_DELETING.String()
	StateRepairing   = redis.Instance_REPAIRING.String()
	StateMaintenance = redis.Instance_MAINTENANCE.String()
)

Cloud Memorystore instance states.

View Source
var (
	TierBasic      = redis.Instance_BASIC.String()
	TierStandardHA = redis.Instance_STANDARD_HA.String()
)

Cloud Memorystore instance tiers.

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 CloudMemorystoreInstance

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

	Spec   CloudMemorystoreInstanceSpec   `json:"spec,omitempty"`
	Status CloudMemorystoreInstanceStatus `json:"status,omitempty"`
}

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

func (*CloudMemorystoreInstance) ConnectionSecretName

func (c *CloudMemorystoreInstance) ConnectionSecretName() string

ConnectionSecretName returns a secret name from the reference

func (*CloudMemorystoreInstance) DeepCopy

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

func (*CloudMemorystoreInstance) DeepCopyInto

func (in *CloudMemorystoreInstance) DeepCopyInto(out *CloudMemorystoreInstance)

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

func (*CloudMemorystoreInstance) DeepCopyObject

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

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

func (*CloudMemorystoreInstance) IsAvailable

func (c *CloudMemorystoreInstance) IsAvailable() bool

IsAvailable for usage/binding

func (*CloudMemorystoreInstance) IsBound

func (c *CloudMemorystoreInstance) IsBound() bool

IsBound determines if the resource is in a bound binding state

func (*CloudMemorystoreInstance) ObjectReference

func (c *CloudMemorystoreInstance) ObjectReference() *corev1.ObjectReference

ObjectReference to this CloudMemorystore instance

func (*CloudMemorystoreInstance) OwnerReference

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

OwnerReference to use this instance as an owner

func (*CloudMemorystoreInstance) SetBound

func (c *CloudMemorystoreInstance) SetBound(state bool)

SetBound sets the binding state of this resource

type CloudMemorystoreInstanceList

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

CloudMemorystoreInstanceList contains a list of CloudMemorystoreInstance

func (*CloudMemorystoreInstanceList) DeepCopy

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

func (*CloudMemorystoreInstanceList) DeepCopyInto

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

func (*CloudMemorystoreInstanceList) DeepCopyObject

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

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

type CloudMemorystoreInstanceSpec

type CloudMemorystoreInstanceSpec struct {
	// Region in which to create this CloudMemorystore cluster.
	Region string `json:"region"`

	// Tier specifies the replication level of the Redis cluster. BASIC provides
	// a single Redis instance with no high availability. STANDARD_HA provides a
	// cluster of two Redis instances in distinct availability zones.
	// https://cloud.google.com/memorystore/docs/redis/redis-tiers
	// +kubebuilder:validation:Enum=BASIC,STANDARD_HA
	Tier string `json:"tier"`

	// LocationID specifies the zone where the instance will be provisioned. If
	// not provided, the service will choose a zone for the instance. For
	// STANDARD_HA tier, instances will be created across two zones for
	// protection against zonal failures.
	LocationID string `json:"locationId,omitempty"`

	// AlternativeLocationID is only applicable to STANDARD_HA tier, which
	// protects the instance against zonal failures by provisioning it across
	// two zones. If provided, it must be a different zone from the one provided
	// in locationId.
	AlternativeLocationID string `json:"alternativeLocationId,omitempty"`

	// MemorySizeGB specifies the Redis memory size in GiB.
	MemorySizeGB int `json:"memorySizeGb"`

	// ReservedIPRange specifies the CIDR range of internal addresses that are
	// reserved for this instance. If not provided, the service will choose an
	// unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must
	// be unique and non-overlapping with existing subnets in an authorized
	// network.
	ReservedIPRange string `json:"reservedIpRange,omitempty"`

	// AuthorizedNetwork specifies the full name of the Google Compute Engine
	// network to which the instance is connected. If left unspecified, the
	// default network will be used.
	AuthorizedNetwork string `json:"authorizedNetwork,omitempty"`

	// RedisVersion specifies the version of Redis software. If not provided,
	// latest supported version will be used. Updating the version will perform
	// an upgrade/downgrade to the new version. Currently, the supported values
	// are REDIS_3_2 for Redis 3.2.
	// +kubebuilder:validation:Enum=REDIS_3_2
	RedisVersion string `json:"redisVersion,omitempty"`

	// RedisConfigs specifies Redis configuration parameters, according to
	// http://redis.io/topics/config. Currently, the only supported parameters
	// are:
	// * maxmemory-policy
	// * notify-keyspace-events
	RedisConfigs map[string]string `json:"redisConfigs,omitempty"`

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

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

CloudMemorystoreInstanceSpec defines the desired state of CloudMemorystoreInstance Most fields map directly to a GCP Instance resource. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance

func NewCloudMemorystoreInstanceSpec

func NewCloudMemorystoreInstanceSpec(properties map[string]string) *CloudMemorystoreInstanceSpec

NewCloudMemorystoreInstanceSpec creates a new CloudMemorystoreInstanceSpec from the given properties map.

func (*CloudMemorystoreInstanceSpec) DeepCopy

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

func (*CloudMemorystoreInstanceSpec) DeepCopyInto

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

type CloudMemorystoreInstanceStatus

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

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

	// CurrentLocationID is the current zone where the Redis endpoint is placed.
	// For Basic Tier instances, this will always be the same as the locationId
	// provided by the user at creation time. For Standard Tier instances, this
	// can be either locationId or alternativeLocationId and can change after a
	// failover event.
	CurrentLocationID string `json:"currentLocationId,omitempty"`

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

	// Port at which the Cloud Memorystore instance endpoint is listening.
	Port int `json:"port,omitempty"`

	// InstanceName of the Cloud Memorystore instance. Does not include the
	// project and location (region) IDs. e.g. 'foo', not
	// 'projects/fooproj/locations/us-foo1/instances/foo'
	InstanceName string `json:"instanceName,omitempty"`
}

CloudMemorystoreInstanceStatus defines the observed state of CloudMemorystoreInstance

func (*CloudMemorystoreInstanceStatus) DeepCopy

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

func (*CloudMemorystoreInstanceStatus) DeepCopyInto

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