Remove unnecessary initializations.
This commit is contained in:
parent
ee83e196a9
commit
04ed22f73f
|
|
@ -189,8 +189,6 @@ func (c *Cluster) Create() error {
|
||||||
|
|
||||||
func (c Cluster) sameServiceWith(service *v1.Service) (match bool, reason string) {
|
func (c Cluster) sameServiceWith(service *v1.Service) (match bool, reason string) {
|
||||||
//TODO: improve comparison
|
//TODO: improve comparison
|
||||||
reason = ""
|
|
||||||
match = false
|
|
||||||
if !reflect.DeepEqual(c.Service.Spec.LoadBalancerSourceRanges, service.Spec.LoadBalancerSourceRanges) {
|
if !reflect.DeepEqual(c.Service.Spec.LoadBalancerSourceRanges, service.Spec.LoadBalancerSourceRanges) {
|
||||||
reason = "new service's LoadBalancerSourceRange doesn't match the current one"
|
reason = "new service's LoadBalancerSourceRange doesn't match the current one"
|
||||||
} else {
|
} 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) {
|
func (c Cluster) sameVolumeWith(volume spec.Volume) (match bool, reason string) {
|
||||||
reason = ""
|
|
||||||
match = false
|
|
||||||
if !reflect.DeepEqual(c.Spec.Volume, volume) {
|
if !reflect.DeepEqual(c.Spec.Volume, volume) {
|
||||||
reason = "new volume's specification doesn't match the current one"
|
reason = "new volume's specification doesn't match the current one"
|
||||||
} else {
|
} 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) {
|
func (c Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) (match, needsRollUpdate bool, reason string) {
|
||||||
match = true
|
match = true
|
||||||
needsRollUpdate = false
|
|
||||||
reason = ""
|
|
||||||
//TODO: improve me
|
//TODO: improve me
|
||||||
if *c.Statefulset.Spec.Replicas != *statefulSet.Spec.Replicas {
|
if *c.Statefulset.Spec.Replicas != *statefulSet.Spec.Replicas {
|
||||||
match = false
|
match = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue