v1beta1

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Overview

Package v1beta1 contains API Schema definitions for the redis v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=redis.kun

Package v1beta1 contains API Schema definitions for the redis v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=redis.kun

Index

Constants

View Source
const (
	OperatorName      = "redis-operator"
	LabelManagedByKey = "app.kubernetes.io/managed-by"
	LabelNameKey      = "redis.kun/v1beta1"
)
View Source
const (
	ClusterConditionAvailable   ConditionType = "Available"
	ClusterConditionHealthy     ConditionType = "Healthy"
	ClusterConditionRunning                   = "Running"
	ClusterConditionCreating                  = "Creating"
	ClusterConditionRecovering                = "Recovering"
	ClusterConditionScaling                   = "Scaling"
	ClusterConditionScalingDown               = "ScalingDown"
	ClusterConditionUpgrading                 = "Upgrading"
	ClusterConditionUpdating                  = "Updating"
	ClusterConditionFailed                    = "Failed"
)
View Source
const (
	Kind = "RedisCluster"
)

Variables

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

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

Functions

func VersionKind

func VersionKind(kind string) schema.GroupVersionKind

VersionKind takes an unqualified kind and returns back a Group qualified GroupVersionKind

Types

type Condition

type Condition struct {
	// Status of cluster condition.
	Type ConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime string    `json:"lastUpdateTime,omitempty"`
	LastUpdateAt   time.Time `json:"-"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

Condition saves the state information of the redis cluster

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConditionType

type ConditionType string

ConditionType defines the condition that the RF can have

type Phase

type Phase string

Phase of the RF status

type RedisCluster

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

	Spec   RedisClusterSpec   `json:"spec,omitempty"`
	Status RedisClusterStatus `json:"status,omitempty"`
}

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

func (*RedisCluster) DeepCopy

func (in *RedisCluster) DeepCopy() *RedisCluster

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

func (*RedisCluster) DeepCopyInto

func (in *RedisCluster) DeepCopyInto(out *RedisCluster)

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

func (*RedisCluster) DeepCopyObject

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

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

func (*RedisCluster) Validate

func (r *RedisCluster) Validate() error

Validate set the values by default if not defined and checks if the values given are valid

type RedisClusterList

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

RedisClusterList contains a list of RedisCluster

func (*RedisClusterList) DeepCopy

func (in *RedisClusterList) DeepCopy() *RedisClusterList

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

func (*RedisClusterList) DeepCopyInto

func (in *RedisClusterList) DeepCopyInto(out *RedisClusterList)

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

func (*RedisClusterList) DeepCopyObject

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

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

type RedisClusterSpec

type RedisClusterSpec struct {
	Size               int32                       `json:"size,omitempty"`
	Resources          corev1.ResourceRequirements `json:"resources,omitempty"`
	Image              string                      `json:"image,omitempty"`
	Command            []string                    `json:"command,omitempty"`
	ShutdownConfigMap  string                      `json:"shutdownConfigMap,omitempty"`
	Storage            RedisStorage                `json:"storage,omitempty"`
	Password           string                      `json:"password,omitempty"`
	Exporter           RedisExporter               `json:"exporter,omitempty"`
	Affinity           *corev1.Affinity            `json:"affinity,omitempty"`
	SecurityContext    *corev1.PodSecurityContext  `json:"securityContext,omitempty"`
	ToleRations        []corev1.Toleration         `json:"toleRations,omitempty"`
	Config             map[string]string           `json:"config,omitempty"`
	Annotations        map[string]string           `json:"annotations,omitempty"`
	DisablePersistence bool                        `json:"disablePersistence,omitempty"`

	// Sentinel defines its cluster settings
	Sentinel SentinelSettings `json:"sentinel,omitempty"`
}

RedisClusterSpec defines the desired state of RedisCluster +k8s:openapi-gen=true

func (*RedisClusterSpec) DeepCopy

func (in *RedisClusterSpec) DeepCopy() *RedisClusterSpec

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

func (*RedisClusterSpec) DeepCopyInto

func (in *RedisClusterSpec) DeepCopyInto(out *RedisClusterSpec)

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

type RedisClusterStatus

type RedisClusterStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
	// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
	Conditions []Condition `json:"conditions,omitempty"`
	MasterIP   string      `json:"masterIP,omitempty"`
	SentinelIP string      `json:"sentinelIP,omitempty"`
}

RedisClusterStatus defines the observed state of RedisCluster +k8s:openapi-gen=true

func (*RedisClusterStatus) ClearCondition

func (cs *RedisClusterStatus) ClearCondition(t ConditionType)

func (*RedisClusterStatus) DeepCopy

func (in *RedisClusterStatus) DeepCopy() *RedisClusterStatus

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

func (*RedisClusterStatus) DeepCopyInto

func (in *RedisClusterStatus) DeepCopyInto(out *RedisClusterStatus)

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

func (*RedisClusterStatus) DescConditionsByTime

func (cs *RedisClusterStatus) DescConditionsByTime()

func (*RedisClusterStatus) SetCreateCondition

func (cs *RedisClusterStatus) SetCreateCondition(message string)

func (*RedisClusterStatus) SetFailedCondition

func (cs *RedisClusterStatus) SetFailedCondition(message string)

func (*RedisClusterStatus) SetReadyCondition

func (cs *RedisClusterStatus) SetReadyCondition(message string)

func (*RedisClusterStatus) SetScalingDownCondition

func (cs *RedisClusterStatus) SetScalingDownCondition(message string)

func (*RedisClusterStatus) SetScalingUpCondition

func (cs *RedisClusterStatus) SetScalingUpCondition(message string)

func (*RedisClusterStatus) SetUpdatingCondition

func (cs *RedisClusterStatus) SetUpdatingCondition(message string)

func (*RedisClusterStatus) SetUpgradingCondition

func (cs *RedisClusterStatus) SetUpgradingCondition(message string)

type RedisExporter

type RedisExporter struct {
	Enabled bool   `json:"enabled,omitempty"`
	Image   string `json:"image,omitempty"`
}

RedisExporter defines the specification for the redis exporter

func (*RedisExporter) DeepCopy

func (in *RedisExporter) DeepCopy() *RedisExporter

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

func (*RedisExporter) DeepCopyInto

func (in *RedisExporter) DeepCopyInto(out *RedisExporter)

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

type RedisStorage

type RedisStorage struct {
	KeepAfterDeletion     bool                          `json:"keepAfterDeletion,omitempty"`
	EmptyDir              *corev1.EmptyDirVolumeSource  `json:"emptyDir,omitempty"`
	PersistentVolumeClaim *corev1.PersistentVolumeClaim `json:"persistentVolumeClaim,omitempty"`
}

RedisStorage defines the structure used to store the Redis Data

func (*RedisStorage) DeepCopy

func (in *RedisStorage) DeepCopy() *RedisStorage

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

func (*RedisStorage) DeepCopyInto

func (in *RedisStorage) DeepCopyInto(out *RedisStorage)

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

type SentinelSettings

type SentinelSettings struct {
	Image           string                      `json:"image,omitempty"`
	Replicas        int32                       `json:"replicas,omitempty"`
	Resources       corev1.ResourceRequirements `json:"resources,omitempty"`
	CustomConfig    []string                    `json:"customConfig,omitempty"`
	Command         []string                    `json:"command,omitempty"`
	Affinity        *corev1.Affinity            `json:"affinity,omitempty"`
	SecurityContext *corev1.PodSecurityContext  `json:"securityContext,omitempty"`
	ToleRations     []corev1.Toleration         `json:"tolerations,omitempty"`
}

SentinelSettings defines the specification of the sentinel cluster

func (*SentinelSettings) DeepCopy

func (in *SentinelSettings) DeepCopy() *SentinelSettings

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

func (*SentinelSettings) DeepCopyInto

func (in *SentinelSettings) DeepCopyInto(out *SentinelSettings)

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