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/azure/cache +k8s:defaulter-gen=TypeMeta +groupName=cache.azure.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/azure/apis/azure/cache +k8s:defaulter-gen=TypeMeta +groupName=cache.azure.crossplane.io

Index

Constants

View Source
const (
	SKUNameBasic    = string(redis.Basic)
	SKUNamePremium  = string(redis.Premium)
	SKUNameStandard = string(redis.Standard)

	SKUFamilyC = string(redis.C)
	SKUFamilyP = string(redis.P)
)

SKU options.

View Source
const (
	ProvisioningStateCreating               = string(redis.Creating)
	ProvisioningStateDeleting               = string(redis.Deleting)
	ProvisioningStateDisabled               = string(redis.Disabled)
	ProvisioningStateFailed                 = string(redis.Failed)
	ProvisioningStateLinking                = string(redis.Linking)
	ProvisioningStateProvisioning           = string(redis.Provisioning)
	ProvisioningStateRecoveringScaleFailure = string(redis.RecoveringScaleFailure)
	ProvisioningStateScaling                = string(redis.Scaling)
	ProvisioningStateSucceeded              = string(redis.Succeeded)
	ProvisioningStateUnlinking              = string(redis.Unlinking)
	ProvisioningStateUnprovisioning         = string(redis.Unprovisioning)
	ProvisioningStateUpdating               = string(redis.Updating)
)

Resource states

View Source
const (
	Group               = "cache.azure.crossplane.io"
	Version             = "v1alpha1"
	APIVersion          = Group + "/" + Version
	RedisKind           = "redis"
	RedisKindAPIVersion = RedisKind + "." + APIVersion
)

Kubernetes Group, Version, and Kind metadata.

View Source
const (
	// SupportedRedisVersion is the only minor version of Redis currently
	// supported by Azure Cache for Redis. The version cannot be specified at
	// creation time.
	SupportedRedisVersion = "3.2"
)

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 Redis

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

	Spec   RedisSpec   `json:"spec,omitempty"`
	Status RedisStatus `json:"status,omitempty"`
}

Redis is the Schema for the instances API +k8s:openapi-gen=true +groupName=cache.azure +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=".status.redisVersion" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

func (*Redis) ConnectionSecretName

func (c *Redis) ConnectionSecretName() string

ConnectionSecretName returns a secret name from the reference

func (*Redis) DeepCopy

func (in *Redis) DeepCopy() *Redis

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

func (*Redis) DeepCopyInto

func (in *Redis) DeepCopyInto(out *Redis)

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

func (*Redis) DeepCopyObject

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

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

func (*Redis) IsAvailable

func (c *Redis) IsAvailable() bool

IsAvailable for usage/binding

func (*Redis) IsBound

func (c *Redis) IsBound() bool

IsBound determines if the resource is in a bound binding state

func (*Redis) ObjectReference

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

ObjectReference to this Redis instance

func (*Redis) OwnerReference

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

OwnerReference to use this instance as an owner

func (*Redis) SetBound

func (c *Redis) SetBound(state bool)

SetBound sets the binding state of this resource

type RedisList

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

RedisList contains a list of Redis

func (*RedisList) DeepCopy

func (in *RedisList) DeepCopy() *RedisList

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

func (*RedisList) DeepCopyInto

func (in *RedisList) DeepCopyInto(out *RedisList)

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

func (*RedisList) DeepCopyObject

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

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

type RedisSpec

type RedisSpec struct {
	// ResourceGroupName in which to create this resource.
	ResourceGroupName string `json:"resourceGroupName"`

	// Location in which to create this resource.
	Location string `json:"location"`

	// SKU of the Redis cache to deploy.
	SKU SKUSpec `json:"sku"`

	// EnableNonSSLPort specifies whether the non-ssl Redis server port (6379)
	// is enabled.
	EnableNonSSLPort bool `json:"enableNonSslPort,omitempty"`

	// ShardCount specifies the number of shards to be created on a Premium
	// Cluster Cache.
	ShardCount int `json:"shardCount,omitempty"`

	// StaticIP address. Required when deploying a Redis cache inside an
	// existing Azure Virtual Network.
	StaticIP string `json:"staticIP,omitempty"`

	// SubnetID specifies the full resource ID of a subnet in a virtual network
	// to deploy the Redis cache in. Example format:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
	SubnetID string `json:"subnetId,omitempty"`

	// RedisConfiguration specifies Redis Settings.
	RedisConfiguration map[string]string `json:"redisConfiguration,omitempty"`

	// 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"`
}

RedisSpec defines the desired state of Redis Most fields map directly to an Azure Redis resource. https://docs.microsoft.com/en-us/rest/api/redis/redis/get#redisresource

func NewRedisSpec

func NewRedisSpec(properties map[string]string) *RedisSpec

NewRedisSpec creates a new RedisSpec from the given properties map.

func (*RedisSpec) DeepCopy

func (in *RedisSpec) DeepCopy() *RedisSpec

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

func (*RedisSpec) DeepCopyInto

func (in *RedisSpec) DeepCopyInto(out *RedisSpec)

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

type RedisStatus

type RedisStatus 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"`

	// Endpoint of the Redis resource used in connection strings.
	Endpoint string `json:"endpoint,omitempty"`

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

	// SSLPort at which the Redis endpoint is listening.
	SSLPort int `json:"sslPort,omitempty"`

	// RedisVersion the Redis endpoint is running.
	RedisVersion string `json:"redisVersion,omitempty"`

	// ResourceName of the Redis cache resource.
	ResourceName string `json:"resourceName,omitempty"`
}

RedisStatus defines the observed state of Redis

func (*RedisStatus) DeepCopy

func (in *RedisStatus) DeepCopy() *RedisStatus

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

func (*RedisStatus) DeepCopyInto

func (in *RedisStatus) DeepCopyInto(out *RedisStatus)

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

type SKUSpec

type SKUSpec struct {
	// Name specifies what type of Redis cache to deploy. Valid values: (Basic,
	// Standard, Premium). Possible values include: 'Basic', 'Standard',
	// 'Premium'
	// +kubebuilder:validation:Enum=Basic,Standard,Premium
	Name string `json:"name"`

	// Family specifies which family to use. Valid values: (C, P). Possible
	// values include: 'C', 'P'
	// +kubebuilder:validation:Enum=C,P
	Family string `json:"family"`

	// Capacity specifies the size of Redis cache to deploy. Valid values: for C
	// family (0, 1, 2, 3, 4, 5, 6), for P family (1, 2, 3, 4).
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=6
	Capacity int `json:"capacity"`
}

SKUSpec represents the performance and cost oriented properties of the server

func (*SKUSpec) DeepCopy

func (in *SKUSpec) DeepCopy() *SKUSpec

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

func (*SKUSpec) DeepCopyInto

func (in *SKUSpec) DeepCopyInto(out *SKUSpec)

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