diff --git a/api/status/redis-standalone_status.go b/api/status/redis-standalone_status.go index 934e437d5..5fca6acab 100644 --- a/api/status/redis-standalone_status.go +++ b/api/status/redis-standalone_status.go @@ -7,8 +7,8 @@ const ( InitializingStandaloneReason string = "RedisStandalone is initializing" BootstrapStandaloneReason string = "RedisStandalone is bootstrapping" ) - -// Status Field of the Redis Standalone + +// Status Field of the Redis Standalone const ( RedisStandaloneReady RedisStandaloneState = "Ready" RedisStandaloneInitializing RedisStandaloneState = "Initializing" diff --git a/api/v1beta2/redis_types.go b/api/v1beta2/redis_types.go index 34bddf4e0..33d06dd1a 100644 --- a/api/v1beta2/redis_types.go +++ b/api/v1beta2/redis_types.go @@ -24,7 +24,7 @@ import ( // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - + // RedisSpec defines the desired state of Redis type RedisSpec struct { KubernetesConfig KubernetesConfig `json:"kubernetesConfig"` diff --git a/api/v1beta2/redisreplication_types.go b/api/v1beta2/redisreplication_types.go index a8fb71fe4..d7901d058 100644 --- a/api/v1beta2/redisreplication_types.go +++ b/api/v1beta2/redisreplication_types.go @@ -38,8 +38,8 @@ func (cr *RedisReplicationSpec) GetReplicationCounts(t string) int32 { // RedisStatus defines the observed state of Redis type RedisReplicationStatus struct { - State status.RedisReplicationState `json:"state,omitempty"` - Reason string `json:"reason,omitempty"` + State status.RedisReplicationState `json:"state,omitempty"` + Reason string `json:"reason,omitempty"` } // +kubebuilder:object:root=true diff --git a/api/v1beta2/redissentinel_types.go b/api/v1beta2/redissentinel_types.go index 1199f515e..45d8d3933 100644 --- a/api/v1beta2/redissentinel_types.go +++ b/api/v1beta2/redissentinel_types.go @@ -43,8 +43,8 @@ type RedisSentinelConfig struct { } type RedisSentinelStatus struct { - State status.RedisSentinelState `json:"state,omitempty"` - Reason string `json:"reason,omitempty"` + State status.RedisSentinelState `json:"state,omitempty"` + Reason string `json:"reason,omitempty"` } // +kubebuilder:object:root=true diff --git a/controllers/redis_controller.go b/controllers/redis_controller.go index 6846f877c..2bed2ee5c 100644 --- a/controllers/redis_controller.go +++ b/controllers/redis_controller.go @@ -16,7 +16,7 @@ limitations under the License. package controllers -import ( +import ( "context" "time" @@ -67,7 +67,7 @@ func (r *RedisReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl if err != nil { return ctrl.Result{RequeueAfter: time.Second * 10}, err } - } + } err = k8sutils.CreateStandaloneRedis(instance) if err != nil { diff --git a/k8sutils/redis-sentinel.go b/k8sutils/redis-sentinel.go index aaa196c96..f05aea39c 100644 --- a/k8sutils/redis-sentinel.go +++ b/k8sutils/redis-sentinel.go @@ -61,7 +61,7 @@ func CreateRedisSentinelService(cr *redisv1beta2.RedisSentinel) error { // Create Redis Sentinel Cluster Setup func (service RedisSentinelSTS) CreateRedisSentinelSetup(cr *redisv1beta2.RedisSentinel) error { - stateFulName := cr.ObjectMeta.Name + "-" + service.RedisStateFulType + stateFulName := cr.ObjectMeta.Name + "-" + service.RedisStateFulType logger := statefulSetLogger(cr.Namespace, stateFulName) labels := getRedisLabels(stateFulName, "cluster", service.RedisStateFulType, cr.ObjectMeta.Labels) annotations := generateStatefulSetsAnots(cr.ObjectMeta) diff --git a/k8sutils/redis.go b/k8sutils/redis.go index 7d4e2cea0..fb341f6cc 100644 --- a/k8sutils/redis.go +++ b/k8sutils/redis.go @@ -608,7 +608,7 @@ func CheckRedisSentinelReady(cr *redisv1beta2.RedisSentinel) bool { if err != nil { // Handle error return false - } + } if sts.Status.ReadyReplicas == *cr.Spec.Size { return true