diff --git a/docs/user_docs/cli/cli.md b/docs/user_docs/cli/cli.md index 54487f0e6..2f6afb9d4 100644 --- a/docs/user_docs/cli/cli.md +++ b/docs/user_docs/cli/cli.md @@ -133,7 +133,6 @@ KubeBlocks operation commands. * [kbcli kubeblocks describe-config](kbcli_kubeblocks_describe-config.md) - Describe KubeBlocks config. * [kbcli kubeblocks install](kbcli_kubeblocks_install.md) - Install KubeBlocks. * [kbcli kubeblocks list-versions](kbcli_kubeblocks_list-versions.md) - List KubeBlocks versions. -* [kbcli kubeblocks preflight](kbcli_kubeblocks_preflight.md) - Run and retrieve preflight checks for KubeBlocks. * [kbcli kubeblocks status](kbcli_kubeblocks_status.md) - Show list of resource KubeBlocks uses or owns. * [kbcli kubeblocks uninstall](kbcli_kubeblocks_uninstall.md) - Uninstall KubeBlocks. * [kbcli kubeblocks upgrade](kbcli_kubeblocks_upgrade.md) - Upgrade KubeBlocks. diff --git a/docs/user_docs/cli/kbcli_kubeblocks.md b/docs/user_docs/cli/kbcli_kubeblocks.md index c30899429..87598bdfd 100644 --- a/docs/user_docs/cli/kbcli_kubeblocks.md +++ b/docs/user_docs/cli/kbcli_kubeblocks.md @@ -42,7 +42,6 @@ KubeBlocks operation commands. * [kbcli kubeblocks describe-config](kbcli_kubeblocks_describe-config.md) - Describe KubeBlocks config. * [kbcli kubeblocks install](kbcli_kubeblocks_install.md) - Install KubeBlocks. * [kbcli kubeblocks list-versions](kbcli_kubeblocks_list-versions.md) - List KubeBlocks versions. -* [kbcli kubeblocks preflight](kbcli_kubeblocks_preflight.md) - Run and retrieve preflight checks for KubeBlocks. * [kbcli kubeblocks status](kbcli_kubeblocks_status.md) - Show list of resource KubeBlocks uses or owns. * [kbcli kubeblocks uninstall](kbcli_kubeblocks_uninstall.md) - Uninstall KubeBlocks. * [kbcli kubeblocks upgrade](kbcli_kubeblocks_upgrade.md) - Upgrade KubeBlocks. diff --git a/docs/user_docs/cli/kbcli_kubeblocks_install.md b/docs/user_docs/cli/kbcli_kubeblocks_install.md index 75a861ae7..dbf5a3bc1 100644 --- a/docs/user_docs/cli/kbcli_kubeblocks_install.md +++ b/docs/user_docs/cli/kbcli_kubeblocks_install.md @@ -17,9 +17,6 @@ kbcli kubeblocks install [flags] # Install KubeBlocks with specified version kbcli kubeblocks install --version=0.4.0 - # Install KubeBlocks with ignoring preflight checks - kbcli kubeblocks install --force - # Install KubeBlocks with specified namespace, if the namespace is not present, it will be created kbcli kubeblocks install --namespace=my-namespace --create-namespace @@ -32,7 +29,6 @@ kbcli kubeblocks install [flags] ``` --check Check kubernetes environment before installation (default true) --create-namespace Create the namespace if not present - --force If present, just print fail item and continue with the following steps -h, --help help for install -n, --namespace string KubeBlocks namespace (default "kb-system") --node-labels stringToString Node label selector (default []) diff --git a/go.mod b/go.mod index 069fc2ab6..a6b299865 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/Masterminds/semver/v3 v3.3.0 github.com/NimbleMarkets/ntcharts v0.1.2 github.com/apecloud/dbctl v0.0.0-20240827084000-68a1980b1a46 - github.com/apecloud/kubeblocks v1.0.1 + github.com/apecloud/kubeblocks v1.0.3-beta.7 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 github.com/briandowns/spinner v1.23.0 github.com/chaos-mesh/chaos-mesh/api v0.0.0-20230912020346-a5d89c1c90ad @@ -24,7 +24,7 @@ require ( github.com/evanphx/json-patch v5.9.11+incompatible github.com/fatih/color v1.16.0 github.com/ghodss/yaml v1.0.0 - github.com/go-git/go-git/v5 v5.16.5 + github.com/go-git/go-git/v5 v5.19.0 github.com/go-logr/logr v1.4.3 github.com/google/uuid v1.6.0 github.com/hashicorp/go-version v1.6.0 @@ -41,8 +41,6 @@ require ( github.com/onsi/gomega v1.36.3 github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 - github.com/replicatedhq/termui/v3 v3.1.1-0.20200811145416-f40076d26851 - github.com/replicatedhq/troubleshoot v0.57.0 github.com/robfig/cron/v3 v3.0.1 github.com/sahilm/fuzzy v0.1.1 github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 @@ -56,11 +54,10 @@ require ( github.com/stretchr/testify v1.11.1 github.com/xeipuuv/gojsonschema v1.2.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.45.0 - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 - golang.org/x/mod v0.29.0 - golang.org/x/net v0.47.0 - golang.org/x/sync v0.18.0 + golang.org/x/crypto v0.50.0 + golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f + golang.org/x/mod v0.35.0 + golang.org/x/net v0.53.0 gopkg.in/yaml.v2 v2.4.0 helm.sh/helm/v3 v3.18.5 k8s.io/api v0.33.3 @@ -81,44 +78,26 @@ require ( ) require ( - cel.dev/expr v0.24.0 // indirect - cloud.google.com/go v0.115.1 // indirect - cloud.google.com/go/auth v0.9.3 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect - cloud.google.com/go/compute/metadata v0.7.0 // indirect - cloud.google.com/go/iam v1.2.1 // indirect - cloud.google.com/go/monitoring v1.21.0 // indirect - cloud.google.com/go/storage v1.45.0 // indirect cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e // indirect - cyphar.com/go-pathrs v0.2.1 // indirect dario.cat/mergo v1.0.1 // indirect filippo.io/edwards25519 v1.1.1 // indirect - github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/BurntSushi/toml v1.5.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Masterminds/squirrel v1.5.4 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/Microsoft/hcsshim v0.12.8 // indirect github.com/ProtonMail/go-crypto v1.1.6 // indirect github.com/StudioSol/set v1.0.0 // indirect - github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/andybalholm/brotli v1.0.5 // indirect github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect - github.com/aws/aws-sdk-go v1.55.5 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bhmj/jsonslice v1.1.2 // indirect github.com/bhmj/xpression v0.9.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/c9s/goprocinfo v0.0.0-20170724085704-0010a05ce49f // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect @@ -127,32 +106,26 @@ require ( github.com/chzyer/readline v1.5.1 // indirect github.com/clbanning/mxj/v2 v2.5.7 // indirect github.com/cloudflare/circl v1.6.3 // indirect - github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect github.com/cockroachdb/apd/v3 v3.2.1 // indirect - github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/containerd/containerd v1.7.29 // indirect - github.com/containerd/errdefs v0.3.0 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect - github.com/containers/image/v5 v5.32.2 // indirect - github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect - github.com/containers/ocicrypt v1.2.0 // indirect - github.com/containers/storage v1.55.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect - github.com/cyphar/filepath-securejoin v0.6.0 // indirect + github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/daviddengcn/go-colortext v1.0.0 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/distribution/distribution/v3 v3.0.0 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/dlclark/regexp2 v1.11.0 // indirect github.com/docker/cli v27.1.1+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v27.1.1+incompatible // indirect + github.com/docker/docker v28.4.0+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.2 // indirect github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect github.com/docker/go-metrics v0.0.1 // indirect @@ -160,8 +133,6 @@ require ( github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/emicklei/proto v1.10.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect - github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect @@ -172,21 +143,18 @@ require ( github.com/fvbommel/sortorder v1.1.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.6.2 // indirect + github.com/go-git/go-billy/v5 v5.9.0 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect - github.com/go-jose/go-jose/v4 v4.0.5 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/go-redis/redis/v7 v7.4.1 // indirect github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/go-test/deep v1.1.0 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/golang/mock v1.6.0 // indirect @@ -199,49 +167,40 @@ require ( github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/go-containerregistry v0.20.1 // indirect - github.com/google/go-intervals v0.0.2 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect - github.com/google/s2a-go v0.1.8 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect - github.com/googleapis/gax-go/v2 v2.13.0 // indirect - github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // 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.24.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.9 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/hcl v1.0.1-vault-5 // indirect github.com/hashicorp/terraform-json v0.15.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgx/v5 v5.6.0 // indirect - github.com/jackc/puddle/v2 v2.2.1 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.9.0 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jinzhu/copier v0.4.0 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmoiron/sqlx v1.4.0 // indirect github.com/jonboulle/clockwork v0.3.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.18.0 // indirect - github.com/klauspost/pgzip v1.2.6 // indirect + github.com/klauspost/compress v1.18.2 // indirect + github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/lithammer/dedent v1.1.0 // indirect - github.com/longhorn/go-iscsi-helper v0.0.0-20210330030558-49a327fb024e // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magefile/mage v1.15.0 // indirect @@ -252,19 +211,18 @@ require ( github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/miekg/pkcs11 v1.1.1 // indirect - github.com/mistifyio/go-zfs/v3 v3.0.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect - github.com/moby/locker v1.0.1 // indirect + github.com/moby/go-archive v0.1.0 // indirect github.com/moby/patternmatcher v0.6.0 // indirect - github.com/moby/spdystream v0.5.0 // indirect - github.com/moby/sys/mountinfo v0.7.2 // indirect - github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/user v0.3.0 // indirect + github.com/moby/spdystream v0.5.1 // indirect + github.com/moby/sys/atomicwriter v0.1.0 // indirect + github.com/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/user v0.4.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/term v0.5.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -276,20 +234,15 @@ require ( github.com/muesli/termenv v0.15.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - github.com/nsf/termbox-go v1.1.1 // indirect - github.com/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/opencontainers/runtime-spec v1.2.0 // indirect - github.com/opencontainers/selinux v1.13.0 // indirect - github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/pjbgf/sha1cd v0.3.2 // indirect - github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect + github.com/pjbgf/sha1cd v0.6.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.22.0 // indirect - github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0 // indirect @@ -303,23 +256,16 @@ require ( github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee // indirect - github.com/segmentio/ksuid v1.0.4 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect github.com/shoenig/go-m1cpu v0.1.7 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/skeema/knownhosts v1.3.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/sylabs/sif/v2 v2.18.0 // indirect - github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect - github.com/tchap/go-patricia/v2 v2.3.1 // indirect github.com/theupdateframework/notary v0.7.0 // indirect - github.com/tj/go-spin v1.1.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/ulikunitz/xz v0.5.15 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.50.0 // indirect github.com/vbatts/tar-split v0.11.5 // indirect @@ -333,43 +279,40 @@ require ( github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zclconf/go-cty v1.12.1 // indirect - github.com/zeebo/errs v1.4.0 // indirect go.etcd.io/etcd/api/v3 v3.5.14 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect go.etcd.io/etcd/client/v3 v3.5.14 // indirect go.mongodb.org/mongo-driver v1.15.1 // indirect - go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect - go.opentelemetry.io/otel v1.40.0 // indirect + go.opentelemetry.io/otel v1.43.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.33.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect - go.opentelemetry.io/otel/metric v1.40.0 // indirect - go.opentelemetry.io/otel/sdk v1.40.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.40.0 // indirect - go.opentelemetry.io/otel/trace v1.40.0 // indirect - go.opentelemetry.io/proto/otlp v1.4.0 // indirect + go.opentelemetry.io/otel/metric v1.43.0 // indirect + go.opentelemetry.io/otel/sdk v1.43.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect + go.opentelemetry.io/otel/trace v1.43.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect go.yaml.in/yaml/v3 v3.0.3 // indirect go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect - golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sys v0.40.0 // indirect - golang.org/x/term v0.37.0 // indirect - golang.org/x/text v0.31.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/sys v0.43.0 // indirect + golang.org/x/term v0.42.0 // indirect + golang.org/x/text v0.36.0 // indirect golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.38.0 // indirect + golang.org/x/tools v0.44.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.197.0 // indirect google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect - google.golang.org/grpc v1.74.2 // indirect - google.golang.org/protobuf v1.36.6 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect + google.golang.org/grpc v1.79.3 // indirect + google.golang.org/protobuf v1.36.10 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect @@ -377,9 +320,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiserver v0.33.3 // indirect k8s.io/component-helpers v0.29.14 // indirect - oras.land/oras-go v1.2.6 // indirect oras.land/oras-go/v2 v2.6.0 // indirect - periph.io/x/host/v3 v3.8.0 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect sigs.k8s.io/kustomize/api v0.19.0 // indirect sigs.k8s.io/kustomize/kustomize/v5 v5.6.0 // indirect diff --git a/go.sum b/go.sum index 1454802f8..dade732b5 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -39,8 +37,6 @@ cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFO cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= -cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= @@ -102,10 +98,6 @@ cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVo cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/auth v0.9.3 h1:VOEUIAADkkLtyfr3BLa3R8Ed/j6w1jTBmARx+wb5w5U= -cloud.google.com/go/auth v0.9.3/go.mod h1:7z6VY+7h3KUdRov5F1i8NDP5ZzWKYmEPO842BgCsmTk= -cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= -cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= @@ -180,15 +172,12 @@ cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvj cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= -cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= @@ -322,8 +311,6 @@ cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGE cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iam v1.2.1 h1:QFct02HRb7H12J/3utj0qf5tobFh9V4vR6h9eX5EBRU= -cloud.google.com/go/iam v1.2.1/go.mod h1:3VUIJDPpwT6p/amXRC5GY8fCCh70lxPygguVtI0Z4/g= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= @@ -353,13 +340,9 @@ cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6 cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= -cloud.google.com/go/logging v1.11.0 h1:v3ktVzXMV7CwHq1MBF65wcqLMA7i+z3YxbUsoK7mOKs= -cloud.google.com/go/logging v1.11.0/go.mod h1:5LDiJC/RxTt+fHc1LAt20R9TKiUTReDg6RuuFOZ67+A= cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/longrunning v0.6.1 h1:lOLTFxYpr8hcRtcwWir5ITh1PAKUD/sG2lKrTSYjyMc= -cloud.google.com/go/longrunning v0.6.1/go.mod h1:nHISoOZpBcmlwbJmiVk5oDRz0qG/ZxPynEGs1iZ79s0= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= @@ -383,8 +366,6 @@ cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhI cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= -cloud.google.com/go/monitoring v1.21.0 h1:EMc0tB+d3lUewT2NzKC/hr8cSR9WsUieVywzIHetGro= -cloud.google.com/go/monitoring v1.21.0/go.mod h1:tuJ+KNDdJbetSsbSGTqnaBvbauS5kr3Q/koy3Up6r+4= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= @@ -548,8 +529,6 @@ cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeL cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= -cloud.google.com/go/storage v1.45.0 h1:5av0QcIVj77t+44mV4gffFC/LscFRUhto6UBMB5SimM= -cloud.google.com/go/storage v1.45.0/go.mod h1:wpPblkIuMP5jCB/E48Pz9zIo2S/zD8g+ITmxKkPCITE= cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= @@ -569,8 +548,6 @@ cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= -cloud.google.com/go/trace v1.11.0 h1:UHX6cOJm45Zw/KIbqHe4kII8PupLt/V5tscZUkeiJVI= -cloud.google.com/go/trace v1.11.0/go.mod h1:Aiemdi52635dBR7o3zuc9lLjXo3BwGaChEjCa3tJNmM= cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= @@ -621,8 +598,6 @@ cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e h1:GwCVItFUPxw cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e/go.mod h1:ApHceQLLwcOkCEXM1+DyCXTHEJhNGDpJ2kmV6axsx24= cuelang.org/go v0.8.0 h1:fO1XPe/SUGtc7dhnGnTPbpIDoQm/XxhDtoSF7jzO01c= cuelang.org/go v0.8.0/go.mod h1:CoDbYolfMms4BhWUlhD+t5ORnihR7wvjcfgyO9lL5FI= -cyphar.com/go-pathrs v0.2.1 h1:9nx1vOgwVvX1mNBWDu93+vaceedpbsDqo+XuBGL40b8= -cyphar.com/go-pathrs v0.2.1/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc= dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -631,12 +606,10 @@ filippo.io/edwards25519 v1.1.1 h1:YpjwWWlNmGIDyXOn8zLzqiD+9TyIlPhGFG96P39uBpw= filippo.io/edwards25519 v1.1.1/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774 h1:SCbEWT58NSt7d2mcFdvxC9uyrdcTfvBbPLThhkDmXzg= -github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774/go.mod h1:6/0dYRLLXyJjbkIPeeGyoJ/eKOSI0eU6eTlCBYibgd0= github.com/76creates/stickers v1.4.0 h1:UD1ShH0mndxzvuyO4Ho4Ct3+EB6FnTbCRecwPs/WFSo= github.com/76creates/stickers v1.4.0/go.mod h1:OnGyCp42wnTwuZv2Ewh4dkvMuaiWMoH4I80yU2IJVmI= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -645,14 +618,6 @@ github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 h1:UQ0AhxogsIRZDkElkblfnwjc3IaltCm2HUMvezQaL7s= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1/go.mod h1:jyqM3eLpJ3IbIFDTKVz2rF9T/xWGW0rIriGwnz8l9Tk= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.1 h1:oTX4vsorBZo/Zdum6OKPA4o7544hm6smoRv1QjpTwGo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.1/go.mod h1:0wEl7vrAD8mehJyohS9HZy+WyEOaQO2mJx86Cvh93kM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 h1:8nn+rsCvTq9axyEh382S0PFLBeaFwNsT43IrPWzctRU= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1/go.mod h1:viRWSEhtMZqz1rhwmOVKkWl6SwmVowfL9O2YR5gI2PE= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= @@ -667,8 +632,6 @@ github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA4 github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Microsoft/hcsshim v0.12.8 h1:BtDWYlFMcWhorrvSSo2M7z0csPdw6t7no/C3FsSvqiI= -github.com/Microsoft/hcsshim v0.12.8/go.mod h1:cibQ4BqhJ32FXDwPdQhKhwrwophnh3FuT4nwQZF907w= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NimbleMarkets/ntcharts v0.1.2 h1:iW1aiOif/Dm74sQd18opi10RMED5589cVhy9SGp98Tw= github.com/NimbleMarkets/ntcharts v0.1.2/go.mod h1:WcHS7kc8oQctN1543DeV9a+gOrS4DDVfKp1N9RZFUqc= @@ -680,8 +643,6 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/O github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/StudioSol/set v1.0.0 h1:G27J71la+Da08WidabBkoRrvPLTa4cdCn0RjvyJ5WKQ= github.com/StudioSol/set v1.0.0/go.mod h1:hIUNZPo6rEGF43RlPXHq7Fjmf+HkVJBqAjtK7Z9LoIU= -github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412 h1:vOVO0ypMfTt6tZacyI0kp+iCZb1XSNiYDqnzBWYgfe4= -github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412/go.mod h1:AI9hp1tkp10pAlK5TCwL+7yWbRgtDm9jhToq6qij2xs= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -703,8 +664,8 @@ github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4x github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/apecloud/dbctl v0.0.0-20240827084000-68a1980b1a46 h1:+Jcc7IjDGxPgIfIkGX2Q5Yxj35U65zgcfjh0B9rDhjo= github.com/apecloud/dbctl v0.0.0-20240827084000-68a1980b1a46/go.mod h1:eksJtZ7z1nVcVLqDzAdcN5EfpHwXllIAvHZEks2zWys= -github.com/apecloud/kubeblocks v1.0.1 h1:t/EPcBYn+83U5lOYBOnexcWomXas6Zz87plMYetEYoc= -github.com/apecloud/kubeblocks v1.0.1/go.mod h1:+p1wpv2KIfet//EWTTyPDYsvvZdkq0eRkjZjmPh2i/M= +github.com/apecloud/kubeblocks v1.0.3-beta.7 h1:mOONpWwdlnVV9k21OWNtheUwVhDR4GBg5mY5K4qfzmI= +github.com/apecloud/kubeblocks v1.0.3-beta.7/go.mod h1:lB4LCrNPjHlgkDrBr1jTFVepwGUEU6wjZ7jMeCpM0V4= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -712,9 +673,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= -github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= @@ -724,8 +682,6 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bhmj/jsonslice v1.1.2 h1:Lzen2S9iG3HsESpiIAnTM7Obs1QiTz83ZXa5YrpTTWI= github.com/bhmj/jsonslice v1.1.2/go.mod h1:O3ZoA0zdEefdbk1dkU5aWPOA36zQhhS/HV6RQFLTlnU= github.com/bhmj/xpression v0.9.1 h1:N7bX/nWx9oFi/zsiMTx2ehoRApTDAWdQadq/5o2wMGk= @@ -755,8 +711,6 @@ github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXe github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/bxcodec/faker v2.0.1+incompatible h1:P0KUpUw5w6WJXwrPfv35oc91i4d8nf40Nwln+M/+faA= github.com/bxcodec/faker v2.0.1+incompatible/go.mod h1:BNzfpVdTwnFJ6GtfYTcQu6l6rHShT+veBxNCnjCx5XM= -github.com/c9s/goprocinfo v0.0.0-20170724085704-0010a05ce49f h1:tRk+aBit+q3oqnj/1mF5HHhP2yxJM2lSa0afOJxQ3nE= -github.com/c9s/goprocinfo v0.0.0-20170724085704-0010a05ce49f/go.mod h1:uEyr4WpAH4hio6LFriaPkL938XnrvLpNPmQHBdrmbIE= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -783,7 +737,6 @@ github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b h1:MnAM github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= github.com/charmbracelet/x/term v0.2.0 h1:cNB9Ot9q8I711MyZ7myUR5HFWL/lc3OpU8jZ4hwm0x0= github.com/charmbracelet/x/term v0.2.0/go.mod h1:GVxgxAbjUrmpvIINHIQnJJKpMlHiZ4cktEQCN6GWyF0= -github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= @@ -813,19 +766,14 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -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/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= -github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= -github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/containerd/containerd v1.7.29 h1:90fWABQsaN9mJhGkoVnuzEY+o1XDPbg9BTC9QTAHnuE= github.com/containerd/containerd v1.7.29/go.mod h1:azUkWcOvHrWvaiUjSQH0fjzuHIwSPg1WL5PshGP4Szs= -github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII= -github.com/containerd/continuity v0.4.4/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= -github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4= -github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= @@ -834,14 +782,6 @@ github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= github.com/containers/common v0.60.4 h1:H5+LAMHPZEqX6vVNOQ+IguVsaFl8kbO/SZ/VPXjxhy0= github.com/containers/common v0.60.4/go.mod h1:I0upBi1qJX3QmzGbUOBN1LVP6RvkKhd3qQpZbQT+Q54= -github.com/containers/image/v5 v5.32.2 h1:SzNE2Y6sf9b1GJoC8qjCuMBXwQrACFp4p0RK15+4gmQ= -github.com/containers/image/v5 v5.32.2/go.mod h1:v1l73VeMugfj/QtKI+jhYbwnwFCFnNGckvbST3rQ5Hk= -github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA= -github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY= -github.com/containers/ocicrypt v1.2.0 h1:X14EgRK3xNFvJEfI5O4Qn4T3E25ANudSOZz/sirVuPM= -github.com/containers/ocicrypt v1.2.0/go.mod h1:ZNviigQajtdlxIZGibvblVuIFBKIuUI2M0QM12SD31U= -github.com/containers/storage v1.55.0 h1:wTWZ3YpcQf1F+dSP4KxG9iqDfpQY1otaUXjPpffuhgg= -github.com/containers/storage v1.55.0/go.mod h1:28cB81IDk+y7ok60Of6u52RbCeBRucbFOeLunhER1RQ= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -853,8 +793,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6N github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.6.0 h1:BtGB77njd6SVO6VztOHfPxKitJvd/VPT+OFBFMOi1Is= -github.com/cyphar/filepath-securejoin v0.6.0/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc= +github.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE= +github.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc= 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= @@ -879,8 +819,8 @@ github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvM github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= -github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.4.0+incompatible h1:KVC7bz5zJY/4AZe/78BIvCnPsLaC9T/zh72xnlrTTOk= +github.com/docker/docker v28.4.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= @@ -922,20 +862,10 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= -github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= -github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= -github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= -github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= -github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= -github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= -github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= -github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= @@ -950,7 +880,6 @@ github.com/fasthttp/router v1.4.20 h1:yPeNxz5WxZGojzolKqiP15DTXnxZce9Drv577GBrDg github.com/fasthttp/router v1.4.20/go.mod h1:um867yNQKtERxBm+C+yzgWxjspTiQoA8z86Ec3fK/tc= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -980,19 +909,17 @@ github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2H github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= -github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= +github.com/go-git/go-billy/v5 v5.9.0 h1:jItGXszUDRtR/AlferWPTMN4j38BQ88XnXKbilmmBPA= +github.com/go-git/go-billy/v5 v5.9.0/go.mod h1:jCnQMLj9eUgGU7+ludSTYoZL/GGmii14RxKFj7ROgHw= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= -github.com/go-git/go-git/v5 v5.16.5 h1:mdkuqblwr57kVfXri5TTH+nMFLNUxIj9Z7F5ykFbw5s= -github.com/go-git/go-git/v5 v5.16.5/go.mod h1:QOMLpNf1qxuSY4StA/ArOdfFR2TrKEjJiye2kel2m+M= +github.com/go-git/go-git/v5 v5.19.0 h1:+WkVUQZSy/F1Gb13udrMKjIM2PrzsNfDKFSfo5tkMtc= +github.com/go-git/go-git/v5 v5.19.0/go.mod h1:Pb1v0c7/g8aGQJwx9Us09W85yGoyvSwuhEGMH7zjDKQ= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs= github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw= -github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE= -github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= @@ -1028,8 +955,6 @@ github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhO github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= -github.com/go-redis/redis/v7 v7.4.1 h1:PASvf36gyUpr2zdOUS/9Zqc80GbM+9BDyiJSJDDOrTI= -github.com/go-redis/redis/v7 v7.4.1/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= @@ -1044,8 +969,6 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= -github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -1138,20 +1061,15 @@ 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/go-containerregistry v0.20.1 h1:eTgx9QNYugV4DN5mz4U8hiAGTi1ybXn0TPi4Smd8du0= github.com/google/go-containerregistry v0.20.1/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= -github.com/google/go-intervals v0.0.2 h1:FGrVEiUnTRKR8yE04qzXYaJMtnIYqobR5QbblK3ixcM= -github.com/google/go-intervals v0.0.2/go.mod h1:MkaR3LNRfeKLPmqgJYs4E66z5InYjmCjbbr4TQlcT6Y= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.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/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= -github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -1174,12 +1092,9 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= -github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= 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.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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= @@ -1188,8 +1103,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= -github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1204,8 +1117,6 @@ github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38 github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= -github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= -github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= @@ -1230,8 +1141,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -1239,12 +1150,8 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.9 h1:G9gcjrDixz7glqJ+ll5IWvggSBR+R0B54DSRt4qfdC4= -github.com/hashicorp/go-getter v1.7.9/go.mod h1:dyFCmT1AQkDfOIt9NH8pw9XBDqNrIKJT5ylbpi7zPNE= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= -github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -1278,12 +1185,12 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= -github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.6.0 h1:SWJzexBzPL5jb0GEsrPMLIsi/3jOo7RHlzTjcAeDrPY= -github.com/jackc/pgx/v5 v5.6.0/go.mod h1:DNZ/vlrUnhWCoFGxHAG8U2ljioxukquj7utPDgtQdTw= -github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= -github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.9.0 h1:T/dI+2TvmI2H8s/KH1/lXIbz1CUFk3gn5oTjr0/mBsE= +github.com/jackc/pgx/v5 v5.9.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1Rjl9Jw= @@ -1297,10 +1204,6 @@ github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8/go.mod h1:Vla75njaFJ8c github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d h1:jRQLvyVGL+iVtDElaEIDdKwpPqUIZJfzkNLV34htpEc= github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/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/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg= @@ -1326,12 +1229,11 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk= +github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= -github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= +github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -1368,9 +1270,6 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/longhorn/go-iscsi-helper v0.0.0-20210330030558-49a327fb024e h1:hz4quJkaJWDo+xW+G6wTF6d6/95QvJ+o2D0+bB/tJ1U= -github.com/longhorn/go-iscsi-helper v0.0.0-20210330030558-49a327fb024e/go.mod h1:9z/y9glKmWEdV50tjlUPxFwi1goQfIrrsoZbnMyIZbY= -github.com/longhorn/nsfilelock v0.0.0-20200723175406-fa7c83ad0003/go.mod h1:0CLeXlf59Lg6C0kjLSDf47ft73Dh37CwymYRKWwAn04= github.com/lrstanley/bubblezone v0.0.0-20240914071701-b48c55a5e78e h1:OLwZ8xVaeVrru0xyeuOX+fne0gQTFEGlzfNjipCbxlU= github.com/lrstanley/bubblezone v0.0.0-20240914071701-b48c55a5e78e/go.mod h1:NQ34EGeu8FAYGBMDzwhfNJL8YQYoWZP5xYJPRDAwN3E= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= @@ -1391,7 +1290,6 @@ github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYt github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -1400,9 +1298,6 @@ 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-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -1418,13 +1313,10 @@ github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= -github.com/mistifyio/go-zfs/v3 v3.0.1 h1:YaoXgBePoMA12+S1u/ddkv+QqxcfiZK4prI6HPnkFiU= -github.com/mistifyio/go-zfs/v3 v3.0.1/go.mod h1:CzVgeB0RvF2EGzQnytKVvVSDwmKJXxkOTUGbNrTja/k= 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= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -1434,19 +1326,19 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ= +github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU= -github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= -github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg= -github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= -github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= +github.com/moby/spdystream v0.5.1 h1:9sNYeYZUcci9R6/w7KDaFWEWeV4LStVG78Mpyq/Zm/Y= +github.com/moby/spdystream v0.5.1/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= +github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= +github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= +github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= +github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= @@ -1462,8 +1354,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v64GQ= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ= +github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= @@ -1477,19 +1369,12 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= -github.com/nsf/termbox-go v1.1.1 h1:nksUPLCb73Q++DwbYUBEglYBRPZyoXJdrj5L+TkjyZY= -github.com/nsf/termbox-go v1.1.1/go.mod h1:T0cTdVuOwf7pHQNtfhnEbzHbcNyCEcVU4YPpouCbVxo= 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.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -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.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= @@ -1507,7 +1392,6 @@ github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7 github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 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.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -1535,15 +1419,9 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= -github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.13.0 h1:Zza88GWezyT7RLql12URvoxsbLfjFx988+LGaWfbL84= -github.com/opencontainers/selinux v1.13.0/go.mod h1:XxWTed+A/s5NNq4GmYScVy+9jzXhGBVEOAyucdRUY8s= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f h1:/UDgs8FGMqwnHagNDPGOlts35QkhAZ8by3DR7nMih7M= -github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc= github.com/pashagolub/pgxmock/v2 v2.12.0 h1:IVRmQtVFNCoq7NOZ+PdfvB6fwnLJmEuWDhnc3yrDxBs= github.com/pashagolub/pgxmock/v2 v2.12.0/go.mod h1:D3YslkN/nJ4+umVqWmbwfSXugJIjPMChkGBG47OJpNw= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= @@ -1556,8 +1434,8 @@ github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2 github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= -github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= +github.com/pjbgf/sha1cd v0.6.0 h1:3WJ8Wz8gvDz29quX1OcEmkAlUg9diU4GxJHqs0/XiwU= +github.com/pjbgf/sha1cd v0.6.0/go.mod h1:lhpGlyHLpQZoxMv8HcgXvZEhcGs0PG/vsZnEJ7H0iCM= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1566,8 +1444,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= -github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1589,8 +1465,8 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= @@ -1615,10 +1491,6 @@ github.com/redis/go-redis/extra/redisotel/v9 v9.0.5/go.mod h1:WZjPDy7VNzn77AAfnA github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/replicatedhq/termui/v3 v3.1.1-0.20200811145416-f40076d26851 h1:eRlNDHxGfVkPCRXbA4BfQJvt5DHjFiTtWy3R/t4djyY= -github.com/replicatedhq/termui/v3 v3.1.1-0.20200811145416-f40076d26851/go.mod h1:JDxG6+uubnk9/BZ2yUsyAJJwlptjrnmB2MPF5d2Xe/8= -github.com/replicatedhq/troubleshoot v0.57.0 h1:m9B31Mhgiz4Lwz+W4RvFkqhfYZLCwAqRPUwiwmSAAps= -github.com/replicatedhq/troubleshoot v0.57.0/go.mod h1:R5VdixzaBXfWLbP9mcLuZKs/bDCyGGS4+vFtKGWs9xE= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= @@ -1647,12 +1519,7 @@ github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEV github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee h1:8Iv5m6xEo1NR1AvpV+7XmhI4r39LGNzwUL4YpMuL5vk= github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee/go.mod h1:qwtSXrKuJh/zsFQ12yEE89xfCrGKK63Rr7ctU/uCo4g= -github.com/sebdah/goldie v1.0.0 h1:9GNhIat69MSlz/ndaBg48vl9dF5fI+NBB6kfOxgfkMc= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= -github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y= -github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= -github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= -github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/sethvargo/go-password v0.2.0 h1:BTDl4CC/gjf/axHMaDQtw507ogrXLci6XRiLc7i/UHI= @@ -1667,7 +1534,6 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -1700,8 +1566,6 @@ github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= -github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= -github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1721,32 +1585,20 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 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.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/sylabs/sif/v2 v2.18.0 h1:eXugsS1qx7St2Wu/AJ21KnsQiVCpouPlTigABh+6KYI= -github.com/sylabs/sif/v2 v2.18.0/go.mod h1:GOQj7LIBqp15fjqH5i8ZEbLp8SXJi9S+xbRO+QQAdRo= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= -github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= 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/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= -github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= -github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= -github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e9M= @@ -1792,8 +1644,6 @@ github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= -github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= @@ -1820,22 +1670,19 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/bridges/prometheus v0.57.0 h1:UW0+QyeyBVhn+COBec3nGhfnFe5lwB0ic1JBVjzhk0w= go.opentelemetry.io/contrib/bridges/prometheus v0.57.0/go.mod h1:ppciCHRLsyCio54qbzQv0E4Jyth/fLWDTJYfvWpcSVk= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0 h1:F7q2tNlCaHY9nMKHR6XH9/qkp8FktLnIcy6jJNyOCQw= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= go.opentelemetry.io/contrib/exporters/autoexport v0.57.0 h1:jmTVJ86dP60C01K3slFQa2NQ/Aoi7zA+wy7vMOKD9H4= go.opentelemetry.io/contrib/exporters/autoexport v0.57.0/go.mod h1:EJBheUMttD/lABFyLXhce47Wr6DPWYReCzaZiXadH7g= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= -go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= +go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= +go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0 h1:WzNab7hOOLzdDF/EoWCt4glhrbMPVMOO5JYTmpz36Ls= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0/go.mod h1:hKvJwTzJdp90Vh7p6q/9PAOd55dI6WA6sWj62a/JvSs= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.8.0 h1:S+LdBGiQXtJdowoJoQPEtI52syEP/JYBUpjO49EQhV8= @@ -1860,21 +1707,21 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.32.0 h1:cC2yDI3IQd0Udsu go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.32.0/go.mod h1:2PD5Ex6z8CFzDbTdOlwyNIUywRr1DN0ospafJM1wJ+s= go.opentelemetry.io/otel/log v0.8.0 h1:egZ8vV5atrUWUbnSsHn6vB8R21G2wrKqNiDt3iWertk= go.opentelemetry.io/otel/log v0.8.0/go.mod h1:M9qvDdUTRCopJcGRKg57+JSQ9LgLBrwwfC32epk5NX8= -go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= -go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= -go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= -go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= +go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= +go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= +go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= +go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg= go.opentelemetry.io/otel/sdk/log v0.8.0 h1:zg7GUYXqxk1jnGF/dTdLPrK06xJdrXgqgFLnI4Crxvs= go.opentelemetry.io/otel/sdk/log v0.8.0/go.mod h1:50iXr0UVwQrYS45KbruFrEt4LvAdCaWWgIrsN3ZQggo= -go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= -go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= -go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= -go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= +go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw= +go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= +go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= +go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= -go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= +go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= +go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -1914,10 +1761,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= -golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= +golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= +golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1933,8 +1778,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJkhzJCK5J6kUi1NTVXfM= +golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1982,10 +1827,8 @@ golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= -golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM= +golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2002,7 +1845,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/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-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -2061,10 +1903,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= -golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= +golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2096,8 +1936,8 @@ golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.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-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2117,11 +1957,8 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2132,7 +1969,6 @@ golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190524152521-dbbf3f1254d4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2141,7 +1977,6 @@ golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2229,11 +2064,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= -golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= +golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2252,10 +2084,8 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= -golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= +golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY= +golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2276,10 +2106,8 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= +golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2362,9 +2190,8 @@ golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= -golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= +golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= +golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= 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= @@ -2379,6 +2206,8 @@ gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJ gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= @@ -2444,8 +2273,6 @@ google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjY google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/api v0.197.0 h1:x6CwqQLsFiA5JKAiGyGBjc2bNtHtLddhJCE2IKuhhcQ= -google.golang.org/api v0.197.0/go.mod h1:AuOuo20GoQ331nq7DquGHlU6d+2wN2fZ8O0ta60nRNw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2594,15 +2421,15 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go. google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ= -google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -2642,13 +2469,11 @@ google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= -google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= +google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= +google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= 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= @@ -2669,20 +2494,18 @@ google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +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/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII= gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20160105164936-4f90aeace3a2/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= @@ -2696,7 +2519,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM= gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw= -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/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -2714,8 +2536,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= helm.sh/helm/v3 v3.18.5 h1:Cc3Z5vd6kDrZq9wO9KxKLNEickiTho6/H/dBNRVSos4= helm.sh/helm/v3 v3.18.5/go.mod h1:L/dXDR2r539oPlFP1PJqKAC1CUgqHJDLkxKpDGrWnyg= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2797,12 +2619,8 @@ modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -oras.land/oras-go v1.2.6 h1:z8cmxQXBU8yZ4mkytWqXfo6tZcamPwjsuxYU81xJ8Lk= -oras.land/oras-go v1.2.6/go.mod h1:OVPc1PegSEe/K8YiLfosrlqlqTN9PUyFvOw5Y9gwrT8= 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= -periph.io/x/host/v3 v3.8.0 h1:T5ojZ2wvnZHGPS4h95N2ZpcCyHnsvH3YRZ1UUUiv5CQ= -periph.io/x/host/v3 v3.8.0/go.mod h1:rzOLH+2g9bhc6pWZrkCrmytD4igwQ2vxFw6Wn6ZOlLY= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/pkg/cmd/kubeblocks/data/ack_hostpreflight.yaml b/pkg/cmd/kubeblocks/data/ack_hostpreflight.yaml deleted file mode 100644 index a41ffdc63..000000000 --- a/pkg/cmd/kubeblocks/data/ack_hostpreflight.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: host-utility -spec: - collectors: - analyzers: - extendCollectors: - - hostUtility : - collectorName: aliyun-cli - utilityName: aliyun - extendAnalyzers: - - hostUtility: - checkName: aliyunCli-Check - collectorName: aliyun-cli - outcomes: - - pass: - message: aliyun-cli has been installed - - warn: - message: aliyun-cli isn't installed \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/data/ack_preflight.yaml b/pkg/cmd/kubeblocks/data/ack_preflight.yaml deleted file mode 100644 index 29e8bb4d9..000000000 --- a/pkg/cmd/kubeblocks/data/ack_preflight.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: Preflight -metadata: - name: kubeblocks_preflight -spec: - collectors: - - clusterInfo: {} - analyzers: - - clusterVersion: - checkName: ACK-Version - outcomes: - - fail: - when: "< 1.20.0" - message: This application requires at least Kubernetes 1.20.0 or later - uri: https://www.kubernetes.io - - pass: - when: ">= 1.20.0" - message: Your cluster meets the recommended and required versions(>= 1.20.0) of Kubernetes - uri: https://www.kubernetes.io - - nodeResources: - checkName: At-Least-3-Nodes - outcomes: - - warn: - when: "count() < 3" - message: This application requires at least 3 nodes - - pass: - message: This cluster has enough nodes - extendAnalyzers: - - clusterAccess: - checkName: Check-K8S-Access - outcomes: - - fail: - message: K8s cluster access fail - - pass: - message: K8s cluster access ok - - taint: - checkName: Required-Taint-Match - outcomes: - - fail: - message: All nodes had taints that the pod didn't tolerate - - pass: - message: The taint matching succeeded - - storageClass: - checkName: Required-Default-SC - outcomes: - - warn: - message: The default storage class was not found. To learn more details, please check https://help.aliyun.com/document_detail/189288.html; Alternatively use option --set storageClass= when creating cluster - - pass: - message: Default storage class is the presence, and all good on storage classes \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/data/eks_hostpreflight.yaml b/pkg/cmd/kubeblocks/data/eks_hostpreflight.yaml deleted file mode 100644 index 37ffd808c..000000000 --- a/pkg/cmd/kubeblocks/data/eks_hostpreflight.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: host-utility -spec: - collectors: - analyzers: - extendCollectors: - - hostUtility : - collectorName: aws-cli - utilityName: aws - - hostUtility : - collectorName: eks-ctl - utilityName: eksctl - extendAnalyzers: - - hostUtility: - checkName: AWSCli-Check - collectorName: aws-cli - outcomes: - - pass: - message: aws cli has been installed - - warn: - message: aws cli isn't installed - - hostUtility: - checkName: EKSCtl-Check - collectorName: eks-ctl - outcomes: - - pass: - message: eksctl has been installed - - warn: - message: eksctl isn't installed \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/data/eks_preflight.yaml b/pkg/cmd/kubeblocks/data/eks_preflight.yaml deleted file mode 100644 index 19e108026..000000000 --- a/pkg/cmd/kubeblocks/data/eks_preflight.yaml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: Preflight -metadata: - name: kubeblocks_preflight -spec: - collectors: - - clusterInfo: {} - analyzers: - - clusterVersion: - checkName: EKS-Version - outcomes: - - fail: - when: "< 1.20.0" - message: This application requires at least Kubernetes 1.20.0 or later - uri: https://www.kubernetes.io - - pass: - when: ">= 1.20.0" - message: Your cluster meets the recommended and required versions(>= 1.20.0) of Kubernetes - uri: https://www.kubernetes.io - - nodeResources: - checkName: At-Least-3-Nodes - outcomes: - - warn: - when: "count() < 3" - message: This application requires at least 3 nodes - - pass: - message: This cluster has enough nodes. - - deploymentStatus: - checkName: AWS-Load-Balancer-Check - name: aws-load-balancer-controller - namespace: kube-system - outcomes: - - warn: - when: "absent" # note that the "absent" failure state must be listed first if used. - message: The aws-load-balancer-controller deployment is not present - - warn: - when: "< 1" - message: The aws-load-balancer-controller deployment does not have any ready replicas - - warn: - when: "= 1" - message: The aws-load-balancer-controller deployment has only a single ready replica - - pass: - message: There are multiple replicas of the aws-load-balancer-controller deployment ready - extendAnalyzers: - - clusterAccess: - checkName: Check-K8S-Access - outcomes: - - fail: - message: K8s cluster access fail - - pass: - message: K8s cluster access ok - - taint: - checkName: Required-Taint-Match - outcomes: - - fail: - message: All nodes had taints that the pod didn't tolerate - - pass: - message: The taint matching succeeded - - storageClass: - checkName: Required-Default-SC - outcomes: - - warn: - message: The default storage class was not found. To learn more details, please check https://docs.aws.amazon.com/zh_cn/eks/latest/userguide/storage-classes.html; Alternatively use option --set storageClass= when creating cluster - - pass: - message: Default storage class is the presence, and all good on storage classes \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/data/gke_hostpreflight.yaml b/pkg/cmd/kubeblocks/data/gke_hostpreflight.yaml deleted file mode 100644 index 1a8ccc863..000000000 --- a/pkg/cmd/kubeblocks/data/gke_hostpreflight.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: host-utility -spec: - collectors: - analyzers: - extendCollectors: - - hostUtility : - collectorName: gcloud-cli - utilityName: gcloud - extendAnalyzers: - - hostUtility: - checkName: gcloudCli-Check - collectorName: gcloud-cli - outcomes: - - pass: - message: gcloud-cli has been installed - - warn: - message: gcloud-cli isn't installed \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/data/gke_preflight.yaml b/pkg/cmd/kubeblocks/data/gke_preflight.yaml deleted file mode 100644 index 9e7336ace..000000000 --- a/pkg/cmd/kubeblocks/data/gke_preflight.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: Preflight -metadata: - name: kubeblocks_preflight -spec: - collectors: - - clusterInfo: {} - analyzers: - - clusterVersion: - checkName: GKE-Version - outcomes: - - fail: - when: "< 1.20.0" - message: This application requires at least Kubernetes 1.20.0 or later - uri: https://www.kubernetes.io - - pass: - when: ">= 1.20.0" - message: Your cluster meets the recommended and required versions(>= 1.20.0) of Kubernetes - uri: https://www.kubernetes.io - - nodeResources: - checkName: At-Least-3-Nodes - outcomes: - - warn: - when: "count() < 3" - message: This application requires at least 3 nodes - - pass: - message: This cluster has enough nodes - extendAnalyzers: - - clusterAccess: - checkName: Check-K8S-Access - outcomes: - - fail: - message: K8s cluster access fail - - pass: - message: K8s cluster access ok - - taint: - checkName: Required-Taint-Match - outcomes: - - fail: - message: All nodes had taints that the pod didn't tolerate - - pass: - message: The taint matching succeeded - - storageClass: - checkName: Required-Default-SC - outcomes: - - warn: - message: The default storage class was not found. To learn more details, please check https://cloud.google.com/anthos/clusters/docs/on-prem/latest/how-to/default-storage-class; Alternatively use option --set storageClass= when creating cluster - - pass: - message: Default storage class is the presence, and all good on storage classes \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/data/kubeblocks_base_preflight.yaml b/pkg/cmd/kubeblocks/data/kubeblocks_base_preflight.yaml deleted file mode 100644 index 3a90dfd6c..000000000 --- a/pkg/cmd/kubeblocks/data/kubeblocks_base_preflight.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: Preflight -metadata: - name: kubeblocks_preflight -spec: - collectors: - - clusterInfo: {} - analyzers: - - clusterVersion: - checkName: K8s-Version - outcomes: - - fail: - when: "< 1.20.0" - message: This application requires at least Kubernetes 1.20.0 or later - uri: https://www.kubernetes.io - - pass: - when: ">= 1.20.0" - message: Your cluster meets the recommended and required versions(>= 1.20.0) of Kubernetes - uri: https://www.kubernetes.io - - nodeResources: - checkName: At-Least-3-Nodes - outcomes: - - warn: - when: "count() < 3" - message: This application requires at least 3 nodes - - pass: - message: This cluster has enough nodes - - customResourceDefinition: - customResourceDefinitionName: volumesnapshotclasses.snapshot.storage.k8s.io - outcomes: - - fail: - message: The volumesnapshotclasses CRD was not found in the cluster. - - pass: - message: volumesnapshotclasses is installed. - - customResourceDefinition: - customResourceDefinitionName: volumesnapshots.snapshot.storage.k8s.io - outcomes: - - fail: - message: The volumesnapshots CRD was not found in the cluster. - - pass: - message: volumesnapshots is installed. - - customResourceDefinition: - customResourceDefinitionName: volumesnapshotcontents.snapshot.storage.k8s.io - outcomes: - - fail: - message: The volumesnapshotcontents CRD was not found in the cluster. - - pass: - message: volumesnapshotcontents is installed. - extendAnalyzers: - - clusterAccess: - checkName: Check-K8S-Access - outcomes: - - fail: - message: K8s cluster access fail - - pass: - message: K8s cluster access ok - - taint: - checkName: Required-Taint-Match - outcomes: - - fail: - message: All nodes had taints that the pod didn't tolerate - - pass: - message: The taint matching succeeded - - storageClass: - checkName: Required-Default-SC - outcomes: - - warn: - message: The default storage class was not found. You can use option --set storageClass= when creating cluster - - pass: - message: Default storage class is the presence, and all good on storage classes \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/data/tke_hostpreflight.yaml b/pkg/cmd/kubeblocks/data/tke_hostpreflight.yaml deleted file mode 100644 index acd2238f1..000000000 --- a/pkg/cmd/kubeblocks/data/tke_hostpreflight.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: host-utility -spec: - collectors: - analyzers: - extendCollectors: - - hostUtility : - collectorName: txcloud-cli - utilityName: tccli - extendAnalyzers: - - hostUtility: - checkName: txcloudCli-Check - collectorName: txcloud-cli - outcomes: - - pass: - message: txcloud-cli has been installed - - warn: - message: txcloud-cli isn't installed \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/data/tke_preflight.yaml b/pkg/cmd/kubeblocks/data/tke_preflight.yaml deleted file mode 100644 index fa2100a98..000000000 --- a/pkg/cmd/kubeblocks/data/tke_preflight.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: Preflight -metadata: - name: kubeblocks_preflight -spec: - collectors: - - clusterInfo: {} - analyzers: - - clusterVersion: - checkName: GKE-Version - outcomes: - - fail: - when: "< 1.20.0" - message: This application requires at least Kubernetes 1.20.0 or later - uri: https://www.kubernetes.io - - pass: - when: ">= 1.20.0" - message: Your cluster meets the recommended and required versions(>= 1.20.0) of Kubernetes - uri: https://www.kubernetes.io - - nodeResources: - checkName: At-Least-3-Nodes - outcomes: - - warn: - when: "count() < 3" - message: This application requires at least 3 nodes - - pass: - message: This cluster has enough nodes - extendAnalyzers: - - clusterAccess: - checkName: Check-K8S-Access - outcomes: - - fail: - message: K8s cluster access fail - - pass: - message: K8s cluster access ok - - taint: - checkName: Required-Taint-Match - outcomes: - - fail: - message: All nodes had taints that the pod didn't tolerate - - pass: - message: The taint matching succeeded - - storageClass: - checkName: Required-Default-SC - outcomes: - - warn: - message: The default storage class was not found. To learn more details, please check https://cloud.tencent.com/document/product/457/44235; Alternatively use option --set storageClass= when creating cluster - - pass: - message: Default storage class is the presence, and all good on storage classes \ No newline at end of file diff --git a/pkg/cmd/kubeblocks/install.go b/pkg/cmd/kubeblocks/install.go index b3ec5b49c..9b1312c7d 100644 --- a/pkg/cmd/kubeblocks/install.go +++ b/pkg/cmd/kubeblocks/install.go @@ -30,7 +30,6 @@ import ( "time" "github.com/pkg/errors" - "github.com/replicatedhq/troubleshoot/pkg/preflight" "github.com/spf13/cobra" "github.com/spf13/viper" "golang.org/x/exp/maps" @@ -113,9 +112,6 @@ var ( # Install KubeBlocks with specified version kbcli kubeblocks install --version=0.4.0 - # Install KubeBlocks with ignoring preflight checks - kbcli kubeblocks install --force - # Install KubeBlocks with specified namespace, if the namespace is not present, it will be created kbcli kubeblocks install --namespace=my-namespace --create-namespace @@ -134,13 +130,6 @@ func newInstallCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra }, } - p := &PreflightOptions{ - PreflightFlags: preflight.NewPreflightFlags(), - IOStreams: streams, - } - *p.Interactive = false - *p.Format = "kbcli" - cmd := &cobra.Command{ Use: "install", Short: "Install KubeBlocks.", @@ -150,7 +139,6 @@ func newInstallCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra util.CheckErr(o.Complete(f, cmd)) util.CheckErr(o.PreCheck()) util.CheckErr(o.CompleteInstallOptions()) - util.CheckErr(p.Preflight(f, args, o.ValueOpts)) util.CheckErr(o.Install()) }, } @@ -162,7 +150,6 @@ func newInstallCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra cmd.Flags().DurationVar(&o.Timeout, "timeout", 1800*time.Second, "Time to wait for installing KubeBlocks, such as --timeout=10m") cmd.Flags().BoolVar(&o.Wait, "wait", true, "Wait for KubeBlocks to be ready, including all the auto installed add-ons. It will wait for a --timeout period") cmd.Flags().BoolVar(&o.WaitAddons, "wait-addons", true, "Wait for auto installed add-ons. It will wait for a --timeout period") - cmd.Flags().BoolVar(&p.force, flagForce, p.force, "If present, just print fail item and continue with the following steps") cmd.Flags().StringVar(&o.PodAntiAffinity, "pod-anti-affinity", "", "Pod anti-affinity type, one of: (Preferred, Required)") cmd.Flags().StringArrayVar(&o.TopologyKeys, "topology-keys", nil, "Topology keys for affinity") cmd.Flags().StringToStringVar(&o.NodeLabels, "node-labels", nil, "Node label selector") diff --git a/pkg/cmd/kubeblocks/install_test.go b/pkg/cmd/kubeblocks/install_test.go index 7fa4da4c8..5cbcb9df4 100644 --- a/pkg/cmd/kubeblocks/install_test.go +++ b/pkg/cmd/kubeblocks/install_test.go @@ -67,6 +67,7 @@ var _ = Describe("kubeblocks install", func() { cmd = newInstallCmd(tf, streams) Expect(cmd).ShouldNot(BeNil()) Expect(cmd.HasSubCommands()).Should(BeFalse()) + Expect(cmd.Flags().Lookup("force")).Should(BeNil()) o := &InstallOptions{ Options: Options{ diff --git a/pkg/cmd/kubeblocks/kubeblocks.go b/pkg/cmd/kubeblocks/kubeblocks.go index ce4304bd0..6596ea841 100644 --- a/pkg/cmd/kubeblocks/kubeblocks.go +++ b/pkg/cmd/kubeblocks/kubeblocks.go @@ -40,7 +40,6 @@ func NewKubeBlocksCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *co newStatusCmd(f, streams), NewConfigCmd(f, streams), NewDescribeConfigCmd(f, streams), - NewPreflightCmd(f, streams), newCompareCmd(f, streams), ) return cmd diff --git a/pkg/cmd/kubeblocks/kubeblocks_test.go b/pkg/cmd/kubeblocks/kubeblocks_test.go index 27410796f..9978d84a6 100644 --- a/pkg/cmd/kubeblocks/kubeblocks_test.go +++ b/pkg/cmd/kubeblocks/kubeblocks_test.go @@ -48,10 +48,7 @@ var _ = Describe("kubeblocks", func() { cmd = NewKubeBlocksCmd(tf, streams) Expect(cmd).ShouldNot(BeNil()) Expect(cmd.HasSubCommands()).Should(BeTrue()) - }) - - It("preflight", func() { - cmd := NewPreflightCmd(tf, streams) - Expect(cmd).ShouldNot(BeNil()) + _, _, err := cmd.Find([]string{"preflight"}) + Expect(err).Should(HaveOccurred()) }) }) diff --git a/pkg/cmd/kubeblocks/preflight.go b/pkg/cmd/kubeblocks/preflight.go deleted file mode 100644 index cb05e4065..000000000 --- a/pkg/cmd/kubeblocks/preflight.go +++ /dev/null @@ -1,288 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package kubeblocks - -import ( - "context" - "embed" - "fmt" - "os" - "os/signal" - "strings" - - "github.com/pkg/errors" - analyze "github.com/replicatedhq/troubleshoot/pkg/analyze" - "github.com/replicatedhq/troubleshoot/pkg/preflight" - "github.com/spf13/cobra" - "golang.org/x/sync/errgroup" - "helm.sh/helm/v3/pkg/cli/values" - "k8s.io/cli-runtime/pkg/genericiooptions" - "k8s.io/client-go/rest" - cmdutil "k8s.io/kubectl/pkg/cmd/util" - "k8s.io/kubectl/pkg/util/templates" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - intctrlutil "github.com/apecloud/kubeblocks/pkg/controllerutil" - - kbpreflight "github.com/apecloud/kbcli/pkg/preflight" - "github.com/apecloud/kbcli/pkg/spinner" - "github.com/apecloud/kbcli/pkg/util" -) - -const ( - flagCollectorImage = "collector-image" - flagCollectorPullPolicy = "collector-pullpolicy" - flagCollectWithoutPermissions = "collect-without-permissions" - flagSelector = "selector" - flagSinceTime = "since-time" - flagSince = "since" - flagOutput = "output" - flagDebug = "debug" - flagNamespace = "namespace" - flagVerbose = "verbose" - flagForce = "force" - flagFormat = "format" - - PreflightPattern = "data/%s_preflight.yaml" - HostPreflightPattern = "data/%s_hostpreflight.yaml" - PreflightMessage = "Kubernetes cluster preflight" - - BasePreflightPattern = "data/kubeblocks_base_preflight.yaml" - BaseHostPreflightPattern = "data/kubeblocks_base_hostpreflight.yaml" -) - -var ( - //go:embed data/* - defaultVendorYamlData embed.FS - preflightExample = templates.Examples(` - # Run preflight provider checks against the default rules automatically - kbcli kubeblocks preflight - - # Run preflight provider checks and output more verbose info - kbcli kubeblocks preflight --verbose - - # Run preflight checks against the customized rules of preflight-check.yaml - kbcli kubeblocks preflight preflight-check.yaml - - # Run preflight checks and display AnalyzeResults with interactive mode - kbcli kubeblocks preflight preflight-check.yaml --interactive=true`) -) - -// PreflightOptions declares the arguments accepted by the preflight command -type PreflightOptions struct { - factory cmdutil.Factory - genericiooptions.IOStreams - *preflight.PreflightFlags - checkFileList []string - checkYamlData [][]byte - namespace string - verbose bool - force bool - ValueOpts values.Options -} - -func NewPreflightCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command { - p := &PreflightOptions{ - factory: f, - IOStreams: streams, - PreflightFlags: preflight.NewPreflightFlags(), - } - cmd := &cobra.Command{ - Use: "preflight", - Short: "Run and retrieve preflight checks for KubeBlocks.", - Example: preflightExample, - Run: func(cmd *cobra.Command, args []string) { - util.CheckErr(p.Preflight(f, args, values.Options{})) - }, - } - // add flags - cmd.Flags().StringVar(p.Format, flagFormat, "yaml", "output format, one of json, yaml. only used when interactive is set to false, default format is yaml") - cmd.Flags().StringVar(p.CollectorImage, flagCollectorImage, *p.CollectorImage, "the full name of the collector image to use") - cmd.Flags().StringVar(p.CollectorPullPolicy, flagCollectorPullPolicy, *p.CollectorPullPolicy, "the pull policy of the collector image") - cmd.Flags().BoolVar(p.CollectWithoutPermissions, flagCollectWithoutPermissions, *p.CollectWithoutPermissions, "always run preflight checks even if some required permissions that preflight does not have") - cmd.Flags().StringVar(p.Selector, flagSelector, *p.Selector, "selector (label query) to filter remote collection nodes on.") - cmd.Flags().StringVar(p.SinceTime, flagSinceTime, *p.SinceTime, "force pod logs collectors to return logs after a specific date (RFC3339)") - cmd.Flags().StringVar(p.Since, flagSince, *p.Since, "force pod logs collectors to return logs newer than a relative duration like 5s, 2m, or 3h.") - cmd.Flags().StringVarP(p.Output, flagOutput, *p.Output, "", "specify the output file path for the preflight checks") - cmd.Flags().BoolVar(p.Debug, flagDebug, *p.Debug, "enable debug logging") - cmd.Flags().StringVarP(&p.namespace, flagNamespace, "n", "", "If present, the namespace scope for this CLI request") - cmd.Flags().BoolVar(&p.verbose, flagVerbose, p.verbose, "print more verbose logs, default value is false") - return cmd -} - -func LoadVendorCheckYaml(vendorName util.K8sProvider) ([][]byte, error) { - var yamlDataList [][]byte - if data, err := defaultVendorYamlData.ReadFile(newPreflightPath(vendorName)); err == nil { - yamlDataList = append(yamlDataList, data) - } else { - if data, err := defaultVendorYamlData.ReadFile(BasePreflightPattern); err == nil { - yamlDataList = append(yamlDataList, data) - } - } - if data, err := defaultVendorYamlData.ReadFile(newHostPreflightPath(vendorName)); err == nil { - yamlDataList = append(yamlDataList, data) - } else { - if data, err := defaultVendorYamlData.ReadFile(BaseHostPreflightPattern); err == nil { - yamlDataList = append(yamlDataList, data) - } - } - if len(yamlDataList) == 0 { - return yamlDataList, errors.New("unsupported k8s provider") - } - return yamlDataList, nil -} - -func (p *PreflightOptions) Preflight(f cmdutil.Factory, args []string, opts values.Options) error { - // if force flag set, skip preflight - - if p.force { - return nil - } - p.ValueOpts = opts - - var err error - if err = p.complete(f, args); err != nil { - if intctrlutil.IsTargetError(err, intctrlutil.ErrorTypeSkipPreflight) { - return nil - } - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, err.Error()) - } - if err = p.run(); err != nil { - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, err.Error()) - } - return nil -} - -func (p *PreflightOptions) complete(f cmdutil.Factory, args []string) error { - // default no args, and run default validating vendor - if len(args) == 0 { - clientSet, err := f.KubernetesClientSet() - if err != nil { - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, "init k8s client failed, please check the kubeconfig") - } - versionInfo, err := util.GetVersionInfo(clientSet) - if err != nil { - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, "get k8s version of server failed, please check accessibility to k8s") - } - vendorName, err := util.GetK8sProvider(versionInfo.Kubernetes, clientSet) - if err != nil { - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, "get k8s cloud provider failed, please check accessibility to k8s") - } - p.checkYamlData, err = LoadVendorCheckYaml(vendorName) - if err != nil { - return intctrlutil.NewError(intctrlutil.ErrorTypeSkipPreflight, err.Error()) - } - } else { - p.checkFileList = args - } - if len(p.checkFileList) < 1 && len(p.checkYamlData) < 1 { - return intctrlutil.NewError(intctrlutil.ErrorTypeSkipPreflight, "must specify at least one checks yaml") - } - - p.factory = f - // conceal warning logs - rest.SetDefaultWarningHandler(rest.NoWarnings{}) - go func() { - signalChan := make(chan os.Signal, 1) - signal.Notify(signalChan, os.Interrupt) - <-signalChan - os.Exit(0) - }() - return nil -} - -func (p *PreflightOptions) run() error { - var ( - kbPreflight *preflightv1beta2.Preflight - kbHostPreflight *preflightv1beta2.HostPreflight - collectResults []preflight.CollectResult - analyzeResults []*analyze.AnalyzeResult - preflightName string - err error - ) - // set progress chan - progressCh := make(chan interface{}) - defer close(progressCh) - // make sure we shut down progress collection goroutines if an error occurs - ctx, cancelFunc := context.WithCancel(context.Background()) - defer cancelFunc() - progressCollections, ctx := errgroup.WithContext(ctx) - progressCollections.Go(CollectProgress(ctx, progressCh, p.verbose)) - // 1. load yaml - if kbPreflight, kbHostPreflight, preflightName, err = kbpreflight.LoadPreflightSpec(p.checkFileList, p.checkYamlData); err != nil { - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, err.Error()) - } - // 2. collect data - s := spinner.New(p.Out, spinner.WithMessage(fmt.Sprintf("%-50s", "Collecting data from cluster"))) - collectResults, err = kbpreflight.CollectPreflight(p.factory, &p.ValueOpts, ctx, kbPreflight, kbHostPreflight, progressCh) - if err != nil { - s.Fail() - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, err.Error()) - } - s.Success() - - // 3. analyze data - for _, res := range collectResults { - analyzeResults = append(analyzeResults, res.Analyze()...) - } - cancelFunc() - if err := progressCollections.Wait(); err != nil { - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, err.Error()) - } - // 4. display analyzed data - if len(analyzeResults) == 0 { - fmt.Fprintln(p.Out, "no data has been collected") - return nil - } - if err = kbpreflight.ShowTextResults(preflightName, analyzeResults, *p.Format, p.verbose, p.Out); err != nil { - return intctrlutil.NewError(intctrlutil.ErrorTypePreflightCommon, err.Error()) - } - return nil -} - -func CollectProgress(ctx context.Context, progressCh <-chan interface{}, verbose bool) func() error { - return func() error { - for { - select { - case msg := <-progressCh: - if verbose { - switch msg := msg.(type) { - case error: - fmt.Fprintf(os.Stderr, "error - %v\n", msg) - case string: - fmt.Fprintf(os.Stderr, "%s\n", msg) - case preflight.CollectProgress: - fmt.Fprintf(os.Stderr, "%s\n", msg.String()) - } - } - case <-ctx.Done(): - return nil - } - } - } -} - -func newPreflightPath(vendorName util.K8sProvider) string { - return fmt.Sprintf(PreflightPattern, strings.ToLower(string(vendorName))) -} - -func newHostPreflightPath(vendorName util.K8sProvider) string { - return fmt.Sprintf(HostPreflightPattern, strings.ToLower(string(vendorName))) -} diff --git a/pkg/cmd/kubeblocks/preflight_test.go b/pkg/cmd/kubeblocks/preflight_test.go deleted file mode 100644 index be95ab59c..000000000 --- a/pkg/cmd/kubeblocks/preflight_test.go +++ /dev/null @@ -1,134 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package kubeblocks - -import ( - "net/http" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/replicatedhq/troubleshoot/pkg/preflight" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/cli-runtime/pkg/genericiooptions" - "k8s.io/cli-runtime/pkg/resource" - "k8s.io/client-go/kubernetes/scheme" - clientfake "k8s.io/client-go/rest/fake" - cmdtesting "k8s.io/kubectl/pkg/cmd/testing" - - "github.com/apecloud/kbcli/pkg/testing" - "github.com/apecloud/kbcli/pkg/types" - "github.com/apecloud/kbcli/pkg/util" -) - -var _ = Describe("Preflight API Test", func() { - const ( - namespace = "test" - clusterName = "test" - ) - - var ( - streams genericiooptions.IOStreams - tf *cmdtesting.TestFactory - cluster = testing.FakeCluster(clusterName, namespace) - pods = testing.FakePods(3, namespace, clusterName) - ) - - BeforeEach(func() { - streams, _, _, _ = genericiooptions.NewTestIOStreams() - tf = testing.NewTestFactory(namespace) - codec := scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...) - httpResp := func(obj runtime.Object) *http.Response { - return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: cmdtesting.ObjBody(codec, obj)} - } - - tf.UnstructuredClient = &clientfake.RESTClient{ - GroupVersion: schema.GroupVersion{Group: types.AppsAPIGroup, Version: types.AppsAPIVersion}, - NegotiatedSerializer: resource.UnstructuredPlusDefaultContentConfig().NegotiatedSerializer, - Client: clientfake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { - if req.Method != "GET" { - return nil, nil - } - urlPrefix := "/api/v1/namespaces/" + namespace - mapping := map[string]*http.Response{ - "/api/v1/nodes/" + testing.NodeName: httpResp(testing.FakeNode()), - urlPrefix + "/services": httpResp(&corev1.ServiceList{}), - urlPrefix + "/events": httpResp(&corev1.EventList{}), - urlPrefix + "/pods": httpResp(pods), - } - return mapping[req.URL.Path], nil - }), - } - - tf.Client = tf.UnstructuredClient - tf.FakeDynamicClient = testing.FakeDynamicClient(cluster, testing.FakeClusterDef()) - }) - - AfterEach(func() { - tf.Cleanup() - }) - - It("complete and validate test", func() { - p := &PreflightOptions{ - factory: tf, - IOStreams: streams, - PreflightFlags: preflight.NewPreflightFlags(), - } - Expect(p.complete(tf, nil)).Should(HaveOccurred()) - Expect(p.complete(tf, []string{"file1", "file2"})).Should(Succeed()) - Expect(len(p.checkFileList)).Should(Equal(2)) - }) - - It("run test", func() { - p := &PreflightOptions{ - factory: tf, - IOStreams: streams, - PreflightFlags: preflight.NewPreflightFlags(), - } - *p.Interactive = false - *p.Format = "yaml" - p.checkFileList = []string{"../../testing/testdata/hostpreflight.yaml"} - By("non-interactive mode, and expect success") - Eventually(func(g Gomega) { - err := p.run() - g.Expect(err).NotTo(HaveOccurred()) - }).Should(Succeed()) - }) - - It("LoadVendorCheckYaml test, and expect fail", func() { - _, err := LoadVendorCheckYaml(util.UnknownProvider) - Expect(err).Should(Succeed()) - }) - - It("LoadVendorCheckYaml test, and expect success", func() { - res, err := LoadVendorCheckYaml(util.EKSProvider) - Expect(err).NotTo(HaveOccurred()) - Expect(len(res)).Should(Equal(2)) - }) - It("newPreflightPath test, and expect success", func() { - res := newPreflightPath("test") - Expect(res).Should(Equal("data/test_preflight.yaml")) - }) - It("newHostPreflightPath test, and expect success", func() { - res := newHostPreflightPath("test") - Expect(res).Should(Equal("data/test_hostpreflight.yaml")) - }) -}) diff --git a/pkg/preflight/analyze.go b/pkg/preflight/analyze.go deleted file mode 100644 index a89c04a90..000000000 --- a/pkg/preflight/analyze.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - "context" - "fmt" - "path/filepath" - "strings" - - analyze "github.com/replicatedhq/troubleshoot/pkg/analyze" - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - "github.com/replicatedhq/troubleshoot/pkg/preflight" - "helm.sh/helm/v3/pkg/cli/values" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - kbanalyzer "github.com/apecloud/kbcli/pkg/preflight/analyzer" -) - -type KBClusterCollectResult struct { - preflight.ClusterCollectResult - HelmOptions *values.Options - AnalyzerSpecs []*troubleshoot.Analyze - KbAnalyzerSpecs []*preflightv1beta2.ExtendAnalyze -} - -type KBHostCollectResult struct { - preflight.HostCollectResult - AnalyzerSpecs []*troubleshoot.HostAnalyze - KbAnalyzerSpecs []*preflightv1beta2.ExtendHostAnalyze -} - -func (c KBClusterCollectResult) Analyze() []*analyze.AnalyzeResult { - return doAnalyze(c.Context, c.AllCollectedData, c.AnalyzerSpecs, c.KbAnalyzerSpecs, nil, nil, c.HelmOptions) -} - -func (c KBHostCollectResult) Analyze() []*analyze.AnalyzeResult { - return doAnalyze(c.Context, c.AllCollectedData, nil, nil, c.AnalyzerSpecs, c.KbAnalyzerSpecs, nil) -} - -func doAnalyze(ctx context.Context, allCollectedData map[string][]byte, - analyzers []*troubleshoot.Analyze, - kbAnalyzers []*preflightv1beta2.ExtendAnalyze, - hostAnalyzers []*troubleshoot.HostAnalyze, - kbhHostAnalyzers []*preflightv1beta2.ExtendHostAnalyze, - options *values.Options, -) []*analyze.AnalyzeResult { - getCollectedFileContents := func(fileName string) ([]byte, error) { - contents, ok := allCollectedData[fileName] - if !ok { - return nil, fmt.Errorf("file %s was not collected", fileName) - } - - return contents, nil - } - getChildCollectedFileContents := func(prefix string, excludeFiles []string) (map[string][]byte, error) { - matching := make(map[string][]byte) - for k, v := range allCollectedData { - if strings.HasPrefix(k, prefix) { - matching[k] = v - } - } - for k, v := range allCollectedData { - if ok, _ := filepath.Match(prefix, k); ok { - matching[k] = v - } - } - if len(excludeFiles) > 0 { - for k := range matching { - for _, ex := range excludeFiles { - if ok, _ := filepath.Match(ex, k); ok { - delete(matching, k) - } - } - } - } - if len(matching) == 0 { - return nil, fmt.Errorf("file not found: %s", prefix) - } - return matching, nil - } - var analyzeResults []*analyze.AnalyzeResult - for _, analyzer := range analyzers { - analyzeResult, _ := analyze.Analyze(ctx, analyzer, getCollectedFileContents, getChildCollectedFileContents) - if analyzeResult != nil { - analyzeResults = append(analyzeResults, analyzeResult...) - } - } - for _, kbAnalyzer := range kbAnalyzers { - analyzeResult := kbanalyzer.KBAnalyze(ctx, kbAnalyzer, getCollectedFileContents, getChildCollectedFileContents, options) - analyzeResults = append(analyzeResults, analyzeResult...) - } - for _, hostAnalyzer := range hostAnalyzers { - analyzeResult := analyze.HostAnalyze(ctx, hostAnalyzer, getCollectedFileContents, getChildCollectedFileContents) - analyzeResults = append(analyzeResults, analyzeResult...) - } - for _, kbHostAnalyzer := range kbhHostAnalyzers { - analyzeResult := kbanalyzer.HostKBAnalyze(ctx, kbHostAnalyzer, getCollectedFileContents, getChildCollectedFileContents) - analyzeResults = append(analyzeResults, analyzeResult...) - } - return analyzeResults -} diff --git a/pkg/preflight/analyze_test.go b/pkg/preflight/analyze_test.go deleted file mode 100644 index a5c1f08ad..000000000 --- a/pkg/preflight/analyze_test.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - "context" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - preflightTesting "github.com/apecloud/kbcli/pkg/preflight/testing" -) - -var _ = Describe("analyze_test", func() { - var ( - ctx context.Context - allCollectedData map[string][]byte - analyzers []*troubleshoot.Analyze - kbAnalyzers []*preflightv1beta2.ExtendAnalyze - hostAnalyzers []*troubleshoot.HostAnalyze - kbhHostAnalyzers []*preflightv1beta2.ExtendHostAnalyze - ) - - BeforeEach(func() { - ctx = context.TODO() - allCollectedData = preflightTesting.FakeCollectedData() - analyzers = preflightTesting.FakeAnalyzers() - kbAnalyzers = []*preflightv1beta2.ExtendAnalyze{{}} - hostAnalyzers = []*troubleshoot.HostAnalyze{{}} - kbhHostAnalyzers = []*preflightv1beta2.ExtendHostAnalyze{{}} - }) - - It("doAnalyze test, and expect success", func() { - Eventually(func(g Gomega) { - analyzeList := doAnalyze(ctx, allCollectedData, analyzers, kbAnalyzers, hostAnalyzers, kbhHostAnalyzers, nil) - g.Expect(len(analyzeList)).Should(Equal(4)) - g.Expect(analyzeList[0].IsPass).Should(Equal(true)) - g.Expect(analyzeList[1].IsFail).Should(Equal(true)) - }).Should(Succeed()) - }) -}) diff --git a/pkg/preflight/analyzer/access.go b/pkg/preflight/analyzer/access.go deleted file mode 100644 index 6386d0907..000000000 --- a/pkg/preflight/analyzer/access.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "path/filepath" - - analyze "github.com/replicatedhq/troubleshoot/pkg/analyze" - "github.com/replicatedhq/troubleshoot/pkg/collect" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - "github.com/apecloud/kbcli/pkg/preflight/util" -) - -func GetClusterVersionPath() string { - // hardcode ClusterVersionPath will make preflight fail in windows - // due to the correct path is "cluster-info\cluster_version.json" in windows - return filepath.Join("cluster-info", "cluster_version.json") -} - -type AnalyzeClusterAccess struct { - analyzer *preflightv1beta2.ClusterAccessAnalyze -} - -func (a *AnalyzeClusterAccess) Title() string { - return util.TitleOrDefault(a.analyzer.AnalyzeMeta, "Cluster Access") -} - -func (a *AnalyzeClusterAccess) IsExcluded() (bool, error) { - return util.IsExcluded(a.analyzer.Exclude) -} - -func (a *AnalyzeClusterAccess) Analyze(getFile GetCollectedFileContents, findFiles GetChildCollectedFileContents) ([]*analyze.AnalyzeResult, error) { - isAccess := true - collected, err := getFile(GetClusterVersionPath()) - if err != nil { - isAccess = false - } else { - if err := json.Unmarshal(collected, &collect.ClusterVersion{}); err != nil { - isAccess = false - } - } - - result := analyze.AnalyzeResult{ - Title: a.Title(), - } - for _, outcome := range a.analyzer.Outcomes { - if outcome.Fail != nil && !isAccess { - result.IsFail = true - result.Message = outcome.Fail.Message - result.URI = outcome.Fail.URI - } else if outcome.Pass != nil && isAccess { - result.IsPass = true - result.Message = outcome.Pass.Message - result.URI = outcome.Pass.URI - } - } - result.Strict = a.analyzer.Strict.BoolOrDefaultFalse() - return []*analyze.AnalyzeResult{&result}, nil -} diff --git a/pkg/preflight/analyzer/access_test.go b/pkg/preflight/analyzer/access_test.go deleted file mode 100644 index 75ca8716c..000000000 --- a/pkg/preflight/analyzer/access_test.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "errors" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - "github.com/replicatedhq/troubleshoot/pkg/collect" - "k8s.io/apimachinery/pkg/version" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var _ = Describe("access_test", func() { - var ( - analyzer AnalyzeClusterAccess - resInfo collect.ClusterVersion - ) - Context("AnalyzeHostUtility test", func() { - BeforeEach(func() { - analyzer = AnalyzeClusterAccess{ - analyzer: &preflightv1beta2.ClusterAccessAnalyze{ - Outcomes: []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - Message: "k8s cluster access success", - }, - Fail: &troubleshoot.SingleOutcome{ - Message: "k8s cluster access fail", - }, - }, - }}} - }) - It("Analyze test, and get file failed", func() { - Eventually(func(g Gomega) { - getCollectedFileContents := func(filename string) ([]byte, error) { - return nil, errors.New("get file failed") - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsFail).Should(BeTrue()) - }).Should(Succeed()) - }) - - It("Analyze test, and return of get file is not version.Info", func() { - Eventually(func(g Gomega) { - getCollectedFileContents := func(filename string) ([]byte, error) { - return []byte("test"), nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsFail).Should(BeTrue()) - }).Should(Succeed()) - }) - - It("Analyze test, and analyzer result is expected that pass is true", func() { - resInfo = collect.ClusterVersion{ - Info: &version.Info{ - Major: "1", - Minor: "23", - GitVersion: "v1.23.15", - GitCommit: "b84cb8ab29366daa1bba65bc67f54de2f6c34848", - GitTreeState: "clean", - BuildDate: "2022-12-08T10:42:57Z", - GoVersion: "go1.17.13", - Compiler: "gc", - Platform: "linux/arm64", - }, - String: "v1.23.15", - } - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(resInfo) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeTrue()) - }).Should(Succeed()) - }) - }) -}) diff --git a/pkg/preflight/analyzer/analyze_result.go b/pkg/preflight/analyzer/analyze_result.go deleted file mode 100644 index 5485c7017..000000000 --- a/pkg/preflight/analyzer/analyze_result.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - analyze "github.com/replicatedhq/troubleshoot/pkg/analyze" - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" -) - -const ( - MissingOutcomeMessage = "there is a missing outcome message" - IncorrectOutcomeType = "there is an incorrect outcome type" - PassType = "Pass" - WarnType = "Warn" - FailType = "Fail" -) - -func newAnalyzeResult(title string, resultType string, outcomes []*troubleshoot.Outcome) *analyze.AnalyzeResult { - for _, outcome := range outcomes { - if outcome == nil { - continue - } - switch resultType { - case PassType: - if outcome.Pass != nil { - return newPassAnalyzeResult(title, outcome) - } - case WarnType: - if outcome.Warn != nil { - return newWarnAnalyzeResult(title, outcome) - } - case FailType: - if outcome.Fail != nil { - return newFailAnalyzeResult(title, outcome) - } - default: - return newFailedResultWithMessage(title, IncorrectOutcomeType) - } - } - return newFailedResultWithMessage(title, MissingOutcomeMessage) -} - -func newFailAnalyzeResult(title string, outcome *troubleshoot.Outcome) *analyze.AnalyzeResult { - return &analyze.AnalyzeResult{ - Title: title, - IsFail: true, - Message: outcome.Fail.Message, - URI: outcome.Fail.URI, - } -} - -func newWarnAnalyzeResult(title string, outcome *troubleshoot.Outcome) *analyze.AnalyzeResult { - return &analyze.AnalyzeResult{ - Title: title, - IsWarn: true, - Message: outcome.Warn.Message, - URI: outcome.Warn.URI, - } -} - -func newPassAnalyzeResult(title string, outcome *troubleshoot.Outcome) *analyze.AnalyzeResult { - return &analyze.AnalyzeResult{ - Title: title, - IsPass: true, - Message: outcome.Pass.Message, - URI: outcome.Pass.URI, - } -} - -func newFailedResultWithMessage(title, message string) *analyze.AnalyzeResult { - return newFailAnalyzeResult(title, &troubleshoot.Outcome{Fail: &troubleshoot.SingleOutcome{Message: message}}) -} - -func newWarnResultWithMessage(title, message string) *analyze.AnalyzeResult { - return newWarnAnalyzeResult(title, &troubleshoot.Outcome{Warn: &troubleshoot.SingleOutcome{Message: message}}) -} diff --git a/pkg/preflight/analyzer/analyze_result_test.go b/pkg/preflight/analyzer/analyze_result_test.go deleted file mode 100644 index 76cf0fef7..000000000 --- a/pkg/preflight/analyzer/analyze_result_test.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" -) - -var _ = Describe("kb_storage_class_test", func() { - var ( - outcomes []*troubleshoot.Outcome - ) - Context("analyze storage class test", func() { - BeforeEach(func() { - outcomes = []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - - Message: "analyze storage class success", - }, - Fail: &troubleshoot.SingleOutcome{ - Message: "analyze storage class fail", - }, - Warn: &troubleshoot.SingleOutcome{ - Message: "warn message", - }, - }, - } - }) - It("AnalyzeResult test, and expected that fail is true", func() { - Eventually(func(g Gomega) { - res := newAnalyzeResult("test", FailType, outcomes) - g.Expect(res.IsFail).Should(BeTrue()) - g.Expect(res.Message).Should(Equal(outcomes[0].Fail.Message)) - }).Should(Succeed()) - }) - - It("AnalyzeResult test, and expected that warn is true", func() { - Eventually(func(g Gomega) { - res := newAnalyzeResult("test", WarnType, outcomes) - g.Expect(res.IsWarn).Should(BeTrue()) - g.Expect(res.Message).Should(Equal(outcomes[0].Warn.Message)) - }).Should(Succeed()) - }) - It("AnalyzeResult test, and expected that pass is true", func() { - Eventually(func(g Gomega) { - res := newAnalyzeResult("test", PassType, outcomes) - g.Expect(res.IsPass).Should(BeTrue()) - g.Expect(res.Message).Should(Equal(outcomes[0].Pass.Message)) - }).Should(Succeed()) - }) - It("AnalyzeResult with message test, and expected that fail is true", func() { - Eventually(func(g Gomega) { - message := "test" - res := newFailedResultWithMessage("test", message) - g.Expect(res.IsFail).Should(BeTrue()) - g.Expect(res.Message).Should(Equal(message)) - }).Should(Succeed()) - }) - It("AnalyzeResult with message test, and expected that fail is true", func() { - Eventually(func(g Gomega) { - message := "test" - res := newWarnResultWithMessage("test", message) - g.Expect(res.IsWarn).Should(BeTrue()) - g.Expect(res.Message).Should(Equal(message)) - }).Should(Succeed()) - }) - }) -}) diff --git a/pkg/preflight/analyzer/analyzer.go b/pkg/preflight/analyzer/analyzer.go deleted file mode 100644 index 352284853..000000000 --- a/pkg/preflight/analyzer/analyzer.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "context" - "fmt" - - "github.com/pkg/errors" - analyze "github.com/replicatedhq/troubleshoot/pkg/analyze" - "helm.sh/helm/v3/pkg/cli/values" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -type KBAnalyzer interface { - Title() string - IsExcluded() (bool, error) - Analyze(getFile GetCollectedFileContents, findFiles GetChildCollectedFileContents) ([]*analyze.AnalyzeResult, error) -} - -type GetCollectedFileContents func(string) ([]byte, error) -type GetChildCollectedFileContents func(string, []string) (map[string][]byte, error) - -func GetAnalyzer(analyzer *preflightv1beta2.ExtendAnalyze, options *values.Options) (KBAnalyzer, bool) { - switch { - case analyzer.ClusterAccess != nil: - return &AnalyzeClusterAccess{analyzer: analyzer.ClusterAccess}, true - case analyzer.StorageClass != nil: - return &AnalyzeStorageClassByKb{analyzer: analyzer.StorageClass}, true - case analyzer.Taint != nil: - return &AnalyzeTaintClassByKb{analyzer: analyzer.Taint, HelmOpts: options}, true - default: - return nil, false - } -} - -func KBAnalyze(ctx context.Context, kbAnalyzer *preflightv1beta2.ExtendAnalyze, getFile func(string) ([]byte, error), findFiles func(string, []string) (map[string][]byte, error), options *values.Options) []*analyze.AnalyzeResult { - analyzer, ok := GetAnalyzer(kbAnalyzer, options) - if !ok { - return NewAnalyzeResultError(analyzer, errors.New("invalid analyzer")) - } - isExcluded, _ := analyzer.IsExcluded() - if isExcluded { - // logger.Printf("Excluding %q analyzer", analyzer.Title()) - return nil - } - results, err := analyzer.Analyze(getFile, findFiles) - if err != nil { - return NewAnalyzeResultError(analyzer, errors.Wrap(err, "analyze")) - } - return results -} - -func HostKBAnalyze(ctx context.Context, kbHostAnalyzer *preflightv1beta2.ExtendHostAnalyze, getFile func(string) ([]byte, error), findFiles func(string, []string) (map[string][]byte, error)) []*analyze.AnalyzeResult { - hostAnalyzer, ok := GetHostAnalyzer(kbHostAnalyzer) - if !ok { - return analyze.NewAnalyzeResultError(hostAnalyzer, errors.New("invalid host analyzer")) - } - isExcluded, _ := hostAnalyzer.IsExcluded() - if isExcluded { - // logger.Printf("Excluding %q analyzer", hostAnalyzer.Title()) - return nil - } - results, err := hostAnalyzer.Analyze(getFile) - if err != nil { - return analyze.NewAnalyzeResultError(hostAnalyzer, errors.Wrap(err, "analyze")) - } - return results -} - -func NewAnalyzeResultError(analyzer KBAnalyzer, err error) []*analyze.AnalyzeResult { - if analyzer != nil { - return []*analyze.AnalyzeResult{{ - IsFail: true, - Title: analyzer.Title(), - Message: fmt.Sprintf("Analyzer Failed: %v", err), - }} - } - return []*analyze.AnalyzeResult{{ - IsFail: true, - Title: "nil analyzer", - Message: fmt.Sprintf("Analyzer Failed: %v", err), - }} -} diff --git a/pkg/preflight/analyzer/anzlyzer_test.go b/pkg/preflight/analyzer/anzlyzer_test.go deleted file mode 100644 index e43499484..000000000 --- a/pkg/preflight/analyzer/anzlyzer_test.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "context" - "encoding/json" - "errors" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - "github.com/replicatedhq/troubleshoot/pkg/collect" - "k8s.io/apimachinery/pkg/version" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - kbcollector "github.com/apecloud/kbcli/pkg/preflight/collector" -) - -var _ = Describe("analyzer_test", func() { - Context("KBAnalyze test", func() { - It("KBAnalyze test, and ExtendAnalyze is nil", func() { - Eventually(func(g Gomega) { - res := KBAnalyze(context.TODO(), &preflightv1beta2.ExtendAnalyze{}, nil, nil, nil) - g.Expect(res[0].IsFail).Should(BeTrue()) - }).Should(Succeed()) - }) - - It("KBAnalyze test, and expect success", func() { - kbAnalyzer := &preflightv1beta2.ExtendAnalyze{ - ClusterAccess: &preflightv1beta2.ClusterAccessAnalyze{ - Outcomes: []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - Message: "k8s cluster access success", - }, - Fail: &troubleshoot.SingleOutcome{ - Message: "k8s cluster access fail", - }, - }, - }}} - resInfo := collect.ClusterVersion{ - Info: &version.Info{ - Major: "1", - Minor: "23", - GitVersion: "v1.23.15", - GitCommit: "b84cb8ab29366daa1bba65bc67f54de2f6c34848", - GitTreeState: "clean", - BuildDate: "2022-12-08T10:42:57Z", - GoVersion: "go1.17.13", - Compiler: "gc", - Platform: "linux/arm64", - }, - String: "v1.23.15", - } - Eventually(func(g Gomega) { - b, err := json.Marshal(resInfo) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(string) ([]byte, error) { - return b, nil - } - res := KBAnalyze(context.TODO(), kbAnalyzer, getCollectedFileContents, nil, nil) - Expect(len(res)).Should(Equal(1)) - g.Expect(res[0].IsPass).Should(BeTrue()) - }).Should(Succeed()) - }) - }) - - Context("HostKBAnalyze test", func() { - It("HostKBAnalyze test, and ExtendHostAnalyze is nil", func() { - Eventually(func(g Gomega) { - res := HostKBAnalyze(context.TODO(), &preflightv1beta2.ExtendHostAnalyze{}, nil, nil) - g.Expect(res[0].IsFail).Should(BeTrue()) - }).Should(Succeed()) - }) - - It("HostKBAnalyze test, and expect success", func() { - kbHostAnalyzer := &preflightv1beta2.ExtendHostAnalyze{ - HostUtility: &preflightv1beta2.HostUtilityAnalyze{ - Outcomes: []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - Message: "utility already installed", - }, - Fail: &troubleshoot.SingleOutcome{ - Message: "utility isn't installed", - }, - }, - }}} - resInfo := kbcollector.HostUtilityInfo{ - Path: "/usr/local/bin/helm", - Name: "helm", - Error: "", - } - Eventually(func(g Gomega) { - b, err := json.Marshal(resInfo) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(string) ([]byte, error) { - return b, nil - } - res := HostKBAnalyze(context.TODO(), kbHostAnalyzer, getCollectedFileContents, nil) - Expect(len(res)).Should(Equal(1)) - g.Expect(res[0].IsPass).Should(BeTrue()) - }).Should(Succeed()) - }) - }) - - It("GetAnalyzer test, and expect success", func() { - Eventually(func(g Gomega) { - collector, ok := GetAnalyzer(&preflightv1beta2.ExtendAnalyze{ClusterAccess: &preflightv1beta2.ClusterAccessAnalyze{}}, nil) - g.Expect(collector).ShouldNot(BeNil()) - g.Expect(ok).Should(BeTrue()) - collector, ok = GetAnalyzer(&preflightv1beta2.ExtendAnalyze{}, nil) - g.Expect(collector).Should(BeNil()) - g.Expect(ok).Should(BeFalse()) - }).Should(Succeed()) - }) - - It("NewAnalyzeResultError test, argument isn't nil", func() { - res := NewAnalyzeResultError(&AnalyzeClusterAccess{analyzer: &preflightv1beta2.ClusterAccessAnalyze{}}, errors.New("mock error")) - Expect(len(res)).Should(Equal(1)) - Expect(res[0].IsFail).Should(BeTrue()) - }) -}) diff --git a/pkg/preflight/analyzer/host_analyzer.go b/pkg/preflight/analyzer/host_analyzer.go deleted file mode 100644 index b53fb0021..000000000 --- a/pkg/preflight/analyzer/host_analyzer.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - analyze "github.com/replicatedhq/troubleshoot/pkg/analyze" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -func GetHostAnalyzer(analyzer *preflightv1beta2.ExtendHostAnalyze) (analyze.HostAnalyzer, bool) { - switch { - case analyzer.HostUtility != nil: - return &AnalyzeHostUtility{analyzer.HostUtility}, true - case analyzer.ClusterRegion != nil: - return &AnalyzeClusterRegion{analyzer.ClusterRegion}, true - default: - return nil, false - } -} diff --git a/pkg/preflight/analyzer/host_analyzer_test.go b/pkg/preflight/analyzer/host_analyzer_test.go deleted file mode 100644 index e11ee832b..000000000 --- a/pkg/preflight/analyzer/host_analyzer_test.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var _ = Describe("host_analyzer_test", func() { - It("GetHostAnalyzer test", func() { - collector, ok := GetHostAnalyzer(&preflightv1beta2.ExtendHostAnalyze{HostUtility: &preflightv1beta2.HostUtilityAnalyze{}}) - Expect(collector).ShouldNot(BeNil()) - Expect(ok).Should(BeTrue()) - collector, ok = GetHostAnalyzer(&preflightv1beta2.ExtendHostAnalyze{ClusterRegion: &preflightv1beta2.ClusterRegionAnalyze{}}) - Expect(collector).ShouldNot(BeNil()) - Expect(ok).Should(BeTrue()) - collector, ok = GetHostAnalyzer(&preflightv1beta2.ExtendHostAnalyze{}) - Expect(collector).Should(BeNil()) - Expect(ok).Should(BeFalse()) - }) -}) diff --git a/pkg/preflight/analyzer/host_region.go b/pkg/preflight/analyzer/host_region.go deleted file mode 100644 index d10585dd6..000000000 --- a/pkg/preflight/analyzer/host_region.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "fmt" - "strings" - - "github.com/pkg/errors" - analyzer "github.com/replicatedhq/troubleshoot/pkg/analyze" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - kbcollector "github.com/apecloud/kbcli/pkg/preflight/collector" - "github.com/apecloud/kbcli/pkg/preflight/util" -) - -type AnalyzeClusterRegion struct { - analyzer *preflightv1beta2.ClusterRegionAnalyze -} - -func (a *AnalyzeClusterRegion) Title() string { - return util.TitleOrDefault(a.analyzer.AnalyzeMeta, "Cluster Region") -} - -func (a *AnalyzeClusterRegion) IsExcluded() (bool, error) { - return util.IsExcluded(a.analyzer.Exclude) -} - -func (a *AnalyzeClusterRegion) Analyze(getFile func(string) ([]byte, error)) ([]*analyzer.AnalyzeResult, error) { - collected, err := getFile(kbcollector.ClusterRegionPath) - if err != nil { - return nil, errors.Wrap(err, "failed to get contents of region_name.json") - } - regionInfo := kbcollector.ClusterRegionInfo{} - if err := json.Unmarshal(collected, ®ionInfo); err != nil { - return nil, errors.Wrap(err, "failed to unmarshal region info") - } - - isMatched := false - regionName := regionInfo.RegionName - for _, expectedRegionName := range a.analyzer.RegionNames { - if strings.EqualFold(regionName, expectedRegionName) { - isMatched = true - break - } - } - - strRegionInfo := fmt.Sprintf(" target cluster region is %s.", regionName) - result := &analyzer.AnalyzeResult{ - Title: a.Title(), - } - for _, outcome := range a.analyzer.Outcomes { - switch { - case isMatched && outcome.Pass != nil: - result.IsPass = true - result.Message = outcome.Pass.Message + strRegionInfo - result.URI = outcome.Pass.URI - case !isMatched && outcome.Warn != nil: - result.IsWarn = true - result.Message = outcome.Warn.Message + strRegionInfo - result.URI = outcome.Warn.URI - case !isMatched && outcome.Fail != nil: - // just return warning info even if outcome.Fail is set - result.IsWarn = true - result.Message = outcome.Fail.Message + strRegionInfo - result.URI = outcome.Fail.URI - default: - } - } - result.Strict = a.analyzer.Strict.BoolOrDefaultFalse() - return []*analyzer.AnalyzeResult{result}, nil -} diff --git a/pkg/preflight/analyzer/host_region_test.go b/pkg/preflight/analyzer/host_region_test.go deleted file mode 100644 index ac5265271..000000000 --- a/pkg/preflight/analyzer/host_region_test.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "errors" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - kbcollector "github.com/apecloud/kbcli/pkg/preflight/collector" -) - -var _ = Describe("region_test", func() { - var ( - analyzer AnalyzeClusterRegion - resInfo kbcollector.ClusterRegionInfo - ) - Context("AnalyzeHostUtility test", func() { - BeforeEach(func() { - analyzer = AnalyzeClusterRegion{ - analyzer: &preflightv1beta2.ClusterRegionAnalyze{ - Outcomes: []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - Message: "k8s cluster region is matched", - }, - Fail: &troubleshoot.SingleOutcome{ - Message: "k8s cluster access isn't matched", - }, - Warn: &troubleshoot.SingleOutcome{ - Message: "k8s cluster access isn't matched", - }, - }, - }, - RegionNames: []string{"beijing", "shanghai"}}} - }) - It("Analyze test, and get file failed", func() { - Eventually(func(g Gomega) { - getCollectedFileContents := func(string) ([]byte, error) { - return nil, errors.New("get file failed") - } - _, err := analyzer.Analyze(getCollectedFileContents) - g.Expect(err).Should(HaveOccurred()) - }).Should(Succeed()) - }) - - It("Analyze test, and return of get file is not ClusterRegionInfo", func() { - Eventually(func(g Gomega) { - getCollectedFileContents := func(string) ([]byte, error) { - return []byte("test"), nil - } - _, err := analyzer.Analyze(getCollectedFileContents) - g.Expect(err).Should(HaveOccurred()) - }).Should(Succeed()) - }) - - It("Analyze test, and analyzer warn is expected", func() { - resInfo = kbcollector.ClusterRegionInfo{ - RegionName: "", - } - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(resInfo) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsWarn).Should(BeTrue()) - }).Should(Succeed()) - }) - - It("Analyze test, and analyzer warn is expected ", func() { - resInfo = kbcollector.ClusterRegionInfo{ - RegionName: "hangzhou", - } - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(resInfo) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsWarn).Should(BeTrue()) - }).Should(Succeed()) - }) - - It("Analyze test, and analyzer pass is expected ", func() { - resInfo = kbcollector.ClusterRegionInfo{ - RegionName: "beijing", - } - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(resInfo) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeTrue()) - }).Should(Succeed()) - }) - }) -}) diff --git a/pkg/preflight/analyzer/host_utility.go b/pkg/preflight/analyzer/host_utility.go deleted file mode 100644 index 25f1f1c9d..000000000 --- a/pkg/preflight/analyzer/host_utility.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "fmt" - - "github.com/pkg/errors" - analyzer "github.com/replicatedhq/troubleshoot/pkg/analyze" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - kbcollector "github.com/apecloud/kbcli/pkg/preflight/collector" - "github.com/apecloud/kbcli/pkg/preflight/util" -) - -type AnalyzeHostUtility struct { - hostAnalyzer *preflightv1beta2.HostUtilityAnalyze -} - -func (a *AnalyzeHostUtility) Title() string { - return util.TitleOrDefault(a.hostAnalyzer.AnalyzeMeta, "Host "+a.hostAnalyzer.CollectorName+" Utility Info") -} - -func (a *AnalyzeHostUtility) IsExcluded() (bool, error) { - return util.IsExcluded(a.hostAnalyzer.Exclude) -} - -func (a *AnalyzeHostUtility) utilityPath() string { - if a.hostAnalyzer.CollectorName != "" { - return a.hostAnalyzer.CollectorName - } - return kbcollector.DefaultHostUtilityPath -} - -func (a *AnalyzeHostUtility) Analyze(getCollectedFileContents func(string) ([]byte, error)) ([]*analyzer.AnalyzeResult, error) { - fullPath := fmt.Sprintf(kbcollector.UtilityPathFormat, a.utilityPath()) - collected, err := getCollectedFileContents(fullPath) - if err != nil { - return nil, errors.Wrapf(err, "failed to get collected file name: %s", fullPath) - } - - utilityInfo := kbcollector.HostUtilityInfo{} - if err := json.Unmarshal(collected, &utilityInfo); err != nil { - return nil, errors.Wrap(err, "failed to unmarshal utility info") - } - // generate analyzer result - result := analyzer.AnalyzeResult{ - Title: a.Title(), - } - for _, outcome := range a.hostAnalyzer.Outcomes { - switch { - case outcome.Pass != nil && len(utilityInfo.Error) == 0 && len(utilityInfo.Path) > 0: - result.IsPass = true - result.Message = outcome.Pass.Message + fmt.Sprintf(". Utility %s Path is %s", utilityInfo.Name, utilityInfo.Path) - result.URI = outcome.Pass.URI - case outcome.Warn != nil && len(utilityInfo.Error) > 0 && len(utilityInfo.Path) == 0: - result.IsWarn = true - result.Message = outcome.Warn.Message - result.URI = outcome.Warn.URI - case outcome.Fail != nil && len(utilityInfo.Error) > 0 && len(utilityInfo.Path) == 0: - // return warning info even if outcome.Fail is set - result.IsWarn = true - result.Message = outcome.Fail.Message - result.URI = outcome.Fail.URI - default: - } - } - return []*analyzer.AnalyzeResult{&result}, nil -} diff --git a/pkg/preflight/analyzer/host_utility_test.go b/pkg/preflight/analyzer/host_utility_test.go deleted file mode 100644 index 97b85ebfa..000000000 --- a/pkg/preflight/analyzer/host_utility_test.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "errors" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - kbcollector "github.com/apecloud/kbcli/pkg/preflight/collector" -) - -var _ = Describe("host_utility_test", func() { - var ( - hostUtilityAnalyzer AnalyzeHostUtility - resInfo kbcollector.HostUtilityInfo - ) - - Context("AnalyzeHostUtility test", func() { - BeforeEach(func() { - hostUtilityAnalyzer = AnalyzeHostUtility{ - hostAnalyzer: &preflightv1beta2.HostUtilityAnalyze{ - Outcomes: []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - Message: "utility already installed", - }, - Fail: &troubleshoot.SingleOutcome{ - Message: "utility isn't installed", - }, - Warn: &troubleshoot.SingleOutcome{ - Message: "utility isn't installed", - }, - }, - }}} - }) - - It("Analyze test, and returns fail error", func() { - resInfo = kbcollector.HostUtilityInfo{ - Path: "", - Name: "helm", - Error: "helm isn't installed in localhost", - } - Eventually(func(g Gomega) { - getCollectedFileContents := func(filename string) ([]byte, error) { - return nil, errors.New("get file failed") - } - res, err := hostUtilityAnalyzer.Analyze(getCollectedFileContents) - g.Expect(err).Should(HaveOccurred()) - g.Expect(res).Should(BeNil()) - }).Should(Succeed()) - }) - - It("Analyze test, and analyzer result is expected that fail is true", func() { - resInfo = kbcollector.HostUtilityInfo{ - Path: "", - Name: "helm", - Error: "helm isn't installed in localhost", - } - Eventually(func(g Gomega) { - b, err := json.Marshal(resInfo) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := hostUtilityAnalyzer.Analyze(getCollectedFileContents) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsWarn).Should(BeTrue()) - }).Should(Succeed()) - }) - - It("Analyze test, and analyzer result is expected that pass is true", func() { - resInfo = kbcollector.HostUtilityInfo{ - Path: "/usr/local/bin/helm", - Name: "helm", - Error: "", - } - Eventually(func(g Gomega) { - g.Expect(hostUtilityAnalyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(resInfo) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := hostUtilityAnalyzer.Analyze(getCollectedFileContents) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeTrue()) - }).Should(Succeed()) - }) - }) -}) diff --git a/pkg/preflight/analyzer/kb_storage_class.go b/pkg/preflight/analyzer/kb_storage_class.go deleted file mode 100644 index 42a89559a..000000000 --- a/pkg/preflight/analyzer/kb_storage_class.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "fmt" - - analyze "github.com/replicatedhq/troubleshoot/pkg/analyze" - storagev1beta1 "k8s.io/api/storage/v1beta1" - "k8s.io/kubectl/pkg/util/storage" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - "github.com/apecloud/kbcli/pkg/preflight/util" -) - -const ( - StorageClassPath = "cluster-resources/storage-classes.json" - StorageClassErrorPath = "cluster-resources/storage-classes-errors.json" -) - -type AnalyzeStorageClassByKb struct { - analyzer *preflightv1beta2.KBStorageClassAnalyze -} - -func (a *AnalyzeStorageClassByKb) Title() string { - return util.TitleOrDefault(a.analyzer.AnalyzeMeta, "KubeBlocks Storage Class") -} - -func (a *AnalyzeStorageClassByKb) GetAnalyzer() *preflightv1beta2.KBStorageClassAnalyze { - return a.analyzer -} - -func (a *AnalyzeStorageClassByKb) IsExcluded() (bool, error) { - return util.IsExcluded(a.analyzer.Exclude) -} - -func (a *AnalyzeStorageClassByKb) Analyze(getFile GetCollectedFileContents, findFiles GetChildCollectedFileContents) ([]*analyze.AnalyzeResult, error) { - result, err := a.analyzeStorageClass(a.analyzer, getFile, findFiles) - if err != nil { - return []*analyze.AnalyzeResult{result}, err - } - result.Strict = a.analyzer.Strict.BoolOrDefaultFalse() - return []*analyze.AnalyzeResult{result}, nil -} - -func (a *AnalyzeStorageClassByKb) analyzeStorageClass(analyzer *preflightv1beta2.KBStorageClassAnalyze, getFile GetCollectedFileContents, findFiles GetChildCollectedFileContents) (*analyze.AnalyzeResult, error) { - storageClassesData, err := getFile(StorageClassPath) - if err != nil { - return newWarnResultWithMessage(a.Title(), fmt.Sprintf("get jsonfile failed, err:%v", err)), err - } - - storageClassesErrorData, err := getFile(StorageClassErrorPath) - if err == nil && storageClassesErrorData != nil && len(storageClassesErrorData) > 0 && len(storageClassesData) == 0 { - var values []string - err = json.Unmarshal(storageClassesErrorData, &values) - if err != nil || len(values) == 0 { - return newWarnResultWithMessage(a.Title(), fmt.Sprintf("get storage class failed, err:%v", storageClassesErrorData)), err - } - return newWarnResultWithMessage(a.Title(), fmt.Sprintf("get storage class failed, err:%v", values[0])), nil - } - - var storageClasses storagev1beta1.StorageClassList - if err = json.Unmarshal(storageClassesData, &storageClasses); err != nil { - return newWarnResultWithMessage(a.Title(), fmt.Sprintf("unmarshal jsonfile failed, err:%v", err)), err - } - - for _, storageClass := range storageClasses.Items { - // if storageClassType not set, check if default storageClass exists - if analyzer.StorageClassType == "" { - val := storageClass.Annotations[storage.IsDefaultStorageClassAnnotation] - if val == "true" { - return newAnalyzeResult(a.Title(), PassType, a.analyzer.Outcomes), nil - } - continue - } - - if storageClass.Parameters["type"] != analyzer.StorageClassType { - continue - } - if storageClass.Provisioner == "" || (storageClass.Provisioner == analyzer.Provisioner) { - return newAnalyzeResult(a.Title(), PassType, a.analyzer.Outcomes), nil - } - } - return newAnalyzeResult(a.Title(), WarnType, a.analyzer.Outcomes), nil -} - -var _ KBAnalyzer = &AnalyzeStorageClassByKb{} diff --git a/pkg/preflight/analyzer/kb_storage_class_test.go b/pkg/preflight/analyzer/kb_storage_class_test.go deleted file mode 100644 index 861609a6e..000000000 --- a/pkg/preflight/analyzer/kb_storage_class_test.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "errors" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubectl/pkg/util/storage" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - storagev1beta1 "k8s.io/api/storage/v1beta1" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var ( - clusterResources = storagev1beta1.StorageClassList{ - Items: []storagev1beta1.StorageClass{ - { - Provisioner: "ebs.csi.aws.com", - Parameters: map[string]string{"type": "gp3"}, - }, - }, - } - clusterResources2 = storagev1beta1.StorageClassList{ - Items: []storagev1beta1.StorageClass{ - { - Provisioner: "ebs.csi.aws.com", - Parameters: map[string]string{"type": "gp3"}, - ObjectMeta: metav1.ObjectMeta{Annotations: map[string]string{storage.IsDefaultStorageClassAnnotation: "true"}}, - }, - }, - } -) - -var _ = Describe("kb_storage_class_test", func() { - var ( - analyzer AnalyzeStorageClassByKb - ) - Context("analyze storage class test", func() { - BeforeEach(func() { - analyzer = AnalyzeStorageClassByKb{ - analyzer: &preflightv1beta2.KBStorageClassAnalyze{ - Provisioner: "ebs.csi.aws.com", - StorageClassType: "gp3", - Outcomes: []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - - Message: "analyze storage class success", - }, - Fail: &troubleshoot.SingleOutcome{ - Message: "analyze storage class fail", - }, - }, - }}} - }) - It("Analyze test, and get file failed", func() { - Eventually(func(g Gomega) { - getCollectedFileContents := func(filename string) ([]byte, error) { - return nil, errors.New("get file failed") - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).To(HaveOccurred()) - g.Expect(res[0].IsWarn).Should(BeTrue()) - g.Expect(res[0].IsPass).Should(BeFalse()) - }).Should(Succeed()) - }) - - It("Analyze test, and return of get file is not clusterResource", func() { - Eventually(func(g Gomega) { - getCollectedFileContents := func(filename string) ([]byte, error) { - return []byte("test"), nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).To(HaveOccurred()) - g.Expect(res[0].IsWarn).Should(BeTrue()) - g.Expect(res[0].IsPass).Should(BeFalse()) - }).Should(Succeed()) - }) - - It("Analyze test, and analyzer result is expected that pass is true", func() { - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(clusterResources) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeTrue()) - g.Expect(res[0].IsFail).Should(BeFalse()) - }).Should(Succeed()) - }) - It("Analyze test, and analyzer result is expected that fail is true", func() { - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - clusterResources.Items[0].Provisioner = "apecloud" - b, err := json.Marshal(clusterResources) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeFalse()) - g.Expect(res[0].IsFail).Should(BeTrue()) - }).Should(Succeed()) - }) - It("Analyze test, and analyzer result is expected that fail is true", func() { - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(clusterResources2) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - analyzer.analyzer.StorageClassType = "" - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeTrue()) - g.Expect(res[0].IsWarn).Should(BeFalse()) - }).Should(Succeed()) - }) - }) -}) diff --git a/pkg/preflight/analyzer/kb_taint.go b/pkg/preflight/analyzer/kb_taint.go deleted file mode 100644 index 1f41bfa46..000000000 --- a/pkg/preflight/analyzer/kb_taint.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - "fmt" - "strings" - - "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/getter" - - analyze "github.com/replicatedhq/troubleshoot/pkg/analyze" - "helm.sh/helm/v3/pkg/cli/values" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - "github.com/apecloud/kbcli/pkg/preflight/util" -) - -const ( - NodesPath = "cluster-resources/nodes.json" - NodesErrorPath = "cluster-resources/nodes-errors.json" - Tolerations = "tolerations" - KubeBlocks = "kubeblocks" -) - -type AnalyzeTaintClassByKb struct { - analyzer *preflightv1beta2.KBTaintAnalyze - HelmOpts *values.Options -} - -func (a *AnalyzeTaintClassByKb) Title() string { - return util.TitleOrDefault(a.analyzer.AnalyzeMeta, "KubeBlocks Taints") -} - -func (a *AnalyzeTaintClassByKb) GetAnalyzer() *preflightv1beta2.KBTaintAnalyze { - return a.analyzer -} - -func (a *AnalyzeTaintClassByKb) IsExcluded() (bool, error) { - return util.IsExcluded(a.analyzer.Exclude) -} - -func (a *AnalyzeTaintClassByKb) Analyze(getFile GetCollectedFileContents, findFiles GetChildCollectedFileContents) ([]*analyze.AnalyzeResult, error) { - result, err := a.analyzeTaint(getFile, findFiles) - if err != nil { - return []*analyze.AnalyzeResult{result}, err - } - result.Strict = a.analyzer.Strict.BoolOrDefaultFalse() - return []*analyze.AnalyzeResult{result}, nil -} - -func (a *AnalyzeTaintClassByKb) analyzeTaint(getFile GetCollectedFileContents, findFiles GetChildCollectedFileContents) (*analyze.AnalyzeResult, error) { - nodesData, err := getFile(NodesPath) - if err != nil { - return newFailedResultWithMessage(a.Title(), fmt.Sprintf("get nodes from jsonfile failed, err:%v", err)), err - } - - nodesErrorData, err := getFile(NodesErrorPath) - if err != nil && nodesErrorData != nil && len(nodesErrorData) > 0 && len(nodesData) == 0 { - var values []string - err = json.Unmarshal(nodesErrorData, &values) - if err != nil || len(values) == 0 { - return newFailedResultWithMessage(a.Title(), fmt.Sprintf("get nodes from k8s failed, err:%v", nodesErrorData)), err - } - return newFailedResultWithMessage(a.Title(), fmt.Sprintf("get nodes from k8s failed, err:%v", values[0])), nil - } - - var nodes v1.NodeList - if err = json.Unmarshal(nodesData, &nodes); err != nil { - return newFailedResultWithMessage(a.Title(), fmt.Sprintf("unmarshal nodes jsonfile failed, err:%v", err)), err - } - - err = a.generateTolerations() - if err != nil { - return newFailedResultWithMessage(a.Title(), fmt.Sprintf("get tolerations failed, err:%v", err)), err - } - return a.doAnalyzeTaint(nodes) -} - -func (a *AnalyzeTaintClassByKb) doAnalyzeTaint(nodes v1.NodeList) (*analyze.AnalyzeResult, error) { - taintFailResult := []string{} - for _, node := range nodes.Items { - if len(node.Spec.Taints) == 0 { - return newAnalyzeResult(a.Title(), PassType, a.analyzer.Outcomes), nil - } - } - - if len(a.analyzer.TolerationsMap) == 0 { - return newAnalyzeResult(a.Title(), FailType, a.analyzer.Outcomes), nil - } - - for k, tolerations := range a.analyzer.TolerationsMap { - count := 0 - for _, node := range nodes.Items { - if isTolerableTaints(node.Spec.Taints, tolerations) { - count++ - } - } - if count <= 0 { - taintFailResult = append(taintFailResult, k) - } - } - if len(taintFailResult) > 0 { - result := newAnalyzeResult(a.Title(), FailType, a.analyzer.Outcomes) - result.Message += fmt.Sprintf(" Taint check failed components: %s", strings.Join(taintFailResult, ", ")) - return result, nil - } - return newAnalyzeResult(a.Title(), PassType, a.analyzer.Outcomes), nil -} - -func (a *AnalyzeTaintClassByKb) generateTolerations() error { - tolerations := map[string][]v1.Toleration{} - if a.HelmOpts != nil { - optsMap, err := a.getHelmValues() - if err != nil { - return err - } - getTolerationsMap(optsMap, "", tolerations) - } - a.analyzer.TolerationsMap = tolerations - return nil -} - -func (a *AnalyzeTaintClassByKb) getHelmValues() (map[string]interface{}, error) { - settings := cli.New() - p := getter.All(settings) - vals, err := a.HelmOpts.MergeValues(p) - if err != nil { - return nil, err - } - return vals, nil -} - -func getTolerationsMap(tolerationData map[string]interface{}, addonName string, tolerationsMap map[string][]v1.Toleration) { - var tmpTolerationList []v1.Toleration - var tmpToleration v1.Toleration - - for k, v := range tolerationData { - if k == Tolerations { - tolerationList := v.([]interface{}) - tmpTolerationList = []v1.Toleration{} - for _, t := range tolerationList { - toleration := t.(map[string]interface{}) - if err := runtime.DefaultUnstructuredConverter.FromUnstructured(toleration, &tmpToleration); err != nil { - continue - } - tmpTolerationList = append(tmpTolerationList, tmpToleration) - } - if addonName == "" { - addonName = KubeBlocks - } - tolerationsMap[addonName] = tmpTolerationList - continue - } - - switch v := v.(type) { - case map[string]interface{}: - if addonName != "" { - addonName += "." - } - addonName += k - getTolerationsMap(v, addonName, tolerationsMap) - default: - continue - } - } -} - -func isTolerableTaints(taints []v1.Taint, tolerations []v1.Toleration) bool { - tolerableCount := 0 - for _, taint := range taints { - // check only on taints that have effect NoSchedule - if taint.Effect != v1.TaintEffectNoSchedule { - continue - } - for _, toleration := range tolerations { - if toleration.ToleratesTaint(&taint) { - tolerableCount++ - break - } - } - } - return tolerableCount >= len(taints) -} diff --git a/pkg/preflight/analyzer/kb_taint_test.go b/pkg/preflight/analyzer/kb_taint_test.go deleted file mode 100644 index 5ccb7544f..000000000 --- a/pkg/preflight/analyzer/kb_taint_test.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "encoding/json" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - "github.com/pkg/errors" - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - "helm.sh/helm/v3/pkg/cli/values" - v1 "k8s.io/api/core/v1" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var ( - nodeList1 = v1.NodeList{Items: []v1.Node{ - {Spec: v1.NodeSpec{Taints: []v1.Taint{ - {Key: "dev", Value: "true", Effect: v1.TaintEffectNoSchedule}, - {Key: "large", Value: "true", Effect: v1.TaintEffectNoSchedule}, - }}}, - {Spec: v1.NodeSpec{Taints: []v1.Taint{ - {Key: "dev", Value: "false", Effect: v1.TaintEffectNoSchedule}, - }}}, - }} - nodeList2 = v1.NodeList{Items: []v1.Node{ - {Spec: v1.NodeSpec{Taints: []v1.Taint{ - {Key: "dev", Value: "false", Effect: v1.TaintEffectNoSchedule}, - {Key: "large", Value: "true", Effect: v1.TaintEffectNoSchedule}, - }}}, - }} - nodeList3 = v1.NodeList{Items: []v1.Node{ - {Spec: v1.NodeSpec{}}, - }} -) - -var _ = Describe("taint_class_test", func() { - var ( - analyzer AnalyzeTaintClassByKb - ) - Context("analyze taint test", func() { - BeforeEach(func() { - JSONStr := "tolerations=[ { \"key\": \"dev\", \"operator\": \"Equal\", \"effect\": \"NoSchedule\", \"value\": \"true\" }, " + - "{ \"key\": \"large\", \"operator\": \"Equal\", \"effect\": \"NoSchedule\", \"value\": \"true\" } ]," + - "prometheus.server.tolerations=[ { \"key\": \"dev\", \"operator\": \"Equal\", \"effect\": \"NoSchedule\", \"value\": \"true\" }, " + - "{ \"key\": \"large\", \"operator\": \"Equal\", \"effect\": \"NoSchedule\", \"value\": \"true\" } ]," + - "grafana.tolerations=[ { \"key\": \"dev\", \"operator\": \"Equal\", \"effect\": \"NoSchedule\", \"value\": \"true\" }, " + - "{ \"key\": \"large\", \"operator\": \"Equal\", \"effect\": \"NoSchedule\", \"value\": \"true\" } ]," - analyzer = AnalyzeTaintClassByKb{ - analyzer: &preflightv1beta2.KBTaintAnalyze{ - Outcomes: []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - Message: "analyze taint success", - }, - Fail: &troubleshoot.SingleOutcome{ - Message: "analyze taint fail", - }, - }, - }, - }, - HelmOpts: &values.Options{JSONValues: []string{JSONStr}}, - } - - }) - It("Analyze test, and get file failed", func() { - Eventually(func(g Gomega) { - getCollectedFileContents := func(filename string) ([]byte, error) { - return nil, errors.New("get file failed") - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).To(HaveOccurred()) - g.Expect(res[0].IsFail).Should(BeTrue()) - g.Expect(res[0].IsPass).Should(BeFalse()) - }).Should(Succeed()) - }) - - It("Analyze test, and return of get file is not clusterResource", func() { - Eventually(func(g Gomega) { - getCollectedFileContents := func(filename string) ([]byte, error) { - return []byte("test"), nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).To(HaveOccurred()) - g.Expect(res[0].IsFail).Should(BeTrue()) - g.Expect(res[0].IsPass).Should(BeFalse()) - }).Should(Succeed()) - }) - - It("Analyze test, and analyzer result is expected that pass is true", func() { - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(nodeList1) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeTrue()) - g.Expect(res[0].IsFail).Should(BeFalse()) - }).Should(Succeed()) - }) - It("Analyze test, and analyzer result is expected that fail is true", func() { - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(nodeList2) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeFalse()) - g.Expect(res[0].IsFail).Should(BeTrue()) - }).Should(Succeed()) - }) - It("Analyze test, the taints are nil, and analyzer result is expected that pass is true", func() { - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(nodeList3) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeTrue()) - g.Expect(res[0].IsFail).Should(BeFalse()) - }).Should(Succeed()) - }) - It("Analyze test, the tolerations are nil, and analyzer result is expected that fail is true", func() { - Eventually(func(g Gomega) { - g.Expect(analyzer.IsExcluded()).Should(BeFalse()) - b, err := json.Marshal(nodeList2) - g.Expect(err).NotTo(HaveOccurred()) - getCollectedFileContents := func(filename string) ([]byte, error) { - return b, nil - } - analyzer.HelmOpts = nil - res, err := analyzer.Analyze(getCollectedFileContents, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(res[0].IsPass).Should(BeFalse()) - g.Expect(res[0].IsFail).Should(BeTrue()) - }).Should(Succeed()) - }) - }) -}) diff --git a/pkg/preflight/analyzer/suite_test.go b/pkg/preflight/analyzer/suite_test.go deleted file mode 100644 index a6054efe6..000000000 --- a/pkg/preflight/analyzer/suite_test.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package analyzer - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestAnalyzer(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Analyzer Suite") -} diff --git a/pkg/preflight/collect.go b/pkg/preflight/collect.go deleted file mode 100644 index 6338648d9..000000000 --- a/pkg/preflight/collect.go +++ /dev/null @@ -1,429 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - "context" - "encoding/json" - "fmt" - "reflect" - "time" - - "github.com/pkg/errors" - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - pkgcollector "github.com/replicatedhq/troubleshoot/pkg/collect" - "github.com/replicatedhq/troubleshoot/pkg/logger" - "github.com/replicatedhq/troubleshoot/pkg/preflight" - "helm.sh/helm/v3/pkg/cli/values" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/kubernetes/scheme" - cmdutil "k8s.io/kubectl/pkg/cmd/util" - "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - viper "github.com/apecloud/kubeblocks/pkg/viperx" - - kbcollector "github.com/apecloud/kbcli/pkg/preflight/collector" -) - -const ( - StorageClassPath = "cluster-resources/storage-classes.json" - StorageClassErrorsPath = "cluster-resources/storage-classes-errors.json" -) - -func CollectPreflight(f cmdutil.Factory, helmOpts *values.Options, ctx context.Context, kbPreflight *preflightv1beta2.Preflight, kbHostPreflight *preflightv1beta2.HostPreflight, progressCh chan interface{}) ([]preflight.CollectResult, error) { - var ( - collectResults []preflight.CollectResult - err error - ) - // deal with preflight - if kbPreflight != nil && (len(kbPreflight.Spec.ExtendCollectors) > 0 || len(kbPreflight.Spec.Collectors) > 0) { - res, err := CollectClusterData(ctx, kbPreflight, f, helmOpts, progressCh) - if err != nil { - return collectResults, errors.Wrap(err, "failed to collect data in cluster") - } - collectResults = append(collectResults, *res) - } - // deal with hostPreflight - if kbHostPreflight != nil { - if len(kbHostPreflight.Spec.ExtendCollectors) > 0 || len(kbHostPreflight.Spec.Collectors) > 0 { - res, err := CollectHostData(ctx, kbHostPreflight, progressCh) - if err != nil { - return collectResults, errors.Wrap(err, "failed to collect data from extend host") - } - collectResults = append(collectResults, *res) - } - if len(kbHostPreflight.Spec.RemoteCollectors) > 0 { - res, err := CollectRemoteData(ctx, kbHostPreflight, f, progressCh) - if err != nil { - return collectResults, errors.Wrap(err, "failed to collect data remotely") - } - collectResults = append(collectResults, *res) - } - } - return collectResults, err -} - -// CollectHostData transforms the specs of hostPreflight to HostCollector, and sets the collectOpts -func CollectHostData(ctx context.Context, hostPreflight *preflightv1beta2.HostPreflight, progressCh chan interface{}) (*preflight.CollectResult, error) { - collectOpts := preflight.CollectOpts{ - ProgressChan: progressCh, - } - var collectors []pkgcollector.HostCollector - for _, collectSpec := range hostPreflight.Spec.Collectors { - collector, ok := pkgcollector.GetHostCollector(collectSpec, "") - if ok { - collectors = append(collectors, collector) - } - } - for _, kbCollector := range hostPreflight.Spec.ExtendCollectors { - collector, ok := kbcollector.GetExtendHostCollector(kbCollector, "") - if ok { - collectors = append(collectors, collector) - } - } - collectResults, err := CollectHost(ctx, collectOpts, collectors, hostPreflight) - if err != nil { - return nil, errors.Wrap(err, "failed to collect from extend host") - } - return &collectResults, nil -} - -// CollectHost collects host data against by HostCollector, and returns the collected data which is encapsulated in CollectResult struct -func CollectHost(ctx context.Context, opts preflight.CollectOpts, collectors []pkgcollector.HostCollector, hostPreflight *preflightv1beta2.HostPreflight) (preflight.CollectResult, error) { - allCollectedData := make(map[string][]byte) - collectResult := KBHostCollectResult{ - HostCollectResult: preflight.HostCollectResult{ - Collectors: collectors, - Context: ctx, - }, - AnalyzerSpecs: hostPreflight.Spec.Analyzers, - KbAnalyzerSpecs: hostPreflight.Spec.ExtendAnalyzers, - } - for _, collector := range collectors { - isExcluded, _ := collector.IsExcluded() - if isExcluded { - continue - } - opts.ProgressChan <- fmt.Sprintf("[%s] Running collector...", collector.Title()) - result, err := collector.Collect(opts.ProgressChan) - if err != nil { - opts.ProgressChan <- errors.Errorf("failed to run collector: %s: %v", collector.Title(), err) - } - for k, v := range result { - allCollectedData[k] = v - } - } - collectResult.AllCollectedData = allCollectedData - return collectResult, nil -} - -// CollectClusterData transforms the specs of Preflight to Collector, and sets the collectOpts, such as restConfig, Namespace, and ProgressChan -func CollectClusterData(ctx context.Context, kbPreflight *preflightv1beta2.Preflight, f cmdutil.Factory, helmOpts *values.Options, progressCh chan interface{}) (*preflight.CollectResult, error) { - var err error - v := viper.GetViper() - - collectOpts := preflight.CollectOpts{ - Namespace: v.GetString("namespace"), - IgnorePermissionErrors: v.GetBool("collect-without-permissions"), - ProgressChan: progressCh, - } - - if collectOpts.KubernetesRestConfig, err = f.ToRESTConfig(); err != nil { - return nil, errors.Wrap(err, "failed to instantiate Kubernetes restconfig") - } - - k8sClient, err := f.KubernetesClientSet() - if err != nil { - return nil, errors.Wrap(err, "failed to instantiate Kubernetes client") - } - - if v.GetString("since") != "" || v.GetString("since-time") != "" { - err := ParseTimeFlags(v.GetString("since-time"), v.GetString("since"), kbPreflight.Spec.Collectors) - if err != nil { - return nil, err - } - } - - collectSpecs := make([]*troubleshoot.Collect, 0, len(kbPreflight.Spec.Collectors)) - collectSpecs = append(collectSpecs, kbPreflight.Spec.Collectors...) - collectSpecs = pkgcollector.EnsureCollectorInList( - collectSpecs, troubleshoot.Collect{ClusterInfo: &troubleshoot.ClusterInfo{}}, - ) - collectSpecs = pkgcollector.EnsureCollectorInList( - collectSpecs, troubleshoot.Collect{ClusterResources: &troubleshoot.ClusterResources{}}, - ) - collectSpecs = pkgcollector.DedupCollectors(collectSpecs) - collectSpecs = pkgcollector.EnsureClusterResourcesFirst(collectSpecs) - - var collectors []pkgcollector.Collector - allCollectorsMap := make(map[reflect.Type][]pkgcollector.Collector) - for _, collectSpec := range collectSpecs { - if collectorInterface, ok := pkgcollector.GetCollector(collectSpec, "", collectOpts.Namespace, collectOpts.KubernetesRestConfig, k8sClient, nil); ok { - if collector, ok := collectorInterface.(pkgcollector.Collector); ok { - err := collector.CheckRBAC(ctx, collector, collectSpec, collectOpts.KubernetesRestConfig, collectOpts.Namespace) - if err != nil { - return nil, errors.Wrap(err, "failed to check RBAC for collectors") - } - collectorType := reflect.TypeOf(collector) - allCollectorsMap[collectorType] = append(allCollectorsMap[collectorType], collector) - } - } - } - // for _, collectSpec := range kbPreflight.Spec.ExtendCollectors { - // // todo user defined cluster collector - // } - - collectResults, err := CollectCluster(ctx, collectOpts, collectors, allCollectorsMap, kbPreflight, helmOpts, k8sClient) - return &collectResults, err -} - -// CollectCluster collects cluster data against by Collector, and returns the collected data which is encapsulated in CollectResult struct -func CollectCluster(ctx context.Context, - opts preflight.CollectOpts, - allCollectors []pkgcollector.Collector, - allCollectorsMap map[reflect.Type][]pkgcollector.Collector, - kbPreflight *preflightv1beta2.Preflight, - helmOpts *values.Options, - client *kubernetes.Clientset, -) (preflight.CollectResult, error) { - var foundForbidden bool - allCollectedData := make(map[string][]byte) - collectorList := map[string]preflight.CollectorStatus{} - for _, collectors := range allCollectorsMap { - if mergeCollector, ok := collectors[0].(pkgcollector.MergeableCollector); ok { - mergedCollectors, err := mergeCollector.Merge(collectors) - if err != nil { - msg := fmt.Sprintf("failed to merge collector: %s: %s", mergeCollector.Title(), err) - opts.ProgressChan <- msg - } - allCollectors = append(allCollectors, mergedCollectors...) - } else { - allCollectors = append(allCollectors, collectors...) - } - - for _, collector := range collectors { - for _, e := range collector.GetRBACErrors() { - foundForbidden = true - opts.ProgressChan <- e - } - - // generate a map of all collectors for atomic status messages - collectorList[collector.Title()] = preflight.CollectorStatus{ - Status: "pending", - } - } - } - - collectResult := KBClusterCollectResult{ - ClusterCollectResult: preflight.ClusterCollectResult{ - Collectors: allCollectors, - Context: ctx, - }, - AnalyzerSpecs: kbPreflight.Spec.Analyzers, - KbAnalyzerSpecs: kbPreflight.Spec.ExtendAnalyzers, - HelmOptions: helmOpts, - } - - if foundForbidden && !opts.IgnorePermissionErrors { - // collectResult.IsRBACAllowed() = false - return collectResult, errors.New("insufficient permissions to run all collectors") - } - - for i, collector := range allCollectors { - isExcluded, _ := collector.IsExcluded() - if isExcluded { - logger.Printf("Excluding %q collector", collector.Title()) - continue - } - - // skip collectors with RBAC errors unless its the ClusterResources collector - if collector.HasRBACErrors() { - if _, ok := collector.(*pkgcollector.CollectClusterResources); !ok { - opts.ProgressChan <- fmt.Sprintf("skipping collector %s with insufficient RBAC permissions", collector.Title()) - opts.ProgressChan <- preflight.CollectProgress{ - CurrentName: collector.Title(), - CurrentStatus: "skipped", - CompletedCount: i + 1, - TotalCount: len(allCollectors), - Collectors: collectorList, - } - continue - } - } - - collectorList[collector.Title()] = preflight.CollectorStatus{ - Status: "running", - } - opts.ProgressChan <- preflight.CollectProgress{ - CurrentName: collector.Title(), - CurrentStatus: "running", - CompletedCount: i, - TotalCount: len(allCollectors), - Collectors: collectorList, - } - - result, err := collector.Collect(opts.ProgressChan) - if err != nil { - collectorList[collector.Title()] = preflight.CollectorStatus{ - Status: "failed", - } - opts.ProgressChan <- errors.Errorf("failed to run collector: %s: %v", collector.Title(), err) - opts.ProgressChan <- preflight.CollectProgress{ - CurrentName: collector.Title(), - CurrentStatus: "failed", - CompletedCount: i + 1, - TotalCount: len(allCollectors), - Collectors: collectorList, - } - continue - } - - collectorList[collector.Title()] = preflight.CollectorStatus{ - Status: "completed", - } - opts.ProgressChan <- preflight.CollectProgress{ - CurrentName: collector.Title(), - CurrentStatus: "completed", - CompletedCount: i + 1, - TotalCount: len(allCollectors), - Collectors: collectorList, - } - - for k, v := range result { - allCollectedData[k] = v - } - } - retryErrorCausedByMetricsUnavailable(ctx, opts, client, allCollectedData) - collectResult.AllCollectedData = allCollectedData - return collectResult, nil -} - -func retryErrorCausedByMetricsUnavailable(ctx context.Context, opts preflight.CollectOpts, client *kubernetes.Clientset, data map[string][]byte) { - handleStorageClassError(ctx, opts, client, data) -} - -func handleStorageClassError(ctx context.Context, _ preflight.CollectOpts, client *kubernetes.Clientset, data map[string][]byte) { - storageClassError, ok := data[StorageClassErrorsPath] - if !ok { - return - } - var errorStrs []string - if err := json.Unmarshal(storageClassError, &errorStrs); err != nil || len(errorStrs) == 0 { - return - } - storageClasses, err := client.StorageV1().StorageClasses().List(ctx, metav1.ListOptions{}) - if err != nil || storageClasses.Items == nil || len(storageClasses.Items) == 0 { - return - } - gvk, err := apiutil.GVKForObject(storageClasses, scheme.Scheme) - if err == nil { - storageClasses.GetObjectKind().SetGroupVersionKind(gvk) - } - - for i, o := range storageClasses.Items { - gvk, err := apiutil.GVKForObject(&o, scheme.Scheme) - if err == nil { - storageClasses.Items[i].GetObjectKind().SetGroupVersionKind(gvk) - } - } - - scBytes, err := json.MarshalIndent(storageClasses, "", " ") - if err != nil { - return - } - data[StorageClassPath] = scBytes -} - -func CollectRemoteData(ctx context.Context, preflightSpec *preflightv1beta2.HostPreflight, f cmdutil.Factory, progressCh chan interface{}) (*preflight.CollectResult, error) { - v := viper.GetViper() - - restConfig, err := f.ToRESTConfig() - if err != nil { - return nil, errors.Wrap(err, "failed to convert kube flags to rest config") - } - - labelSelector, err := labels.Parse(v.GetString("selector")) - if err != nil { - return nil, errors.Wrap(err, "unable to parse selector") - } - - namespace := v.GetString("namespace") - if namespace == "" { - namespace = "default" - } - - timeout := v.GetDuration("request-timeout") - if timeout == 0 { - timeout = 30 * time.Second - } - - collectOpts := preflight.CollectOpts{ - Namespace: namespace, - IgnorePermissionErrors: v.GetBool("collect-without-permissions"), - ProgressChan: progressCh, - KubernetesRestConfig: restConfig, - Image: v.GetString("collector-image"), - PullPolicy: v.GetString("collector-pullpolicy"), - LabelSelector: labelSelector.String(), - Timeout: timeout, - } - - collectResults, err := preflight.CollectRemoteWithContext(ctx, collectOpts, ExtractHostPreflightSpec(preflightSpec)) - if err != nil { - return nil, errors.Wrap(err, "failed to collect from remote") - } - - return &collectResults, nil -} - -func ParseTimeFlags(sinceTimeStr, sinceStr string, collectors []*troubleshoot.Collect) error { - var ( - sinceTime time.Time - err error - ) - if sinceTimeStr != "" { - if sinceStr != "" { - return errors.Errorf("at most one of `sinceTime` or `since` may be specified") - } - sinceTime, err = time.Parse(time.RFC3339, sinceTimeStr) - if err != nil { - return errors.Wrap(err, "unable to parse --since-time flag") - } - } else { - parsedDuration, err := time.ParseDuration(sinceStr) - if err != nil { - return errors.Wrap(err, "unable to parse --since flag") - } - now := time.Now() - sinceTime = now.Add(0 - parsedDuration) - } - for _, collector := range collectors { - if collector.Logs != nil { - if collector.Logs.Limits == nil { - collector.Logs.Limits = new(troubleshoot.LogLimits) - } - collector.Logs.Limits.SinceTime = metav1.NewTime(sinceTime) - } - } - return nil -} diff --git a/pkg/preflight/collect_test.go b/pkg/preflight/collect_test.go deleted file mode 100644 index f9446745e..000000000 --- a/pkg/preflight/collect_test.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - "context" - "net/http" - "time" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/cli-runtime/pkg/genericiooptions" - "k8s.io/cli-runtime/pkg/resource" - "k8s.io/client-go/kubernetes/scheme" - clientfake "k8s.io/client-go/rest/fake" - cmdtesting "k8s.io/kubectl/pkg/cmd/testing" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - preflightTesting "github.com/apecloud/kbcli/pkg/preflight/testing" - "github.com/apecloud/kbcli/pkg/testing" - "github.com/apecloud/kbcli/pkg/types" -) - -var _ = Describe("collect_test", func() { - var ( - timeOut = 10 * time.Second - namespace = "test" - clusterName = "test" - tf *cmdtesting.TestFactory - cluster = testing.FakeCluster(clusterName, namespace) - pods = testing.FakePods(3, namespace, clusterName) - preflight *preflightv1beta2.Preflight - hostPreflight *preflightv1beta2.HostPreflight - ) - - BeforeEach(func() { - _, _, _, _ = genericiooptions.NewTestIOStreams() - tf = testing.NewTestFactory(namespace) - codec := scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...) - httpResp := func(obj runtime.Object) *http.Response { - return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: cmdtesting.ObjBody(codec, obj)} - } - - tf.UnstructuredClient = &clientfake.RESTClient{ - GroupVersion: schema.GroupVersion{Group: types.AppsAPIGroup, Version: types.AppsAPIVersion}, - NegotiatedSerializer: resource.UnstructuredPlusDefaultContentConfig().NegotiatedSerializer, - Client: clientfake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { - if req.Method != "GET" { - return nil, nil - } - urlPrefix := "/api/v1/namespaces/" + namespace - mapping := map[string]*http.Response{ - "/api/v1/nodes/" + testing.NodeName: httpResp(testing.FakeNode()), - urlPrefix + "/services": httpResp(&corev1.ServiceList{}), - urlPrefix + "/events": httpResp(&corev1.EventList{}), - urlPrefix + "/pods": httpResp(pods), - } - return mapping[req.URL.Path], nil - }), - } - - tf.Client = tf.UnstructuredClient - tf.FakeDynamicClient = testing.FakeDynamicClient(cluster, testing.FakeClusterDef()) - - preflight = preflightTesting.FakeKbPreflight() - hostPreflight = preflightTesting.FakeKbHostPreflight() - }) - - AfterEach(func() { - tf.Cleanup() - }) - - It("CollectPreflight test, and expect success ", func() { - Eventually(func(g Gomega) { - progressCh := make(chan interface{}) - go func() { - for { - g.Expect(<-progressCh).NotTo(BeNil()) - } - }() - results, err := CollectPreflight(tf, nil, context.TODO(), preflight, hostPreflight, progressCh) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(len(results)).Should(BeNumerically(">=", 3)) - }).WithTimeout(timeOut).Should(Succeed()) - }) - - It("CollectHostData Test, and expect success", func() { - Eventually(func(g Gomega) { - progressCh := make(chan interface{}) - go func() { - for { - g.Expect(<-progressCh).NotTo(BeNil()) - } - }() - results, err := CollectHostData(context.TODO(), hostPreflight, progressCh) - g.Expect(err).NotTo(HaveOccurred()) - _, ok := (*results).(KBHostCollectResult) - g.Expect(ok).Should(BeTrue()) - }).WithTimeout(timeOut).Should(Succeed()) - }) - - It("CollectRemoteData test, and expect success", func() { - Eventually(func(g Gomega) { - progressCh := make(chan interface{}) - go func() { - for { - g.Expect(<-progressCh).NotTo(BeNil()) - } - }() - collectResult, err := CollectRemoteData(context.TODO(), &preflightv1beta2.HostPreflight{}, tf, progressCh) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(collectResult).NotTo(BeNil()) - }).WithTimeout(timeOut).Should(Succeed()) - }) - - It("ParseTimeFlags test, and expect success", func() { - sinceStr := "5m" - sinceTimeStr := "2023-01-09T15:18:46+08:00" - Expect(ParseTimeFlags(sinceStr, sinceTimeStr, []*troubleshoot.Collect{})).Should(HaveOccurred()) - Expect(ParseTimeFlags(sinceTimeStr, "", []*troubleshoot.Collect{})).Should(Succeed()) - Expect(ParseTimeFlags("", sinceStr, []*troubleshoot.Collect{})).Should(Succeed()) - }) - - It("ParseTimeFlags test, and expect error", func() { - sinceStr := "5error-m" - sinceTimeStr := "2023-01-09T15:46+:00" - Expect(ParseTimeFlags("", "", []*troubleshoot.Collect{})).Should(HaveOccurred()) - Expect(ParseTimeFlags(sinceStr, "", []*troubleshoot.Collect{})).Should(HaveOccurred()) - Expect(ParseTimeFlags("", sinceTimeStr, []*troubleshoot.Collect{})).Should(HaveOccurred()) - - }) -}) diff --git a/pkg/preflight/collector/host_collector.go b/pkg/preflight/collector/host_collector.go deleted file mode 100644 index 06733d6c5..000000000 --- a/pkg/preflight/collector/host_collector.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package collector - -import ( - "github.com/replicatedhq/troubleshoot/pkg/collect" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -func GetExtendHostCollector(kbCollector *preflightv1beta2.ExtendHostCollect, bundlePath string) (collect.HostCollector, bool) { - switch { - case kbCollector.HostUtility != nil: - return &CollectHostUtility{HostCollector: kbCollector.HostUtility, BundlePath: bundlePath}, true - case kbCollector.ClusterRegion != nil: - return &CollectClusterRegion{HostCollector: kbCollector.ClusterRegion, BundlePath: bundlePath}, true - default: - return nil, false - } -} diff --git a/pkg/preflight/collector/host_collector_test.go b/pkg/preflight/collector/host_collector_test.go deleted file mode 100644 index 5daa1821d..000000000 --- a/pkg/preflight/collector/host_collector_test.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package collector - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var _ = Describe("host_collector_test", func() { - It("GetExtendHostCollector test", func() { - collector, ok := GetExtendHostCollector(&preflightv1beta2.ExtendHostCollect{HostUtility: &preflightv1beta2.HostUtility{}}, "bundlePath") - Expect(collector).ShouldNot(BeNil()) - Expect(ok).Should(BeTrue()) - collector, ok = GetExtendHostCollector(&preflightv1beta2.ExtendHostCollect{ClusterRegion: &preflightv1beta2.ClusterRegion{}}, "bundlePath") - Expect(collector).ShouldNot(BeNil()) - Expect(ok).Should(BeTrue()) - collector, ok = GetExtendHostCollector(&preflightv1beta2.ExtendHostCollect{}, "bundlePath") - Expect(collector).Should(BeNil()) - Expect(ok).Should(BeFalse()) - }) -}) diff --git a/pkg/preflight/collector/host_region.go b/pkg/preflight/collector/host_region.go deleted file mode 100644 index 2b05b5c54..000000000 --- a/pkg/preflight/collector/host_region.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package collector - -import ( - "bytes" - "encoding/json" - "strings" - - "github.com/pkg/errors" - pkgcollector "github.com/replicatedhq/troubleshoot/pkg/collect" - "k8s.io/client-go/rest" - cmdutil "k8s.io/kubectl/pkg/cmd/util" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - "github.com/apecloud/kbcli/pkg/preflight/util" - cliutil "github.com/apecloud/kbcli/pkg/util" -) - -const ( - ClusterRegionTitle = "Cluster Region" - ClusterRegionPath = "host-collectors/extend/region_name.json" -) - -var RestConfigFn = func() (*rest.Config, error) { - // create rest config of target k8s cluster - return cmdutil.NewFactory(cmdutil.NewMatchVersionFlags(cliutil.NewConfigFlagNoWarnings())).ToRESTConfig() -} - -type ClusterRegionInfo struct { - RegionName string `json:"regionName"` -} - -type CollectClusterRegion struct { - HostCollector *preflightv1beta2.ClusterRegion - BundlePath string -} - -func (c *CollectClusterRegion) Title() string { - return util.TitleOrDefault(c.HostCollector.HostCollectorMeta, ClusterRegionTitle) -} - -func (c *CollectClusterRegion) IsExcluded() (bool, error) { - return util.IsExcluded(c.HostCollector.Exclude) -} - -func (c *CollectClusterRegion) Collect(progressChan chan<- interface{}) (map[string][]byte, error) { - b, err := doCollect(RestConfigFn, c.HostCollector.ProviderName) - if err != nil { - return nil, err - } - output := pkgcollector.NewResult() - _ = output.SaveResult(c.BundlePath, ClusterRegionPath, bytes.NewBuffer(b)) - return output, nil -} - -func doCollect(fn func() (*rest.Config, error), providerName string) ([]byte, error) { - kubeConfig, err := fn() - if err != nil { - return nil, errors.Wrap(err, "failed to get kube config") - } - regionName := ResolveRegionNameByEndPoint(providerName, kubeConfig.Host) - info := ClusterRegionInfo{regionName} - b, err := json.Marshal(info) - if err != nil { - return nil, errors.Wrap(err, "failed to marshal cluster region info") - } - return b, nil -} - -func ResolveRegionNameByEndPoint(providerName, endPoint string) string { - var regionName string - switch { - case strings.EqualFold(providerName, "eks"): - if len(endPoint) > 0 { - // eks endpoint format: https://xxx.yl4.cn-northwest-1.eks.amazonaws.com.cn - strList := strings.Split(endPoint, ".") - if len(strList) == 7 { - regionName = strList[2] - } - } - default: - } - return regionName -} diff --git a/pkg/preflight/collector/host_region_test.go b/pkg/preflight/collector/host_region_test.go deleted file mode 100644 index 08ceff7ac..000000000 --- a/pkg/preflight/collector/host_region_test.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package collector - -import ( - "errors" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - "k8s.io/client-go/rest" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var _ = Describe("host_region_test", func() { - var ( - clusterRegion CollectClusterRegion - testName = "testName" - config *rest.Config - ) - BeforeEach(func() { - clusterRegion = CollectClusterRegion{ - HostCollector: &preflightv1beta2.ClusterRegion{ - HostCollectorMeta: troubleshoot.HostCollectorMeta{ - CollectorName: testName, - }, - ProviderName: "eks", - }, - BundlePath: "", - } - config = &rest.Config{Host: "https://xxx.yl4.cn-northwest-1.eks.amazonaws.com.cn"} - }) - It("CollectClusterRegion test, get config fail and expect error", func() { - Eventually(func(g Gomega) { - g.Expect(clusterRegion.Title()).Should(Equal(testName)) - g.Expect(clusterRegion.IsExcluded()).Should(BeFalse()) - data, err := doCollect(func() (*rest.Config, error) { - return config, errors.New("fail") - }, "eks") - g.Expect(err).Should(HaveOccurred()) - g.Expect(data).Should(BeNil()) - }).Should(Succeed()) - }) - - It("CollectClusterRegion test, and expect success", func() { - Eventually(func(g Gomega) { - g.Expect(clusterRegion.Title()).Should(Equal(testName)) - g.Expect(clusterRegion.IsExcluded()).Should(BeFalse()) - data, err := doCollect(func() (*rest.Config, error) { - return config, nil - }, "eks") - g.Expect(err).ShouldNot(HaveOccurred()) - g.Expect(string(data)).Should(Equal(`{"regionName":"cn-northwest-1"}`)) - }).Should(Succeed()) - }) -}) diff --git a/pkg/preflight/collector/host_utility.go b/pkg/preflight/collector/host_utility.go deleted file mode 100644 index d525669b6..000000000 --- a/pkg/preflight/collector/host_utility.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package collector - -import ( - "bytes" - "encoding/json" - "fmt" - "os/exec" - - "github.com/pkg/errors" - pkgcollector "github.com/replicatedhq/troubleshoot/pkg/collect" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - "github.com/apecloud/kbcli/pkg/preflight/util" -) - -const UtilityPathFormat = "host-collectors/utility/%s.json" -const DefaultHostUtilityName = "Host Utility" -const DefaultHostUtilityPath = "utility" - -type HostUtilityInfo struct { - Name string `json:"name"` - Path string `json:"path"` - Error string `json:"error"` -} - -type CollectHostUtility struct { - HostCollector *preflightv1beta2.HostUtility - BundlePath string -} - -func (c *CollectHostUtility) Title() string { - return util.TitleOrDefault(c.HostCollector.HostCollectorMeta, DefaultHostUtilityName) -} - -func (c *CollectHostUtility) IsExcluded() (bool, error) { - return util.IsExcluded(c.HostCollector.Exclude) -} - -func (c *CollectHostUtility) Collect(progressChan chan<- interface{}) (map[string][]byte, error) { - hostCollector := c.HostCollector - - path, err := exec.LookPath(hostCollector.UtilityName) - utilityInfo := HostUtilityInfo{ - Name: hostCollector.UtilityName, - Path: path, - } - if err != nil { - utilityInfo.Error = err.Error() - } - b, err := json.Marshal(utilityInfo) - if err != nil { - return nil, errors.Wrap(err, "failed to marshal host utility info") - } - - resPath := util.TitleOrDefault(hostCollector.HostCollectorMeta, DefaultHostUtilityPath) - - output := pkgcollector.NewResult() - _ = output.SaveResult(c.BundlePath, fmt.Sprintf(UtilityPathFormat, resPath), bytes.NewBuffer(b)) - return output, nil -} diff --git a/pkg/preflight/collector/host_utility_test.go b/pkg/preflight/collector/host_utility_test.go deleted file mode 100644 index b22a48157..000000000 --- a/pkg/preflight/collector/host_utility_test.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package collector - -import ( - "encoding/json" - "fmt" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var _ = Describe("host_utility_test", func() { - var ( - hostUtility CollectHostUtility - testName = "testName" - ) - BeforeEach(func() { - hostUtility = CollectHostUtility{ - HostCollector: &preflightv1beta2.HostUtility{ - HostCollectorMeta: troubleshoot.HostCollectorMeta{ - CollectorName: testName}, - UtilityName: "UtilityName"}, - BundlePath: "", - } - }) - It("CollectHostUtility test, UtilityName is invalid and expect error", func() { - Eventually(func(g Gomega) { - g.Expect(hostUtility.Title()).Should(Equal(testName)) - g.Expect(hostUtility.IsExcluded()).Should(BeFalse()) - dataMap, err := hostUtility.Collect(nil) - g.Expect(err).ShouldNot(HaveOccurred()) - collectd, ok := dataMap[fmt.Sprintf(UtilityPathFormat, hostUtility.HostCollector.CollectorName)] - g.Expect(ok).Should(BeTrue()) - utilityInfo := new(HostUtilityInfo) - err = json.Unmarshal(collectd, utilityInfo) - g.Expect(err).ShouldNot(HaveOccurred()) - g.Expect(utilityInfo.Error).ShouldNot(BeNil()) - }).Should(Succeed()) - - }) -}) diff --git a/pkg/preflight/collector/suite_test.go b/pkg/preflight/collector/suite_test.go deleted file mode 100644 index eb3c6552b..000000000 --- a/pkg/preflight/collector/suite_test.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package collector - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestCollector(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Collector Suite") -} diff --git a/pkg/preflight/concat_spec.go b/pkg/preflight/concat_spec.go deleted file mode 100644 index f65afbf08..000000000 --- a/pkg/preflight/concat_spec.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -// ConcatPreflightSpec splices multiple PreflightSpec into one Preflight object -func ConcatPreflightSpec(target *preflightv1beta2.Preflight, source *preflightv1beta2.Preflight) *preflightv1beta2.Preflight { - if source == nil { - return target - } - var newSpec *preflightv1beta2.Preflight - if target == nil { - newSpec = source - } else { - newSpec = target.DeepCopy() - newSpec.Spec.Collectors = append(newSpec.Spec.Collectors, source.Spec.Collectors...) - newSpec.Spec.RemoteCollectors = append(newSpec.Spec.RemoteCollectors, source.Spec.RemoteCollectors...) - newSpec.Spec.Analyzers = append(newSpec.Spec.Analyzers, source.Spec.Analyzers...) - newSpec.Spec.ExtendCollectors = append(newSpec.Spec.ExtendCollectors, source.Spec.ExtendCollectors...) - newSpec.Spec.ExtendAnalyzers = append(newSpec.Spec.ExtendAnalyzers, source.Spec.ExtendAnalyzers...) - } - return newSpec -} - -// ConcatHostPreflightSpec splices multiple HostPreflightSpec into one HostPreflight object -func ConcatHostPreflightSpec(target *preflightv1beta2.HostPreflight, source *preflightv1beta2.HostPreflight) *preflightv1beta2.HostPreflight { - if source == nil { - return target - } - var newSpec *preflightv1beta2.HostPreflight - if target == nil { - newSpec = source - } else { - newSpec = target.DeepCopy() - newSpec.Spec.Collectors = append(newSpec.Spec.Collectors, source.Spec.Collectors...) - newSpec.Spec.RemoteCollectors = append(newSpec.Spec.RemoteCollectors, source.Spec.RemoteCollectors...) - newSpec.Spec.Analyzers = append(newSpec.Spec.Analyzers, source.Spec.Analyzers...) - newSpec.Spec.ExtendCollectors = append(newSpec.Spec.ExtendCollectors, source.Spec.ExtendCollectors...) - newSpec.Spec.ExtendAnalyzers = append(newSpec.Spec.ExtendAnalyzers, source.Spec.ExtendAnalyzers...) - } - return newSpec -} - -// ExtractHostPreflightSpec extracts spec of troubleshootv1beta2.HostPreflight from preflightv1beta2.HostPreflight -func ExtractHostPreflightSpec(kb *preflightv1beta2.HostPreflight) *troubleshoot.HostPreflight { - if kb != nil { - return &troubleshoot.HostPreflight{ - TypeMeta: kb.TypeMeta, - ObjectMeta: kb.ObjectMeta, - Spec: troubleshoot.HostPreflightSpec{ - Collectors: kb.Spec.Collectors, - RemoteCollectors: kb.Spec.RemoteCollectors, - Analyzers: kb.Spec.Analyzers, - }, - } - } - return nil -} diff --git a/pkg/preflight/concat_spec_test.go b/pkg/preflight/concat_spec_test.go deleted file mode 100644 index 66b339887..000000000 --- a/pkg/preflight/concat_spec_test.go +++ /dev/null @@ -1,176 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - "k8s.io/apimachinery/pkg/util/yaml" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var _ = Describe("concat_spec_test", func() { - - It("ConcatPreflightSpec Test", func() { - targetByte := ` -apiVersion: troubleshoot.sh/v1beta2 -kind: Preflight -metadata: - name: sample -spec: - analyzers: - - nodeResources: - checkName: Must have at least 3 nodes in the cluster - outcomes: - - fail: - when: "< 3" - message: This application requires at least 3 nodes - - warn: - when: "< 5" - message: This application recommends at last 5 nodes. - - pass: - message: This cluster has enough nodes.` - sourceByte := ` -apiVersion: troubleshoot.sh/v1beta2 -kind: Preflight -metadata: - name: sample -spec: - collectors: - - redis: - collectorName: my-redis - uri: rediss://default:replicated@server:6380 - tls: - skipVerify: true - analyzers: - - redis: - checkName: Must be redis 5.x or later - collectorName: my-redis - outcomes: - - fail: - when: "connected == false" - message: Cannot connect to redis server - - fail: - when: "version < 5.0.0" - message: The redis server must be at least version 5 - - pass: - message: The redis connection checks out.` - targetSpec := new(preflightv1beta2.Preflight) - sourceSpec := new(preflightv1beta2.Preflight) - Expect(yaml.Unmarshal([]byte(targetByte), targetSpec)).Should(Succeed()) - Expect(yaml.Unmarshal([]byte(sourceByte), sourceSpec)).Should(Succeed()) - var newSpec = ConcatPreflightSpec(nil, sourceSpec) - Expect(newSpec).Should(Equal(sourceSpec)) - newSpec = ConcatPreflightSpec(targetSpec, nil) - Expect(newSpec).Should(Equal(targetSpec)) - newSpec = ConcatPreflightSpec(targetSpec, sourceSpec) - Expect(len(newSpec.Spec.Analyzers)).Should(Equal(2)) - }) - It("ConcatHostPreflightSpec Test", func() { - targetByte := ` -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: cpu -spec: - collectors: - - cpu: {} - analyzers: - - cpu: - outcomes: - - fail: - when: "physical < 4" - message: At least 4 physical CPU cores are required - - fail: - when: "logical < 8" - message: At least 8 CPU cores are required - - warn: - when: "count < 16" - message: At least 16 CPU cores preferred - - pass: - message: This server has sufficient CPU cores.` - sourceByte := ` -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: http -spec: - collectors: - - http: - collectorName: registry - get: - url: https://registry.replicated.com - analyzers: - - http: - collectorName: registry - outcomes: - - fail: - when: "error" - message: Error connecting to registry - - pass: - when: "statusCode == 404" - message: Connected to registry - - fail: - message: "Unexpected response"` - targetSpec := new(preflightv1beta2.HostPreflight) - sourceSpec := new(preflightv1beta2.HostPreflight) - Expect(yaml.Unmarshal([]byte(targetByte), targetSpec)).Should(Succeed()) - Expect(yaml.Unmarshal([]byte(sourceByte), sourceSpec)).Should(Succeed()) - var newSpec = ConcatHostPreflightSpec(nil, sourceSpec) - Expect(newSpec).Should(Equal(sourceSpec)) - newSpec = ConcatHostPreflightSpec(targetSpec, nil) - Expect(newSpec).Should(Equal(targetSpec)) - newSpec = ConcatHostPreflightSpec(targetSpec, sourceSpec) - Expect(len(newSpec.Spec.Analyzers)).Should(Equal(2)) - }) - - It("ExtractHostPreflightSpec Test", func() { - sourceByte := ` -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: http -spec: - collectors: - - http: - collectorName: registry - get: - url: https://registry.replicated.com - analyzers: - - http: - collectorName: registry - outcomes: - - fail: - when: "error" - message: Error connecting to registry - - pass: - when: "statusCode == 404" - message: Connected to registry - - fail: - message: "Unexpected response"` - sourceSpec := new(preflightv1beta2.HostPreflight) - Expect(yaml.Unmarshal([]byte(sourceByte), sourceSpec)).Should(Succeed()) - Expect(ExtractHostPreflightSpec(nil)).Should(BeNil()) - newSpec := ExtractHostPreflightSpec(sourceSpec) - Expect(len(newSpec.Spec.Collectors)).Should(Equal(1)) - }) -}) diff --git a/pkg/preflight/interactive/interactive.go b/pkg/preflight/interactive/interactive.go deleted file mode 100644 index f1d72711c..000000000 --- a/pkg/preflight/interactive/interactive.go +++ /dev/null @@ -1,312 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package interactive - -import ( - "fmt" - "os" - "time" - - "github.com/pkg/errors" - ui "github.com/replicatedhq/termui/v3" - "github.com/replicatedhq/termui/v3/widgets" - "github.com/replicatedhq/troubleshoot/cmd/util" - analyzerunner "github.com/replicatedhq/troubleshoot/pkg/analyze" - "github.com/replicatedhq/troubleshoot/pkg/convert" -) - -var ( - selectedResult = 0 - table = widgets.NewTable() - isShowingSaved = false -) - -// ShowInteractiveResults displays the results in interactive mode -func ShowInteractiveResults(preflightName string, analyzeResults []*analyzerunner.AnalyzeResult, outputPath string) error { - if err := ui.Init(); err != nil { - return errors.Wrap(err, "failed to create terminal ui") - } - defer ui.Close() - - drawUI(preflightName, analyzeResults) - - uiEvents := ui.PollEvents() - for e := range uiEvents { - switch e.ID { - case "": - return nil - case "q": - if isShowingSaved { - isShowingSaved = false - ui.Clear() - drawUI(preflightName, analyzeResults) - } else { - return nil - } - case "s": - filename, err := save(preflightName, outputPath, analyzeResults) - if err != nil { - // show - } else { - showSaved(filename) - go func() { - time.Sleep(time.Second * 5) - isShowingSaved = false - ui.Clear() - drawUI(preflightName, analyzeResults) - }() - } - case "": - ui.Clear() - drawUI(preflightName, analyzeResults) - case "": - if selectedResult < len(analyzeResults)-1 { - selectedResult++ - } else { - selectedResult = 0 - table.SelectedRow = 0 - } - table.ScrollDown() - ui.Clear() - drawUI(preflightName, analyzeResults) - case "": - if selectedResult > 0 { - selectedResult-- - } else { - selectedResult = len(analyzeResults) - 1 - table.SelectedRow = len(analyzeResults) - } - table.ScrollUp() - ui.Clear() - drawUI(preflightName, analyzeResults) - } - } - return nil -} - -func drawUI(preflightName string, analyzeResults []*analyzerunner.AnalyzeResult) { - drawGrid(analyzeResults) - drawHeader(preflightName) - drawFooter() -} - -func drawHeader(preflightName string) { - termWidth, _ := ui.TerminalDimensions() - - title := widgets.NewParagraph() - title.Text = fmt.Sprintf("%s Preflight Checks", util.AppName(preflightName)) - title.TextStyle.Fg = ui.ColorWhite - title.TextStyle.Bg = ui.ColorClear - title.TextStyle.Modifier = ui.ModifierBold - title.Border = false - - left := termWidth/2 - 2*len(title.Text)/3 - right := termWidth/2 + (termWidth/2 - left) - - title.SetRect(left, 0, right, 1) - ui.Render(title) -} - -func drawGrid(analyzeResults []*analyzerunner.AnalyzeResult) { - drawPreflightTable(analyzeResults) - drawDetails(analyzeResults[selectedResult]) -} - -func drawFooter() { - termWidth, termHeight := ui.TerminalDimensions() - - instructions := widgets.NewParagraph() - instructions.Text = "[q] quit [s] save [↑][↓] scroll" - instructions.Border = false - - left := 0 - right := termWidth - top := termHeight - 1 - bottom := termHeight - - instructions.SetRect(left, top, right, bottom) - ui.Render(instructions) -} - -func drawPreflightTable(analyzeResults []*analyzerunner.AnalyzeResult) { - termWidth, termHeight := ui.TerminalDimensions() - - table.SetRect(0, 3, termWidth/2, termHeight-6) - table.FillRow = true - table.Border = true - table.Rows = [][]string{} - table.ColumnWidths = []int{termWidth} - - for i, analyzeResult := range analyzeResults { - title := analyzeResult.Title - if analyzeResult.Strict { - title += fmt.Sprintf(" (Strict: %t)", analyzeResult.Strict) - } - switch { - case analyzeResult.IsPass: - title = fmt.Sprintf("✔ %s", title) - case analyzeResult.IsWarn: - title = fmt.Sprintf("⚠️ %s", title) - case analyzeResult.IsFail: - title = fmt.Sprintf("✘ %s", title) - } - table.Rows = append(table.Rows, []string{ - title, - }) - switch { - case analyzeResult.IsPass: - if i == selectedResult { - table.RowStyles[i] = ui.NewStyle(ui.ColorGreen, ui.ColorClear, ui.ModifierReverse) - } else { - table.RowStyles[i] = ui.NewStyle(ui.ColorGreen, ui.ColorClear) - } - case analyzeResult.IsWarn: - if i == selectedResult { - table.RowStyles[i] = ui.NewStyle(ui.ColorYellow, ui.ColorClear, ui.ModifierReverse) - } else { - table.RowStyles[i] = ui.NewStyle(ui.ColorYellow, ui.ColorClear) - } - case analyzeResult.IsFail: - if i == selectedResult { - table.RowStyles[i] = ui.NewStyle(ui.ColorRed, ui.ColorClear, ui.ModifierReverse) - } else { - table.RowStyles[i] = ui.NewStyle(ui.ColorRed, ui.ColorClear) - } - } - } - ui.Render(table) -} - -func drawDetails(analysisResult *analyzerunner.AnalyzeResult) { - termWidth, _ := ui.TerminalDimensions() - - currentTop := 4 - title := widgets.NewParagraph() - title.Text = analysisResult.Title - title.Border = false - switch { - case analysisResult.IsPass: - title.TextStyle = ui.NewStyle(ui.ColorGreen, ui.ColorClear, ui.ModifierBold) - case analysisResult.IsWarn: - title.TextStyle = ui.NewStyle(ui.ColorYellow, ui.ColorClear, ui.ModifierBold) - case analysisResult.IsFail: - title.TextStyle = ui.NewStyle(ui.ColorRed, ui.ColorClear, ui.ModifierBold) - } - height := estimateNumberOfLines(title.Text, termWidth/2) - title.SetRect(termWidth/2, currentTop, termWidth, currentTop+height) - ui.Render(title) - currentTop = currentTop + height + 1 - - message := widgets.NewParagraph() - message.Text = analysisResult.Message - message.Border = false - height = estimateNumberOfLines(message.Text, termWidth/2) + 2 - message.SetRect(termWidth/2, currentTop, termWidth, currentTop+height) - ui.Render(message) - currentTop = currentTop + height + 1 - - if analysisResult.URI != "" { - uri := widgets.NewParagraph() - uri.Text = fmt.Sprintf("For more information: %s", analysisResult.URI) - uri.Border = false - height = estimateNumberOfLines(uri.Text, termWidth/2) - uri.SetRect(termWidth/2, currentTop, termWidth, currentTop+height) - ui.Render(uri) - // currentTop = currentTop + height + 1 - } -} - -func estimateNumberOfLines(text string, width int) int { - if width == 0 { - return 0 - } - lines := len(text)/width + 1 - return lines -} - -// save exports analyzeResults to local file against customize outputPath. -func save(preflightName string, outputPath string, analyzeResults []*analyzerunner.AnalyzeResult) (string, error) { - filename := "" - if outputPath != "" { - // use override output path - overridePath, err := convert.ValidateOutputPath(outputPath) - if err != nil { - return "", errors.Wrap(err, "override output file path") - } - filename = overridePath - } else { - // use default output path - filename = fmt.Sprintf("%s-results-%s.txt", preflightName, time.Now().Format("2006-01-02T15_04_05")) - } - - if _, err := os.Stat(filename); err == nil { - _ = os.Remove(filename) - } - - results := fmt.Sprintf("%s Preflight Checks\n\n", util.AppName(preflightName)) - for _, analyzeResult := range analyzeResults { - result := "" - switch { - case analyzeResult.IsPass: - result = "Check PASS\n" - case analyzeResult.IsWarn: - result = "Check WARN\n" - case analyzeResult.IsFail: - result = "Check FAIL\n" - } - result += fmt.Sprintf("Title: %s\n", analyzeResult.Title) - result += fmt.Sprintf("Message: %s\n", analyzeResult.Message) - - if analyzeResult.URI != "" { - result += fmt.Sprintf("URI: %s\n", analyzeResult.URI) - } - - if analyzeResult.Strict { - result += fmt.Sprintf("Strict: %t\n", analyzeResult.Strict) - } - result += "\n------------\n" - results += result - } - - if err := os.WriteFile(filename, []byte(results), 0644); err != nil { - return "", errors.Wrap(err, "failed to save preflight results") - } - - return filename, nil -} - -func showSaved(filename string) { - termWidth, termHeight := ui.TerminalDimensions() - - savedMessage := widgets.NewParagraph() - savedMessage.Text = fmt.Sprintf("Preflight results saved to\n\n%s", filename) - savedMessage.WrapText = true - savedMessage.Border = true - - left := termWidth/2 - 20 - right := termWidth/2 + 20 - top := termHeight/2 - 4 - bottom := termHeight/2 + 4 - - savedMessage.SetRect(left, top, right, bottom) - ui.Render(savedMessage) - - isShowingSaved = true -} diff --git a/pkg/preflight/load_spec.go b/pkg/preflight/load_spec.go deleted file mode 100644 index dcf3d642a..000000000 --- a/pkg/preflight/load_spec.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - "os" - - "github.com/pkg/errors" - "k8s.io/client-go/kubernetes/scheme" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" - - "github.com/apecloud/kbcli/pkg/cmd/cluster" - "github.com/apecloud/kbcli/pkg/preflight/util" -) - -// LoadPreflightSpec loads content of preflightSpec and hostPreflightSpec against yamlFiles from args -func LoadPreflightSpec(checkFileList []string, checkYamlData [][]byte) (*preflightv1beta2.Preflight, *preflightv1beta2.HostPreflight, string, error) { - var ( - preflightSpec *preflightv1beta2.Preflight - hostPreflightSpec *preflightv1beta2.HostPreflight - preflightContent []byte - preflightName string - err error - ) - for _, fileName := range checkFileList { - // support to load yaml from stdin, local file and URI - if preflightContent, err = cluster.MultipleSourceComponents(fileName, os.Stdin); err != nil { - return preflightSpec, hostPreflightSpec, preflightName, err - } - checkYamlData = append(checkYamlData, preflightContent) - } - for _, yamlData := range checkYamlData { - obj, _, err := scheme.Codecs.UniversalDeserializer().Decode(yamlData, nil, nil) - if err != nil { - return preflightSpec, hostPreflightSpec, preflightName, errors.Wrapf(err, "failed to parse %s", string(yamlData)) - } - if spec, ok := obj.(*preflightv1beta2.Preflight); ok { - preflightSpec = ConcatPreflightSpec(preflightSpec, spec) - preflightName = preflightSpec.Name - } else if spec, ok := obj.(*preflightv1beta2.HostPreflight); ok { - hostPreflightSpec = ConcatHostPreflightSpec(hostPreflightSpec, spec) - preflightName = hostPreflightSpec.Name - } - } - return preflightSpec, hostPreflightSpec, preflightName, nil -} - -func init() { - // register the scheme of troubleshoot API and decode function - if err := util.AddToScheme(scheme.Scheme); err != nil { - return - } -} diff --git a/pkg/preflight/load_spec_test.go b/pkg/preflight/load_spec_test.go deleted file mode 100644 index abd08c83d..000000000 --- a/pkg/preflight/load_spec_test.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("load_spec_test", func() { - It("LoadPreflightSpec test, and expect success", func() { - yamlCheckFiles := []string{"../testing/testdata/preflight.yaml", "..//testing/testdata/hostpreflight.yaml"} - Eventually(func(g Gomega) { - preflightSpec, hostPreflightSpec, preflightName, err := LoadPreflightSpec(yamlCheckFiles, nil) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(len(preflightSpec.Spec.Analyzers)).Should(Equal(1)) - g.Expect(len(hostPreflightSpec.Spec.Analyzers)).Should(Equal(1)) - g.Expect(preflightName).NotTo(BeNil()) - }).Should(Succeed()) - }) -}) diff --git a/pkg/preflight/suite_test.go b/pkg/preflight/suite_test.go deleted file mode 100644 index bdd1c0ecf..000000000 --- a/pkg/preflight/suite_test.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestPreflight(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Preflight Suite") -} diff --git a/pkg/preflight/testing/fake.go b/pkg/preflight/testing/fake.go deleted file mode 100644 index 41a55062f..000000000 --- a/pkg/preflight/testing/fake.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package testing - -import ( - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -const ( - clusterVersion = ` - { - "info": { - "major": "1", - "minor": "23", - "gitVersion": "v1.23.15", - "gitCommit": "b84cb8ab29366daa1bba65bc67f54de2f6c34848", - "gitTreeState": "clean", - "buildDate": "2022-12-08T10:42:57Z", - "goVersion": "go1.17.13", - "compiler": "gc", - "platform": "linux/arm64" - }, - "string": "v1.23.15" - }` - deploymentStatus = ` - { - "string": "1" - }` -) - -func FakeAnalyzers() []*troubleshoot.Analyze { - return []*troubleshoot.Analyze{ - { - ClusterVersion: &troubleshoot.ClusterVersion{ - AnalyzeMeta: troubleshoot.AnalyzeMeta{ - CheckName: "ClusterVersionCheck", - }, - Outcomes: []*troubleshoot.Outcome{ - { - Pass: &troubleshoot.SingleOutcome{ - Message: "version is ok.", - }, - }, - }, - }, - }, - { - DeploymentStatus: &troubleshoot.DeploymentStatus{ - AnalyzeMeta: troubleshoot.AnalyzeMeta{ - CheckName: "DeploymentStatusCheck", - }, - Outcomes: []*troubleshoot.Outcome{ - { - Warn: &troubleshoot.SingleOutcome{ - When: "absent", - Message: "The deployment is not present.", - }, - Pass: &troubleshoot.SingleOutcome{ - Message: "There are multiple replicas of the deployment ready", - }, - }, - }, - }, - }, - } -} - -func FakeCollectedData() map[string][]byte { - return map[string][]byte{ - "cluster-info/cluster_version.json": []byte(clusterVersion), - "cluster-info/deployment_status.json": []byte(deploymentStatus), - } -} - -func FakeKbPreflight() *preflightv1beta2.Preflight { - var collectList []*troubleshoot.Collect - collect := &troubleshoot.Collect{ - ClusterInfo: &troubleshoot.ClusterInfo{}, - ClusterResources: &troubleshoot.ClusterResources{}, - } - collectList = append(collectList, collect) - - return &preflightv1beta2.Preflight{ - Spec: preflightv1beta2.PreflightSpec{ - PreflightSpec: troubleshoot.PreflightSpec{ - Collectors: collectList, - }, - }, - } -} - -func FakeKbHostPreflight() *preflightv1beta2.HostPreflight { - var extendCollectList []*preflightv1beta2.ExtendHostCollect - var remoteCollectList []*troubleshoot.RemoteCollect - extendCollectList = append( - extendCollectList, - &preflightv1beta2.ExtendHostCollect{HostUtility: &preflightv1beta2.HostUtility{}}, - ) - remoteCollectList = append(remoteCollectList, &troubleshoot.RemoteCollect{CPU: &troubleshoot.RemoteCPU{}}) - - hostPreflight := &preflightv1beta2.HostPreflight{ - Spec: preflightv1beta2.HostPreflightSpec{ - ExtendCollectors: extendCollectList, - }, - } - hostPreflight.Spec.RemoteCollectors = remoteCollectList - return hostPreflight -} diff --git a/pkg/preflight/testing/fake_test.go b/pkg/preflight/testing/fake_test.go deleted file mode 100644 index f399b4960..000000000 --- a/pkg/preflight/testing/fake_test.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package testing - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("test fake in pkg/preflight", func() { - It("test FakeKbPreflight", func() { - kbPreflight := FakeKbPreflight() - Expect(kbPreflight).ShouldNot(BeNil()) - Expect(len(kbPreflight.Spec.Collectors)).Should(BeNumerically(">", 0)) - }) - - It("test FakeKbHostPreflight", func() { - hostKbPreflight := FakeKbHostPreflight() - Expect(hostKbPreflight).ShouldNot(BeNil()) - Expect(len(hostKbPreflight.Spec.RemoteCollectors)).Should(BeNumerically(">", 0)) - Expect(len(hostKbPreflight.Spec.ExtendCollectors)).Should(BeNumerically(">", 0)) - }) - - It("test FakeAnalyzers", func() { - analyzers := FakeAnalyzers() - Expect(analyzers).ShouldNot(BeNil()) - Expect(len(analyzers)).Should(BeNumerically(">", 0)) - }) -}) diff --git a/pkg/preflight/testing/suite_test.go b/pkg/preflight/testing/suite_test.go deleted file mode 100644 index f0104afc1..000000000 --- a/pkg/preflight/testing/suite_test.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package testing - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestFake(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Fake Preflight") -} diff --git a/pkg/preflight/text_results.go b/pkg/preflight/text_results.go deleted file mode 100644 index 49e1a5b3a..000000000 --- a/pkg/preflight/text_results.go +++ /dev/null @@ -1,199 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - "encoding/json" - "fmt" - "io" - "strings" - - "github.com/apecloud/kbcli/pkg/spinner" - - "github.com/pkg/errors" - analyzerunner "github.com/replicatedhq/troubleshoot/pkg/analyze" - "gopkg.in/yaml.v2" - - "github.com/apecloud/kbcli/pkg/printer" -) - -const ( - FailMessage = "Failed items were found. Please resolve the failed items and try again." -) - -type TextResultOutput struct { - Title string `json:"title" yaml:"title"` - Message string `json:"message" yaml:"message"` - URI string `json:"uri,omitempty" yaml:"uri,omitempty"` - Strict bool `json:"strict,omitempty" yaml:"strict,omitempty"` -} - -func NewTextResultOutput(title, message, uri string) TextResultOutput { - return TextResultOutput{ - Title: title, - Message: message, - URI: uri, - } -} - -type TextOutput struct { - Pass []TextResultOutput `json:"pass,omitempty" yaml:"pass,omitempty"` - Warn []TextResultOutput `json:"warn,omitempty" yaml:"warn,omitempty"` - Fail []TextResultOutput `json:"fail,omitempty" yaml:"fail,omitempty"` -} - -func NewTextOutput() TextOutput { - return TextOutput{ - Pass: []TextResultOutput{}, - Warn: []TextResultOutput{}, - Fail: []TextResultOutput{}, - } -} - -// ShowTextResults shadows interactive mode, and exports results by customized format -func ShowTextResults(preflightName string, analyzeResults []*analyzerunner.AnalyzeResult, format string, verbose bool, out io.Writer) error { - switch format { - case "json": - return showTextResultsJSON(preflightName, analyzeResults, verbose, out) - case "yaml": - return showStdoutResultsYAML(preflightName, analyzeResults, verbose, out) - case "kbcli": - return showResultsKBCli(preflightName, analyzeResults, verbose, out) - default: - return errors.Errorf("unknown output format: %q", format) - } -} - -func showResultsKBCli(preflightName string, analyzeResults []*analyzerunner.AnalyzeResult, verbose bool, out io.Writer) error { - var ( - allMsg string - all = make([]string, 0) - spinnerDone = func(s spinner.Interface) { - s.SetFinalMsg(allMsg) - s.Done("") - fmt.Fprintln(out) - } - showResults = func(results []TextResultOutput) { - for _, result := range results { - all = append(all, fmt.Sprintf("- %s", result.Message)) - } - } - ) - msg := fmt.Sprintf("%-50s", "Kubernetes cluster preflight") - s := spinner.New(out, spinner.WithMessage(msg)) - data := showStdoutResultsStructured(preflightName, analyzeResults, verbose) - isFailed := false - - if verbose { - if len(data.Pass) > 0 { - all = append(all, fmt.Sprint(printer.BoldGreen("Pass"))) - showResults(data.Pass) - } - } - if len(data.Warn) > 0 { - all = append(all, fmt.Sprint(printer.BoldYellow("Warn"))) - showResults(data.Warn) - } - if len(data.Fail) > 0 { - all = append(all, fmt.Sprint(printer.BoldRed("Fail"))) - showResults(data.Fail) - isFailed = true - } - allMsg = fmt.Sprintf(" %s", strings.Join(all, "\n ")) - s.SetFinalMsg(suffixMsg(allMsg)) - if isFailed { - s.Fail() - spinnerDone(s) - return errors.New(FailMessage) - } - s.Success() - spinnerDone(s) - return nil -} - -func suffixMsg(msg string) string { - return fmt.Sprintf("%-50s", msg) -} - -func showTextResultsJSON(preflightName string, analyzeResults []*analyzerunner.AnalyzeResult, verbose bool, out io.Writer) error { - output := showStdoutResultsStructured(preflightName, analyzeResults, verbose) - b, err := json.MarshalIndent(output, "", " ") - if err != nil { - return errors.Wrap(err, "failed to marshal results as json") - } - - fmt.Fprintf(out, "%s\n", b) - if len(output.Fail) > 0 { - return errors.New(FailMessage) - } - return nil -} - -func showStdoutResultsYAML(preflightName string, analyzeResults []*analyzerunner.AnalyzeResult, verbose bool, out io.Writer) error { - data := showStdoutResultsStructured(preflightName, analyzeResults, verbose) - if len(data.Pass) > 0 { - fmt.Fprintln(out, printer.BoldGreen("Pass items")) - if b, err := yaml.Marshal(data.Pass); err != nil { - return errors.Wrap(err, "failed to marshal results as yaml") - } else { - fmt.Fprintf(out, "%s", b) - } - } - if len(data.Warn) > 0 { - fmt.Fprintln(out, printer.BoldYellow("Warn items")) - if b, err := yaml.Marshal(data.Warn); err != nil { - return errors.Wrap(err, "failed to marshal results as yaml") - } else { - fmt.Fprintf(out, "%s", b) - } - } - if len(data.Fail) > 0 { - fmt.Fprintln(out, printer.BoldRed("Pass items")) - if b, err := yaml.Marshal(data.Fail); err != nil { - return errors.Wrap(err, "failed to marshal results as yaml") - } else { - fmt.Fprintf(out, "%s", b) - } - return errors.New(FailMessage) - } - return nil -} - -// showStdoutResultsStructured is Used by KBCLI, JSON and YAML outputs -func showStdoutResultsStructured(preflightName string, analyzeResults []*analyzerunner.AnalyzeResult, verbose bool) TextOutput { - output := NewTextOutput() - for _, analyzeResult := range analyzeResults { - resultOutput := NewTextResultOutput(analyzeResult.Title, analyzeResult.Message, analyzeResult.URI) - if analyzeResult.Strict { - resultOutput.Strict = analyzeResult.Strict - } - switch { - case analyzeResult.IsPass: - if verbose { - output.Pass = append(output.Pass, resultOutput) - } - case analyzeResult.IsWarn: - output.Warn = append(output.Warn, resultOutput) - case analyzeResult.IsFail: - output.Fail = append(output.Fail, resultOutput) - } - } - return output -} diff --git a/pkg/preflight/text_results_test.go b/pkg/preflight/text_results_test.go deleted file mode 100644 index 464e5fa93..000000000 --- a/pkg/preflight/text_results_test.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package preflight - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - "k8s.io/cli-runtime/pkg/genericiooptions" - - analyzerunner "github.com/replicatedhq/troubleshoot/pkg/analyze" -) - -var _ = Describe("text_results_test", func() { - var ( - preflightName = "stdoutPreflightName" - jsonFormat = "json" - yamlFormat = "yaml" - kbcliFormat = "kbcli" - unknownFormat = "unknown" - streams, _, _, _ = genericiooptions.NewTestIOStreams() - out = streams.Out - ) - It("ShowStdoutResults Test", func() { - analyzeResults := []*analyzerunner.AnalyzeResult{ - { - IsPass: true, - Title: "pass item", - Message: "message for pass test", - URI: "https://kubernetes.io", - }, - { - IsWarn: true, - Title: "warn item", - Message: "message for warn test", - URI: "https://kubernetes.io", - Strict: true, - }, - } - Eventually(func(g Gomega) { - err := ShowTextResults(preflightName, analyzeResults, jsonFormat, true, out) - g.Expect(err).NotTo(HaveOccurred()) - err = ShowTextResults(preflightName, analyzeResults, yamlFormat, false, out) - g.Expect(err).NotTo(HaveOccurred()) - err = ShowTextResults(preflightName, analyzeResults, kbcliFormat, false, out) - g.Expect(err).NotTo(HaveOccurred()) - err = ShowTextResults(preflightName, analyzeResults, unknownFormat, false, out) - g.Expect(err).To(HaveOccurred()) - }).ShouldNot(HaveOccurred()) - }) - It("ShowStdoutResults Test", func() { - analyzeResults := []*analyzerunner.AnalyzeResult{ - { - IsFail: true, - Title: "fail item", - Message: "message for fail test", - URI: "https://kubernetes.io", - }, - } - Eventually(func(g Gomega) { - err := ShowTextResults(preflightName, analyzeResults, jsonFormat, true, out) - g.Expect(err).NotTo(HaveOccurred()) - err = ShowTextResults(preflightName, analyzeResults, yamlFormat, false, out) - g.Expect(err).NotTo(HaveOccurred()) - err = ShowTextResults(preflightName, analyzeResults, kbcliFormat, false, out) - g.Expect(err).NotTo(HaveOccurred()) - err = ShowTextResults(preflightName, analyzeResults, unknownFormat, false, out) - g.Expect(err).To(HaveOccurred()) - }).Should(HaveOccurred()) - }) -}) diff --git a/pkg/preflight/util/schema.go b/pkg/preflight/util/schema.go deleted file mode 100644 index 74df2330d..000000000 --- a/pkg/preflight/util/schema.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package util - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - - preflightv1beta2 "github.com/apecloud/kubeblocks/externalapis/preflight/v1beta2" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - preflightv1beta2.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/pkg/preflight/util/suite_test.go b/pkg/preflight/util/suite_test.go deleted file mode 100644 index 5c77664c7..000000000 --- a/pkg/preflight/util/suite_test.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package util - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestUtil(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Util Suite") -} diff --git a/pkg/preflight/util/util.go b/pkg/preflight/util/util.go deleted file mode 100644 index d2d3b7780..000000000 --- a/pkg/preflight/util/util.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package util - -import ( - "strconv" - - "github.com/pkg/errors" - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - "github.com/replicatedhq/troubleshoot/pkg/multitype" -) - -// TitleOrDefault extracts titleName from metaInfo, and returns default if metaInfo is unhelpful -func TitleOrDefault[T troubleshoot.HostCollectorMeta | troubleshoot.AnalyzeMeta](meta T, defaultTitle string) string { - var title string - iMeta := (interface{})(meta) - switch tmp := iMeta.(type) { - case troubleshoot.HostCollectorMeta: - title = tmp.CollectorName - case troubleshoot.AnalyzeMeta: - title = tmp.CheckName - default: - } - if title == "" { - title = defaultTitle - } - return title -} - -func IsExcluded(excludeVal *multitype.BoolOrString) (bool, error) { - if excludeVal == nil { - return false, nil - } - if excludeVal.Type == multitype.Bool { - return excludeVal.BoolVal, nil - } - if excludeVal.StrVal == "" { - return false, nil - } - parsed, err := strconv.ParseBool(excludeVal.StrVal) - if err != nil { - return false, errors.Wrap(err, "failed to parse bool string") - } - return parsed, nil -} diff --git a/pkg/preflight/util/util_test.go b/pkg/preflight/util/util_test.go deleted file mode 100644 index 052063c54..000000000 --- a/pkg/preflight/util/util_test.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright (C) 2022-2026 ApeCloud Co., Ltd - -This file is part of KubeBlocks project - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . -*/ - -package util - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - "github.com/replicatedhq/troubleshoot/pkg/multitype" -) - -var _ = Describe("util_test", func() { - It("IsExcluded test", func() { - Eventually(func(g Gomega) { - By("tests with normal case, and expect success") - tests := []*multitype.BoolOrString{nil, {Type: 1, BoolVal: true, StrVal: ""}, {Type: 0, BoolVal: false, StrVal: "true"}, {Type: 0, BoolVal: false, StrVal: ""}} - var resList []bool - for _, test := range tests { - res, err := IsExcluded(test) - g.Expect(err).NotTo(HaveOccurred()) - resList = append(resList, res) - } - g.Expect(resList).Should(Equal([]bool{false, true, true, false})) - By("test with corner case, and expect error") - cornerTest := &multitype.BoolOrString{Type: 0, BoolVal: false, StrVal: "i am true"} - res, err := IsExcluded(cornerTest) - g.Expect(err).To(HaveOccurred()) - g.Expect(res).Should(Equal(false)) - }).Should(Succeed()) - }) - - It("TitleOrDefault test", func() { - Eventually(func(g Gomega) { - res := TitleOrDefault(troubleshoot.HostCollectorMeta{}, "default") - g.Expect(res).Should(Equal("default")) - res = TitleOrDefault(troubleshoot.HostCollectorMeta{CollectorName: "collectName"}, "default") - g.Expect(res).Should(Equal("collectName")) - res = TitleOrDefault(troubleshoot.AnalyzeMeta{}, "default") - g.Expect(res).Should(Equal("default")) - res = TitleOrDefault(troubleshoot.AnalyzeMeta{CheckName: "checkName"}, "default") - g.Expect(res).Should(Equal("checkName")) - }).Should(Succeed()) - }) - -}) diff --git a/pkg/testing/testdata/hostpreflight.yaml b/pkg/testing/testdata/hostpreflight.yaml deleted file mode 100644 index fae7f0d1c..000000000 --- a/pkg/testing/testdata/hostpreflight.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: kubeblocks_hostpreflight -spec: - collectors: - - cpu: { } - analyzers: - - cpu: - outcomes: - - fail: - when: "physical < 1" - message: At least 1 physical CPU cores are required - - fail: - when: "logical < 1" - message: At least 1 CPU cores are required - - warn: - when: "count < 16" - message: At least 16 CPU cores preferred - - pass: - message: This server has sufficient CPU cores diff --git a/pkg/testing/testdata/hostpreflight_nil.yaml b/pkg/testing/testdata/hostpreflight_nil.yaml deleted file mode 100644 index f79f30bd2..000000000 --- a/pkg/testing/testdata/hostpreflight_nil.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: HostPreflight -metadata: - name: kubeblocks_hostpreflight -spec: - collectors: - analyzers: - - cpu: - outcomes: - - fail: - when: "physical < 1" - message: At least 1 physical CPU cores are required - - fail: - when: "logical < 1" - message: At least 1 CPU cores are required - - warn: - when: "count < 16" - message: At least 16 CPU cores preferred - - pass: - message: This server has sufficient CPU cores diff --git a/pkg/testing/testdata/preflight.yaml b/pkg/testing/testdata/preflight.yaml deleted file mode 100644 index ecda7ef83..000000000 --- a/pkg/testing/testdata/preflight.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: troubleshoot.sh/v1beta2 -kind: Preflight -metadata: - name: kubeblocks_preflight -spec: - collectors: - - clusterInfo: {} - analyzers: - - clusterVersion: - checkName: Kubernetes Version - outcomes: - - fail: - when: "< 1.20.0" - message: This application requires at least Kubernetes 1.20.0 or later, and recommends 1.20.0. - uri: https://www.kubernetes.io - - warn: - when: "< 1.20.0" - message: Your cluster meets the minimum version of Kubernetes, but we recommend you update to 1.20.0 or later. - uri: https://kubernetes.io - - pass: - when: ">= 1.20.0" - message: Your cluster meets the recommended and required versions of Kubernetes. \ No newline at end of file