Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the redis v1beta1 API group +kubebuilder:object:generate=true +groupName=redis.redis.opstreelabs.in
Index ¶
- Variables
- type AdditionalVolume
- type ExistingPasswordSecret
- type KubernetesConfig
- type Probe
- type Redis
- type RedisCluster
- type RedisClusterList
- type RedisClusterSpec
- type RedisClusterStatus
- type RedisConfig
- type RedisExporter
- type RedisFollower
- type RedisLeader
- type RedisList
- type RedisPodDisruptionBudget
- type RedisSpec
- type RedisStatus
- type ServiceConfig
- type Sidecar
- type Storage
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "redis.redis.opstreelabs.in", 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 )
Functions ¶
This section is empty.
Types ¶
type AdditionalVolume ¶ added in v0.13.0
type AdditionalVolume struct { Volume []corev1.Volume `json:"volume,omitempty"` MountPath []corev1.VolumeMount `json:"mountPath,omitempty"` }
Additional Volume is provided by user that is mounted on the pods
func (*AdditionalVolume) DeepCopy ¶ added in v0.13.0
func (in *AdditionalVolume) DeepCopy() *AdditionalVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalVolume.
func (*AdditionalVolume) DeepCopyInto ¶ added in v0.13.0
func (in *AdditionalVolume) DeepCopyInto(out *AdditionalVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExistingPasswordSecret ¶
type ExistingPasswordSecret struct { Name *string `json:"name,omitempty"` Key *string `json:"key,omitempty"` }
ExistingPasswordSecret is the struct to access the existing secret
func (*ExistingPasswordSecret) DeepCopy ¶
func (in *ExistingPasswordSecret) DeepCopy() *ExistingPasswordSecret
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExistingPasswordSecret.
func (*ExistingPasswordSecret) DeepCopyInto ¶
func (in *ExistingPasswordSecret) DeepCopyInto(out *ExistingPasswordSecret)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesConfig ¶
type KubernetesConfig struct { Image string `json:"image"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` Resources *corev1.ResourceRequirements `json:"resources,omitempty"` ExistingPasswordSecret *ExistingPasswordSecret `json:"redisSecret,omitempty"` ImagePullSecrets *[]corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` UpdateStrategy appsv1.StatefulSetUpdateStrategy `json:"updateStrategy,omitempty"` Service *ServiceConfig `json:"service,omitempty"` }
KubernetesConfig will be the JSON struct for Basic Redis Config
func (*KubernetesConfig) DeepCopy ¶
func (in *KubernetesConfig) DeepCopy() *KubernetesConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesConfig.
func (*KubernetesConfig) DeepCopyInto ¶
func (in *KubernetesConfig) DeepCopyInto(out *KubernetesConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Probe ¶ added in v0.13.0
type Probe struct { // +kubebuilder:validation:Minimum=1 // +kubebuilder:default=1 InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"` // +kubebuilder:validation:Minimum=1 // +kubebuilder:default=1 TimeoutSeconds int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"` // +kubebuilder:validation:Minimum=1 // +kubebuilder:default=10 PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"` // +kubebuilder:validation:Minimum=1 // +kubebuilder:default=1 SuccessThreshold int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"` // +kubebuilder:validation:Minimum=1 // +kubebuilder:default=3 FailureThreshold int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"` }
Probe is a interface for ReadinessProbe and LivenessProbe
func (*Probe) DeepCopy ¶ added in v0.13.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probe.
func (*Probe) DeepCopyInto ¶ added in v0.13.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Redis ¶
type Redis struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RedisSpec `json:"spec"` Status RedisStatus `json:"status,omitempty"` }
Redis is the Schema for the redis API
func (*Redis) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Redis.
func (*Redis) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Redis) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RedisCluster ¶
type RedisCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RedisClusterSpec `json:"spec"` Status RedisClusterStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="ClusterSize",type=integer,JSONPath=`.spec.clusterSize`,description=Current cluster node count +kubebuilder:printcolumn:name="LeaderReplicas",type=integer,JSONPath=`.spec.redisLeader.replicas`,description=Overridden Leader replica count +kubebuilder:printcolumn:name="FollowerReplicas",type=integer,JSONPath=`.spec.redisFollower.replicas`,description=Overridden Follower replica count +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description=Age of Cluster RedisCluster is the Schema for the redisclusters API
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.
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:"clusterSize"` KubernetesConfig KubernetesConfig `json:"kubernetesConfig"` // +kubebuilder:default:=v7 ClusterVersion *string `json:"clusterVersion,omitempty"` // +kubebuilder:default:={livenessProbe:{initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}, readinessProbe:{initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}} RedisLeader RedisLeader `json:"redisLeader,omitempty"` // +kubebuilder:default:={livenessProbe:{initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}, readinessProbe:{initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}} RedisFollower RedisFollower `json:"redisFollower,omitempty"` RedisExporter *RedisExporter `json:"redisExporter,omitempty"` Storage *Storage `json:"storage,omitempty"` SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` PriorityClassName string `json:"priorityClassName,omitempty"` Resources *corev1.ResourceRequirements `json:"resources,omitempty"` TLS *TLSConfig `json:"TLS,omitempty"` Sidecars *[]Sidecar `json:"sidecars,omitempty"` ServiceAccountName *string `json:"serviceAccountName,omitempty"` PersistenceEnabled *bool `json:"persistenceEnabled,omitempty"` }
RedisClusterSpec defines the desired state of RedisCluster
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.
func (*RedisClusterSpec) GetReplicaCounts ¶
func (cr *RedisClusterSpec) GetReplicaCounts(t string) int32
type RedisClusterStatus ¶
type RedisClusterStatus struct { }
RedisClusterStatus defines the observed state of RedisCluster
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.
type RedisConfig ¶
type RedisConfig struct {
AdditionalRedisConfig *string `json:"additionalRedisConfig,omitempty"`
}
RedisConfig defines the external configuration of Redis
func (*RedisConfig) DeepCopy ¶
func (in *RedisConfig) DeepCopy() *RedisConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisConfig.
func (*RedisConfig) DeepCopyInto ¶
func (in *RedisConfig) DeepCopyInto(out *RedisConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisExporter ¶
type RedisExporter struct { Enabled bool `json:"enabled,omitempty"` Image string `json:"image"` Resources *corev1.ResourceRequirements `json:"resources,omitempty"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` EnvVars *[]corev1.EnvVar `json:"env,omitempty"` }
RedisExporter interface will have the information for redis exporter related stuff
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 RedisFollower ¶
type RedisFollower struct { Replicas *int32 `json:"replicas,omitempty"` RedisConfig *RedisConfig `json:"redisConfig,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty"` PodDisruptionBudget *RedisPodDisruptionBudget `json:"pdb,omitempty"` // +kubebuilder:default:={initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3} ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"` // +kubebuilder:default:={initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3} LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"` Tolerations *[]corev1.Toleration `json:"tolerations,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` }
RedisFollower interface will have the redis follower configuration
func (*RedisFollower) DeepCopy ¶
func (in *RedisFollower) DeepCopy() *RedisFollower
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisFollower.
func (*RedisFollower) DeepCopyInto ¶
func (in *RedisFollower) DeepCopyInto(out *RedisFollower)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisLeader ¶
type RedisLeader struct { Replicas *int32 `json:"replicas,omitempty"` RedisConfig *RedisConfig `json:"redisConfig,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty"` PodDisruptionBudget *RedisPodDisruptionBudget `json:"pdb,omitempty"` // +kubebuilder:default:={initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3} ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"` // +kubebuilder:default:={initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3} LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"` Tolerations *[]corev1.Toleration `json:"tolerations,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` }
RedisLeader interface will have the redis leader configuration
func (*RedisLeader) DeepCopy ¶
func (in *RedisLeader) DeepCopy() *RedisLeader
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisLeader.
func (*RedisLeader) DeepCopyInto ¶
func (in *RedisLeader) DeepCopyInto(out *RedisLeader)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisList.
func (*RedisList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RedisList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RedisPodDisruptionBudget ¶
type RedisPodDisruptionBudget struct { Enabled bool `json:"enabled,omitempty"` MinAvailable *int32 `json:"minAvailable,omitempty"` }
RedisPodDisruptionBudget configure a PodDisruptionBudget on the resource (leader/follower)
func (*RedisPodDisruptionBudget) DeepCopy ¶
func (in *RedisPodDisruptionBudget) DeepCopy() *RedisPodDisruptionBudget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisPodDisruptionBudget.
func (*RedisPodDisruptionBudget) DeepCopyInto ¶
func (in *RedisPodDisruptionBudget) DeepCopyInto(out *RedisPodDisruptionBudget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisSpec ¶
type RedisSpec struct { KubernetesConfig KubernetesConfig `json:"kubernetesConfig"` RedisExporter *RedisExporter `json:"redisExporter,omitempty"` RedisConfig *RedisConfig `json:"redisConfig,omitempty"` Storage *Storage `json:"storage,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` PriorityClassName string `json:"priorityClassName,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty"` Tolerations *[]corev1.Toleration `json:"tolerations,omitempty"` TLS *TLSConfig `json:"TLS,omitempty"` // +kubebuilder:default:={initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3} ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"` // +kubebuilder:default:={initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3} LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"` Sidecars *[]Sidecar `json:"sidecars,omitempty"` ServiceAccountName *string `json:"serviceAccountName,omitempty"` }
RedisSpec defines the desired state of Redis
func (*RedisSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSpec.
func (*RedisSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisStatus ¶
type RedisStatus struct { }
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 ServiceConfig ¶ added in v0.13.0
type ServiceConfig struct { // +kubebuilder:validation:Enum=LoadBalancer;NodePort;ClusterIP ServiceType string `json:"serviceType,omitempty"` ServiceAnnotations map[string]string `json:"annotations,omitempty"` }
ServiceConfig define the type of service to be created and its annotations
func (*ServiceConfig) DeepCopy ¶ added in v0.13.0
func (in *ServiceConfig) DeepCopy() *ServiceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceConfig.
func (*ServiceConfig) DeepCopyInto ¶ added in v0.13.0
func (in *ServiceConfig) DeepCopyInto(out *ServiceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Sidecar ¶
type Sidecar struct { Name string `json:"name"` Image string `json:"image"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` Resources *corev1.ResourceRequirements `json:"resources,omitempty"` EnvVars *[]corev1.EnvVar `json:"env,omitempty"` }
Sidecar for each Redis pods
func (*Sidecar) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.
func (*Sidecar) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Storage ¶
type Storage struct { VolumeClaimTemplate corev1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"` VolumeMount AdditionalVolume `json:"volumeMount,omitempty"` }
Storage is the inteface to add pvc and pv support in redis
func (*Storage) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.
func (*Storage) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSConfig ¶
type TLSConfig struct { CaKeyFile string `json:"ca,omitempty"` CertKeyFile string `json:"cert,omitempty"` KeyFile string `json:"key,omitempty"` // Reference to secret which contains the certificates Secret corev1.SecretVolumeSource `json:"secret"` }
TLS Configuration for redis instances
func (*TLSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.
func (*TLSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.