Browse Source

equalize specs bugfix

pull/4/head
Vladimir Smagin 1 year ago
parent
commit
1d57222ffb
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      pkg/controller/rabbitmq/rabbitmq_controller.go

+ 5
- 0
pkg/controller/rabbitmq/rabbitmq_controller.go View File

@@ -2,6 +2,7 @@ package rabbitmq

import (
"context"
"reflect"
"strconv"
"time"

@@ -221,6 +222,10 @@ func (r *ReconcileRabbitmq) Reconcile(request reconcile.Request) (reconcile.Resu
return reconcile.Result{}, err
}

if !reflect.DeepEqual(found.Spec, statefulset.Spec) {
found.Spec = statefulset.Spec
}

reqLogger.Info("Reconcile statefulset", "statefulset.Namespace", found.Namespace, "statefulset.Name", found.Name)
if err = r.client.Update(context.TODO(), found); err != nil {
reqLogger.Info("Reconcile statefulset error", "statefulset.Namespace", found.Namespace, "statefulset.Name", found.Name)


Loading…
Cancel
Save