diff --git a/.golangci.yml b/.golangci.yml index 8757ea394..8aae25cc2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -81,6 +81,12 @@ linters: - linters: - goconst path: (.+)_test\.go + - linters: + - unused + path: tests/e2e/ + - linters: + - goheader + path: third_party/ paths: - third_party$ - builtin$ diff --git a/Makefile b/Makefile index 3799dc402..e48c21c22 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,23 @@ MOCKGEN_VERSION := 0.6.0 # renovate: datasource=github-releases depName=uber-go/ GOPROXY=https://proxy.golang.org +# Directories to run golangci-lint in +LINT_DIRS := . api properties tests/e2e \ + third_party/github.com/banzaicloud/operator-tools \ + third_party/github.com/banzaicloud/k8s-objectmatcher \ + third_party/github.com/banzaicloud/go-cruise-control + +# Directories to run licensei check/cache in +LICENSE_CHECK_DIRS := . \ + third_party/github.com/banzaicloud/operator-tools \ + third_party/github.com/banzaicloud/k8s-objectmatcher \ + third_party/github.com/banzaicloud/go-cruise-control + +# Directories to run licensei header in +LICENSE_HEADER_DIRS := \ + third_party/github.com/banzaicloud/k8s-objectmatcher \ + third_party/github.com/banzaicloud/go-cruise-control + # Use BIN_DIR to form an absolute, stable path regardless of `cd` usage CONTROLLER_GEN = $(BIN_DIR)/controller-gen @@ -62,6 +79,16 @@ clean: ## Clean build artifacts and test binaries fi @rm -f cover.out @rm -f manager_image_patch.yaml + @echo "Cleaning third_party/github.com/banzaicloud/operator-tools..." + @if [ -d "third_party/github.com/banzaicloud/operator-tools/bin" ]; then \ + chmod -R u+w third_party/github.com/banzaicloud/operator-tools/bin/ 2>/dev/null || true; \ + rm -rf third_party/github.com/banzaicloud/operator-tools/bin/; \ + fi + @echo "Cleaning third_party/github.com/banzaicloud/k8s-objectmatcher..." + @if [ -d "third_party/github.com/banzaicloud/k8s-objectmatcher/bin" ]; then \ + chmod -R u+w third_party/github.com/banzaicloud/k8s-objectmatcher/bin/ 2>/dev/null || true; \ + rm -rf third_party/github.com/banzaicloud/k8s-objectmatcher/bin/; \ + fi bin/golangci-lint: bin/golangci-lint-${GOLANGCI_VERSION} ## Symlink golangi-lint- into versionless golangci-lint. @ln -sf golangci-lint-${GOLANGCI_VERSION} bin/golangci-lint @@ -72,14 +99,22 @@ bin/golangci-lint-${GOLANGCI_VERSION}: ## Download versioned golangci-lint. .PHONY: lint lint: bin/golangci-lint ## Run linter analysis. - bin/golangci-lint run -c ./.golangci.yml --timeout=5m - cd api && ../bin/golangci-lint run -c ../.golangci.yml --timeout=5m - cd properties && ../bin/golangci-lint run -c ../.golangci.yml --timeout=5m - cd tests/e2e && ../../bin/golangci-lint run -c .golangci.yml --timeout=5m + @for dir in $(LINT_DIRS); do \ + echo "Running lint in $$dir"; \ + (cd $$dir && $(CURDIR)/bin/golangci-lint run -c $(CURDIR)/.golangci.yml --timeout=5m) || exit 1; \ + done + +.PHONY: lint-fix +lint-fix: bin/golangci-lint ## Run linter with automatic fixes. + @for dir in $(LINT_DIRS); do \ + echo "Running lint-fix in $$dir"; \ + (cd $$dir && $(CURDIR)/bin/golangci-lint run -c $(CURDIR)/.golangci.yml --fix --timeout=5m) || exit 1; \ + done -.PHONY: lint-fix ## Run linter with automatic fixes. -lint-fix: bin/golangci-lint ## Run linter - @bin/golangci-lint run -v --fix +.PHONY: lint-clean +lint-clean: bin/golangci-lint ## Clean linter cache. + @echo "Cleaning golangci-lint cache..." + bin/golangci-lint cache clean bin/licensei: bin/licensei-${LICENSEI_VERSION} ## Symlink licensei- into versionless licensei. @ln -sf licensei-${LICENSEI_VERSION} bin/licensei @@ -90,11 +125,24 @@ bin/licensei-${LICENSEI_VERSION}: ## Download versioned licensei. .PHONY: license-check license-check: bin/licensei ## Run license check. - bin/licensei check + @for dir in $(LICENSE_CHECK_DIRS); do \ + echo "Running license check in $$dir..."; \ + (cd $$dir && $(CURDIR)/bin/licensei check) || exit 1; \ + done .PHONY: license-cache license-cache: bin/licensei ## Generate license cache. - bin/licensei cache + @for dir in $(LICENSE_CHECK_DIRS); do \ + echo "Generating license cache in $$dir..."; \ + (cd $$dir && $(CURDIR)/bin/licensei cache) || exit 1; \ + done + +.PHONY: license +license: bin/licensei ## Add license headers to source files. + @for dir in $(LICENSE_HEADER_DIRS); do \ + echo "Adding license headers in $$dir..."; \ + (cd $$dir && $(CURDIR)/bin/licensei header) || exit 1; \ + done install-kustomize: ## Install kustomize. @ if ! which bin/kustomize &>/dev/null; then\ @@ -113,6 +161,15 @@ test: generate fmt vet bin/setup-envtest -test.paniconexit0 \ -timeout 1h cd properties && go test -coverprofile cover.out -cover -failfast -v -covermode=count ./pkg/... ./internal/... + @echo "Running tests in third_party/github.com/banzaicloud/operator-tools..." + cd third_party/github.com/banzaicloud/operator-tools && \ + KUBEBUILDER_ASSETS=$$($(BIN_DIR)/setup-envtest --print path --bin-dir $(BIN_DIR) use $(ENVTEST_K8S_VERSION)) \ + go test ./... -v -failfast + @echo "Running tests in third_party/github.com/banzaicloud/k8s-objectmatcher..." + cd third_party/github.com/banzaicloud/k8s-objectmatcher && go test ./... + @echo "Running tests in third_party/github.com/banzaicloud/go-cruise-control..." + cd third_party/github.com/banzaicloud/go-cruise-control && \ + go test -v -parallel 2 -failfast ./... -cover -covermode=count -coverprofile cover.out -test.v -test.paniconexit0 # Run e2e tests test-e2e: @@ -158,15 +215,38 @@ fmt: ## Run go fmt against code. cd api && go fmt ./... cd properties && go fmt ./... cd tests/e2e && go fmt ./... + @echo "Running fmt in third_party/github.com/banzaicloud/k8s-objectmatcher..." + cd third_party/github.com/banzaicloud/k8s-objectmatcher && go fmt ./... + @echo "Running fmt in third_party/github.com/banzaicloud/go-cruise-control..." + cd third_party/github.com/banzaicloud/go-cruise-control && go fmt ./... vet: ## Run go vet against code. go vet ./... cd api && go fmt ./... cd properties && go vet ./... cd tests/e2e && go vet ./... + @echo "Running vet in third_party/github.com/banzaicloud/k8s-objectmatcher..." + cd third_party/github.com/banzaicloud/k8s-objectmatcher && go vet ./... + @echo "Running vet in third_party/github.com/banzaicloud/go-cruise-control..." + cd third_party/github.com/banzaicloud/go-cruise-control && go vet ./... generate: bin/controller-gen gen-license-header ## Generate source code for APIs, Mocks, etc. cd api && $(CONTROLLER_GEN) object:headerFile=$(BOILERPLATE_DIR)/header.go.generated.txt paths="./..." + @echo "Running generate in third_party/github.com/banzaicloud/operator-tools..." + cd third_party/github.com/banzaicloud/operator-tools && \ + $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/secret/... && \ + $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/volume/... && \ + $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/prometheus/... && \ + $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/types/... && \ + $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/typeoverride/... && \ + $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/helm/... + @echo "Generating type documentation for operator-tools..." + cd third_party/github.com/banzaicloud/operator-tools && go run cmd/docs.go + +.PHONY: check-diff +check-diff: generate ## Check for uncommitted changes + @echo "Checking for uncommitted changes ..." + git diff --exit-code docker-build: ## Build the operator docker image. docker build . -t ${IMG} diff --git a/api/go.mod b/api/go.mod index f30f2d29e..639d7582f 100644 --- a/api/go.mod +++ b/api/go.mod @@ -7,15 +7,19 @@ require ( emperror.dev/errors v0.8.1 github.com/banzaicloud/istio-client-go v0.0.17 github.com/cert-manager/cert-manager v1.18.2 - golang.org/x/exp v0.0.0-20250911091902-df9299821621 - gotest.tools v2.2.0+incompatible k8s.io/api v0.34.1 k8s.io/apimachinery v0.34.1 sigs.k8s.io/controller-runtime v0.22.1 ) require ( - // github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/stretchr/testify v1.11.1 + gotest.tools v2.2.0+incompatible +) + +require ( + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/go-cmp v0.7.0 // indirect @@ -23,27 +27,18 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/pkg/errors v0.9.1 // indirect - // github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect golang.org/x/net v0.44.0 // indirect golang.org/x/text v0.29.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - // gopkg.in/yaml.v3 v3.0.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect -) - -require github.com/stretchr/testify v1.11.1 - -require ( - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/spf13/pflag v1.0.10 // indirect - github.com/x448/float16 v0.8.4 // indirect - go.yaml.in/yaml/v2 v2.4.3 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect ) diff --git a/api/go.sum b/api/go.sum index 0612f97dd..74b3597be 100644 --- a/api/go.sum +++ b/api/go.sum @@ -76,8 +76,6 @@ go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20250911091902-df9299821621 h1:2id6c1/gto0kaHYyrixvknJ8tUK/Qs5IsmBtrc+FtgU= -golang.org/x/exp v0.0.0-20250911091902-df9299821621/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -105,8 +103,8 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= -golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -130,8 +128,8 @@ k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13l k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.22.1 h1:Ah1T7I+0A7ize291nJZdS1CabF/lB4E++WizgV24Eqg= sigs.k8s.io/controller-runtime v0.22.1/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= diff --git a/api/v1alpha1/kafkauserspec_annotations.go b/api/v1alpha1/kafkauserspec_annotations.go index 6191c2665..991f52dff 100644 --- a/api/v1alpha1/kafkauserspec_annotations.go +++ b/api/v1alpha1/kafkauserspec_annotations.go @@ -16,10 +16,10 @@ package v1alpha1 import ( "fmt" + "maps" "time" "emperror.dev/errors" - "golang.org/x/exp/maps" ) // annotationsWithValidations is a map whose keys are KafkaUserSpec annotation keys, and values are validators diff --git a/go.mod b/go.mod index 22c6798f9..c3c4559f7 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/envoyproxy/go-control-plane v0.13.4 github.com/envoyproxy/go-control-plane/envoy v1.35.0 github.com/go-logr/logr v1.4.3 - github.com/onsi/ginkgo/v2 v2.25.3 + github.com/onsi/ginkgo/v2 v2.26.0 github.com/onsi/gomega v1.38.2 github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0 github.com/projectcontour/contour v1.33.0 @@ -26,7 +26,7 @@ require ( github.com/stretchr/testify v1.11.1 go.uber.org/mock v0.6.0 go.uber.org/zap v1.27.0 - golang.org/x/exp v0.0.0-20250911091902-df9299821621 + golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 google.golang.org/protobuf v1.36.10 gopkg.in/inf.v0 v0.9.1 gotest.tools v2.2.0+incompatible @@ -55,18 +55,18 @@ require ( github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/btree v1.1.3 // indirect github.com/google/gnostic-models v0.7.0 // indirect - github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 // indirect - github.com/onsi/ginkgo v1.16.5 // indirect + github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/x448/float16 v0.8.4 // indirect go.uber.org/automaxprocs v1.6.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/mod v0.28.0 // indirect golang.org/x/sync v0.17.0 // indirect golang.org/x/tools v0.37.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250929231259-57b25ae835d4 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect @@ -80,7 +80,6 @@ require ( github.com/briandowns/spinner v1.23.2 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect - github.com/cppforlife/go-patch v0.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/eapache/go-resiliency v1.7.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect @@ -126,7 +125,7 @@ require ( github.com/shopspring/decimal v1.4.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.10 // indirect - github.com/tidwall/gjson v1.14.4 // indirect + github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/wayneashleyberry/terminal-dimensions v1.1.0 // indirect @@ -139,12 +138,11 @@ require ( golang.org/x/text v0.29.0 // indirect golang.org/x/time v0.13.0 // indirect gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect istio.io/api v1.27.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect - k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect sigs.k8s.io/gateway-api v1.3.0 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/yaml v1.6.0 diff --git a/go.sum b/go.sum index ab3642bd3..4ddee363b 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,6 @@ github.com/cisco-open/cluster-registry-controller/api v0.2.12 h1:dxKVG3T75RAU8f0 github.com/cisco-open/cluster-registry-controller/api v0.2.12/go.mod h1:zRJ4y4xZlEq1AkOm8pd6qpH7WQ9yinLaE3SA30TWh74= github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= -github.com/cppforlife/go-patch v0.2.0 h1:Y14MnCQjDlbw7WXT4k+u6DPAA9XnygN4BfrSpI/19RU= -github.com/cppforlife/go-patch v0.2.0/go.mod h1:67a7aIi94FHDZdoeGSJRRFDp66l9MhaAG1yGxpUoFD8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -54,12 +52,16 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= +github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= +github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= +github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= +github.com/gkampitakis/go-snaps v0.5.14 h1:3fAqdB6BCPKHDMHAKRwtPUwYexKtGrNuw8HX/T/4neo= +github.com/gkampitakis/go-snaps v0.5.14/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -94,20 +96,14 @@ github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3 github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= +github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= @@ -116,16 +112,13 @@ github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 h1:ZI8gCoCjGzPsum4L21jHdQs8shFBIQih1TM9Rd/c+EQ= -github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= +github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6 h1:/WHh/1k4thM/w+PAZEIiZK9NwCMFahw5tUzKUCnUtds= +github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= @@ -133,7 +126,6 @@ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/z github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= @@ -150,6 +142,8 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6 github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= +github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -162,10 +156,14 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= +github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= +github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= @@ -178,17 +176,8 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.25.3 h1:Ty8+Yi/ayDAGtk4XxmmfUy4GabvM+MegeB4cDLRi6nw= -github.com/onsi/ginkgo/v2 v2.25.3/go.mod h1:43uiyQC4Ed2tkOzLsEYm7hnrb7UJTWHYNsuy3bG/snE= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE= +github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw= github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0 h1:2nosf3P75OZv2/ZO/9Px5ZgZ5gbKrzA3joN1QMfOGMQ= @@ -231,19 +220,20 @@ github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= -github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/wayneashleyberry/terminal-dimensions v1.1.0 h1:EB7cIzBdsOzAgmhTUtTTQXBByuPheP/Zv1zL2BRPY6g= github.com/wayneashleyberry/terminal-dimensions v1.1.0/go.mod h1:2lc/0eWCObmhRczn2SdGSQtgBooLUzIotkkEGXqghyg= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -274,17 +264,17 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= -golang.org/x/exp v0.0.0-20250911091902-df9299821621 h1:2id6c1/gto0kaHYyrixvknJ8tUK/Qs5IsmBtrc+FtgU= -golang.org/x/exp v0.0.0-20250911091902-df9299821621/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= +golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 h1:TQwNpfvNkxAVlItJf6Cr5JTsVZoC/Sj7K3OZv2Pc14A= +golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -294,23 +284,16 @@ golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -334,7 +317,6 @@ golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= @@ -345,16 +327,10 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 h1:8XJ4pajGwOlasW+L13MnEGA8W4115jJySQtVfS2/IBU= -google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4/go.mod h1:NnuHhy+bxcg30o7FnVAZbXsPHUDQ9qKWAQKCD7VxFtk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250929231259-57b25ae835d4 h1:i8QOKZfYg6AbGVZzUAY3LrNWCKF8O6zFisU9Wl9RER4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250929231259-57b25ae835d4/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797 h1:D/zZ8knc/wLq9imidPFpHsGuRUYTCWWCwemZ2dxACGs= +google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797/go.mod h1:NnuHhy+bxcg30o7FnVAZbXsPHUDQ9qKWAQKCD7VxFtk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 h1:CirRxTOwnRWVLKzDNrs0CXAaVozJoR4G9xvdRecrdpk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ= google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -362,16 +338,9 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -391,8 +360,8 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.22.1 h1:Ah1T7I+0A7ize291nJZdS1CabF/lB4E++WizgV24Eqg= sigs.k8s.io/controller-runtime v0.22.1/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY= sigs.k8s.io/gateway-api v1.3.0 h1:q6okN+/UKDATola4JY7zXzx40WO4VISk7i9DIfOvr9M= diff --git a/renovate.json b/renovate.json index b5dd68d04..566c429ff 100644 --- a/renovate.json +++ b/renovate.json @@ -79,6 +79,11 @@ "helm-values", "docker" ] + }, + { + "matchManagers": ["gomod"], + "matchDepTypes": ["indirect"], + "enabled": true } ] } diff --git a/tests/e2e/go.mod b/tests/e2e/go.mod index d669dd518..d93b96ccd 100644 --- a/tests/e2e/go.mod +++ b/tests/e2e/go.mod @@ -9,7 +9,7 @@ require ( github.com/banzaicloud/koperator/api v0.28.8 github.com/cisco-open/k8s-objectmatcher v1.10.0 github.com/gruntwork-io/terratest v0.51.0 - github.com/onsi/ginkgo/v2 v2.25.3 + github.com/onsi/ginkgo/v2 v2.26.0 github.com/onsi/gomega v1.38.2 github.com/twmb/franz-go v1.19.5 k8s.io/api v0.34.1 @@ -68,7 +68,6 @@ require ( github.com/briandowns/spinner v1.23.2 // indirect github.com/cert-manager/cert-manager v1.18.2 // indirect github.com/cisco-open/cluster-registry-controller/api v0.2.12 // indirect - github.com/cppforlife/go-patch v0.2.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/eapache/go-resiliency v1.7.0 // indirect @@ -108,7 +107,7 @@ require ( github.com/gonvenience/ytbx v1.4.4 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 // indirect + github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gruntwork-io/go-commons v0.17.1 // indirect @@ -173,7 +172,8 @@ require ( go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.42.0 // indirect - golang.org/x/exp v0.0.0-20250911091902-df9299821621 // indirect + golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 // indirect + golang.org/x/mod v0.28.0 // indirect golang.org/x/net v0.44.0 // indirect golang.org/x/oauth2 v0.31.0 // indirect golang.org/x/sync v0.17.0 // indirect @@ -190,7 +190,7 @@ require ( k8s.io/client-go v0.34.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect - k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect sigs.k8s.io/controller-runtime v0.22.1 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect diff --git a/tests/e2e/go.sum b/tests/e2e/go.sum index e90b7ffac..280f2c3a9 100644 --- a/tests/e2e/go.sum +++ b/tests/e2e/go.sum @@ -105,8 +105,6 @@ github.com/cisco-open/cluster-registry-controller/api v0.2.12 h1:dxKVG3T75RAU8f0 github.com/cisco-open/cluster-registry-controller/api v0.2.12/go.mod h1:zRJ4y4xZlEq1AkOm8pd6qpH7WQ9yinLaE3SA30TWh74= github.com/cisco-open/k8s-objectmatcher v1.10.0 h1:1TdhMPqVaU+NqECqytAkRF1SFU0QIMqrqbNTnTl933A= github.com/cisco-open/k8s-objectmatcher v1.10.0/go.mod h1:O/TFG3vW12jbKNQejpc8SGgSfujlaWYIOCZHcXeK514= -github.com/cppforlife/go-patch v0.2.0 h1:Y14MnCQjDlbw7WXT4k+u6DPAA9XnygN4BfrSpI/19RU= -github.com/cppforlife/go-patch v0.2.0/go.mod h1:67a7aIi94FHDZdoeGSJRRFDp66l9MhaAG1yGxpUoFD8= github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -135,6 +133,12 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= +github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= +github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= +github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= +github.com/gkampitakis/go-snaps v0.5.14 h1:3fAqdB6BCPKHDMHAKRwtPUwYexKtGrNuw8HX/T/4neo= +github.com/gkampitakis/go-snaps v0.5.14/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= @@ -178,6 +182,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= +github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -200,8 +206,8 @@ github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7O github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 h1:ZI8gCoCjGzPsum4L21jHdQs8shFBIQih1TM9Rd/c+EQ= -github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= +github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6 h1:/WHh/1k4thM/w+PAZEIiZK9NwCMFahw5tUzKUCnUtds= +github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -252,6 +258,8 @@ github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 h1:liMMTbpW github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= +github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -269,6 +277,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= +github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= github.com/mattn/go-ciede2000 v0.0.0-20170301095244-782e8c62fec3 h1:BXxTozrOU8zgC5dkpn3J6NTRdoP+hjok/e+ACr4Hibk= github.com/mattn/go-ciede2000 v0.0.0-20170301095244-782e8c62fec3/go.mod h1:x1uk6vxTiVuNt6S5R2UYgdhpj3oKojXvOXauHZ7dEnI= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= @@ -277,6 +287,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-zglob v0.0.4 h1:LQi2iOm0/fGgu80AioIJ/1j9w9Oh+9DZ39J4VAGzHQM= github.com/mattn/go-zglob v0.0.4/go.mod h1:MxxjyoXXnMxfIpxTK2GAkw1w8glPsQILx3N5wrKakiY= +github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= +github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -304,8 +316,8 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.25.3 h1:Ty8+Yi/ayDAGtk4XxmmfUy4GabvM+MegeB4cDLRi6nw= -github.com/onsi/ginkgo/v2 v2.25.3/go.mod h1:43uiyQC4Ed2tkOzLsEYm7hnrb7UJTWHYNsuy3bG/snE= +github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE= +github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw= github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0 h1:2nosf3P75OZv2/ZO/9Px5ZgZ5gbKrzA3joN1QMfOGMQ= @@ -367,6 +379,8 @@ github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/twmb/franz-go v1.19.5 h1:W7+o8D0RsQsedqib71OVlLeZ0zI6CbFra7yTYhZTs5Y= github.com/twmb/franz-go v1.19.5/go.mod h1:4kFJ5tmbbl7asgwAGVuyG1ZMx0NNpYk7EqflvWfPCpM= github.com/twmb/franz-go/pkg/kmsg v1.11.2 h1:hIw75FpwcAjgeyfIGFqivAvwC5uNIOWRGvQgZhH4mhg= @@ -405,11 +419,13 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= -golang.org/x/exp v0.0.0-20250911091902-df9299821621 h1:2id6c1/gto0kaHYyrixvknJ8tUK/Qs5IsmBtrc+FtgU= -golang.org/x/exp v0.0.0-20250911091902-df9299821621/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= +golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 h1:TQwNpfvNkxAVlItJf6Cr5JTsVZoC/Sj7K3OZv2Pc14A= +golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -503,8 +519,8 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.22.1 h1:Ah1T7I+0A7ize291nJZdS1CabF/lB4E++WizgV24Eqg= sigs.k8s.io/controller-runtime v0.22.1/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= diff --git a/tests/e2e/helm.go b/tests/e2e/helm.go index 2684baa9e..67e3dd709 100644 --- a/tests/e2e/helm.go +++ b/tests/e2e/helm.go @@ -239,7 +239,11 @@ func (helmDescriptor *helmDescriptor) installHelmChart(kubectlOptions k8s.Kubect fixedArguments := []string{ "--create-namespace", "--atomic", - "--debug", + } + + // Only add --debug flag if verbose logging is enabled + if os.Getenv("E2E_VERBOSE_LOGGING") == verboseLoggingEnabled { + fixedArguments = append(fixedArguments, "--debug") } helmChartNameOrLocalPath := helmDescriptor.ChartName @@ -309,10 +313,15 @@ func (helmDescriptor *helmDescriptor) uninstallHelmChart(kubectlOptions k8s.Kube ) fixedArguments := []string{ - "--debug", "--wait", "--cascade=foreground", } + + // Only add --debug flag if verbose logging is enabled + if os.Getenv("E2E_VERBOSE_LOGGING") == verboseLoggingEnabled { + fixedArguments = append(fixedArguments, "--debug") + } + purge := true return helm.DeleteE( @@ -380,14 +389,26 @@ func (helmRelease *HelmRelease) chartNameAndVersion() (string, string) { // listHelmReleases returns a slice of Helm releases retrieved from the cluster // using the specified kubectl context and namespace. func listHelmReleases(kubectlOptions k8s.KubectlOptions) ([]*HelmRelease, error) { - ginkgo.By("Listing Helm releases") + // Only log if verbose logging is enabled + if os.Getenv("E2E_VERBOSE_LOGGING") == verboseLoggingEnabled { + ginkgo.By("Listing Helm releases") + } + + // Build command arguments + args := []string{"--output", "json"} + + // Add --debug flag if verbose logging is enabled + if os.Getenv("E2E_VERBOSE_LOGGING") == verboseLoggingEnabled { + args = append(args, "--debug") + } + output, err := helm.RunHelmCommandAndGetOutputE( ginkgo.GinkgoT(), &helm.Options{ KubectlOptions: &kubectlOptions, }, "list", - "--output", "json", + args..., ) if err != nil { diff --git a/third_party/github.com/banzaicloud/go-cruise-control/.golangci.yml b/third_party/github.com/banzaicloud/go-cruise-control/.golangci.yml deleted file mode 100644 index 4b36e8371..000000000 --- a/third_party/github.com/banzaicloud/go-cruise-control/.golangci.yml +++ /dev/null @@ -1,135 +0,0 @@ -version: "2" -linters: - default: none - enable: - - bodyclose - - dogsled - - errcheck - - exhaustive - - funlen - - goconst - - gocritic - - gocyclo - - goheader - - goprintffuncname - - govet - - ineffassign - - lll - - misspell - - nakedret - - reassign - - rowserrcheck - - staticcheck - - unconvert - - unparam - - unused - - whitespace - settings: - depguard: - rules: - main: - files: - - $all - deny: - - pkg: forbiddenpackage - desc: Please don't use forbiddenpackage package - dogsled: - max-blank-identifiers: 3 - funlen: - lines: 323 - statements: 100 - gocritic: - disabled-checks: - - commentFormatting - gocyclo: - min-complexity: 38 - goheader: - values: - const: - COMPANY: Cisco Systems, Inc. and/or its affiliates - ADOBE_COMPANY: Adobe. All rights reserved. - regexp: - COPYRIGHT: (Copyright|Copyright ©) - YEAR: 20[0-9]{2} - CISCO_LINE: 'Copyright(?: ©)? 20[0-9]{2} Cisco Systems, Inc\. and/or its affiliates' - ADOBE_LINE: 'Copyright(?: ©)? 20[0-9]{2} Adobe\. All rights reserved\.' - template: |- - {{ if .CISCO_LINE }}{{ CISCO_LINE }}{{ end }}{{ if and .CISCO_LINE .ADOBE_LINE }} - {{ end }}{{ if .ADOBE_LINE }}{{ ADOBE_LINE }}{{ end }} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - lll: - line-length: 300 - exclusions: - generated: lax - presets: - - comments - - common-false-positives - - legacy - - std-error-handling - rules: - - linters: - - goconst - path: (.+)_test\.go - - linters: - - unused - path: .* - paths: - - third_party$ - - builtin$ - - examples$ - -# Preserve e2e-specific issue exclusions -issues: - exclude-rules: - - path: zz_generated.deepcopy.go - linters: - - lll - - path: "(.+)_test.go" - linters: - - funlen - - goconst - - interfacer - - dupl - - lll - - gocritic - # Ignore unused across e2e helpers/tests - - path: ".*" - linters: - - unused - - linters: - - staticcheck - text: "SA9003:" - - linters: - - lll - source: "^//go:generate " - exclude: - - 'Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print.*|os\.(Un)?Setenv). is not checked' - - "should have a package comment, unless it's in another file for this package" - max-issues-per-linter: 0 - max-same-issues: 0 - -formatters: - enable: - - gofmt - - goimports - settings: - goimports: - local-prefixes: - - github.com/banzaicloud/koperator - exclusions: - generated: lax - paths: - - third_party$ - - builtin$ - - examples$ diff --git a/third_party/github.com/banzaicloud/go-cruise-control/Makefile b/third_party/github.com/banzaicloud/go-cruise-control/Makefile index a5f7f2910..3115e354a 100644 --- a/third_party/github.com/banzaicloud/go-cruise-control/Makefile +++ b/third_party/github.com/banzaicloud/go-cruise-control/Makefile @@ -1,34 +1,24 @@ +# go-cruise-control Makefile +# Most common targets (test, lint, fmt, vet, license-check, etc.) +# are now handled by the parent Makefile at the repository root. +# This Makefile contains only unique targets specific to go-cruise-control. + SHELL = /usr/bin/env bash -o pipefail .SHELLFLAGS = -ec CRUISE_CONTROL_VERSION ?= 2.5.118-adbe-20230504 export CRUISE_CONTROL_IMAGE ?= docker.io/adobe/cruise-control:latest +PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) + ##@ General help: ## Display this help. @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) -##@ Development - -fmt: ## Run go fmt against code - @go fmt ./... - -vet: ## Run go vet against code - @go vet ./... - -test: ## Run go test against code - @go test \ - -v \ - -parallel 2 \ - -failfast \ - ./... \ - -cover \ - -covermode=count \ - -coverprofile cover.out \ - -test.v \ - -test.paniconexit0 +##@ Unique targets for go-cruise-control +.PHONY: integration-test integration-test: ## Run go integration test against code @cd integration_test && \ go test \ @@ -39,11 +29,12 @@ integration-test: ## Run go integration test against code -timeout 2h \ -ginkgo.v . -go.work: +.PHONY: go.work +go.work: ## Create Go workspace @go work init @go work use . integration_test - +.PHONY: update-go-deps update-go-deps: ## Update Go modules dependencies. @echo "Finding all directories with go.mod files..." @for gomod in $$(find . -name "go.mod" | sort); do \ @@ -59,6 +50,5 @@ update-go-deps: ## Update Go modules dependencies. ) \ done -PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) - +# Include additional targets from makefile.d/ include makefile.d/*.mk diff --git a/third_party/github.com/banzaicloud/go-cruise-control/deploy/docker-compose.yml b/third_party/github.com/banzaicloud/go-cruise-control/deploy/docker-compose.yml index fb10307f6..acbb669de 100644 --- a/third_party/github.com/banzaicloud/go-cruise-control/deploy/docker-compose.yml +++ b/third_party/github.com/banzaicloud/go-cruise-control/deploy/docker-compose.yml @@ -1,6 +1,6 @@ services: zookeeper: - image: zookeeper:3.9.4@sha256:9283f601b66c373bb4caa653f59bf71f4b018b714693c4669defce3120328076 + image: zookeeper:3.9.4@sha256:2408ba6f6eb91a4dbf65548428b90f9e5e9cf9d77e5f280a4bf80270d465a80f restart: unless-stopped hostname: zookeeper container_name: zookeeper diff --git a/third_party/github.com/banzaicloud/go-cruise-control/integration_test/go.mod b/third_party/github.com/banzaicloud/go-cruise-control/integration_test/go.mod index c1f3b66be..18a2704bb 100644 --- a/third_party/github.com/banzaicloud/go-cruise-control/integration_test/go.mod +++ b/third_party/github.com/banzaicloud/go-cruise-control/integration_test/go.mod @@ -5,11 +5,11 @@ go 1.25 require ( github.com/banzaicloud/go-cruise-control v0.6.0 github.com/compose-spec/compose-go/v2 v2.9.0 - github.com/docker/cli v28.4.0+incompatible + github.com/docker/cli v28.5.0+incompatible github.com/docker/compose/v2 v2.39.4 github.com/go-logr/logr v1.4.3 github.com/go-logr/zapr v1.3.0 - github.com/onsi/ginkgo/v2 v2.25.3 + github.com/onsi/ginkgo/v2 v2.26.0 github.com/onsi/gomega v1.38.2 github.com/pkg/errors v0.9.1 go.uber.org/zap v1.27.0 @@ -81,7 +81,7 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 // indirect + github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/mux v1.8.1 // indirect @@ -178,6 +178,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.42.0 // indirect + golang.org/x/mod v0.28.0 // indirect golang.org/x/net v0.44.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.17.0 // indirect diff --git a/third_party/github.com/banzaicloud/go-cruise-control/integration_test/go.sum b/third_party/github.com/banzaicloud/go-cruise-control/integration_test/go.sum index a53fc0065..27227d2ed 100644 --- a/third_party/github.com/banzaicloud/go-cruise-control/integration_test/go.sum +++ b/third_party/github.com/banzaicloud/go-cruise-control/integration_test/go.sum @@ -128,8 +128,8 @@ github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxK github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/docker/buildx v0.28.0 h1:ZnrVsZ/qQwSOQ4Fx3IgXjiurAwvocaF1YUaPbIXD89E= github.com/docker/buildx v0.28.0/go.mod h1:nLwx58w7xrQbLVSXiWiHpkVhY4ou4ci/hYomc139Vjk= -github.com/docker/cli v28.4.0+incompatible h1:RBcf3Kjw2pMtwui5V0DIMdyeab8glEw5QY0UUU4C9kY= -github.com/docker/cli v28.4.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v28.5.0+incompatible h1:crVqLrtKsrhC9c00ythRx435H8LiQnUKRtJLRR+Auxk= +github.com/docker/cli v28.5.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli-docs-tool v0.10.0 h1:bOD6mKynPQgojQi3s2jgcUWGp/Ebqy1SeCr9VfKQLLU= github.com/docker/cli-docs-tool v0.10.0/go.mod h1:5EM5zPnT2E7yCLERZmrDA234Vwn09fzRHP4aX1qwp1U= github.com/docker/compose/v2 v2.39.4 h1:lXIyl0axf8rZ5ThGm25g0y5nvtj1a9HKS08qfMvHiFM= @@ -168,6 +168,12 @@ github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQ github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/gkampitakis/ciinfo v0.3.2 h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs= +github.com/gkampitakis/ciinfo v0.3.2/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= +github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= +github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= +github.com/gkampitakis/go-snaps v0.5.14 h1:3fAqdB6BCPKHDMHAKRwtPUwYexKtGrNuw8HX/T/4neo= +github.com/gkampitakis/go-snaps v0.5.14/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -193,6 +199,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= +github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -221,8 +229,8 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 h1:ZI8gCoCjGzPsum4L21jHdQs8shFBIQih1TM9Rd/c+EQ= -github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= +github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6 h1:/WHh/1k4thM/w+PAZEIiZK9NwCMFahw5tUzKUCnUtds= +github.com/google/pprof v0.0.0-20251002213607-436353cc1ee6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -265,6 +273,8 @@ github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbd github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE= +github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -296,6 +306,8 @@ github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= +github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -309,6 +321,8 @@ github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebG github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE= +github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= @@ -366,8 +380,8 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/ginkgo/v2 v2.25.3 h1:Ty8+Yi/ayDAGtk4XxmmfUy4GabvM+MegeB4cDLRi6nw= -github.com/onsi/ginkgo/v2 v2.25.3/go.mod h1:43uiyQC4Ed2tkOzLsEYm7hnrb7UJTWHYNsuy3bG/snE= +github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE= +github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= @@ -472,6 +486,14 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c= github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA= github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375/go.mod h1:xRroudyp5iVtxKqZCrA6n2TLFRBf8bmnjr1UD4x+z7g= github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323 h1:r0p7fK56l8WPequOaR3i9LBqfPtEdXIQbUTzT55iqT4= diff --git a/third_party/github.com/banzaicloud/go-cruise-control/makefile.d/80-lint.mk b/third_party/github.com/banzaicloud/go-cruise-control/makefile.d/80-lint.mk deleted file mode 100644 index a2a4db34d..000000000 --- a/third_party/github.com/banzaicloud/go-cruise-control/makefile.d/80-lint.mk +++ /dev/null @@ -1,22 +0,0 @@ -##@ Linter - -GOLANGCI_VERSION = 1.51.2 - -bin/golangci-lint: bin/golangci-lint-$(GOLANGCI_VERSION) - @ln -sf golangci-lint-$(GOLANGCI_VERSION) bin/golangci-lint -bin/golangci-lint-$(GOLANGCI_VERSION): - @mkdir -p bin - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b ./bin/ v$(GOLANGCI_VERSION) - @mv bin/golangci-lint $@ - -.PHONY: lint -lint: bin/golangci-lint ## Run linter - @bin/golangci-lint run --timeout=240s - -.PHONY: lint-fix -lint-fix: bin/golangci-lint ## Run linter and fix issues - @bin/golangci-lint run --fix - -.PHONY: lint-clean -lint-clean: bin/golangci-lint ## Clean linter cache - @bin/golangci-lint cache clean diff --git a/third_party/github.com/banzaicloud/go-cruise-control/makefile.d/81-license.mk b/third_party/github.com/banzaicloud/go-cruise-control/makefile.d/81-license.mk deleted file mode 100644 index 8c3f1128c..000000000 --- a/third_party/github.com/banzaicloud/go-cruise-control/makefile.d/81-license.mk +++ /dev/null @@ -1,20 +0,0 @@ -##@ License - -LICENSEI_VERSION = 0.8.0 - -bin/licensei: bin/licensei-$(LICENSEI_VERSION) - @ln -sf licensei-${LICENSEI_VERSION} bin/licensei - -bin/licensei-$(LICENSEI_VERSION): - @mkdir -p bin - curl -sfL https://raw.githubusercontent.com/goph/licensei/master/install.sh | bash -s v$(LICENSEI_VERSION) - @mv bin/licensei $@ - -.PHONY: license-check -license-check: bin/licensei ## Run license check - @bin/licensei check - @bin/licensei header - -.PHONY: license-cache -license-cache: bin/licensei ## Generate license cache - @bin/licensei cache diff --git a/third_party/github.com/banzaicloud/go-cruise-control/pkg/internal/encoder/encoder.go b/third_party/github.com/banzaicloud/go-cruise-control/pkg/internal/encoder/encoder.go index 269ba4d29..658cc3f4b 100644 --- a/third_party/github.com/banzaicloud/go-cruise-control/pkg/internal/encoder/encoder.go +++ b/third_party/github.com/banzaicloud/go-cruise-control/pkg/internal/encoder/encoder.go @@ -257,7 +257,7 @@ func newSliceEncoder(t reflect.Type) encoderFunc { stringerType := reflect.TypeOf((*fmt.Stringer)(nil)).Elem() if t.Elem().Kind() == reflect.Uint8 { - p := reflect.PtrTo(t.Elem()) + p := reflect.PointerTo(t.Elem()) if !p.Implements(paramsMarshalerType) && !p.Implements(stringerType) { return byteSliceEncoder } diff --git a/third_party/github.com/banzaicloud/istio-client-go/.golangci.yml b/third_party/github.com/banzaicloud/istio-client-go/.golangci.yml deleted file mode 100644 index a228da25e..000000000 --- a/third_party/github.com/banzaicloud/istio-client-go/.golangci.yml +++ /dev/null @@ -1,20 +0,0 @@ -linters: - enable-all: true - disable: - - maligned - - gochecknoglobals - - lll - - gochecknoinits - - funlen - - dupl - -linters-settings: - funlen: - lines: 100 - - golint: - min-confidence: 0.1 - goimports: - # put imports beginning with prefix after 3rd-party packages; - # it's a comma-separated list of prefixes - local-prefixes: github.com/banzaicloud diff --git a/third_party/github.com/banzaicloud/istio-operator/.golangci.yml b/third_party/github.com/banzaicloud/istio-operator/.golangci.yml deleted file mode 100644 index 9ea91dde5..000000000 --- a/third_party/github.com/banzaicloud/istio-operator/.golangci.yml +++ /dev/null @@ -1,95 +0,0 @@ -run: - skip-dirs: - - .gen - - build - skip-files: - - ".*zz_.*\\.go$" - -linters: - enable-all: true - disable: - - lll - - gochecknoinits - - gochecknoglobals - - funlen - - godot - - godox - - wsl - - dupl - - wrapcheck - - forbidigo - - golint - - exhaustive - - varnamelen - - ireturn - - gci - - forcetypeassert - - # - goconst - # - gocritic - # - gocognit - # - gomnd - # - nestif - # - testpackage - - - mirror - - revive - - contextcheck - - depguard - - exhaustruct - - nonamedreturns - - # special cases only - - exhaustivestruct - - # deprecated - - maligned - - interfacer - - scopelint - - varcheck - - structcheck - - nosnakecase - - deadcode - - ifshort - -linters-settings: - gomnd: - settings: - mnd: - checks: [case,operation,return,assign] - gocognit: - min-complexity: 50 - cyclop: - max-complexity: 40 - golint: - min-confidence: 0.1 - gocyclo: - min-complexity: 40 - goimports: - local-prefixes: github.com/banzaicloud,github.com/cisco-open - gocritic: - disabled-checks: - - ifElseChain - maintidx: - under: 10 # todo: set a valid value - gomoddirectives: - replace-local: true - replace-allow-list: - - github.com/golang/protobuf - -issues: - # mainly because of the operator, but we are using helm chart names - # as package names - exclude: - - underscore in package name - - should not use underscores in package names - - exclude-rules: - # zz_ files are messing up the receiver name - - linters: - - stylecheck - text: "ST1016:" - # fake client is still alive - - linters: - - staticcheck - text: "SA1019:" diff --git a/third_party/github.com/banzaicloud/istio-operator/api/go.mod b/third_party/github.com/banzaicloud/istio-operator/api/go.mod index 55ff9cb9f..ea10bb846 100644 --- a/third_party/github.com/banzaicloud/istio-operator/api/go.mod +++ b/third_party/github.com/banzaicloud/istio-operator/api/go.mod @@ -4,7 +4,7 @@ go 1.25 require ( github.com/golang/protobuf v1.5.4 - google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 + google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797 google.golang.org/protobuf v1.36.10 istio.io/api v1.27.1 k8s.io/api v0.34.1 @@ -28,7 +28,7 @@ require ( golang.org/x/text v0.29.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect diff --git a/third_party/github.com/banzaicloud/istio-operator/api/go.sum b/third_party/github.com/banzaicloud/istio-operator/api/go.sum index e337353f0..39f10658a 100644 --- a/third_party/github.com/banzaicloud/istio-operator/api/go.sum +++ b/third_party/github.com/banzaicloud/istio-operator/api/go.sum @@ -84,8 +84,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 h1:8XJ4pajGwOlasW+L13MnEGA8W4115jJySQtVfS2/IBU= -google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4/go.mod h1:NnuHhy+bxcg30o7FnVAZbXsPHUDQ9qKWAQKCD7VxFtk= +google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797 h1:D/zZ8knc/wLq9imidPFpHsGuRUYTCWWCwemZ2dxACGs= +google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797/go.mod h1:NnuHhy+bxcg30o7FnVAZbXsPHUDQ9qKWAQKCD7VxFtk= google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -103,8 +103,8 @@ k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4= k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.22.1 h1:Ah1T7I+0A7ize291nJZdS1CabF/lB4E++WizgV24Eqg= sigs.k8s.io/controller-runtime v0.22.1/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= diff --git a/third_party/github.com/banzaicloud/k8s-objectmatcher/.golangci.yml b/third_party/github.com/banzaicloud/k8s-objectmatcher/.golangci.yml deleted file mode 100644 index 112fd8087..000000000 --- a/third_party/github.com/banzaicloud/k8s-objectmatcher/.golangci.yml +++ /dev/null @@ -1,28 +0,0 @@ - -run: - skip-dirs: - - .gen - - client - -linters-settings: - golint: - min-confidence: 0.9 - - gocyclo: - min-complexity: 15 - -linters: - enable: - - misspell - - gofmt - - goimports - disable: - - golint - - errcheck - - gas - - megacheck - - varcheck - - gochecknoglobals - # Disabled due to: ":0: nilness: impossible condition: non-nil == nil (govet)" - - govet - fast: false diff --git a/third_party/github.com/banzaicloud/k8s-objectmatcher/Makefile b/third_party/github.com/banzaicloud/k8s-objectmatcher/Makefile index 719c0fcd4..930c520f6 100644 --- a/third_party/github.com/banzaicloud/k8s-objectmatcher/Makefile +++ b/third_party/github.com/banzaicloud/k8s-objectmatcher/Makefile @@ -1,50 +1,18 @@ -LICENSEI_VERSION = 0.5.0 -GOLANGCI_VERSION = 1.44.0 +# k8s-objectmatcher Makefile +# Most common targets (test, lint, fmt, vet, clean, license, license-check, etc.) +# are now handled by the parent Makefile at the repository root. +# This Makefile contains only unique targets specific to k8s-objectmatcher. -all: license fmt vet test +SHELL = /bin/bash +.SHELLFLAGS := -eu -o pipefail -c -.PHONY: license -license: bin/licensei - bin/licensei header +PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) -# Run go fmt against code -fmt: - go fmt ./... +help: ## Display this help. + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^([a-zA-Z_0-9-]|\/)+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) -# Run go vet against code -vet: - go vet ./... +# Unique targets for k8s-objectmatcher -test: - go test ./... - -test-integration: +.PHONY: test-integration +test-integration: ## Run integration tests. cd tests && go test -integration -v ./... - -bin/licensei: bin/licensei-${LICENSEI_VERSION} - @ln -sf licensei-${LICENSEI_VERSION} bin/licensei - -bin/licensei-${LICENSEI_VERSION}: - @mkdir -p bin - curl -sfL https://raw.githubusercontent.com/goph/licensei/master/install.sh | bash -s v${LICENSEI_VERSION} - @mv bin/licensei $@ - -.PHONY: license-check -license-check: bin/licensei ## Run license check - bin/licensei check - bin/licensei header - -.PHONY: license-cache -license-cache: bin/licensei ## Generate license cache - bin/licensei cache - -bin/golangci-lint: bin/golangci-lint-${GOLANGCI_VERSION} - @ln -sf golangci-lint-${GOLANGCI_VERSION} bin/golangci-lint -bin/golangci-lint-${GOLANGCI_VERSION}: - @mkdir -p bin - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/v${GOLANGCI_VERSION}/install.sh | bash -s -- -b ./bin/ v${GOLANGCI_VERSION} - @mv bin/golangci-lint $@ - -.PHONY: lint -lint: bin/golangci-lint ## Run linter - bin/golangci-lint run diff --git a/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/annotation.go b/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/annotation.go index cc2a163dd..26eb4eb2b 100644 --- a/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/annotation.go +++ b/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/annotation.go @@ -18,7 +18,7 @@ import ( "archive/zip" "bytes" "encoding/base64" - "io/ioutil" + "io" "net/http" json "github.com/json-iterator/go" @@ -122,7 +122,9 @@ func (a *Annotator) GetModifiedConfiguration(obj runtime.Object, annotate bool) // Do not include an empty annotation map if len(annots) == 0 { - a.metadataAccessor.SetAnnotations(obj, nil) + if err := a.metadataAccessor.SetAnnotations(obj, nil); err != nil { + return nil, err + } } modified, err = json.ConfigCompatibleWithStandardLibrary.Marshal(obj) @@ -195,7 +197,7 @@ func zipAndBase64EncodeAnnotation(original []byte) (string, error) { } func unZipAnnotation(original []byte) ([]byte, error) { - annotation, err := ioutil.ReadAll(bytes.NewReader(original)) + annotation, err := io.ReadAll(bytes.NewReader(original)) if err != nil { return nil, err } @@ -221,5 +223,5 @@ func readZipFile(zf *zip.File) ([]byte, error) { return nil, err } defer f.Close() - return ioutil.ReadAll(f) + return io.ReadAll(f) } diff --git a/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/annotation_test.go b/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/annotation_test.go index c63d4181c..95b69c878 100644 --- a/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/annotation_test.go +++ b/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/annotation_test.go @@ -29,7 +29,7 @@ func TestAnnotationRemovedWhenEmpty(t *testing.T) { if err != nil { t.Fatal(err) } - if "{\"metadata\":{}}" != string(modified) { + if string(modified) != "{\"metadata\":{}}" { t.Fatalf("Expected {\"metadata\":{} got %s", string(modified)) } } diff --git a/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/deletenull.go b/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/deletenull.go index d5784d83d..a3c95f187 100644 --- a/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/deletenull.go +++ b/third_party/github.com/banzaicloud/k8s-objectmatcher/patch/deletenull.go @@ -253,6 +253,7 @@ func deleteVolumeClaimTemplateFields(obj []byte) ([]byte, error) { } func isZero(v reflect.Value) bool { + //nolint:exhaustive switch v.Kind() { default: z := reflect.Zero(v.Type()) diff --git a/third_party/github.com/banzaicloud/k8s-objectmatcher/tests/go.mod b/third_party/github.com/banzaicloud/k8s-objectmatcher/tests/go.mod index 109e6c01f..ce13bb8f4 100644 --- a/third_party/github.com/banzaicloud/k8s-objectmatcher/tests/go.mod +++ b/third_party/github.com/banzaicloud/k8s-objectmatcher/tests/go.mod @@ -57,7 +57,7 @@ require ( gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect - k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect diff --git a/third_party/github.com/banzaicloud/k8s-objectmatcher/tests/go.sum b/third_party/github.com/banzaicloud/k8s-objectmatcher/tests/go.sum index dfb18cf78..e9f18209e 100644 --- a/third_party/github.com/banzaicloud/k8s-objectmatcher/tests/go.sum +++ b/third_party/github.com/banzaicloud/k8s-objectmatcher/tests/go.sum @@ -162,8 +162,8 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= diff --git a/third_party/github.com/banzaicloud/operator-tools/Makefile b/third_party/github.com/banzaicloud/operator-tools/Makefile index 8b7e69775..5fa96da25 100644 --- a/third_party/github.com/banzaicloud/operator-tools/Makefile +++ b/third_party/github.com/banzaicloud/operator-tools/Makefile @@ -1,5 +1,16 @@ -LICENSEI_VERSION = 0.2.0 -GOLANGCI_VERSION = 1.21.0 +# operator-tools Makefile +# Most common targets (test, lint, fmt, vet, generate, clean, license-check, etc.) +# are now handled by the parent Makefile at the repository root. +# This Makefile contains only unique targets specific to operator-tools. + +SHELL = /bin/bash +.SHELLFLAGS := -eu -o pipefail -c + +PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) +BIN_DIR := $(PROJECT_DIR)/bin + +# Version constants +CONTROLLER_GEN_VERSION = v0.19.0 # renovate: datasource=github-releases depName=kubernetes-sigs/controller-tools # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -8,103 +19,26 @@ else GOBIN=$(shell go env GOBIN) endif -BIN := ${PWD}/bin -export PATH := ${BIN}:${PATH} - -CONTROLLER_GEN_VERSION = v0.8.0 -CONTROLLER_GEN = $(PWD)/bin/controller-gen - -OS = $(shell uname | tr A-Z a-z) +export PATH := $(BIN_DIR):$(PATH) -ENVTEST_BIN_DIR := ${BIN}/envtest -ENVTEST_K8S_VERSION := 1.24.1 -ENVTEST_BINARY_ASSETS := ${ENVTEST_BIN_DIR}/bin +CONTROLLER_GEN = $(BIN_DIR)/controller-gen -SETUP_ENVTEST := ${BIN}/setup-envtest - -# Generate code -generate: bin/controller-gen - $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/secret/... - $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/volume/... - $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/prometheus/... - $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/types/... - $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/typeoverride/... - $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./pkg/helm/... - -bin/controller-gen: - @ if ! test -x bin/controller-gen; then \ - set -ex ;\ - GOBIN=$(PWD)/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION} ;\ - fi - - -bin/licensei: bin/licensei-${LICENSEI_VERSION} - @ln -sf licensei-${LICENSEI_VERSION} bin/licensei -bin/licensei-${LICENSEI_VERSION}: - @mkdir -p bin - curl -sfL https://git.io/licensei | bash -s v${LICENSEI_VERSION} - @mv bin/licensei $@ +help: ## Display this help. + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^([a-zA-Z_0-9-]|\/)+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) -.PHONY: license-cache -license-cache: bin/licensei ## Generate license cache - bin/licensei cache +# Unique targets for operator-tools -.PHONY: license-check -license-check: bin/licensei ## Run license check - bin/licensei check - bin/licensei header +.PHONY: check-diff +check-diff: ## Check for uncommitted changes (run from repository root) + @echo "Note: This target should be run from the repository root directory" + @echo "Run: make -C ../../.. check-diff-operator-tools" -.PHONY: test -test: ${ENVTEST_BINARY_ASSETS} - KUBEBUILDER_ASSETS=${ENVTEST_BINARY_ASSETS} go test ./... +# Local tool installation (for standalone use of this module) -.PHONY: check -check: test lint check-diff ## Run tests and linters +bin/controller-gen: bin/controller-gen-$(CONTROLLER_GEN_VERSION) ## Symlink controller-gen- into versionless controller-gen. + @ln -sf controller-gen-$(CONTROLLER_GEN_VERSION) bin/controller-gen -bin/golangci-lint: bin/golangci-lint-${GOLANGCI_VERSION} - @ln -sf golangci-lint-${GOLANGCI_VERSION} bin/golangci-lint -bin/golangci-lint-${GOLANGCI_VERSION}: +bin/controller-gen-$(CONTROLLER_GEN_VERSION): ## Download versioned controller-gen. @mkdir -p bin - curl -sfL curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b ./bin/ v${GOLANGCI_VERSION} - @mv bin/golangci-lint $@ - -.PHONY: lint -lint: export CGO_ENABLED = 1 -lint: bin/golangci-lint ## Run linter - bin/golangci-lint run - -.PHONY: fix -fix: export CGO_ENABLED = 1 -fix: bin/golangci-lint ## Fix lint violations - bin/golangci-lint run --fix - -check-diff: generate-type-docs - go mod tidy - $(MAKE) generate docs - git diff --exit-code - -generate-type-docs: - go run cmd/docs.go - -${ENVTEST_BINARY_ASSETS}: ${ENVTEST_BINARY_ASSETS}_${ENVTEST_K8S_VERSION} - ln -sf $(notdir $<) $@ - -${ENVTEST_BINARY_ASSETS}_${ENVTEST_K8S_VERSION}: | ${SETUP_ENVTEST} ${ENVTEST_BIN_DIR} - ln -sf $$(${SETUP_ENVTEST} --bin-dir ${ENVTEST_BIN_DIR} use ${ENVTEST_K8S_VERSION} -p path) $@ - -${SETUP_ENVTEST}: IMPORT_PATH := sigs.k8s.io/controller-runtime/tools/setup-envtest -${SETUP_ENVTEST}: VERSION := latest -${SETUP_ENVTEST}: | ${BIN} - GOBIN=${BIN} go install ${IMPORT_PATH}@${VERSION} - -${ENVTEST_BIN_DIR}: | ${BIN} - mkdir -p $@ - -${BIN}: - mkdir -p $@ - -define go_install_binary -find ${BIN} -name '$(notdir ${IMPORT_PATH})_*' -exec rm {} + -GOBIN=${BIN} go install ${IMPORT_PATH}@${VERSION} -mv ${BIN}/$(notdir ${IMPORT_PATH}) ${BIN}/$(notdir ${IMPORT_PATH})_${VERSION} -endef \ No newline at end of file + GOBIN=$(BIN_DIR) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION) + @mv bin/controller-gen bin/controller-gen-$(CONTROLLER_GEN_VERSION) diff --git a/third_party/github.com/banzaicloud/operator-tools/docs/types/secret_types.md b/third_party/github.com/banzaicloud/operator-tools/docs/types/secret_types.md index d4fe8bf12..f385f596f 100644 --- a/third_party/github.com/banzaicloud/operator-tools/docs/types/secret_types.md +++ b/third_party/github.com/banzaicloud/operator-tools/docs/types/secret_types.md @@ -4,6 +4,7 @@ SecretLoader facilitates loading the secrets from an operator. Leverages core types from kubernetes/api/core/v1 + ## Configuration ## Secret diff --git a/third_party/github.com/banzaicloud/operator-tools/docs/types/volume_types.md b/third_party/github.com/banzaicloud/operator-tools/docs/types/volume_types.md index f12e162bf..98928cf2a 100644 --- a/third_party/github.com/banzaicloud/operator-tools/docs/types/volume_types.md +++ b/third_party/github.com/banzaicloud/operator-tools/docs/types/volume_types.md @@ -4,12 +4,13 @@ Leverages core types from kubernetes/api/core/v1 + ## Configuration ## KubernetesVolume ### host_path (*corev1.HostPathVolumeSource, optional) {#kubernetesvolume-host_path} -Deprecated, use hostPath +Deprecated: use hostPath Default: - diff --git a/third_party/github.com/banzaicloud/operator-tools/go.mod b/third_party/github.com/banzaicloud/operator-tools/go.mod index 63c7de600..288f6f424 100644 --- a/third_party/github.com/banzaicloud/operator-tools/go.mod +++ b/third_party/github.com/banzaicloud/operator-tools/go.mod @@ -4,33 +4,32 @@ go 1.25 require ( emperror.dev/errors v0.8.1 - github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 github.com/banzaicloud/k8s-objectmatcher v1.8.0 github.com/briandowns/spinner v1.23.2 - github.com/cppforlife/go-patch v0.2.0 + github.com/evanphx/json-patch/v5 v5.9.11 github.com/fatih/color v1.18.0 github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v1.4.3 - github.com/go-test/deep v1.1.1 - github.com/huandu/xstrings v1.5.0 // indirect github.com/iancoleman/orderedmap v0.3.0 github.com/pborman/uuid v1.2.1 github.com/spf13/cast v1.10.0 - github.com/stretchr/testify v1.11.1 github.com/wayneashleyberry/terminal-dimensions v1.1.0 - gopkg.in/yaml.v3 v3.0.1 helm.sh/helm/v3 v3.19.0 k8s.io/api v0.34.1 k8s.io/apiextensions-apiserver v0.34.1 k8s.io/apimachinery v0.34.1 k8s.io/client-go v0.34.1 - k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 sigs.k8s.io/controller-runtime v0.22.1 sigs.k8s.io/yaml v1.6.0 ) -require k8s.io/cli-runtime v0.34.0 // indirect +require ( + github.com/MakeNowJust/heredoc/v2 v2.0.1 + github.com/go-test/deep v1.1.1 + github.com/google/go-cmp v0.7.0 + github.com/stretchr/testify v1.11.1 +) require ( dario.cat/mergo v1.0.1 // indirect @@ -55,7 +54,6 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/evanphx/json-patch v5.9.11+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect @@ -79,13 +77,14 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect github.com/google/gnostic-models v0.7.0 // indirect - github.com/google/go-cmp v0.7.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gosuri/uitable v0.0.4 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmoiron/sqlx v1.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -144,14 +143,16 @@ require ( golang.org/x/time v0.13.0 // indirect golang.org/x/tools v0.37.0 // indirect gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250929231259-57b25ae835d4 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect google.golang.org/grpc v1.75.1 // indirect google.golang.org/protobuf v1.36.10 // indirect gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiserver v0.34.1 // indirect + k8s.io/cli-runtime v0.34.0 // indirect k8s.io/component-base v0.34.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect diff --git a/third_party/github.com/banzaicloud/operator-tools/go.sum b/third_party/github.com/banzaicloud/operator-tools/go.sum index 67a66aa57..5186cbb1a 100644 --- a/third_party/github.com/banzaicloud/operator-tools/go.sum +++ b/third_party/github.com/banzaicloud/operator-tools/go.sum @@ -30,8 +30,6 @@ github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA4 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= @@ -66,8 +64,6 @@ github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpS github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/coreos/go-systemd/v22 v22.6.0 h1:aGVa/v8B7hpb0TKl0MWoAavPDmHvobFe5R5zn0bCJWo= github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU= -github.com/cppforlife/go-patch v0.2.0 h1:Y14MnCQjDlbw7WXT4k+u6DPAA9XnygN4BfrSpI/19RU= -github.com/cppforlife/go-patch v0.2.0/go.mod h1:67a7aIi94FHDZdoeGSJRRFDp66l9MhaAG1yGxpUoFD8= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= @@ -226,8 +222,8 @@ github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -239,7 +235,6 @@ github.com/hashicorp/golang-lru/arc/v2 v2.0.5 h1:l2zaLDubNhW4XO3LnliVj0GXO3+/CGN github.com/hashicorp/golang-lru/arc/v2 v2.0.5/go.mod h1:ny6zBSQZi2JxIeYcv7kt2sH2PXJtirBN7RDhRpxPkxU= github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -533,10 +528,10 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 h1:8XJ4pajGwOlasW+L13MnEGA8W4115jJySQtVfS2/IBU= -google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4/go.mod h1:NnuHhy+bxcg30o7FnVAZbXsPHUDQ9qKWAQKCD7VxFtk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250929231259-57b25ae835d4 h1:i8QOKZfYg6AbGVZzUAY3LrNWCKF8O6zFisU9Wl9RER4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250929231259-57b25ae835d4/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ= +google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797 h1:D/zZ8knc/wLq9imidPFpHsGuRUYTCWWCwemZ2dxACGs= +google.golang.org/genproto/googleapis/api v0.0.0-20251002232023-7c0ddcbb5797/go.mod h1:NnuHhy+bxcg30o7FnVAZbXsPHUDQ9qKWAQKCD7VxFtk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 h1:CirRxTOwnRWVLKzDNrs0CXAaVozJoR4G9xvdRecrdpk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -559,11 +554,9 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -602,8 +595,8 @@ k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZ k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/kubectl v0.34.0 h1:NcXz4TPTaUwhiX4LU+6r6udrlm0NsVnSkP3R9t0dmxs= k8s.io/kubectl v0.34.0/go.mod h1:bmd0W5i+HuG7/p5sqicr0Li0rR2iIhXL0oUyLF3OjR4= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= -k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc= oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o= sigs.k8s.io/controller-runtime v0.22.1 h1:Ah1T7I+0A7ize291nJZdS1CabF/lB4E++WizgV24Eqg= diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/docgen.go b/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/docgen.go index 3cf5f1d7e..3cacc4bc2 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/docgen.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/docgen.go @@ -144,7 +144,7 @@ func (d *Doc) visitNode(n ast.Node) bool { d.Append(fmt.Sprintf("## %s", getTypeName(generic, typeName.Name.Name))) d.Append("") // Adds a line-break for markdown formatting if getTypeDocs(generic, true) != "" { - d.Append(fmt.Sprintf("%s", getTypeDocs(generic, true))) + d.Append(getTypeDocs(generic, true)) } for i, item := range structure.Fields.List { name, com, def, required, err := d.getValuesFromItem(item) @@ -153,9 +153,10 @@ func (d *Doc) visitNode(n ast.Node) bool { } required_string := "" - if required == "No" { + switch required { + case "No": required_string = ", optional" - } else if required == "Yes" { + case "Yes": required_string = ", required" } @@ -163,7 +164,7 @@ func (d *Doc) visitNode(n ast.Node) bool { d.Append(fmt.Sprintf("### %s (%s%s) {#%s}", name, d.normaliseType(item.Type), required_string, anchor)) d.Append("") if com != "" { - d.Append(fmt.Sprintf("%s", com)) + d.Append(com) d.Append("") } d.Append(fmt.Sprintf("Default: %s", def)) diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/docgen_test.go b/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/docgen_test.go index 3f782cab7..f8da60055 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/docgen_test.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/docgen_test.go @@ -15,16 +15,17 @@ package docgen_test import ( - "io/ioutil" + "os" "path/filepath" "runtime" + "strings" "testing" "github.com/MakeNowJust/heredoc/v2" - "github.com/andreyvit/diff" "github.com/banzaicloud/operator-tools/pkg/docgen" "github.com/banzaicloud/operator-tools/pkg/utils" "github.com/go-logr/logr" + "github.com/google/go-cmp/cmp" ) var logger logr.Logger @@ -33,6 +34,15 @@ func init() { logger = utils.Log } +// normalizeString trims trailing whitespace from each line and the overall string +func normalizeString(s string) string { + lines := strings.Split(s, "\n") + for i, line := range lines { + lines[i] = strings.TrimRight(line, " \t") + } + return strings.TrimSpace(strings.Join(lines, "\n")) +} + func TestGenParse(t *testing.T) { _, filename, _, _ := runtime.Caller(0) currentDir := filepath.Dir(filename) @@ -51,7 +61,7 @@ func TestGenParse(t *testing.T) { ## Sample ### field1 (string, optional) {#sample-field1} - + Default: - `), }, @@ -68,7 +78,7 @@ func TestGenParse(t *testing.T) { ## SampleDefault ### field1 (string, optional) {#sampledefault-field1} - + Default: testval `), }, @@ -90,7 +100,7 @@ func TestGenParse(t *testing.T) { {{< highlight yaml >}} test: code block some: more lines - indented: line + indented: line {{< /highlight >}} @@ -106,13 +116,15 @@ func TestGenParse(t *testing.T) { t.Fatalf("%+v", err) } - bytes, err := ioutil.ReadFile(filepath.Join(item.docItem.DestPath, item.docItem.Name+".md")) + bytes, err := os.ReadFile(filepath.Join(item.docItem.DestPath, item.docItem.Name+".md")) if err != nil { t.Fatalf("%+v", err) } - if a, e := diff.TrimLinesInString(string(bytes)), diff.TrimLinesInString(item.expected); a != e { - t.Errorf("Result does not match (-actual vs +expected):\n%v\nActual: %s", diff.LineDiff(a, e), string(bytes)) + actual := normalizeString(string(bytes)) + expected := normalizeString(item.expected) + if diff := cmp.Diff(expected, actual); diff != "" { + t.Errorf("Result mismatch (-want +got):\n%s", diff) } } } diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/lister.go b/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/lister.go index f9d44b893..81f009d41 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/lister.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/docgen/lister.go @@ -15,7 +15,7 @@ package docgen import ( - "io/ioutil" + "os" "path/filepath" "regexp" "sort" @@ -59,7 +59,7 @@ func (sl *SourceLister) ListSources() ([]DocItem, error) { for _, key := range orderedMap(sl.Sources).Keys() { p := sl.Sources[key] - files, err := ioutil.ReadDir(p.Path) + files, err := os.ReadDir(p.Path) if err != nil { return nil, errors.WrapIff(err, "failed to read files from %s", p.Path) } @@ -83,7 +83,6 @@ func (sl *SourceLister) ListSources() ([]DocItem, error) { return sourceList, nil } - func (sl *SourceLister) isBlacklisted(source string) bool { for _, p := range sl.IgnoredSources { r := regexp.MustCompile(p) diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/render_test.go b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/render_test.go index 93973db60..f114b3d21 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/render_test.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/render_test.go @@ -54,7 +54,6 @@ func TestRenderChartWithCrdsAndTemplates(t *testing.T) { assert.Equal(t, "loggings.logging.banzaicloud.io", o.GetName()) } - func TestRenderChartWithCrdsOnly(t *testing.T) { chart := http.Dir("testdata/crds-only/logging-operator") @@ -95,7 +94,7 @@ func TestRenderWithScheme(t *testing.T) { objects, err := Render(chart, valuesMap, ReleaseOptions{ Name: "release-name", Namespace: "release-namespace", - Scheme: scheme, + Scheme: scheme, }, "logging-operator") require.NoError(t, err) diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/strimap.go b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/strimap.go index 321228baa..ac4b25e26 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/strimap.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/strimap.go @@ -51,4 +51,4 @@ func MergeMaps(a, b Strimap) Strimap { out[k] = v } return out -} \ No newline at end of file +} diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/templatereconciler/chart.go b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/templatereconciler/chart.go index f17bb9c48..2c82743f3 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/templatereconciler/chart.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/templatereconciler/chart.go @@ -48,11 +48,11 @@ func chartObjects(releaseData *ReleaseData, scheme *runtime.Scheme, caps chartut } objects, err := helm.Render(releaseData.Chart, helm.MergeMaps(chartDefaultValuesYaml, releaseData.Values), helm.ReleaseOptions{ - Name: releaseData.ReleaseName, - IsInstall: true, - IsUpgrade: false, - Namespace: releaseData.Namespace, - Scheme: scheme, + Name: releaseData.ReleaseName, + IsInstall: true, + IsUpgrade: false, + Namespace: releaseData.Namespace, + Scheme: scheme, Capabilities: caps, }, releaseData.ChartName) if err != nil { diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/templatereconciler/reconciler.go b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/templatereconciler/reconciler.go index abaf1171f..3d6caae23 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/templatereconciler/reconciler.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/templatereconciler/reconciler.go @@ -184,7 +184,6 @@ func (rec *HelmReconciler) Reconcile(object runtime.Object, component Component) return &reconcile.Result{ RequeueAfter: time.Second * 5, }, nil - } } @@ -204,22 +203,22 @@ func (rec *HelmReconciler) Reconcile(object runtime.Object, component Component) rec.logger.Error(uerr, "status update failed") } return result, err - } else { - if component.Skipped(object) { - err = component.UpdateStatus(object, types.ReconcileStatusUnmanaged, "") - if err != nil { - return result, err - } - } else if component.Enabled(object) { - err = component.UpdateStatus(object, types.ReconcileStatusAvailable, "") - if err != nil { - return result, err - } - } else { - err = component.UpdateStatus(object, types.ReconcileStatusRemoved, "") - if err != nil { - return result, err - } + } + switch { + case component.Skipped(object): + err = component.UpdateStatus(object, types.ReconcileStatusUnmanaged, "") + if err != nil { + return result, err + } + case component.Enabled(object): + err = component.UpdateStatus(object, types.ReconcileStatusAvailable, "") + if err != nil { + return result, err + } + default: + err = component.UpdateStatus(object, types.ReconcileStatusRemoved, "") + if err != nil { + return result, err } } diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/values.go b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/values.go index 3f26ca189..2d810ab9e 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/values.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/values.go @@ -39,7 +39,6 @@ type EnvironmentVariables struct { EnvConfigMap []EnvConfigMap `json:"envConfigMaps,omitempty"` } - // +kubebuilder:object:generate=true type EnvConfigMap struct { Name string `json:"name"` diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/zz_generated.deepcopy.go b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/zz_generated.deepcopy.go index 9d533bc79..09d1d41c4 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/helm/zz_generated.deepcopy.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/helm/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated // Copyright © 2020 Banzai Cloud // diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/inventory/scope.go b/third_party/github.com/banzaicloud/operator-tools/pkg/inventory/scope.go index a7a5718fe..01b965fe9 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/inventory/scope.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/inventory/scope.go @@ -86,4 +86,4 @@ func getDynamicResourceScope(gk schema.GroupKind) (bool, bool) { namespaced, ok := dynamicResourceScope[gk.String()] return namespaced, ok -} \ No newline at end of file +} diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/logger/logsink.go b/third_party/github.com/banzaicloud/operator-tools/pkg/logger/logsink.go index 7112738fb..8f4d3a1ff 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/logger/logsink.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/logger/logsink.go @@ -87,13 +87,14 @@ func (log *SpinnerLogSink) Init(_ logr.RuntimeInfo) {} // Info implements logr.LogSink interface func (log *SpinnerLogSink) Info(level int, msg string, keysAndValues ...interface{}) { - colorPrinter := log.getColorPrinter(log.colors.Info) if !log.Enabled(level) { return } - allVal := append(keysAndValues, log.values...) + allVal := make([]interface{}, 0, len(keysAndValues)+len(log.values)) + allVal = append(allVal, keysAndValues...) + allVal = append(allVal, log.values...) if len(allVal) > 0 { msg = fmt.Sprintf("%s %s", msg, log.joinAndSeparatePairs(allVal)) } @@ -116,6 +117,15 @@ func (log *SpinnerLogSink) Info(level int, msg string, keysAndValues ...interfac } } + // If not grouped, write directly without spinner animation + if !log.grouped { + // Include the same escape codes that spinner would use: \r (carriage return) and \x1b[K (clear line) + finalMsg := "\r\x1b[K" + colorPrinter.Sprintf("%c", log.checkMark) + " " + msg + "\n" + fmt.Fprint(log.out, finalMsg) + return + } + + // For grouped mode, use spinner if log.spinner == nil { log.initSpinner() } @@ -127,10 +137,6 @@ func (log *SpinnerLogSink) Info(level int, msg string, keysAndValues ...interfac log.spinner.FinalMSG = colorPrinter.Sprintf("%c", log.checkMark) + log.spinner.Suffix + "\n" } log.mux.Unlock() - - if log.spinner != nil && !log.grouped { - log.stopSpinner() - } } // Enabled implements logr.LogSink interface @@ -140,7 +146,9 @@ func (log *SpinnerLogSink) Enabled(level int) bool { // Error implements logr.LogSink interface func (log *SpinnerLogSink) Error(e error, msg string, keysAndValues ...interface{}) { - allVal := append(keysAndValues, log.values...) + allVal := make([]interface{}, 0, len(keysAndValues)+len(log.values)) + allVal = append(allVal, keysAndValues...) + allVal = append(allVal, log.values...) colorPrinter := log.getColorPrinter(log.colors.Error) diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/merge/merge.go b/third_party/github.com/banzaicloud/operator-tools/pkg/merge/merge.go index d4650b8d5..e60279748 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/merge/merge.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/merge/merge.go @@ -60,4 +60,4 @@ func Merge(base, overrides interface{}) error { } valueOfBase.Set(reflect.Indirect(into)) return nil -} \ No newline at end of file +} diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/merge/merge_test.go b/third_party/github.com/banzaicloud/operator-tools/pkg/merge/merge_test.go index 116030c5a..f40957494 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/merge/merge_test.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/merge/merge_test.go @@ -114,8 +114,8 @@ func TestMerge(t *testing.T) { // container c is not modified (note that it's index will change) assert.Equal(t, corev1.Container{ - Name: "container-c", - Image: "image-c", + Name: "container-c", + Image: "image-c", Command: []string{"fake"}, }, base.Spec.Template.Spec.Containers[3]) } @@ -166,7 +166,7 @@ func TestVolume(t *testing.T) { err := Merge(base, overrides) require.NoError(t, err) - require.Equal(t, &v1.DaemonSet{ + require.Equal(t, &v1.DaemonSet{ Spec: v1.DaemonSetSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ @@ -346,7 +346,7 @@ func TestMergeMap(t *testing.T) { "a": "1", "b": "3", "c": "4", - }, base.ObjectMeta.Labels) + }, base.Labels) } func TestMergeMapWithEmbeddedType(t *testing.T) { @@ -374,7 +374,7 @@ func TestMergeMapWithEmbeddedType(t *testing.T) { "a": "1", "b": "3", "c": "4", - }, base.ObjectMeta.Labels) + }, base.Labels) } func TestMergeService(t *testing.T) { @@ -420,7 +420,7 @@ func TestMergeService(t *testing.T) { TargetPort: intstr.FromInt(8082), }, }, - Selector:map[string]string{ + Selector: map[string]string{ "b": "3", "c": "4", }, @@ -434,7 +434,7 @@ func TestMergeService(t *testing.T) { "a": "1", "b": "3", "c": "4", - }, base.ObjectMeta.Labels) + }, base.Labels) require.Equal(t, base.Spec, corev1.ServiceSpec{ Ports: []corev1.ServicePort{ diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/prometheus/zz_generated.deepcopy.go b/third_party/github.com/banzaicloud/operator-tools/pkg/prometheus/zz_generated.deepcopy.go index a0fdeb301..88787241f 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/prometheus/zz_generated.deepcopy.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/prometheus/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated // Copyright © 2020 Banzai Cloud // @@ -57,7 +56,8 @@ func (in *Endpoint) DeepCopyInto(out *Endpoint) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = make([]string, len(*in)) copy(*out, *in) } diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/component.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/component.go index 674dedb5d..ae8b38bb8 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/component.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/component.go @@ -156,7 +156,7 @@ func (r *Dispatcher) Handle(object runtime.Object) (ctrl.Result, error) { combinedResult.CombineErr(errors.WrapIf(uerr, "unable to update status for component")) } } else { - if result == nil || (!result.Requeue && result.RequeueAfter == 0) { + if result == nil || result.RequeueAfter == 0 { status := types.ReconcileStatusRemoved if cr.IsEnabled(object) { status = types.ReconcileStatusAvailable diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/conditions.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/conditions.go index 248cdf888..2a85153d9 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/conditions.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/conditions.go @@ -51,14 +51,14 @@ type ResourceCondition struct { type ConditionChecker struct { client client.Client scheme *runtime.Scheme - log logr.Logger + log logr.Logger } func NewConditionChecker(client client.Client, scheme *runtime.Scheme, log logr.Logger) *ConditionChecker { return &ConditionChecker{ client: client, scheme: scheme, - log: log, + log: log, } } diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/handlers.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/handlers.go index 9e870ca64..6bdd7dcd1 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/handlers.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/handlers.go @@ -15,6 +15,7 @@ package reconciler import ( + "context" "strings" "k8s.io/apimachinery/pkg/types" @@ -26,7 +27,7 @@ import ( ) func EnqueueByOwnerAnnotationMapper() handler.MapFunc { - return func(a client.Object) []reconcile.Request { + return func(ctx context.Context, a client.Object) []reconcile.Request { pieces := strings.SplitN(a.GetAnnotations()[ottypes.BanzaiCloudRelatedTo], string(types.Separator), 2) if len(pieces) != 2 { return []reconcile.Request{} diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/native.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/native.go index 79015be81..48f5923dc 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/native.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/native.go @@ -24,7 +24,6 @@ import ( crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" crdv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" apimeta "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -149,7 +148,7 @@ type NativeReconciler struct { *GenericResourceReconciler client.Client scheme *runtime.Scheme - restMapper meta.RESTMapper + restMapper apimeta.RESTMapper reconciledComponent NativeReconciledComponent configTranslate ResourceTranslate componentName string @@ -175,7 +174,7 @@ func NativeReconcilerSetControllerRef() NativeReconcilerOpt { } } -func NativeReconcilerSetRESTMapper(mapper meta.RESTMapper) NativeReconcilerOpt { +func NativeReconcilerSetRESTMapper(mapper apimeta.RESTMapper) NativeReconcilerOpt { return func(r *NativeReconciler) { r.restMapper = mapper } @@ -286,12 +285,13 @@ func (rec *NativeReconciler) Reconcile(owner runtime.Object) (*reconcile.Result, LOOP: for _, r := range rec.reconciledComponent.ResourceBuilders(rec.configTranslate(owner)) { o, state, err := r() - if err != nil { + switch { + case err != nil: combinedResult.CombineErr(err) - } else if o == nil || state == nil { + case o == nil || state == nil: rec.Log.Info("skipping resource builder reconciliation due to object or desired state was nil") continue - } else { + default: var objectMeta metav1.Object objectMeta, err = rec.addComponentIDAnnotation(o, componentID) if err != nil { @@ -330,7 +330,7 @@ LOOP: } } - // desired state can be overriden to create-only by an annotation + // desired state can be overridden to create-only by an annotation if _, ok := objectMeta.GetAnnotations()[types.BanzaiCloudDesiredStateCreated]; ok { if ds, ok := state.(DynamicDesiredState); ok && ds.DesiredState == StatePresent || state == StatePresent { state = StateCreated @@ -376,7 +376,7 @@ LOOP: } func (rec *NativeReconciler) generateComponentID(owner runtime.Object) (string, metav1.Object, error) { - ownerMeta, err := meta.Accessor(owner) + ownerMeta, err := apimeta.Accessor(owner) if err != nil { return "", nil, errors.WrapIf(err, "failed to access owner object meta") } @@ -408,7 +408,7 @@ func (rec *NativeReconciler) generateComponentID(owner runtime.Object) (string, } func (rec *NativeReconciler) generateResourceIDForPurge(resource runtime.Object) (string, error) { - resourceMeta, err := meta.Accessor(resource) + resourceMeta, err := apimeta.Accessor(resource) if err != nil { return "", errors.WrapIf(err, "failed to access owner object meta") } @@ -477,7 +477,7 @@ func (rec *NativeReconciler) purge(excluded map[string]bool, componentId string) continue } for _, o := range objects.Items { - objectMeta, err := meta.Accessor(&o) + objectMeta, err := apimeta.Accessor(&o) if err != nil { allErr = errors.Combine(allErr, errors.WrapIf(err, "failed to get object metadata")) continue @@ -504,7 +504,7 @@ func (rec *NativeReconciler) purge(excluded map[string]bool, componentId string) utils.RuntimeObjects(purgeObjects).Sort(utils.UninstallResourceOrder) for _, o := range purgeObjects { - if err := rec.Client.Delete(context.TODO(), o.(client.Object)); err != nil && !k8serrors.IsNotFound(err) { + if err := rec.Delete(context.TODO(), o.(client.Object)); err != nil && !k8serrors.IsNotFound(err) { allErr = errors.Combine(allErr, err) } else { rec.addReconciledObjectState(ReconciledObjectStatePurged, o.DeepCopyObject()) @@ -543,7 +543,7 @@ func (rec *NativeReconciler) addRelatedToAnnotation(objectMeta, ownerMeta metav1 } func (rec *NativeReconciler) addComponentIDAnnotation(o runtime.Object, componentId string) (metav1.Object, error) { - objectMeta, err := meta.Accessor(o) + objectMeta, err := apimeta.Accessor(o) if err != nil { return nil, errors.Wrapf(err, "failed to access object metadata") } diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/reconcileretry.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/reconcileretry.go index 9feb68c6b..cc6694c3d 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/reconcileretry.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/reconcileretry.go @@ -36,7 +36,7 @@ func (r *ReconcileRetry) Reconcile(component func() (*reconcile.Result, error)) if result == nil { return nil } - if !result.Requeue && result.RequeueAfter == 0 { + if result.RequeueAfter == 0 { break } else { if result.RequeueAfter > 0 { diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/resource.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/resource.go index 040a1f54d..fa795f4e0 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/resource.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/resource.go @@ -192,7 +192,7 @@ func MatchImmutableErrorMessages(errorMessage string) bool { } // NewGenericReconciler returns GenericResourceReconciler -// Deprecated, use NewReconcilerWith +// Deprecated: use NewReconcilerWith func NewGenericReconciler(c client.Client, log logr.Logger, opts ReconcilerOpts) *GenericResourceReconciler { if opts.Scheme == nil { opts.Scheme = runtime.NewScheme() @@ -355,6 +355,8 @@ func (r *GenericResourceReconciler) shouldRecreate(sErr *apierrors.StatusError) } // ReconcileResource reconciles various kubernetes types +// +//nolint:gocyclo,funlen func (r *GenericResourceReconciler) ReconcileResource(desired runtime.Object, desiredState DesiredState) (*reconcile.Result, error) { resourceDetails, gvk, err := r.resourceDetails(desired) if err != nil { @@ -369,17 +371,25 @@ func (r *GenericResourceReconciler) ReconcileResource(desired runtime.Object, de } else if ds, ok := desiredState.(DesiredStateWithGetter); ok { state = ds.GetDesiredState() } + var created bool + var current runtime.Object switch state { case StateCreated: - created, _, err := r.CreateIfNotExist(desired, desiredState) + created, _, err = r.CreateIfNotExist(desired, desiredState) if err == nil && created { return nil, nil } if err != nil { return nil, errors.WrapIfWithDetails(err, "failed to create resource", resourceDetails...) } + case StateAbsent: + _, err := r.delete(desired, desiredState) + if err != nil { + return nil, errors.WrapIfWithDetails(err, "failed to delete resource", resourceDetails...) + } + return nil, nil default: - created, current, err := r.CreateIfNotExist(desired, desiredState) + created, current, err = r.CreateIfNotExist(desired, desiredState) if err == nil && created { return nil, nil } @@ -435,12 +445,13 @@ func (r *GenericResourceReconciler) ReconcileResource(desired runtime.Object, de } patchResult, err := r.Options.PatchMaker.Calculate(current, desired, r.Options.PatchCalculateOptions...) - if err != nil { + switch { + case err != nil: debugLog.Info("could not match objects", "error", err) - } else if patchResult.IsEmpty() { + case patchResult.IsEmpty(): debugLog.Info("resource is in sync") return nil, nil - } else { + default: if gvk.Kind == "Secret" { debugLog.Info("resource diff") } else { @@ -518,22 +529,16 @@ func (r *GenericResourceReconciler) ReconcileResource(desired runtime.Object, de return nil, errors.WrapIfWithDetails(err, "updating resource failed", resourceDetails...) } debugLog.Info("resource updated") - - case StateAbsent: - _, err := r.delete(desired, desiredState) - if err != nil { - return nil, errors.WrapIfWithDetails(err, "failed to delete resource", resourceDetails...) - } } return nil, nil } -func (r *GenericResourceReconciler) fromDesired(desired runtime.Object) (runtime.Object, error) { +func (r *GenericResourceReconciler) fromDesired(desired runtime.Object) runtime.Object { if _, ok := desired.(*unstructured.Unstructured); ok { if r.Options.Scheme != nil { object, err := r.Options.Scheme.New(desired.GetObjectKind().GroupVersionKind()) if err == nil { - return object, nil + return object } r.Log.V(2).Info("unable to detect correct type for the resource, falling back to unstructured") } @@ -541,16 +546,13 @@ func (r *GenericResourceReconciler) fromDesired(desired runtime.Object) (runtime desiredGVK := desired.GetObjectKind() current.SetKind(desiredGVK.GroupVersionKind().Kind) current.SetAPIVersion(desiredGVK.GroupVersionKind().GroupVersion().String()) - return current, nil + return current } - return reflect.New(reflect.Indirect(reflect.ValueOf(desired)).Type()).Interface().(runtime.Object), nil + return reflect.New(reflect.Indirect(reflect.ValueOf(desired)).Type()).Interface().(runtime.Object) } func (r *GenericResourceReconciler) CreateIfNotExist(desired runtime.Object, desiredState DesiredState) (bool, runtime.Object, error) { - current, err := r.fromDesired(desired) - if err != nil { - return false, nil, errors.WrapIf(err, "failed to create new object based on desired") - } + current := r.fromDesired(desired) m, err := meta.Accessor(desired) if err != nil { return false, nil, errors.WrapIf(err, "failed to get object key") @@ -595,8 +597,8 @@ func (r *GenericResourceReconciler) CreateIfNotExist(desired runtime.Object, des } switch t := desired.DeepCopyObject().(type) { case *v1beta1.CustomResourceDefinition: - err = wait.Poll(time.Second*1, time.Second*10, func() (done bool, err error) { - err = r.Client.Get(context.TODO(), client.ObjectKey{Namespace: t.Namespace, Name: t.Name}, t) + err = wait.PollUntilContextTimeout(context.TODO(), time.Second*1, time.Second*10, true, func(ctx context.Context) (done bool, err error) { + err = r.Client.Get(ctx, client.ObjectKey{Namespace: t.Namespace, Name: t.Name}, t) if err != nil { return false, err } @@ -606,8 +608,8 @@ func (r *GenericResourceReconciler) CreateIfNotExist(desired runtime.Object, des return false, nil, errors.WrapIfWithDetails(err, "failed to wait for the crd to get ready", resourceDetails...) } case *v1.CustomResourceDefinition: - err = wait.Poll(time.Second*1, time.Second*10, func() (done bool, err error) { - err = r.Client.Get(context.TODO(), client.ObjectKey{Namespace: t.Namespace, Name: t.Name}, t) + err = wait.PollUntilContextTimeout(context.TODO(), time.Second*1, time.Second*10, true, func(ctx context.Context) (done bool, err error) { + err = r.Client.Get(ctx, client.ObjectKey{Namespace: t.Namespace, Name: t.Name}, t) if err != nil { return false, err } @@ -625,10 +627,7 @@ func (r *GenericResourceReconciler) CreateIfNotExist(desired runtime.Object, des } func (r *GenericResourceReconciler) delete(desired runtime.Object, desiredState DesiredState) (bool, error) { - current, err := r.fromDesired(desired) - if err != nil { - return false, errors.WrapIf(err, "failed to create new object based on desired") - } + current := r.fromDesired(desired) m, err := meta.Accessor(desired) if err != nil { return false, errors.WrapIf(err, "failed to get object key") @@ -688,6 +687,8 @@ func crdReady(crd *v1beta1.CustomResourceDefinition) bool { if cond.Status == v1beta1.ConditionTrue { return true } + case v1beta1.NamesAccepted, v1beta1.NonStructuralSchema, v1beta1.Terminating, v1beta1.KubernetesAPIApprovalPolicyConformant: + // These conditions are not relevant for readiness check } } return false @@ -700,6 +701,8 @@ func crdReadyV1(crd *v1.CustomResourceDefinition) bool { if cond.Status == v1.ConditionTrue { return true } + case v1.NamesAccepted, v1.NonStructuralSchema, v1.Terminating, v1.KubernetesAPIApprovalPolicyConformant: + // These conditions are not relevant for readiness check } } return false @@ -716,7 +719,9 @@ func (r *GenericResourceReconciler) resourceDetails(desired runtime.Object) ([]i if key.Namespace != "" { values = append(values, "namespace", key.Namespace) } - defaultValues := append(values, "type", reflect.TypeOf(desired).String()) + defaultValues := make([]interface{}, len(values), len(values)+2) + copy(defaultValues, values) + defaultValues = append(defaultValues, "type", reflect.TypeOf(desired).String()) if r.Options.Scheme == nil { return defaultValues, gvk, nil } @@ -731,7 +736,7 @@ func (r *GenericResourceReconciler) resourceDetails(desired runtime.Object) ([]i return values, gvk, nil } -func (r *GenericResourceReconciler) resourceLog(desired runtime.Object, details ...interface{}) logr.Logger { +func (r *GenericResourceReconciler) resourceLog(_ runtime.Object, details ...interface{}) logr.Logger { if len(details) > 0 { return r.Log.WithValues(details...) } diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/resource_test.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/resource_test.go index 4ac036de7..2feace758 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/resource_test.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/resource_test.go @@ -154,7 +154,7 @@ func TestRecreateObjectFailIfNotAllowed(t *testing.T) { }, wantResult: func(result *reconcile.Result) { require.NotNil(t, result) - require.True(t, result.Requeue) + require.Greater(t, result.RequeueAfter, int64(0)) }, }, { diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/result.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/result.go index ac2b4334b..d952224ed 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/result.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/result.go @@ -22,15 +22,12 @@ import ( // Collects results and errors of all subcomponents instead of failing and bailing out immediately type CombinedResult struct { Result reconcile.Result - Err error + Err error } func (c *CombinedResult) Combine(sub *reconcile.Result, err error) { c.CombineErr(err) if sub != nil { - if sub.Requeue { - c.Result.Requeue = true - } // combined should be requeued at the minimum of all subresults if sub.RequeueAfter > 0 { if c.Result.RequeueAfter == 0 || sub.RequeueAfter < c.Result.RequeueAfter { diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/suite_test.go b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/suite_test.go index 46276f85b..edbaec92f 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/suite_test.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/reconciler/suite_test.go @@ -114,4 +114,4 @@ func assertSecretList(t *testing.T, a func(l *corev1.SecretList)) { } a(l) -} \ No newline at end of file +} diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/resources/overlay.go b/third_party/github.com/banzaicloud/operator-tools/pkg/resources/overlay.go index 433b4cd39..82fe0c99d 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/resources/overlay.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/resources/overlay.go @@ -15,13 +15,14 @@ package resources import ( + "encoding/json" + "emperror.dev/errors" - ypatch "github.com/cppforlife/go-patch/patch" - "gopkg.in/yaml.v3" + jsonpatch "github.com/evanphx/json-patch/v5" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - k8syaml "sigs.k8s.io/yaml" + "sigs.k8s.io/yaml" "github.com/banzaicloud/operator-tools/pkg/types" "github.com/banzaicloud/operator-tools/pkg/utils" @@ -63,26 +64,40 @@ func PatchYAMLModifier(overlay K8SResourceOverlay, parser *ObjectParser) (Object }, nil } - var opsDefinitions []ypatch.OpDefinition + // Build JSON Patch operations + var patchOps []map[string]interface{} for _, patch := range overlay.Patches { - var value interface{} - if patch.ParseValue { - err := yaml.Unmarshal([]byte(utils.PointerToString(patch.Value)), &value) - if err != nil { - return nil, errors.WrapIf(err, "could not unmarshal value") - } - } else { - value = interface{}(patch.Value) + op := map[string]interface{}{ + "op": string(patch.Type), + "path": utils.PointerToString(patch.Path), } - op := ypatch.OpDefinition{ - Type: string(patch.Type), - Path: patch.Path, - } if patch.Type == ReplaceOverlayPatchType { - op.Value = &value + var value interface{} + if patch.ParseValue { + // Parse the value as YAML/JSON + err := yaml.Unmarshal([]byte(utils.PointerToString(patch.Value)), &value) + if err != nil { + return nil, errors.WrapIf(err, "could not unmarshal value") + } + } else { + value = utils.PointerToString(patch.Value) + } + op["value"] = value } - opsDefinitions = append(opsDefinitions, op) + + patchOps = append(patchOps, op) + } + + // Convert patch operations to JSON + patchJSON, err := json.Marshal(patchOps) + if err != nil { + return nil, errors.WrapIf(err, "could not marshal patch operations") + } + + patch, err := jsonpatch.DecodePatch(patchJSON) + if err != nil { + return nil, errors.WrapIf(err, "could not decode patch") } return func(o runtime.Object) (runtime.Object, error) { @@ -110,33 +125,32 @@ func PatchYAMLModifier(overlay K8SResourceOverlay, parser *ObjectParser) (Object return o, nil } - y, err := k8syaml.Marshal(o) + // Marshal object to YAML + yamlBytes, err := yaml.Marshal(o) if err != nil { return o, errors.WrapIf(err, "could not marshal runtime object") } - ops, err := ypatch.NewOpsFromDefinitions(opsDefinitions) - if err != nil { - return o, errors.WrapIf(err, "could not init patch ops from definitions") - } - - var in interface{} - err = yaml.Unmarshal(y, &in) + // Convert YAML to JSON (json-patch works on JSON) + jsonBytes, err := yaml.YAMLToJSON(yamlBytes) if err != nil { - return o, errors.WrapIf(err, "could not unmarshal resource yaml") + return o, errors.WrapIf(err, "could not convert YAML to JSON") } - res, err := ops.Apply(in) + // Apply the patch + patchedJSON, err := patch.Apply(jsonBytes) if err != nil { - return o, errors.WrapIf(err, "could not apply patch ops") + return o, errors.WrapIf(err, "could not apply patch") } - y, err = yaml.Marshal(res) + // Convert JSON back to YAML + patchedYAML, err := yaml.JSONToYAML(patchedJSON) if err != nil { - return o, errors.WrapIf(err, "could not marshal patched object to yaml") + return o, errors.WrapIf(err, "could not convert JSON to YAML") } - o, err = parser.ParseYAMLToK8sObject(y) + // Parse back to K8s object + o, err = parser.ParseYAMLToK8sObject(patchedYAML) if err != nil { return o, errors.WrapIf(err, "could not parse runtime object from yaml") } diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/secret/secret_types.go b/third_party/github.com/banzaicloud/operator-tools/pkg/secret/secret_types.go index b36085c0d..40ff13431 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/secret/secret_types.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/secret/secret_types.go @@ -18,23 +18,25 @@ import ( corev1 "k8s.io/api/core/v1" ) -//nolint:unused,deadcode // +docName:"Secret abstraction" // Provides an abstraction to refer to secrets from other types // SecretLoader facilitates loading the secrets from an operator. // Leverages core types from kubernetes/api/core/v1 +// +//nolint:unused type _docSecret interface{} -//nolint:unused,deadcode // +name:"Secret" // +description:"Secret referencing abstraction" +// +//nolint:unused type _metaSecret interface{} // +kubebuilder:object:generate=true type Secret struct { // Refers to a non-secret value - Value string `json:"value,omitempty"` + Value string `json:"value,omitempty"` // Refers to a secret value to be used directly ValueFrom *ValueFrom `json:"valueFrom,omitempty"` // Refers to a secret value to be used through a volume mount diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/secret/zz_generated.deepcopy.go b/third_party/github.com/banzaicloud/operator-tools/pkg/secret/zz_generated.deepcopy.go index aa5b4c9b6..d3f4e5af9 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/secret/zz_generated.deepcopy.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/secret/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated // Copyright © 2020 Banzai Cloud // diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/typeoverride/zz_generated.deepcopy.go b/third_party/github.com/banzaicloud/operator-tools/pkg/typeoverride/zz_generated.deepcopy.go index 68a48093f..321c45157 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/typeoverride/zz_generated.deepcopy.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/typeoverride/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated // Copyright © 2020 Banzai Cloud // diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/types/base_types.go b/third_party/github.com/banzaicloud/operator-tools/pkg/types/base_types.go index d11d5f4a9..d00b0c4ff 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/types/base_types.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/types/base_types.go @@ -87,7 +87,7 @@ func AggregatedState(componentStatuses []ReconcileStatus) ReconcileStatus { if cs != "" { statusMap[cs] = true } - if !(cs == "" || cs.Stable()) { + if cs != "" && !cs.Stable() { hasUnstable = true } } @@ -312,7 +312,7 @@ func (base *DeploymentBase) Override(deployment appsv1.Deployment) appsv1.Deploy return deployment } if base.MetaBase != nil { - deployment.ObjectMeta = base.MetaBase.Merge(deployment.ObjectMeta) + deployment.ObjectMeta = base.Merge(deployment.ObjectMeta) } if base.Spec != nil { deployment.Spec = base.Spec.Override(deployment.Spec) @@ -362,7 +362,7 @@ func (base *StatefulSetBase) Override(statefulSet appsv1.StatefulSet) appsv1.Sta return statefulSet } if base.MetaBase != nil { - statefulSet.ObjectMeta = base.MetaBase.Merge(statefulSet.ObjectMeta) + statefulSet.ObjectMeta = base.Merge(statefulSet.ObjectMeta) } if base.Spec != nil { statefulSet.Spec = base.Spec.Override(statefulSet.Spec) @@ -416,7 +416,7 @@ func (base *DaemonSetBase) Override(daemonset appsv1.DaemonSet) appsv1.DaemonSet return daemonset } if base.MetaBase != nil { - daemonset.ObjectMeta = base.MetaBase.Merge(daemonset.ObjectMeta) + daemonset.ObjectMeta = base.Merge(daemonset.ObjectMeta) } if base.Spec != nil { daemonset.Spec = base.Spec.Override(daemonset.Spec) diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/types/base_types_test.go b/third_party/github.com/banzaicloud/operator-tools/pkg/types/base_types_test.go index bb484fb5b..8bab6e29d 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/types/base_types_test.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/types/base_types_test.go @@ -24,11 +24,10 @@ import ( appsv1 "k8s.io/api/apps/v1" v12 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestMetaBaseEmptyOverrideOnEmptyObject(t *testing.T) { - original := v1.ObjectMeta{} + original := metav1.ObjectMeta{} overrides := types.MetaBase{} result := overrides.Merge(original) @@ -43,7 +42,7 @@ func TestMetaBaseEmptyOverrideOnEmptyObject(t *testing.T) { } func TestMetaBaseOverrideOnEmptyObject(t *testing.T) { - original := v1.ObjectMeta{} + original := metav1.ObjectMeta{} overrides := types.MetaBase{ Annotations: map[string]string{ "annotation": "a", @@ -65,7 +64,7 @@ func TestMetaBaseOverrideOnEmptyObject(t *testing.T) { } func TestMetaBaseOverrideOnExistingObject(t *testing.T) { - original := v1.ObjectMeta{ + original := metav1.ObjectMeta{ Annotations: map[string]string{ "annotation": "a", }, @@ -324,7 +323,6 @@ func TestDeploymentBaseOverride(t *testing.T) { } }) } - } func TestStatefulsetBaseOverride(t *testing.T) { @@ -546,13 +544,13 @@ func TestStatefulSetOverride(t *testing.T) { "old": "old-value", }, }}, - spec: appsv1.StatefulSet{ObjectMeta: v1.ObjectMeta{ + spec: appsv1.StatefulSet{ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "override": "ooo", "new": "new-value", }, }}, - want: appsv1.StatefulSet{ObjectMeta: v1.ObjectMeta{ + want: appsv1.StatefulSet{ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "override": "winning", "old": "old-value", @@ -613,7 +611,7 @@ func TestPodSpecOverride(t *testing.T) { spec: v12.PodSpec{ Containers: []v12.Container{ { - Name: "override", // this one will be overridden + Name: "override", // this one will be overridden Image: "original", }, { @@ -625,7 +623,7 @@ func TestPodSpecOverride(t *testing.T) { want: v12.PodSpec{ Containers: []v12.Container{ { - Name: "override", + Name: "override", Image: "override-image", }, { @@ -652,7 +650,7 @@ func TestPodSpecOverride(t *testing.T) { spec: v12.PodSpec{ InitContainers: []v12.Container{ { - Name: "override", // this one will be overridden + Name: "override", // this one will be overridden Image: "original", }, { @@ -664,7 +662,7 @@ func TestPodSpecOverride(t *testing.T) { want: v12.PodSpec{ InitContainers: []v12.Container{ { - Name: "override", + Name: "override", Image: "override-image", }, { @@ -685,7 +683,6 @@ func TestPodSpecOverride(t *testing.T) { } } - func TestPodTemplateOverride(t *testing.T) { tests := []struct { name string @@ -724,4 +721,3 @@ func TestPodTemplateOverride(t *testing.T) { }) } } - diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/types/zz_generated.deepcopy.go b/third_party/github.com/banzaicloud/operator-tools/pkg/types/zz_generated.deepcopy.go index 7e0418a3f..24792317e 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/types/zz_generated.deepcopy.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/types/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated // Copyright © 2020 Banzai Cloud // diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/utils/log.go b/third_party/github.com/banzaicloud/operator-tools/pkg/utils/log.go index e075e251b..cae7f6ed1 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/utils/log.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/utils/log.go @@ -44,10 +44,8 @@ func joinAndSeparatePairs(values []interface{}) string { joined += cast.ToString(v) if i%2 == 0 { joined += ": " - } else { - if i < len(values)-1 { - joined += ", " - } + } else if i < len(values)-1 { + joined += ", " } } return joined diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/volume/volume_types.go b/third_party/github.com/banzaicloud/operator-tools/pkg/volume/volume_types.go index 84d35ef30..3fa04aad6 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/volume/volume_types.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/volume/volume_types.go @@ -21,22 +21,24 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -//nolint:unused,deadcode // +docName:"Kubernetes volume abstraction" // Refers to different types of volumes to be mounted to pods: emptyDir, hostPath, pvc // // Leverages core types from kubernetes/api/core/v1 +// +//nolint:unused type _docKubernetesVolume interface{} -//nolint:unused,deadcode // +name:"KubernetesVolume" // +description:"Kubernetes volume abstraction" +// +//nolint:unused type _metaKubernetesVolume interface{} // +kubebuilder:object:generate=true type KubernetesVolume struct { - // Deprecated, use hostPath + // Deprecated: use hostPath HostPathLegacy *corev1.HostPathVolumeSource `json:"host_path,omitempty"` HostPath *corev1.HostPathVolumeSource `json:"hostPath,omitempty"` EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"` @@ -71,25 +73,27 @@ func (v *KubernetesVolume) GetVolume(name string) (corev1.Volume, error) { if v.HostPathLegacy != nil { return volume, errors.New("legacy host_path field is not supported anymore, please migrate to hostPath") } - if v.HostPath != nil { + switch { + case v.HostPath != nil: volume.VolumeSource = corev1.VolumeSource{ HostPath: v.HostPath, } return volume, nil - } else if v.EmptyDir != nil { + case v.EmptyDir != nil: volume.VolumeSource = corev1.VolumeSource{ EmptyDir: v.EmptyDir, } return volume, nil - } else if v.PersistentVolumeClaim != nil { + case v.PersistentVolumeClaim != nil: volume.VolumeSource = corev1.VolumeSource{ PersistentVolumeClaim: &v.PersistentVolumeClaim.PersistentVolumeSource, } return volume, nil - } - // return a default emptydir volume if none configured - volume.VolumeSource = corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + default: + // return a default emptydir volume if none configured + volume.VolumeSource = corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + } } return volume, nil } diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/volume/volume_types_test.go b/third_party/github.com/banzaicloud/operator-tools/pkg/volume/volume_types_test.go index aa01697b2..37aac48db 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/volume/volume_types_test.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/volume/volume_types_test.go @@ -25,8 +25,7 @@ import ( func TestKubernetesVolume_ApplyVolumeForPodSpec_FailNonExistingContainer(t *testing.T) { vol := KubernetesVolume{ - HostPath: &v1.HostPathVolumeSource{ - }, + HostPath: &v1.HostPathVolumeSource{}, } spec := &v1.PodSpec{ @@ -47,8 +46,7 @@ func TestKubernetesVolume_ApplyVolumeForPodSpec_FailNonExistingContainer(t *test func TestKubernetesVolume_ApplyVolumeForPodSpec(t *testing.T) { vol := KubernetesVolume{ - HostPath: &v1.HostPathVolumeSource{ - }, + HostPath: &v1.HostPathVolumeSource{}, } spec := &v1.PodSpec{ @@ -70,8 +68,7 @@ func TestKubernetesVolume_ApplyVolumeForPodSpec(t *testing.T) { func TestKubernetesVolume_ApplyPVCForStatefulSet(t *testing.T) { vol := KubernetesVolume{ PersistentVolumeClaim: &PersistentVolumeClaim{ - PersistentVolumeClaimSpec: v1.PersistentVolumeClaimSpec{ - }, + PersistentVolumeClaimSpec: v1.PersistentVolumeClaimSpec{}, PersistentVolumeSource: v1.PersistentVolumeClaimVolumeSource{ ClaimName: "my-claim", }, diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/volume/zz_generated.deepcopy.go b/third_party/github.com/banzaicloud/operator-tools/pkg/volume/zz_generated.deepcopy.go index e684c2a4d..d6c3ef280 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/volume/zz_generated.deepcopy.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/volume/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated // Copyright © 2020 Banzai Cloud // diff --git a/third_party/github.com/banzaicloud/operator-tools/pkg/wait/wait.go b/third_party/github.com/banzaicloud/operator-tools/pkg/wait/wait.go index aa7eb330d..267fa1d3e 100644 --- a/third_party/github.com/banzaicloud/operator-tools/pkg/wait/wait.go +++ b/third_party/github.com/banzaicloud/operator-tools/pkg/wait/wait.go @@ -41,7 +41,7 @@ type ResourceConditionChecks struct { func NewResourceConditionChecks(client client.Client, backoff Backoff, log logr.Logger, scheme *runtime.Scheme) *ResourceConditionChecks { return &ResourceConditionChecks{ client: client, - backoff: wait.Backoff(backoff), + backoff: backoff, log: log, scheme: scheme, }