From 04ed22f73fc785508c2ed658f677f7232c77da6c Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Fri, 7 Apr 2017 10:29:11 +0200 Subject: [PATCH] Remove unnecessary initializations. --- pkg/cluster/cluster.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index 3e8b56eac..2cfa9ddc3 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -189,8 +189,6 @@ func (c *Cluster) Create() error { func (c Cluster) sameServiceWith(service *v1.Service) (match bool, reason string) { //TODO: improve comparison - reason = "" - match = false if !reflect.DeepEqual(c.Service.Spec.LoadBalancerSourceRanges, service.Spec.LoadBalancerSourceRanges) { reason = "new service's LoadBalancerSourceRange doesn't match the current one" } else { @@ -200,8 +198,6 @@ func (c Cluster) sameServiceWith(service *v1.Service) (match bool, reason string } func (c Cluster) sameVolumeWith(volume spec.Volume) (match bool, reason string) { - reason = "" - match = false if !reflect.DeepEqual(c.Spec.Volume, volume) { reason = "new volume's specification doesn't match the current one" } else { @@ -212,8 +208,6 @@ func (c Cluster) sameVolumeWith(volume spec.Volume) (match bool, reason string) func (c Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) (match, needsRollUpdate bool, reason string) { match = true - needsRollUpdate = false - reason = "" //TODO: improve me if *c.Statefulset.Spec.Replicas != *statefulSet.Spec.Replicas { match = false