Skip to content

Commit

Permalink
Fix: Go linting
Browse files Browse the repository at this point in the history
Signed-off-by: syedsadath-17 <[email protected]>
  • Loading branch information
sadath-12 committed Sep 20, 2023
1 parent 79b6c69 commit ec0426d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions api/status/redis-standalone_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta2/redis_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 2 additions & 2 deletions api/v1beta2/redisreplication_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions api/v1beta2/redissentinel_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions controllers/redis_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

package controllers

import (
import (
"context"
"time"

Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion k8sutils/redis-sentinel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion k8sutils/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec0426d

Please sign in to comment.