Documentation
¶
Index ¶
- type ACLConfig
- type AdditionalVolume
- type ExistingPasswordSecret
- type InitContainer
- type KubernetesConfig
- func (in *KubernetesConfig) DeepCopy() *KubernetesConfig
- func (in *KubernetesConfig) DeepCopyInto(out *KubernetesConfig)
- func (in *KubernetesConfig) GetHeadlessServiceAnnotations() map[string]string
- func (in *KubernetesConfig) GetServiceAnnotations() map[string]string
- func (in *KubernetesConfig) GetServiceType() string
- func (in *KubernetesConfig) ShouldCreateAdditionalService() bool
- func (in *KubernetesConfig) ShouldIncludeBusPort() bool
- func (in *KubernetesConfig) ShouldIncludeBusPortForAdditional() bool
- func (in *KubernetesConfig) ShouldIncludeBusPortForHeadless() bool
- type RedisConfig
- type RedisExporter
- type RedisFollower
- type RedisLeader
- type RedisPodDisruptionBudget
- type RedisSentinelConfig
- type Service
- type ServiceConfig
- type Sidecar
- type Storage
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLConfig ¶
type ACLConfig struct {
Secret *corev1.SecretVolumeSource `json:"secret,omitempty"`
}
+k8s:deepcopy-gen=true
func (*ACLConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ACLConfig.
func (*ACLConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdditionalVolume ¶
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 +k8s:deepcopy-gen=true
func (*AdditionalVolume) DeepCopy ¶
func (in *AdditionalVolume) DeepCopy() *AdditionalVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalVolume.
func (*AdditionalVolume) DeepCopyInto ¶
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 +k8s:deepcopy-gen=true
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 InitContainer ¶
type InitContainer struct {
Enabled *bool `json:"enabled,omitempty"`
Image string `json:"image"`
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
EnvVars *[]corev1.EnvVar `json:"env,omitempty"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}
InitContainer for each Redis pods +k8s:deepcopy-gen=true
func (*InitContainer) DeepCopy ¶
func (in *InitContainer) DeepCopy() *InitContainer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitContainer.
func (*InitContainer) DeepCopyInto ¶
func (in *InitContainer) DeepCopyInto(out *InitContainer)
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"`
IgnoreAnnotations []string `json:"ignoreAnnotations,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
}
KubernetesConfig will be the JSON struct for Basic Redis Config +k8s:deepcopy-gen=true
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.
func (*KubernetesConfig) GetHeadlessServiceAnnotations ¶
func (in *KubernetesConfig) GetHeadlessServiceAnnotations() map[string]string
func (*KubernetesConfig) GetServiceAnnotations ¶
func (in *KubernetesConfig) GetServiceAnnotations() map[string]string
func (*KubernetesConfig) GetServiceType ¶
func (in *KubernetesConfig) GetServiceType() string
func (*KubernetesConfig) ShouldCreateAdditionalService ¶
func (in *KubernetesConfig) ShouldCreateAdditionalService() bool
ShouldCreateAdditionalService returns whether additional service should be created
func (*KubernetesConfig) ShouldIncludeBusPort ¶
func (in *KubernetesConfig) ShouldIncludeBusPort() bool
ShouldIncludeBusPort returns whether bus port should be included in the service
func (*KubernetesConfig) ShouldIncludeBusPortForAdditional ¶
func (in *KubernetesConfig) ShouldIncludeBusPortForAdditional() bool
ShouldIncludeBusPortForAdditional returns whether bus port should be included in the additional service
func (*KubernetesConfig) ShouldIncludeBusPortForHeadless ¶
func (in *KubernetesConfig) ShouldIncludeBusPortForHeadless() bool
ShouldIncludeBusPortForHeadless returns whether bus port should be included in the headless service
type RedisConfig ¶
type RedisConfig struct {
// MaxMemoryPercentOfLimit is the percentage of redis container memory limit to be used as maxmemory.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=100
MaxMemoryPercentOfLimit *int `json:"maxMemoryPercentOfLimit,omitempty"`
DynamicConfig []string `json:"dynamicConfig,omitempty"`
AdditionalRedisConfig *string `json:"additionalRedisConfig,omitempty"`
}
RedisConfig defines the external configuration of Redis +k8s:deepcopy-gen=true
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"`
// +kubebuilder:default:=9121
Port *int `json:"port,omitempty"`
Image string `json:"image"`
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
EnvVars *[]corev1.EnvVar `json:"env,omitempty"`
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}
RedisExporter interface will have the information for redis exporter related stuff +k8s:deepcopy-gen=true
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"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty" protobuf:"bytes,12,opt,name=livenessProbe"`
Tolerations *[]corev1.Toleration `json:"tolerations,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}
RedisFollower interface will have the redis follower configuration +k8s:deepcopy-gen=true
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"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty" protobuf:"bytes,12,opt,name=livenessProbe"`
Tolerations *[]corev1.Toleration `json:"tolerations,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}
RedisLeader interface will have the redis leader configuration +k8s:deepcopy-gen=true
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 RedisPodDisruptionBudget ¶
type RedisPodDisruptionBudget struct {
Enabled bool `json:"enabled,omitempty"`
MinAvailable *int32 `json:"minAvailable,omitempty"`
}
RedisPodDisruptionBudget configure a PodDisruptionBudget on the resource (leader/follower) +k8s:deepcopy-gen=true
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 RedisSentinelConfig ¶
type RedisSentinelConfig struct {
AdditionalSentinelConfig *string `json:"additionalSentinelConfig,omitempty"`
RedisReplicationName string `json:"redisReplicationName"`
RedisReplicationPassword *corev1.EnvVarSource `json:"redisReplicationPassword,omitempty"`
// +kubebuilder:default:=myMaster
MasterGroupName string `json:"masterGroupName,omitempty"`
// +kubebuilder:default:="6379"
RedisPort string `json:"redisPort,omitempty"`
// +kubebuilder:default:="2"
Quorum string `json:"quorum,omitempty"`
// +kubebuilder:default:="1"
ParallelSyncs string `json:"parallelSyncs,omitempty"`
// +kubebuilder:default:="180000"
FailoverTimeout string `json:"failoverTimeout,omitempty"`
// +kubebuilder:default:="30000"
DownAfterMilliseconds string `json:"downAfterMilliseconds,omitempty"`
// +kubebuilder:default:="no"
ResolveHostnames string `json:"resolveHostnames,omitempty"`
// +kubebuilder:default:="no"
AnnounceHostnames string `json:"announceHostnames,omitempty"`
}
+k8s:deepcopy-gen=true
func (*RedisSentinelConfig) DeepCopy ¶
func (in *RedisSentinelConfig) DeepCopy() *RedisSentinelConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSentinelConfig.
func (*RedisSentinelConfig) DeepCopyInto ¶
func (in *RedisSentinelConfig) DeepCopyInto(out *RedisSentinelConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Service ¶
type Service struct {
// +kubebuilder:validation:Enum=LoadBalancer;NodePort;ClusterIP
// +kubebuilder:default:=ClusterIP
Type string `json:"type,omitempty"`
AdditionalAnnotations map[string]string `json:"additionalAnnotations,omitempty"`
// IncludeBusPort when set to true, it will add bus port to the service, such as 16379.
// This field is only used for Redis cluster mode.
IncludeBusPort *bool `json:"includeBusPort,omitempty"`
// +kubebuilder:default:=true
Enabled *bool `json:"enabled,omitempty"`
}
Service is the struct to define the service type and its annotations +k8s:deepcopy-gen=true
func (*Service) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (*Service) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceConfig ¶
type ServiceConfig struct {
// +kubebuilder:validation:Enum=LoadBalancer;NodePort;ClusterIP
ServiceType string `json:"serviceType,omitempty"`
ServiceAnnotations map[string]string `json:"annotations,omitempty"`
// IncludeBusPort when set to true, it will add bus port to the service, such as 16379.
// This field is only used for Redis cluster mode.
IncludeBusPort *bool `json:"includeBusPort,omitempty"`
// Headless config for which suffix is -headless service
Headless *Service `json:"headless,omitempty"`
// Additional config for which suffix is -additional service
Additional *Service `json:"additional,omitempty"`
}
ServiceConfig define the type of service to be created and its annotations +k8s:deepcopy-gen=true
func (*ServiceConfig) DeepCopy ¶
func (in *ServiceConfig) DeepCopy() *ServiceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceConfig.
func (*ServiceConfig) DeepCopyInto ¶
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"`
Volumes *[]corev1.VolumeMount `json:"mountPath,omitempty"`
Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"`
Ports *[]corev1.ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}
Sidecar for each Redis pods +k8s:deepcopy-gen=true
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 {
KeepAfterDelete bool `json:"keepAfterDelete,omitempty"`
VolumeClaimTemplate corev1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`
VolumeMount AdditionalVolume `json:"volumeMount,omitempty"`
}
Storage is the inteface to add pvc and pv support in redis +k8s:deepcopy-gen=true
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 +k8s:deepcopy-gen=true
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.