Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the redis.kun v1alpha1 API group +kubebuilder:object:generate=true +groupName=redis.kun
Index ¶
- Constants
- Variables
- func DefaultOwnerReferences(cluster *DistributedRedisCluster) []metav1.OwnerReference
- type AclStatus
- type AgentSpec
- type BackupPhase
- type BackupSourceSpec
- type ClusterStatus
- type DistributedRedisCluster
- func (in *DistributedRedisCluster) DeepCopy() *DistributedRedisCluster
- func (in *DistributedRedisCluster) DeepCopyInto(out *DistributedRedisCluster)
- func (in *DistributedRedisCluster) DeepCopyObject() runtime.Object
- func (r *DistributedRedisCluster) Default()
- func (in *DistributedRedisCluster) DefaultSpec(log logr.Logger) bool
- func (in *DistributedRedisCluster) IsRestoreFromBackup() bool
- func (in *DistributedRedisCluster) IsRestoreRestarting() bool
- func (in *DistributedRedisCluster) IsRestoreRunning() bool
- func (in *DistributedRedisCluster) IsRestored() bool
- func (r *DistributedRedisCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (in *DistributedRedisCluster) ShouldInitRestorePhase() bool
- func (r *DistributedRedisCluster) ValidateCreate() (admission.Warnings, error)
- func (r *DistributedRedisCluster) ValidateDelete() (admission.Warnings, error)
- func (r *DistributedRedisCluster) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type DistributedRedisClusterList
- type DistributedRedisClusterSpec
- type DistributedRedisClusterStatus
- type HAspec
- type HaStatus
- type NodesPlacementInfo
- type PodSpec
- type PrometheusSpec
- type RedisClusterBackup
- func (in *RedisClusterBackup) DeepCopy() *RedisClusterBackup
- func (in *RedisClusterBackup) DeepCopyInto(out *RedisClusterBackup)
- func (in *RedisClusterBackup) DeepCopyObject() runtime.Object
- func (in *RedisClusterBackup) JobName() string
- func (in *RedisClusterBackup) RCloneSecretName() string
- func (in *RedisClusterBackup) Validate() error
- type RedisClusterBackupList
- type RedisClusterBackupSpec
- type RedisClusterBackupStatus
- type RedisClusterNode
- type RedisRole
- type RedisStatus
- type RedisStorage
- type Restore
- type RestorePhase
- type RestoreSpec
- type StorageType
- type UtilSpec
Constants ¶
const ( OperatorName = "redis-cluster-operator" LabelManagedByKey = "managed-by" LabelNameKey = "distributed-redis-cluster" StatefulSetLabel = "statefulSet" ShardLabel = "shard" PasswordENV = "REDIS_PASSWORD" RedisRoleLabelKey = "role" )
const ( DatabaseNamePrefix = "redis" GenericKey = "redis.kun" LabelClusterName = GenericKey + "/name" BackupKey = ResourceSingularBackup + "." + GenericKey LabelBackupStatus = BackupKey + "/status" AnnotationJobType = GenericKey + "/job-type" JobTypeBackup = "backup" JobTypeRestore = "restore" PrometheusExporterPortNumber = 9100 PrometheusExporterTelemetryPath = "/metrics" BackupDumpDir = "/data" UtilVolumeName = "util-volume" )
const ( DistributedRedisClusterKind = "DistributedRedisCluster" RedisClusterBackupKind = "RedisClusterBackup" )
const (
PodEvictAnnotation string = "cluster-autoscaler.kubernetes.io/safe-to-evict"
)
const (
ResourceSingularBackup = "backup"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "redis.kun", Version: "v1alpha1"} // 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 ¶
func DefaultOwnerReferences ¶
func DefaultOwnerReferences(cluster *DistributedRedisCluster) []metav1.OwnerReference
Types ¶
type AgentSpec ¶
type AgentSpec struct {
Name string `json:"name,omitempty"`
Image string `json:"image,omitempty"`
Prometheus *PrometheusSpec `json:"prometheus,omitempty"`
Command []string `json:"command,omitempty"`
// Arguments to the entrypoint.
// The docker image's CMD is used if this is not provided.
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
// Cannot be updated.
// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
// +optional
Args []string `json:"args,omitempty"`
// List of environment variables to set in the container.
// Cannot be updated.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge
Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// Compute Resources required by exporter container.
// Cannot be updated.
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// Security options the pod should run with.
// More info: https://kubernetes.io/docs/concepts/policy/security-context/
// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
// +optional
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}
func (*AgentSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSpec.
func (*AgentSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupPhase ¶
type BackupPhase string
const ( // used for Backup that are getting initiated BackupPhaseStarting BackupPhase = "Initiating" // used for Backup that are currently running BackupPhaseRunning BackupPhase = "Running" // used for Backup that are Succeeded BackupPhaseSucceeded BackupPhase = "Succeeded" // used for Backup that are Failed BackupPhaseFailed BackupPhase = "Failed" // used for Backup that are Ignored BackupPhaseIgnored BackupPhase = "Ignored" )
type BackupSourceSpec ¶
type BackupSourceSpec struct {
Namespace string `json:"namespace"`
Name string `json:"name"`
// Arguments to the restore job
Args []string `json:"args,omitempty"`
}
func (*BackupSourceSpec) DeepCopy ¶
func (in *BackupSourceSpec) DeepCopy() *BackupSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSourceSpec.
func (*BackupSourceSpec) DeepCopyInto ¶
func (in *BackupSourceSpec) DeepCopyInto(out *BackupSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterStatus ¶
type ClusterStatus string
ClusterStatus Redis Cluster status
const ( // ClusterStatusOK ClusterStatus OK ClusterStatusOK ClusterStatus = "Healthy" ClusterStatusNOK ClusterStatus = "NotHealthy" // ClusterStatusKO ClusterStatus KO ClusterStatusKO ClusterStatus = "Failed" // ClusterStatusCreating ClusterStatus Creating ClusterStatusCreating = "Creating" // ClusterStatusScaling ClusterStatus Scaling ClusterStatusScaling ClusterStatus = "Scaling" // ClusterStatusCalculatingRebalancing ClusterStatus Rebalancing ClusterStatusCalculatingRebalancing ClusterStatus = "Calculating Rebalancing" // ClusterStatusRebalancing ClusterStatus Rebalancing ClusterStatusRebalancing ClusterStatus = "Rebalancing" // ClusterStatusRollingUpdate ClusterStatus RollingUpdate ClusterStatusRollingUpdate ClusterStatus = "RollingUpdate" // ClusterStatusOnDelete ClusterStatus OnDelete ClusterStatusOnDelete ClusterStatus = "OnDelete" // ClusterStatusResetPassword ClusterStatus ResetPassword ClusterStatusResetPassword ClusterStatus = "ResetPassword" )
type DistributedRedisCluster ¶
type DistributedRedisCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DistributedRedisClusterSpec `json:"spec,omitempty"`
Status DistributedRedisClusterStatus `json:"status,omitempty"`
}
DistributedRedisCluster is the Schema for the distributedredisclusters API
func (*DistributedRedisCluster) DeepCopy ¶
func (in *DistributedRedisCluster) DeepCopy() *DistributedRedisCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributedRedisCluster.
func (*DistributedRedisCluster) DeepCopyInto ¶
func (in *DistributedRedisCluster) DeepCopyInto(out *DistributedRedisCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DistributedRedisCluster) DeepCopyObject ¶
func (in *DistributedRedisCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DistributedRedisCluster) Default ¶
func (r *DistributedRedisCluster) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*DistributedRedisCluster) DefaultSpec ¶
func (in *DistributedRedisCluster) DefaultSpec(log logr.Logger) bool
func (*DistributedRedisCluster) IsRestoreFromBackup ¶
func (in *DistributedRedisCluster) IsRestoreFromBackup() bool
func (*DistributedRedisCluster) IsRestoreRestarting ¶
func (in *DistributedRedisCluster) IsRestoreRestarting() bool
func (*DistributedRedisCluster) IsRestoreRunning ¶
func (in *DistributedRedisCluster) IsRestoreRunning() bool
func (*DistributedRedisCluster) IsRestored ¶
func (in *DistributedRedisCluster) IsRestored() bool
func (*DistributedRedisCluster) SetupWebhookWithManager ¶
func (r *DistributedRedisCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*DistributedRedisCluster) ShouldInitRestorePhase ¶
func (in *DistributedRedisCluster) ShouldInitRestorePhase() bool
func (*DistributedRedisCluster) ValidateCreate ¶
func (r *DistributedRedisCluster) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*DistributedRedisCluster) ValidateDelete ¶
func (r *DistributedRedisCluster) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*DistributedRedisCluster) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type DistributedRedisClusterList ¶
type DistributedRedisClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DistributedRedisCluster `json:"items"`
}
DistributedRedisClusterList contains a list of DistributedRedisCluster
func (*DistributedRedisClusterList) DeepCopy ¶
func (in *DistributedRedisClusterList) DeepCopy() *DistributedRedisClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributedRedisClusterList.
func (*DistributedRedisClusterList) DeepCopyInto ¶
func (in *DistributedRedisClusterList) DeepCopyInto(out *DistributedRedisClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DistributedRedisClusterList) DeepCopyObject ¶
func (in *DistributedRedisClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DistributedRedisClusterSpec ¶
type DistributedRedisClusterSpec struct {
// Foo is an example field of DistributedRedisCluster. Edit distributedrediscluster_types.go to remove/update
InitContainers []corev1.Container `json:"initContainers,omitempty"`
Image string `json:"image,omitempty"`
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
Command []string `json:"command,omitempty"`
Env []corev1.EnvVar `json:"env,omitempty"`
MasterSize int32 `json:"masterSize,omitempty"`
ClusterReplicas int32 `json:"clusterReplicas,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
Config map[string]string `json:"config,omitempty"`
// Set RequiredAntiAffinity to force the master-slave node anti-affinity.
HaConfig *HAspec `json:"haConfig,omitempty"`
RequiredAntiAffinity bool `json:"requiredAntiAffinity,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
ToleRations []corev1.Toleration `json:"toleRations,omitempty"`
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
Storage *RedisStorage `json:"storage,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
AdminSecret *corev1.LocalObjectReference `json:"adminUser,omitempty"`
DefaultSecret *corev1.LocalObjectReference `json:"defaultUser,omitempty"`
AdditionalSecret []corev1.LocalObjectReference `json:"additionalUsers,omitempty"`
UtilConfig string `json:"utilConfig"`
Monitor *[]AgentSpec `json:"monitor,omitempty"`
Restore *RestoreSpec `json:"restoreContainer,omitempty"`
TerminationGracePeriod *int64 `json:"terminationGracePeriod,omitempty"`
CustomLivenessProbe corev1.Probe `json:"customLivenessProbe"`
CustomReadinessProbe corev1.Probe `json:"customReadinessProbe"`
CustomStartupProbe corev1.Probe `json:"customStartupProbe"`
PdbEnabled bool `json:"pdbEnabled"`
}
DistributedRedisClusterSpec defines the desired state of DistributedRedisCluster
func (*DistributedRedisClusterSpec) DeepCopy ¶
func (in *DistributedRedisClusterSpec) DeepCopy() *DistributedRedisClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributedRedisClusterSpec.
func (*DistributedRedisClusterSpec) DeepCopyInto ¶
func (in *DistributedRedisClusterSpec) DeepCopyInto(out *DistributedRedisClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributedRedisClusterStatus ¶
type DistributedRedisClusterStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
Status ClusterStatus `json:"status"`
HAStatus HaStatus `json:"haStatus"`
SecretStatus string `json:"secretstatus"`
SecretsVer map[string]string `json:"secretverisons"`
Reason string `json:"reason,omitempty"`
NumberOfMaster int32 `json:"numberOfMaster,omitempty"`
MinReplicationFactor int32 `json:"minReplicationFactor,omitempty"`
MaxReplicationFactor int32 `json:"maxReplicationFactor,omitempty"`
Nodes []RedisClusterNode `json:"nodes"`
// +optional
Restore Restore `json:"restore,omitempty"`
}
DistributedRedisClusterStatus defines the observed state of DistributedRedisCluster
func (*DistributedRedisClusterStatus) DeepCopy ¶
func (in *DistributedRedisClusterStatus) DeepCopy() *DistributedRedisClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributedRedisClusterStatus.
func (*DistributedRedisClusterStatus) DeepCopyInto ¶
func (in *DistributedRedisClusterStatus) DeepCopyInto(out *DistributedRedisClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HAspec ¶
type HAspec struct {
HaEnabled bool `json:"haEnabled"`
ZonesInfo map[string]string `json:"zonesInfo"`
}
func (*HAspec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HAspec.
func (*HAspec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodesPlacementInfo ¶
type NodesPlacementInfo string
NodesPlacementInfo Redis Nodes placement mode information
const ( // NodesPlacementInfoBestEffort the cluster nodes placement is in best effort, // it means you can have 2 masters (or more) on the same VM. NodesPlacementInfoBestEffort NodesPlacementInfo = "BestEffort" // NodesPlacementInfoOptimal the cluster nodes placement is optimal, // it means on master by VM NodesPlacementInfoOptimal NodesPlacementInfo = "Optimal" )
type PodSpec ¶
type PodSpec struct {
// ServiceAccountName is the name of the ServiceAccount to use to run this pod.
// More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// Arguments to the entrypoint.
// The docker image's CMD is used if this is not provided.
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
// Cannot be updated.
// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
// +optional
Args []string `json:"args,omitempty"`
// NodeSelector is a selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// Compute Resources required by the sidecar container.
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// If specified, the pod's scheduling constraints
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// If specified, the pod will be dispatched by specified scheduler.
// If not specified, the pod will be dispatched by default scheduler.
// +optional
SchedulerName string `json:"schedulerName,omitempty"`
// If specified, the pod's tolerations.
// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
// If specified, these secrets will be passed to individual puller implementations for them to use.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// List of environment variables to set in the container.
// Cannot be updated.
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`
// List of initialization containers belonging to the pod.
// Init containers are executed in order prior to containers being started. If any
// init container fails, the pod is considered to have failed and is handled according
// to its restartPolicy. The name for an init container or normal container must be
// unique among all containers.
// Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes.
// The resourceRequirements of an init container are taken into account during scheduling
// by finding the highest request/limit for each resource type, and then using the max of
// of that value or the sum of the normal containers. Limits are applied to init containers
// in a similar fashion.
// Init containers cannot currently be added or removed.
// Cannot be updated.
// More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
// +patchMergeKey=name
// +patchStrategy=merge
InitContainers []corev1.Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// If specified, indicates the pod's priority. "system-node-critical" and
// "system-cluster-critical" are two special keywords which indicate the
// highest priorities with the former being the highest priority. Any other
// name must be defined by creating a PriorityClass object with that name.
// If not specified, the pod priority will be default or zero if there is no
// default.
// +optional
PriorityClassName string `json:"priorityClassName,omitempty"`
// The priority value. Various system components use this field to find the
// priority of the pod. When Priority Admission Controller is enabled, it
// prevents users from setting this field. The admission controller populates
// this field from PriorityClassName.
// The higher the value, the higher the priority.
// +optional
Priority *int32 `json:"priority,omitempty"`
// SecurityContext holds pod-level security attributes and common container settings.
// Optional: Defaults to empty. See type description for default values of each field.
// +optional
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
// Periodic probe of container liveness.
// Container will be restarted if the probe fails.
// Controllers may set default LivenessProbe if no liveness probe is provided.
// To ignore defaulting, set the value to empty LivenessProbe "{}".
// Cannot be updated.
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
// +optional
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
// Periodic probe of container service readiness.
// Container will be removed from service endpoints if the probe fails.
// Cannot be updated.
// Controllers may set default ReadinessProbe if no readyness probe is provided.
// To ignore defaulting, set the value to empty ReadynessProbe "{}".
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
// +optional
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
// Actions that the management system should take in response to container lifecycle events.
// Cannot be updated.
// +optional
Lifecycle *corev1.Lifecycle `json:"lifecycle,omitempty"`
}
func (*PodSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.
func (*PodSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusSpec ¶
type PrometheusSpec struct {
// Port number for the exporter side car.
Port int32 `json:"port,omitempty"`
// Metrics name for the exporter side car
Name string `json:"name,omitempty"`
// Namespace of Prometheus. Service monitors will be created in this namespace.
Namespace string `json:"namespace,omitempty"`
// Labels are key value pairs that is used to select Prometheus instance via ServiceMonitor labels.
// +optional
Labels map[string]string `json:"labels,omitempty"`
// Interval at which metrics should be scraped
Interval string `json:"interval,omitempty"`
}
func (*PrometheusSpec) DeepCopy ¶
func (in *PrometheusSpec) DeepCopy() *PrometheusSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusSpec.
func (*PrometheusSpec) DeepCopyInto ¶
func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisClusterBackup ¶
type RedisClusterBackup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec RedisClusterBackupSpec `json:"spec,omitempty"`
Status RedisClusterBackupStatus `json:"status,omitempty"`
}
RedisClusterBackup is the Schema for the redisclusterbackups API
func (*RedisClusterBackup) DeepCopy ¶
func (in *RedisClusterBackup) DeepCopy() *RedisClusterBackup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisClusterBackup.
func (*RedisClusterBackup) DeepCopyInto ¶
func (in *RedisClusterBackup) DeepCopyInto(out *RedisClusterBackup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RedisClusterBackup) DeepCopyObject ¶
func (in *RedisClusterBackup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RedisClusterBackup) JobName ¶
func (in *RedisClusterBackup) JobName() string
func (*RedisClusterBackup) RCloneSecretName ¶
func (in *RedisClusterBackup) RCloneSecretName() string
func (*RedisClusterBackup) Validate ¶
func (in *RedisClusterBackup) Validate() error
type RedisClusterBackupList ¶
type RedisClusterBackupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RedisClusterBackup `json:"items"`
}
RedisClusterBackupList contains a list of RedisClusterBackup
func (*RedisClusterBackupList) DeepCopy ¶
func (in *RedisClusterBackupList) DeepCopy() *RedisClusterBackupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisClusterBackupList.
func (*RedisClusterBackupList) DeepCopyInto ¶
func (in *RedisClusterBackupList) DeepCopyInto(out *RedisClusterBackupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RedisClusterBackupList) DeepCopyObject ¶
func (in *RedisClusterBackupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RedisClusterBackupSpec ¶
type RedisClusterBackupSpec struct {
// Foo is an example field of RedisClusterBackup. Edit redisclusterbackup_types.go to remove/update
RedisClusterName string `json:"redisClusterName"`
UtilSpec *UtilSpec `json:"utilSpec"`
SecurityContext *corev1.PodSecurityContext `json:"securityContext"`
}
RedisClusterBackupSpec defines the desired state of RedisClusterBackup
func (*RedisClusterBackupSpec) DeepCopy ¶
func (in *RedisClusterBackupSpec) DeepCopy() *RedisClusterBackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisClusterBackupSpec.
func (*RedisClusterBackupSpec) DeepCopyInto ¶
func (in *RedisClusterBackupSpec) DeepCopyInto(out *RedisClusterBackupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisClusterBackupStatus ¶
type RedisClusterBackupStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
StartTime *metav1.Time `json:"startTime,omitempty"`
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
Phase BackupPhase `json:"phase,omitempty"`
Reason string `json:"reason,omitempty"`
MasterSize int32 `json:"masterSize,omitempty"`
ClusterReplicas int32 `json:"clusterReplicas,omitempty"`
ClusterImage string `json:"clusterImage,omitempty"`
}
RedisClusterBackupStatus defines the observed state of RedisClusterBackup
func (*RedisClusterBackupStatus) DeepCopy ¶
func (in *RedisClusterBackupStatus) DeepCopy() *RedisClusterBackupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisClusterBackupStatus.
func (*RedisClusterBackupStatus) DeepCopyInto ¶
func (in *RedisClusterBackupStatus) DeepCopyInto(out *RedisClusterBackupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisClusterNode ¶
type RedisClusterNode struct {
ID string `json:"id"`
Role RedisRole `json:"role"`
IP string `json:"ip"`
Port string `json:"port"`
Slots []string `json:"slots,omitempty"`
MasterRef string `json:"masterRef,omitempty"`
PodName string `json:"podName"`
NodeName string `json:"nodeName"`
Zonename string `json:"zonename"`
StatefulSet string `json:"statefulSet"`
}
RedisClusterNode represent a RedisCluster Node
func (*RedisClusterNode) DeepCopy ¶
func (in *RedisClusterNode) DeepCopy() *RedisClusterNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisClusterNode.
func (*RedisClusterNode) DeepCopyInto ¶
func (in *RedisClusterNode) DeepCopyInto(out *RedisClusterNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisRole ¶
type RedisRole string
RedisRole RedisCluster Node Role type
const ( // RedisClusterNodeRoleMaster RedisCluster Master node role RedisClusterNodeRoleMaster RedisRole = "Master" // RedisClusterNodeRoleSlave RedisCluster Master node role RedisClusterNodeRoleSlave RedisRole = "Slave" // RedisClusterNodeRoleNone None node role RedisClusterNodeRoleNone RedisRole = "None" )
type RedisStatus ¶
type RedisStatus string
Redis Status Redis server status
const ( // RedisSyncing Redis server syncing in in progress with master RedisSyncing RedisStatus = "master_sync_in_progress:1" RedisMasterSillPending RedisStatus = "master_host:127.0.0.1" RedisLinkUp RedisStatus = "master_link_status:up" )
type RedisStorage ¶
type RedisStorage struct {
Size resource.Quantity `json:"size"`
Type StorageType `json:"type"`
Class string `json:"class"`
DeleteClaim bool `json:"deleteClaim,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 Restore ¶
type Restore struct {
Phase RestorePhase `json:"phase,omitempty"`
}
func (*Restore) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restore.
func (*Restore) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestorePhase ¶
type RestorePhase string
const ( // RestorePhaseRunning used for Restore that are currently running. RestorePhaseRunning RestorePhase = "Running" // RestorePhaseRestart used for Restore that are restart master nodes. RestorePhaseRestart RestorePhase = "Restart" // RestorePhaseSucceeded used for Restore that are Succeeded. RestorePhaseSucceeded RestorePhase = "Succeeded" )
type RestoreSpec ¶
type RestoreSpec struct {
BackupSource *BackupSourceSpec `json:"backupSource,omitempty"`
}
func (*RestoreSpec) DeepCopy ¶
func (in *RestoreSpec) DeepCopy() *RestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreSpec.
func (*RestoreSpec) DeepCopyInto ¶
func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageType ¶
type StorageType string
const ( PersistentClaim StorageType = "persistent-claim" Ephemeral StorageType = "ephemeral" )
type UtilSpec ¶
type UtilSpec struct {
Image string `json:"image"`
StartUpCommand string `json:"startupCommand,omitempty"`
S3Bucket string `json:"s3Bucket"`
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
Replicas int32 `json:"replicas"`
TerminationGracePeriod *int64 `json:"terminationGracePeriod"`
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext"`
}
func (*UtilSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UtilSpec.
func (*UtilSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.