diff --git a/hack/update-deps.sh b/hack/update-deps.sh index ae7f8255..d3e2ee30 100755 --- a/hack/update-deps.sh +++ b/hack/update-deps.sh @@ -10,8 +10,8 @@ true >go.mod.bzl true >go.sum # verify and vendor all dependencies -go mod verify go mod tidy -v +go mod verify go mod vendor # remove all files that were fetched with previous commands in order to avoid conflicts with proto rules diff --git a/pkg/controller/redis/redis_controller.go b/pkg/controller/redis/redis_controller.go index 4171b0fa..3d02c6b0 100644 --- a/pkg/controller/redis/redis_controller.go +++ b/pkg/controller/redis/redis_controller.go @@ -267,6 +267,7 @@ podIter: for i := range podList.Items { go func(pod corev1.Pod, masterAddress string, wg *sync.WaitGroup) { defer wg.Done() + podPatch := client.MergeFrom(pod.DeepCopy()) if pod.Status.PodIP == masterAddress { select { case masterChan <- pod.Name: @@ -285,7 +286,7 @@ podIter: } pod.Labels[roleLabelKey] = replicaLabel } - if err := reconciler.client.Update(ctx, &pod); err != nil { + if err := reconciler.client.Patch(ctx, &pod, podPatch); err != nil { errChan <- err } }(podList.Items[i], master.Host, &wg) diff --git a/vendor/modules.txt b/vendor/modules.txt index 08c58d0b..70f0b44f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -18,6 +18,7 @@ github.com/PuerkitoBio/urlesc # github.com/beorn7/perks v1.0.1 github.com/beorn7/perks/quantile # github.com/cenkalti/backoff/v3 v3.0.0 +## explicit github.com/cenkalti/backoff/v3 # github.com/cespare/xxhash/v2 v2.1.1 github.com/cespare/xxhash/v2 @@ -44,10 +45,12 @@ github.com/go-openapi/jsonpointer # github.com/go-openapi/jsonreference v0.19.3 github.com/go-openapi/jsonreference # github.com/go-openapi/spec v0.19.4 +## explicit github.com/go-openapi/spec # github.com/go-openapi/swag v0.19.5 github.com/go-openapi/swag # github.com/go-redis/redis v6.15.5+incompatible +## explicit github.com/go-redis/redis github.com/go-redis/redis/internal github.com/go-redis/redis/internal/consistenthash @@ -106,6 +109,7 @@ github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.1 github.com/modern-go/reflect2 # github.com/operator-framework/operator-sdk v0.17.1 +## explicit github.com/operator-framework/operator-sdk/pkg/k8sutil github.com/operator-framework/operator-sdk/pkg/kube-metrics github.com/operator-framework/operator-sdk/pkg/leader @@ -129,8 +133,10 @@ github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util # github.com/spf13/cast v1.3.0 +## explicit github.com/spf13/cast # github.com/spf13/pflag v1.0.5 +## explicit github.com/spf13/pflag # go.uber.org/atomic v1.6.0 go.uber.org/atomic @@ -144,6 +150,7 @@ go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/zapcore # golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 +## explicit golang.org/x/crypto/argon2 golang.org/x/crypto/blake2b golang.org/x/crypto/ssh/terminal @@ -192,6 +199,7 @@ gopkg.in/inf.v0 # gopkg.in/yaml.v2 v2.2.8 gopkg.in/yaml.v2 # k8s.io/api v0.17.4 +## explicit k8s.io/api/admission/v1beta1 k8s.io/api/admissionregistration/v1 k8s.io/api/admissionregistration/v1beta1 @@ -234,6 +242,7 @@ k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 # k8s.io/apimachinery v0.17.4 +## explicit k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/api/meta @@ -279,6 +288,7 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect # k8s.io/client-go v12.0.0+incompatible => k8s.io/client-go v0.17.4 +## explicit k8s.io/client-go/discovery k8s.io/client-go/dynamic k8s.io/client-go/kubernetes @@ -362,6 +372,7 @@ k8s.io/client-go/util/workqueue # k8s.io/klog v1.0.0 k8s.io/klog # k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a +## explicit k8s.io/kube-openapi/pkg/common k8s.io/kube-openapi/pkg/util/proto # k8s.io/kube-state-metrics v1.7.2 @@ -373,6 +384,7 @@ k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace # sigs.k8s.io/controller-runtime v0.5.2 +## explicit sigs.k8s.io/controller-runtime/pkg/cache sigs.k8s.io/controller-runtime/pkg/cache/internal sigs.k8s.io/controller-runtime/pkg/client @@ -407,3 +419,5 @@ sigs.k8s.io/controller-runtime/pkg/webhook/internal/certwatcher sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics # sigs.k8s.io/yaml v1.1.0 sigs.k8s.io/yaml +# github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible +# k8s.io/client-go => k8s.io/client-go v0.17.4