From ccc160095e75187a15936f12f45678ac71ae82df Mon Sep 17 00:00:00 2001 From: hys Date: Thu, 7 May 2026 16:28:10 +0800 Subject: [PATCH] fix: use oac and remove some unused code --- Dockerfile.server | 2 +- go.mod | 178 +-- go.sum | 587 ++++---- pkg/api/server/handlers_api.go | 4 +- pkg/api/server/handlers_cmd.go | 4 +- pkg/api/server/server.go | 2 +- pkg/api/server/utils.go | 16 +- pkg/appcfg/application.go | 17 +- pkg/development/application/cfg.go | 140 -- pkg/development/application/middleware.go | 40 - pkg/development/application/state.go | 31 +- pkg/development/command/cfg_validate.go | 6 +- pkg/development/command/command_test.go | 12 +- pkg/development/command/createapp.go | 1335 +---------------- pkg/development/command/createapp_dev.go | 4 +- .../command/createapp_helloword.go | 3 +- pkg/development/command/createapp_kompose.go | 51 +- .../command/createapp_onedocker.go | 183 +-- .../command/createapp_onedocker_test.go | 3 +- pkg/development/command/createapp_test.go | 37 - pkg/development/command/lint.go | 12 +- pkg/development/command/resources.go | 249 +++ pkg/development/command/utils.go | 4 +- pkg/development/envoy/sidecar.go | 4 +- pkg/services/chart_op.go | 7 +- pkg/store/db/operator.go | 55 +- pkg/utils/gpu.go | 76 + pkg/utils/sysversion.go | 34 + pkg/utils/utils.go | 23 +- pkg/utils/version/version.go | 68 + pkg/utils/version/version_test.go | 54 + pkg/webhook/funcs.go | 11 +- 32 files changed, 1049 insertions(+), 2203 deletions(-) delete mode 100644 pkg/development/application/cfg.go delete mode 100644 pkg/development/application/middleware.go delete mode 100644 pkg/development/command/createapp_test.go create mode 100644 pkg/development/command/resources.go create mode 100644 pkg/utils/gpu.go create mode 100644 pkg/utils/sysversion.go create mode 100644 pkg/utils/version/version.go create mode 100644 pkg/utils/version/version_test.go diff --git a/Dockerfile.server b/Dockerfile.server index 12a136a..2c351df 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -1,4 +1,4 @@ -FROM golang:1.24.0 AS builder +FROM golang:1.24.11 AS builder WORKDIR /workspace COPY go.mod . diff --git a/go.mod b/go.mod index ccda3b8..45c17b6 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,15 @@ module github.com/beclab/devbox -go 1.24.0 - -toolchain go1.24.11 +go 1.24.11 require ( github.com/AlecAivazis/survey/v2 v2.3.7 - github.com/Masterminds/semver/v3 v3.3.0 - github.com/containerd/containerd v1.7.6 - github.com/emicklei/go-restful/v3 v3.12.2 - github.com/envoyproxy/go-control-plane/envoy v1.32.4 + github.com/Masterminds/semver/v3 v3.4.0 + github.com/beclab/Olares/framework/oac v0.0.0-20260509033324-899cba323495 + github.com/beclab/api v0.0.5 + github.com/containerd/containerd v1.7.29 + github.com/emicklei/go-restful/v3 v3.13.0 + github.com/envoyproxy/go-control-plane/envoy v1.36.0 github.com/go-playground/validator/v10 v10.25.0 github.com/go-resty/resty/v2 v2.11.0 github.com/gofiber/fiber/v2 v2.49.2 @@ -23,39 +23,40 @@ require ( github.com/nats-io/nats.go v1.36.0 github.com/otiai10/copy v1.14.1 github.com/spf13/afero v1.11.0 - github.com/spf13/cobra v1.9.1 - github.com/spf13/pflag v1.0.7 - github.com/stretchr/testify v1.10.0 + github.com/spf13/cobra v1.10.1 + github.com/spf13/pflag v1.0.10 + github.com/stretchr/testify v1.11.1 github.com/thoas/go-funk v0.9.3 - google.golang.org/protobuf v1.36.5 + google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af gopkg.in/yaml.v2 v2.4.0 gorm.io/driver/postgres v1.5.11 gorm.io/gorm v1.25.10 - helm.sh/helm/v3 v3.13.3 - k8s.io/api v0.34.0 - k8s.io/apimachinery v0.34.0 - k8s.io/client-go v0.34.0 - k8s.io/klog/v2 v2.130.1 - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 + helm.sh/helm/v3 v3.19.5 + k8s.io/api v0.34.2 + k8s.io/apimachinery v0.34.2 + k8s.io/client-go v0.34.2 + k8s.io/klog/v2 v2.140.0 + k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 sigs.k8s.io/controller-runtime v0.22.0 sigs.k8s.io/yaml v1.6.0 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/andeya/ameda v1.5.3 // indirect - github.com/andeya/goutil v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/bytedance/go-tagexpr/v2 v2.9.11 // indirect github.com/compose-spec/compose-go/v2 v2.8.1 // indirect + github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect github.com/deckarep/golang-set v1.8.0 // indirect github.com/distribution/reference v0.6.0 // indirect + github.com/dlclark/regexp2 v1.12.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/fsouza/go-dockerclient v1.12.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect + github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-viper/mapstructure/v2 v2.3.0 // indirect @@ -66,81 +67,70 @@ require ( github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/user v0.3.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect github.com/novln/docker-parser v1.0.0 // indirect - github.com/nyaruka/phonenumbers v1.0.55 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/otiai10/mint v1.6.3 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect - github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xhit/go-str2duration/v2 v2.1.0 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/otel/metric v1.35.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.36.0 // indirect - golang.org/x/tools v0.27.0 // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/tools/godoc v0.1.0-deprecated // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + oras.land/oras-go/v2 v2.6.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect ) require ( - dario.cat/mergo v1.0.1 // indirect - github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect - github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect - github.com/BurntSushi/toml v1.4.0 // indirect + dario.cat/mergo v1.0.2 // indirect + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect + github.com/BurntSushi/toml v1.5.0 // 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/hcsshim v0.11.0 // indirect github.com/andybalholm/brotli v1.0.5 // indirect - github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect - github.com/beclab/oachecker v0.0.12 + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect - github.com/cyphar/filepath-securejoin v0.3.6 // indirect + github.com/chai2010/gettext-go v1.0.3 // indirect + github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect + github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect - github.com/docker/cli v25.0.1+incompatible // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v27.1.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.5.0 // indirect - github.com/docker/go-metrics v0.0.1 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect - github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/envoyproxy/protoc-gen-validate v1.3.0 // indirect + github.com/evanphx/json-patch v5.9.11+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/go-errors/errors v1.4.2 // indirect + github.com/go-errors/errors v1.5.1 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.23.0 // indirect - github.com/gobwas/glob v0.2.3 // indirect + github.com/go-openapi/jsonpointer v0.21.1 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.1 // indirect + github.com/gobwas/glob v0.2.4-0.20181002190808-e7a84e9525fe // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.2 // indirect github.com/google/btree v1.1.3 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/gorilla/mux v1.8.1 // indirect github.com/gosuri/uitable v0.0.4 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -153,7 +143,7 @@ require ( github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect - github.com/jmoiron/sqlx v1.3.5 // indirect + github.com/jmoiron/sqlx v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect @@ -164,18 +154,16 @@ require ( 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/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect - github.com/mattn/go-sqlite3 v1.14.17 // indirect + github.com/mailru/easyjson v0.9.0 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moby/locker v1.0.1 // indirect - github.com/moby/spdystream v0.5.0 // indirect - github.com/moby/term v0.5.0 // indirect + github.com/moby/spdystream v0.5.1 // indirect + github.com/moby/term v0.5.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect @@ -183,17 +171,17 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nwaples/rardecode v1.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pierrec/lz4/v4 v4.1.2 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.22.0 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect - github.com/rivo/uniseg v0.2.0 // indirect - github.com/rubenv/sql-migrate v1.5.2 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.23.0 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.65.0 // indirect + github.com/prometheus/procfs v0.16.1 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rubenv/sql-migrate v1.8.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect @@ -203,35 +191,29 @@ require ( github.com/valyala/fasthttp v1.49.0 // indirect github.com/valyala/fasttemplate v1.2.1 // indirect github.com/valyala/tcplisten v1.0.0 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xlab/treeprint v1.2.0 // indirect - go.opentelemetry.io/otel v1.35.0 // indirect - go.opentelemetry.io/otel/trace v1.35.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.30.0 // indirect - golang.org/x/text v0.23.0 // indirect - golang.org/x/time v0.9.0 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/term v0.39.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/time v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/grpc v1.72.1 // 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 gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/apiextensions-apiserver v0.34.0 // indirect - k8s.io/apiserver v0.34.0 // indirect - k8s.io/cli-runtime v0.33.1 // indirect - k8s.io/component-base v0.34.0 // indirect - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect - k8s.io/kubectl v0.33.1 // indirect - oras.land/oras-go v1.2.5 // indirect - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect - sigs.k8s.io/kustomize/api v0.19.0 // indirect - sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect + k8s.io/apiextensions-apiserver v0.34.2 // indirect + k8s.io/apiserver v0.34.2 // indirect + k8s.io/cli-runtime v0.34.2 // indirect + k8s.io/component-base v0.34.2 // indirect + k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect + k8s.io/kubectl v0.34.2 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect + sigs.k8s.io/kustomize/api v0.20.1 // indirect + sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect ) diff --git a/go.sum b/go.sum index 7c2c1c5..0107fdf 100644 --- a/go.sum +++ b/go.sum @@ -1,89 +1,89 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= -dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= -dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= +dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= +dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= 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/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= -github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +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 v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= +github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +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/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= -github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM= github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= 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.11.0 h1:7EFNIY4igHEXUdj1zXgAyU3fLc7QfOKHbkldRVTBdiM= -github.com/Microsoft/hcsshim v0.11.0/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/andeya/ameda v1.5.3 h1:SvqnhQPZwwabS8HQTRGfJwWPl2w9ZIPInHAw9aE1Wlk= -github.com/andeya/ameda v1.5.3/go.mod h1:FQDHRe1I995v6GG+8aJ7UIUToEmbdTJn/U26NCPIgXQ= -github.com/andeya/goutil v1.0.1 h1:eiYwVyAnnK0dXU5FJsNjExkJW4exUGn/xefPt3k4eXg= -github.com/andeya/goutil v1.0.1/go.mod h1:jEG5/QnnhG7yGxwFUX6Q+JGMif7sjdHmmNVjn7nhJDo= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/beclab/oachecker v0.0.12 h1:NajwJF87rgqHsliTpE3Bc1YRY3bTlnPRm/l4bEY1MNs= -github.com/beclab/oachecker v0.0.12/go.mod h1:zf+RkTQr83uCoOQ+9wtXVfvL7V+Ae/6wTXLwVo/6DPo= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +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/beclab/Olares/framework/oac v0.0.0-20260506141732-553492c74ed0 h1:ohMmGp9YWEdOa4Lz7+3BIgeUSj4IHBEdhFb2TemvwKI= +github.com/beclab/Olares/framework/oac v0.0.0-20260506141732-553492c74ed0/go.mod h1:AqzYNmWtzMUWJT7JHB+IQLFg3wySDxBhATEjI7b0KaY= +github.com/beclab/Olares/framework/oac v0.0.0-20260509033324-899cba323495 h1:eie7a0VwMpIxUhR2t4JKfQSQeVQr6zRSoj0SVZhNMYs= +github.com/beclab/Olares/framework/oac v0.0.0-20260509033324-899cba323495/go.mod h1:uCKpGAtSTN4UTgizY9DKfo7p346XXg5urs68eUJvewk= +github.com/beclab/api v0.0.4 h1:EPSMGtVorbbjpvNyW0qPNJSSHagFDErGF1H6FqxJzoo= +github.com/beclab/api v0.0.4/go.mod h1:okd0RExsvSsuW5MsRh7v56Xex3vi5B26xHOGH3LT6yQ= +github.com/beclab/api v0.0.5-0.20260507075751-2151a2924a84 h1:ZM3ZCRWxbeV6DDZmupX52Gwen/xc9CvFu0QNXG03ZQQ= +github.com/beclab/api v0.0.5-0.20260507075751-2151a2924a84/go.mod h1:okd0RExsvSsuW5MsRh7v56Xex3vi5B26xHOGH3LT6yQ= +github.com/beclab/api v0.0.5-0.20260507080603-f435a487306c h1:7Jf57yBtPQTnh7wGSsT6kp8L/TWJNE9PskFHhAVIR9c= +github.com/beclab/api v0.0.5-0.20260507080603-f435a487306c/go.mod h1:okd0RExsvSsuW5MsRh7v56Xex3vi5B26xHOGH3LT6yQ= +github.com/beclab/api v0.0.5-0.20260507133455-754b4bd139f8 h1:ahhtOdKbR7+FCN5jaIkC0CG3HNmBcEUSlbaXIM5ZcVo= +github.com/beclab/api v0.0.5-0.20260507133455-754b4bd139f8/go.mod h1:okd0RExsvSsuW5MsRh7v56Xex3vi5B26xHOGH3LT6yQ= +github.com/beclab/api v0.0.5-0.20260507153207-e0d7ef04a633 h1:KdUXcIgkB7EfMrU7y3M3tojKo2HNSaOGMyukVdBWjrM= +github.com/beclab/api v0.0.5-0.20260507153207-e0d7ef04a633/go.mod h1:okd0RExsvSsuW5MsRh7v56Xex3vi5B26xHOGH3LT6yQ= +github.com/beclab/api v0.0.5 h1:ulPsQIzvVP42M8GaNjRvcdAksMahdz7ItwYBaOHf19s= +github.com/beclab/api v0.0.5/go.mod h1:okd0RExsvSsuW5MsRh7v56Xex3vi5B26xHOGH3LT6yQ= 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/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/bytedance/go-tagexpr/v2 v2.9.11 h1:jJgmoDKPKacGl0llPYbYL/+/2N+Ng0vV0ipbnVssXHY= -github.com/bytedance/go-tagexpr/v2 v2.9.11/go.mod h1:UAyKh4ZRLBPGsyTRFZoPqTni1TlojMdOJXQnEIPCX84= +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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= -github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= -github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 h1:Om6kYQYDUk5wWbT0t0q6pvyM49i9XZAv9dDrkDA7gjk= -github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/chai2010/gettext-go v1.0.3 h1:9liNh8t+u26xl5ddmWLmsOsdNLwkdRTg5AG+JnTiM80= +github.com/chai2010/gettext-go v1.0.3/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= +github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 h1:6xNmx7iTtyBRev0+D/Tv1FZd4SCg8axKApyNyRsAt/w= +github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5/go.mod h1:KdCmV+x/BuvyMxRnYBlmVaq4OLiKW6iRQfvC62cvdkI= github.com/compose-spec/compose-go/v2 v2.8.1 h1:27O4dzyhiS/UEUKp1zHOHCBWD1WbxGsYGMNNaSejTk4= github.com/compose-spec/compose-go/v2 v2.8.1/go.mod h1:veko/VB7URrg/tKz3vmIAQDaz+CGiXH8vZsW79NmAww= -github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= -github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/containerd v1.7.6 h1:oNAVsnhPoy4BTPQivLgTzI9Oleml9l/+eYIDYXRCYo8= -github.com/containerd/containerd v1.7.6/go.mod h1:SY6lrkkuJT40BVNO37tlYTSnKJnP5AXBc0fhx0q+TJ4= -github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= -github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= +github.com/containerd/containerd v1.7.29 h1:90fWABQsaN9mJhGkoVnuzEY+o1XDPbg9BTC9QTAHnuE= +github.com/containerd/containerd v1.7.29/go.mod h1:azUkWcOvHrWvaiUjSQH0fjzuHIwSPg1WL5PshGP4Szs= +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/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= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= 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.3.6 h1:4d9N5ykBnSp5Xn2JkhocYDkOpURL/18CYMpo6xB9uWM= -github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= +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= @@ -92,20 +92,18 @@ github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsP github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= -github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/distribution/distribution/v3 v3.0.0 h1:q4R8wemdRQDClzoNNStftB2ZAfqOiN6UX90KJc4HjyM= +github.com/distribution/distribution/v3 v3.0.0/go.mod h1:tRNuFoZsUdyRVegq8xGNeds4KLjwLCRin/tTo6i1DhU= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI= -github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/cli v25.0.1+incompatible h1:mFpqnrS6Hsm3v1k7Wa/BO23oz0k121MTbTO1lpcGSkU= -github.com/docker/cli v25.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -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/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= +github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/docker/docker v27.1.2+incompatible h1:AhGzR1xaQIy53qCkxARaFluI00WPGtXn0AJuoQsVYTY= github.com/docker/docker v27.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= +github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8= +github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= @@ -114,31 +112,29 @@ github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQ github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= -github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= -github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -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/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/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane/envoy v1.36.0 h1:yg/JjO5E7ubRyKX3m07GF3reDNEnfOboJ0QySbH736g= +github.com/envoyproxy/go-control-plane/envoy v1.36.0/go.mod h1:ty89S1YCCVruQAm9OtKeEkQLTb+Lkz0k8v9W0Oxsv98= +github.com/envoyproxy/protoc-gen-validate v1.3.0 h1:TvGH1wof4H33rezVKWSpqKz5NXWg5VPuZ0uONDT6eb4= +github.com/envoyproxy/protoc-gen-validate v1.3.0/go.mod h1:HvYl7zwPa5mffgyeTUHA9zHIH36nmrm7oCbo4YKoSWA= +github.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb4Z+d1UQi45df52xW8= +github.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= -github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4= +github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= +github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= @@ -149,28 +145,24 @@ github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sa github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM= github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= +github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-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-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= +github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU= +github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= +github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= +github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -181,57 +173,40 @@ github.com/go-playground/validator/v10 v10.25.0 h1:5Dh7cjvzR7BRZadnsVOzPhWsrwUr0 github.com/go-playground/validator/v10 v10.25.0/go.mod h1:GGzBIJMuE98Ic/kJsBXbz1x/7cByt++cQ+YOuDM5wus= github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +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= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-viper/mapstructure/v2 v2.3.0 h1:27XbWsHIqhbdR5TIC911OfYvgSaW93HM+dX7970Q7jk= github.com/go-viper/mapstructure/v2 v2.3.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/gobuffalo/logger v1.0.6 h1:nnZNpxYo0zx+Aj9RfMPBm+x9zAU2OayFh/xrAWi34HU= -github.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs= -github.com/gobuffalo/packd v1.0.1 h1:U2wXfRr4E9DH8IdsDLlRFwTZTK7hLfq9qT/QHXGVe/0= -github.com/gobuffalo/packd v1.0.1/go.mod h1:PP2POP3p3RXGz7Jh6eYEf93S7vA2za6xM7QT85L4+VY= -github.com/gobuffalo/packr/v2 v2.8.3 h1:xE1yzvnO56cUC0sTpKR3DIbxZgB54AftTFMhB2XEWlY= -github.com/gobuffalo/packr/v2 v2.8.3/go.mod h1:0SahksCVcx4IMnigTjiFuyldmTrdTctXsOdiU5KwbKc= -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/gobwas/glob v0.2.4-0.20181002190808-e7a84e9525fe h1:zn8tqiUbec4wR94o7Qj3LZCAT6uGobhEgnDRg6isG5U= +github.com/gobwas/glob v0.2.4-0.20181002190808-e7a84e9525fe/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gofiber/fiber/v2 v2.49.2 h1:ONEN3/Vc+dUCxxDgZZwpqvhISgHqb+bu+isBiEyKEQs= github.com/gofiber/fiber/v2 v2.49.2/go.mod h1:gNsKnyrmfEWFpJxQAV0qvW6l70K1dZGno12oLtukcts= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= -github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= @@ -240,13 +215,17 @@ github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 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/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/arc/v2 v2.0.5 h1:l2zaLDubNhW4XO3LnliVj0GXO3+/CGNJAg1dcN2Fpfw= +github.com/hashicorp/golang-lru/arc/v2 v2.0.5/go.mod h1:ny6zBSQZi2JxIeYcv7kt2sH2PXJtirBN7RDhRpxPkxU= +github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= +github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= @@ -267,19 +246,14 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= -github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -291,13 +265,8 @@ github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYW github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kubernetes/kompose v1.37.0 h1:yWVvs6a/3BrihjIn44mfT6UDUPOVdSec2edEq7HJq0M= @@ -314,46 +283,34 @@ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhR github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI= -github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= -github.com/markbates/oncer v1.0.0 h1:E83IaVAHygyndzPimgUYJjbshhDTALZyXxvk9FOlQRY= -github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI= -github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/maruel/natural v1.1.0 h1:2z1NgP/Vae+gYrtC0VuvrTJ6U35OuyUqDdfluLqMWuQ= github.com/maruel/natural v1.1.0/go.mod h1:eFVhYCcUOfZFxXoDZam8Ktya72wa79fNC3lc/leA0DQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -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-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= -github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4= -github.com/miekg/dns v1.1.25 h1:dFwPR6SfLtrSwgDcIq2bcU/gVutB4sNApq2HBdqcakg= -github.com/miekg/dns v1.1.25/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.57 h1:Jzi7ApEIzwEPLHWRcafCN9LZSBbqQpxjt/wpgvg7wcM= +github.com/miekg/dns v1.1.57/go.mod h1:uqRjCRUuEAA6qsOiJvDd+CFo/vW+y5WR6SNmHE55hZk= 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-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= @@ -362,27 +319,21 @@ 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/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.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.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= -github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +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/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.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= -github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +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/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.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= @@ -392,7 +343,6 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 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/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU= @@ -405,16 +355,14 @@ github.com/novln/docker-parser v1.0.0 h1:PjEBd9QnKixcWczNGyEdfUrP6GR0YUilAqG7Wks github.com/novln/docker-parser v1.0.0/go.mod h1:oCeM32fsoUwkwByB5wVjsrsVQySzPWkl3JdlTn1txpE= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= -github.com/nyaruka/phonenumbers v1.0.55 h1:bj0nTO88Y68KeUQ/n3Lo2KgK7lM1hF7L9NFuwcCl3yg= -github.com/nyaruka/phonenumbers v1.0.55/go.mod h1:sDaTZ/KPX5f8qyV9qN+hIm+4ZBARJrupC6LuhshJq1U= -github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg= -github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= -github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw= -github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/ginkgo/v2 v2.25.2 h1:hepmgwx1D+llZleKQDMEvy8vIlCxMGt7W5ZxDjIEhsw= +github.com/onsi/ginkgo/v2 v2.25.2/go.mod h1:43uiyQC4Ed2tkOzLsEYm7hnrb7UJTWHYNsuy3bG/snE= +github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= +github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= -github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +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/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs= github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/otiai10/copy v1.14.1 h1:5/7E6qsUMBaH5AnQ0sSLzzTg1oTECmcCmT6lvF45Na8= @@ -427,63 +375,56 @@ github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1H github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4/v4 v4.1.2 h1:qvY3YFXRQE/XB8MlLzJH7mSzBs74eA2gg52YTk6jUPM= github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 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= github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -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/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= +github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE= +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.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= +github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 h1:EaDatTxkdHG+U3Bk4EUr+DZ7fOGwTfezUiUJMaIcaho= +github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5/go.mod h1:fyalQWdtzDBECAQFBJuQe5bzQ02jGd5Qcbgb97Flm7U= +github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 h1:EfpWLLCyXw8PSM2/XNJLjI3Pb27yVE+gIAfeqp8LUCc= +github.com/redis/go-redis/extra/redisotel/v9 v9.0.5/go.mod h1:WZjPDy7VNzn77AAfnAfVjZNvfJTYfPetfZk5yoSTLaQ= +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/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/rubenv/sql-migrate v1.5.2 h1:bMDqOnrJVV/6JQgQ/MxOpU+AdO8uzYYA/TxFUBzFtS0= -github.com/rubenv/sql-migrate v1.5.2/go.mod h1:H38GW8Vqf8F0Su5XignRyaRcbXbJunSWxs+kmzlg0Is= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/rubenv/sql-migrate v1.8.0 h1:dXnYiJk9k3wetp7GfQbKJcPHjVJL6YK19tKj8t2Ns0o= +github.com/rubenv/sql-migrate v1.8.0/go.mod h1:F2bGFBwCU+pnmbtNYDeKvSuvL6lBVtXDXUUv5t+u1qw= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 h1:PKK9DyHxif4LZo+uQSgXNqs0jj5+xZwwfKHgph2lxBw= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE= github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= -github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= +github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -492,16 +433,10 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.5/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.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.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/thoas/go-funk v0.9.3 h1:7+nAEx3kn5ZJcnDm2Bh23N2yOtweO14bi//dvRtgLpw= github.com/thoas/go-funk v0.9.3/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -515,13 +450,6 @@ github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVS github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= @@ -531,47 +459,78 @@ github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -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.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= -go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= -go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= -go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= -go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +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/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/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +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= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.8.0/go.mod h1:5KXybFvPGds3QinJWQT7pmXf+TN5YIa7CNYObWRkj50= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 h1:j7ZSD+5yn+lo3sGV69nW04rRR0jhYnBwjuX3r0HvnK0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0/go.mod h1:WXbYJTUaZXAbYd8lbgGuvih0yuCfOFC5RJoYnoLcGz8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 h1:t/Qur3vKSkUCcDVaSumWF2PKHt85pc7fRvFuoVT8qFU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0/go.mod h1:Rl61tySSdcOJWoEgYZVtmnKdA0GeKrSqkHC1t+91CH8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 h1:cMyu9O88joYEaI47CnQkxO1XZdpoTF9fEnW2duIddhw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0/go.mod h1:6Am3rn7P9TVVeXYG+wtcGE7IE1tsQ+bP3AuWcKt/gOI= +go.opentelemetry.io/otel/exporters/prometheus v0.54.0 h1:rFwzp68QMgtzu9PgP3jm9XaMICI6TsofWWPcBDKwlsU= +go.opentelemetry.io/otel/exporters/prometheus v0.54.0/go.mod h1:QyjcV9qDP6VeK5qPyKETvNjmaaEc7+gqjh4SS0ZYzDU= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.8.0 h1:CHXNXwfKWfzS65yrlB2PVds1IBZcdsX8Vepy9of0iRU= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.8.0/go.mod h1:zKU4zUgKiaRxrdovSS2amdM5gOc59slmo/zJwGX+YBg= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 h1:SZmDnHcgp3zwlPBS2JX2urGYe/jBKEIT6ZedHRUyCz8= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0/go.mod h1:fdWW0HtZJ7+jNpTKUR0GpMEDP69nR8YBJQxNiVCE3jk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.32.0 h1:cC2yDI3IQd0Udsux7Qmq8ToKAx1XCilTQECZ0KDZyTw= +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.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +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.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +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= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= +golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -580,27 +539,20 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= -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= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -611,20 +563,19 @@ golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= 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= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= +golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -632,44 +583,42 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= -golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk= +golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= -google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= -google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +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/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.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= +google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI= +google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -683,43 +632,43 @@ gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s= gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -helm.sh/helm/v3 v3.13.3 h1:0zPEdGqHcubehJHP9emCtzRmu8oYsJFRrlVF3TFj8xY= -helm.sh/helm/v3 v3.13.3/go.mod h1:3OKO33yI3p4YEXtTITN2+4oScsHeQe71KuzhlZ+aPfg= -k8s.io/api v0.34.0 h1:L+JtP2wDbEYPUeNGbeSa/5GwFtIA662EmT2YSLOkAVE= -k8s.io/api v0.34.0/go.mod h1:YzgkIzOOlhl9uwWCZNqpw6RJy9L2FK4dlJeayUoydug= -k8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc= -k8s.io/apiextensions-apiserver v0.34.0/go.mod h1:hLI4GxE1BDBy9adJKxUxCEHBGZtGfIg98Q+JmTD7+g0= -k8s.io/apimachinery v0.34.0 h1:eR1WO5fo0HyoQZt1wdISpFDffnWOvFLOOeJ7MgIv4z0= -k8s.io/apimachinery v0.34.0/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= -k8s.io/apiserver v0.34.0 h1:Z51fw1iGMqN7uJ1kEaynf2Aec1Y774PqU+FVWCFV3Jg= -k8s.io/apiserver v0.34.0/go.mod h1:52ti5YhxAvewmmpVRqlASvaqxt0gKJxvCeW7ZrwgazQ= -k8s.io/cli-runtime v0.33.1 h1:TvpjEtF71ViFmPeYMj1baZMJR4iWUEplklsUQ7D3quA= -k8s.io/cli-runtime v0.33.1/go.mod h1:9dz5Q4Uh8io4OWCLiEf/217DXwqNgiTS/IOuza99VZE= -k8s.io/client-go v0.34.0 h1:YoWv5r7bsBfb0Hs2jh8SOvFbKzzxyNo0nSb0zC19KZo= -k8s.io/client-go v0.34.0/go.mod h1:ozgMnEKXkRjeMvBZdV1AijMHLTh3pbACPvK7zFR+QQY= -k8s.io/component-base v0.34.0 h1:bS8Ua3zlJzapklsB1dZgjEJuJEeHjj8yTu1gxE2zQX8= -k8s.io/component-base v0.34.0/go.mod h1:RSCqUdvIjjrEm81epPcjQ/DS+49fADvGSCkIP3IC6vg= -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= -k8s.io/kubectl v0.33.1 h1:OJUXa6FV5bap6iRy345ezEjU9dTLxqv1zFTVqmeHb6A= -k8s.io/kubectl v0.33.1/go.mod h1:Z07pGqXoP4NgITlPRrnmiM3qnoo1QrK1zjw85Aiz8J0= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -oras.land/oras-go v1.2.5 h1:XpYuAwAb0DfQsunIyMfeET92emK8km3W4yEzZvUbsTo= -oras.land/oras-go v1.2.5/go.mod h1:PuAwRShRZCsZb7g8Ar3jKKQR/2A/qN+pkYxIOd/FAoo= +helm.sh/helm/v3 v3.19.5 h1:l8zDGBhPaF2z5pTR5ASku/yZwi0qZrWthWMzvf1ZruE= +helm.sh/helm/v3 v3.19.5/go.mod h1:PC1rk7PqacpkV4acUFMLStOOis7QM9Jq3DveHBInu4s= +k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= +k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= +k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo= +k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE= +k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= +k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/apiserver v0.34.2 h1:2/yu8suwkmES7IzwlehAovo8dDE07cFRC7KMDb1+MAE= +k8s.io/apiserver v0.34.2/go.mod h1:gqJQy2yDOB50R3JUReHSFr+cwJnL8G1dzTA0YLEqAPI= +k8s.io/cli-runtime v0.34.2 h1:cct1GEuWc3IyVT8MSCoIWzRGw9HJ/C5rgP32H60H6aE= +k8s.io/cli-runtime v0.34.2/go.mod h1:X13tsrYexYUCIq8MarCBy8lrm0k0weFPTpcaNo7lms4= +k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= +k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= +k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ= +k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM= +k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= +k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= +k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg= +k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0= +k8s.io/kubectl v0.34.2 h1:+fWGrVlDONMUmmQLDaGkQ9i91oszjjRAa94cr37hzqA= +k8s.io/kubectl v0.34.2/go.mod h1:X2KTOdtZZNrTWmUD4oHApJ836pevSl+zvC5sI6oO2YQ= +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU= +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= +oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc= +oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o= sigs.k8s.io/controller-runtime v0.22.0 h1:mTOfibb8Hxwpx3xEkR56i7xSjB+nH4hZG37SrlCY5e0= sigs.k8s.io/controller-runtime v0.22.0/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kustomize/api v0.19.0 h1:F+2HB2mU1MSiR9Hp1NEgoU2q9ItNOaBJl0I4Dlus5SQ= -sigs.k8s.io/kustomize/api v0.19.0/go.mod h1:/BbwnivGVcBh1r+8m3tH1VNxJmHSk1PzP5fkP6lbL1o= -sigs.k8s.io/kustomize/kyaml v0.19.0 h1:RFge5qsO1uHhwJsu3ipV7RNolC7Uozc0jUBC/61XSlA= -sigs.k8s.io/kustomize/kyaml v0.19.0/go.mod h1:FeKD5jEOH+FbZPpqUghBP8mrLjJ3+zD3/rf9NNu1cwY= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= +sigs.k8s.io/kustomize/api v0.20.1/go.mod h1:t6hUFxO+Ph0VxIk1sKp1WS0dOjbPCtLJ4p8aADLwqjM= +sigs.k8s.io/kustomize/kyaml v0.20.1 h1:PCMnA2mrVbRP3NIB6v9kYCAc38uvFLVs8j/CD567A78= +sigs.k8s.io/kustomize/kyaml v0.20.1/go.mod h1:0EmkQHRUsJxY8Ug9Niig1pUMSCGHxQ5RklbpV/Ri6po= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= -sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/pkg/api/server/handlers_api.go b/pkg/api/server/handlers_api.go index dbb8e55..a674a09 100644 --- a/pkg/api/server/handlers_api.go +++ b/pkg/api/server/handlers_api.go @@ -16,8 +16,8 @@ import ( "github.com/beclab/devbox/pkg/development/helm" "github.com/beclab/devbox/pkg/store/db" "github.com/beclab/devbox/pkg/store/db/model" + oac "github.com/beclab/Olares/framework/oac" "github.com/beclab/devbox/pkg/utils" - "github.com/beclab/oachecker" "github.com/emicklei/go-restful/v3" "github.com/go-resty/resty/v2" @@ -82,7 +82,7 @@ func (h *handlers) updateAppConfig(ctx *fiber.Ctx) error { path := getAppPath(username, app) appCfgPath := filepath.Join(path, constants.AppCfgFileName) - var appcfg oachecker.AppConfiguration + var appcfg oac.AppConfiguration err := ctx.BodyParser(&appcfg) if err != nil { klog.Error("read app cfg post data error, ", err) diff --git a/pkg/api/server/handlers_cmd.go b/pkg/api/server/handlers_cmd.go index cc3169e..222a480 100644 --- a/pkg/api/server/handlers_cmd.go +++ b/pkg/api/server/handlers_cmd.go @@ -1008,7 +1008,7 @@ func (h *handlers) fillApp(ctx *fiber.Ctx) error { "message": fmt.Sprintf("Bad Request: %v", errs), }) } - at := command.AppTemplate{} + at := command.NewAppTemplate(ctx.Context()) at.WithDockerCfg(&cfg).WithDockerDeployment(&cfg). WithDockerService(&cfg).WithDockerChartMetadata(&cfg).WithDockerOwner(&cfg) err = at.WriteDockerFile(&cfg, utils.GetAppPath(username, cfg.Name)) @@ -1181,7 +1181,7 @@ func (h *handlers) fillAppWithDevContainer(ctx *fiber.Ctx) error { appId, err := utils.UpdateDevApp(username, name, updates) if err != nil { - klog.Errorf("failed to update dev app %w,err=%v", name, err) + klog.Errorf("failed to update dev app %s,err=%v", name, err) return ctx.JSON(fiber.Map{ "code": http.StatusBadRequest, "message": fmt.Sprintf("update app err %v", err), diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go index be52e0d..9f371f4 100644 --- a/pkg/api/server/server.go +++ b/pkg/api/server/server.go @@ -90,7 +90,7 @@ func (s *server) Start() { command.Post("/apps/create", s.handlers.createApp) command.Post("/apps/:name/create", s.handlers.fillApp) - command.Post("/apps/:name/example/create", s.handlers.fillAppWithExample) + //command.Post("/apps/:name/example/create", s.handlers.fillAppWithExample) command.Post("/apps/:name/vscode/create", s.handlers.fillAppWithDevContainer) command.Post("/apps/kompose", s.handlers.createAppFromComposeFile) diff --git a/pkg/api/server/utils.go b/pkg/api/server/utils.go index 911d466..7dc6be0 100644 --- a/pkg/api/server/utils.go +++ b/pkg/api/server/utils.go @@ -9,9 +9,9 @@ import ( "path/filepath" "strings" + oac "github.com/beclab/Olares/framework/oac" "github.com/beclab/devbox/pkg/constants" "github.com/beclab/devbox/pkg/utils" - "github.com/beclab/oachecker" "github.com/mholt/archiver/v3" "k8s.io/klog/v2" @@ -43,7 +43,7 @@ func CheckDir(dirname string) error { return err } -func readCfgFromFile(owner, chartDir string) (*oachecker.AppConfiguration, error) { +func readCfgFromFile(owner, chartDir string) (*oac.AppConfiguration, error) { cfgFile := findAppCfgFile(chartDir) klog.Infof("readCfgFromFile: %s", cfgFile) if len(cfgFile) == 0 { @@ -56,7 +56,7 @@ func readCfgFromFile(owner, chartDir string) (*oachecker.AppConfiguration, error return appcfg, nil } -func readAppInfo(owner, cfgFile string) (*oachecker.AppConfiguration, error) { +func readAppInfo(owner, cfgFile string) (*oac.AppConfiguration, error) { f, err := os.Open(cfgFile) if err != nil { return nil, err @@ -73,13 +73,13 @@ func readAppInfo(owner, cfgFile string) (*oachecker.AppConfiguration, error) { if err != nil { return nil, err } - opts := []func(map[string]interface{}){ - oachecker.WithAdmin(admin), - oachecker.WithOwner(owner), + opts := []oac.Option{ + oac.WithAdmin(admin), + oac.WithOwner(owner), utils.WithIsAdmin(isAdmin), } - appcfg, err := oachecker.GetAppConfigurationFromContent(data, opts...) - return appcfg, nil + appcfg, err := oac.LoadAppConfigurationContent(data, opts...) + return appcfg, err } // findAppCfgFile find app.cfg path in untar path diff --git a/pkg/appcfg/application.go b/pkg/appcfg/application.go index b792e6e..71b6417 100644 --- a/pkg/appcfg/application.go +++ b/pkg/appcfg/application.go @@ -3,7 +3,8 @@ package appcfg import ( "time" - "github.com/beclab/oachecker" + appv1 "github.com/beclab/api/api/app.bytetrade.io/v1alpha1" + "github.com/beclab/api/manifest" "k8s.io/apimachinery/pkg/api/resource" ) @@ -58,19 +59,19 @@ type ApplicationConfig struct { Target string AppName string // name of application displayed on shortcut OwnerName string // name of owner who installed application - Entrances []oachecker.Entrance - Ports []oachecker.ServicePort + Entrances []appv1.Entrance + Ports []appv1.ServicePort Icon string // base64 icon data Permission []AppPermission // app permission requests Requirement AppRequirement Policies []AppPolicy - Middleware *oachecker.Middleware + Middleware *manifest.Middleware AnalyticsEnabled bool ResetCookieEnabled bool - Dependencies []oachecker.Dependency - AppScope oachecker.AppScope - WsConfig oachecker.WsConfig - Upload oachecker.Upload + Dependencies []manifest.Dependency + AppScope manifest.AppScope + WsConfig manifest.WsConfig + Upload manifest.Upload OnlyAdmin bool MobileSupported bool ApiTimeout *int64 diff --git a/pkg/development/application/cfg.go b/pkg/development/application/cfg.go deleted file mode 100644 index 7479158..0000000 --- a/pkg/development/application/cfg.go +++ /dev/null @@ -1,140 +0,0 @@ -package application - -type AppMetaData struct { - Name string `yaml:"name" json:"name"` - Icon string `yaml:"icon" json:"icon"` - Description string `yaml:"description" json:"description"` - AppID string `yaml:"appid,omitempty" json:"appid,omitempty"` - Title string `yaml:"title" json:"title"` - Version string `yaml:"version" json:"version"` - Categories []string `yaml:"categories,omitempty" json:"categories,omitempty"` - //Rating float32 `yaml:"rating,omitempty" json:"rating,omitempty"` - Target string `yaml:"target,omitempty" json:"target,omitempty"` -} - -type AppConfiguration struct { - ConfigVersion string `yaml:"olaresManifest.version" json:"olaresManifest.version"` - ConfigType string `yaml:"olaresManifest.type" json:"olaresManifest.type"` - Metadata AppMetaData `yaml:"metadata" json:"metadata"` - Entrances []Entrance `yaml:"entrances" json:"entrances"` - Spec AppSpec `yaml:"spec" json:"spec"` - Permission Permission `yaml:"permission,omitempty" json:"permission,omitempty" description:"app permission request"` - Middleware *Middleware `yaml:"middleware,omitempty" json:"middleware,omitempty" description:"app middleware request"` - Options Options `yaml:"options,omitempty" json:"options,omitempty" description:"app options"` -} - -type AppSpec struct { - VersionName string `yaml:"versionName,omitempty" json:"versionName,omitempty"` - FullDescription string `yaml:"fullDescription,omitempty" json:"fullDescription,omitempty"` - UpgradeDescription string `yaml:"upgradeDescription,omitempty" json:"upgradeDescription,omitempty"` - PromoteImage []string `yaml:"promoteImage,omitempty" json:"promoteImage,omitempty"` - PromoteVideo string `yaml:"promoteVideo,omitempty" json:"promoteVideo,omitempty"` - SubCategory string `yaml:"subCategory,omitempty" json:"subCategory,omitempty"` - Developer string `yaml:"developer,omitempty" json:"developer,omitempty"` - RequiredMemory string `yaml:"requiredMemory,omitempty" json:"requiredMemory,omitempty"` - RequiredDisk string `yaml:"requiredDisk,omitempty" json:"requiredDisk,omitempty"` - SupportClient *SupportClient `yaml:"supportClient,omitempty" json:"supportClient,omitempty"` - SupportArch []string `yaml:"supportArch" json:"supportArch"` - RequiredGPU string `yaml:"requiredGpu,omitempty" json:"requiredGpu,omitempty"` - RequiredCPU string `yaml:"requiredCpu,omitempty" json:"requiredCpu,omitempty"` - LimitedMemory string `yaml:"limitedMemory,omitempty" json:"limitedMemory"` - LimitedCPU string `yaml:"limitedCpu,omitempty" json:"limitedCpu,omitempty"` - - Language []string `yaml:"language,omitempty" json:"language,omitempty"` - Submitter string `yaml:"submitter,omitempty" json:"submitter,omitempty"` - Doc string `yaml:"doc,omitempty" json:"doc,omitempty"` - Website string `yaml:"website,omitempty" json:"website,omitempty"` - FeatureImage string `yaml:"featuredImage,omitempty" json:"featuredImage,omitempty"` - SourceCode string `yaml:"sourceCode,omitempty" json:"sourceCode,omitempty"` - License []TextAndURL `yaml:"license,omitempty" json:"license,omitempty"` - Legal []TextAndURL `yaml:"legal,omitempty" json:"legal,omitempty"` -} - -type TextAndURL struct { - Text string `yaml:"text" json:"text" bson:"text"` - URL string `yaml:"url" json:"url" bson:"url"` -} - -type SupportClient struct { - Edge string `yaml:"edge" json:"edge"` - Android string `yaml:"android" json:"android"` - Ios string `yaml:"ios" json:"ios"` - Windows string `yaml:"windows" json:"windows"` - Mac string `yaml:"mac" json:"mac"` - Linux string `yaml:"linux" json:"linux"` -} - -type Permission struct { - AppData bool `yaml:"appData,omitempty" json:"appData,omitempty" description:"app data permission for writing"` - AppCache bool `yaml:"appCache" json:"appCache"` - UserData []string `yaml:"userData" json:"userData"` - SysData []SysDataCfg `yaml:"sysData,omitempty" json:"sysData,omitempty" description:"system shared data permission for accessing"` -} - -type SysDataCfg struct { - Group string `yaml:"group" json:"group"` - DataType string `yaml:"dataType" json:"dataType"` - Version string `yaml:"version" json:"version"` - Ops []string `yaml:"ops" json:"ops"` -} - -type Policy struct { - EntranceName string `yaml:"entranceName" json:"entranceName"` - Description string `yaml:"description" json:"description" description:"the description of the policy"` - URIRegex string `yaml:"uriRegex" json:"uriRegex" description:"uri regular expression"` - Level string `yaml:"level" json:"level"` - OneTime bool `yaml:"oneTime" json:"oneTime"` - Duration string `yaml:"validDuration" json:"validDuration"` -} - -type Analytics struct { - Enabled bool `yaml:"enabled" json:"enabled"` -} - -type Dependency struct { - Name string `yaml:"name" json:"name"` - Version string `yaml:"version" json:"version"` - // dependency type: system, application. - Type string `yaml:"type" json:"type"` -} - -type ResetCookie struct { - Enabled bool `yaml:"enabled" json:"enabled"` -} - -type Options struct { - Policies []Policy `yaml:"policies,omitempty" json:"policies,omitempty"` - Analytics Analytics `yaml:"analytics" json:"analytics"` - ResetCookie ResetCookie `yaml:"resetCookie" json:"resetCookie"` - Dependencies []Dependency `yaml:"dependencies,omitempty" json:"dependencies,omitempty"` - AppScope AppScope `yaml:"appScope" json:"appScope"` - WsConfig *WsConfig `yaml:"websocket,omitempty" json:"websocket,omitempty"` - Upload *Upload `yaml:"upload,omitempty" json:"upload,omitempty"` -} - -type AppScope struct { - ClusterScoped bool `yaml:"clusterScoped" json:"clusterScoped"` - AppRef []string `yaml:"appRef" json:"appRef"` -} - -type Entrance struct { - Name string `yaml:"name" json:"name"` - Host string `yaml:"host" json:"host"` - Port int32 `yaml:"port" json:"port"` - Icon string `yaml:"icon,omitempty" json:"icon,omitempty"` - Title string `yaml:"title" json:"title"` - AuthLevel string `yaml:"authLevel,omitempty" json:"authLevel,omitempty"` - Invisible bool `yaml:"invisible,omitempty" json:"invisible,omitempty"` - OpenMethod string `yaml:"openMethod" json:"openMethod"` -} - -type WsConfig struct { - Port int `yaml:"port" json:"port"` - URL string `yaml:"url" json:"url"` -} - -type Upload struct { - FileType []string `yaml:"fileType" json:"fileType"` - Dest string `yaml:"dest" json:"dest"` - LimitedSize int `yaml:"limitedSize" json:"limitedSize"` -} diff --git a/pkg/development/application/middleware.go b/pkg/development/application/middleware.go deleted file mode 100644 index bd70052..0000000 --- a/pkg/development/application/middleware.go +++ /dev/null @@ -1,40 +0,0 @@ -package application - -type Middleware struct { - Postgres *PostgresConfig `yaml:"postgres,omitempty" json:"postgres,omitempty"` - Redis *RedisConfig `yaml:"redis,omitempty" json:"redis,omitempty"` - MongoDB *MongodbConfig `yaml:"mongodb,omitempty" json:"mongodb,omitempty"` - ZincSearch *ZincSearchConfig `yaml:"zincSearch,omitempty" json:"zincSearch,omitempty"` -} - -type Database struct { - Name string `json:"name"` - Distributed bool `json:"distributed,omitempty"` -} - -type PostgresConfig struct { - Username string `yaml:"username" json:"username"` - Password string `yaml:"password,omitempty" json:"password,omitempty"` - Databases []Database `yaml:"databases" json:"databases"` -} - -type RedisConfig struct { - Password string `yaml:"password,omitempty" json:"password,omitempty"` - Namespace string `yaml:"namespace" json:"namespace"` -} - -type MongodbConfig struct { - Username string `yaml:"username" json:"username"` - Password string `yaml:"password,omitempty" json:"password,omitempty"` - Databases []Database `yaml:"databases" json:"databases"` -} - -type ZincSearchConfig struct { - Username string `yaml:"username" json:"username"` - Password string `yaml:"password,omitempty" json:"password,omitempty"` - Indexes []Index `yaml:"indexes" json:"indexes"` -} - -type Index struct { - Name string `yaml:"name" json:"name"` -} diff --git a/pkg/development/application/state.go b/pkg/development/application/state.go index 149cd5d..d80277f 100644 --- a/pkg/development/application/state.go +++ b/pkg/development/application/state.go @@ -1,6 +1,7 @@ package application import ( + appv1 "github.com/beclab/api/api/app.bytetrade.io/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -16,32 +17,6 @@ type Operate struct { Source string `json:"source"` } -type ApplicationManagerState string +type ApplicationManagerState = appv1.ApplicationManagerState -var ( - Pending ApplicationManagerState = "pending" - Installing ApplicationManagerState = "installing" - Upgrading ApplicationManagerState = "upgrading" - Uninstalling ApplicationManagerState = "uninstalling" - Canceled ApplicationManagerState = "canceled" - Failed ApplicationManagerState = "failed" - Completed ApplicationManagerState = "completed" - Suspend ApplicationManagerState = "suspend" - - Processing ApplicationManagerState = "processing" -) - -func (a ApplicationManagerState) String() string { - return string(a) -} - -type OpType string - -var ( - Install OpType = "install" - Uninstall OpType = "uninstall" - Upgrade OpType = "upgrade" - SuspendApp OpType = "suspend" - ResumeApp OpType = "resume" - Cancel OpType = "cancel" -) +type OpType = appv1.OpType diff --git a/pkg/development/command/cfg_validate.go b/pkg/development/command/cfg_validate.go index 6536b88..0e47bf8 100644 --- a/pkg/development/command/cfg_validate.go +++ b/pkg/development/command/cfg_validate.go @@ -4,7 +4,7 @@ import ( "context" "path/filepath" - "github.com/beclab/oachecker" + oac "github.com/beclab/Olares/framework/oac" ) type checkCfg struct { @@ -21,6 +21,6 @@ func (c *checkCfg) WithDir(dir string) *checkCfg { } func (c *checkCfg) Run(ctx context.Context, owner, chart string) error { - err := oachecker.CheckChart(filepath.Join(c.baseCommand.dir, owner, chart)) - return err + chartPath := filepath.Join(c.baseCommand.dir, owner, chart) + return oac.Lint(chartPath) } diff --git a/pkg/development/command/command_test.go b/pkg/development/command/command_test.go index 673feff..468dd4f 100644 --- a/pkg/development/command/command_test.go +++ b/pkg/development/command/command_test.go @@ -9,18 +9,8 @@ import ( "k8s.io/klog/v2" ) -func TestCreateApp(t *testing.T) { - err := CreateApp().WithDir("/tmp").Run(context.Background(), &CreateConfig{Name: "testdev"}, "") - if err != nil { - klog.Error(err) - t.Fail() - } else { - t.Log("run CreateApp command success") - } -} - func TestInstall(t *testing.T) { - _, err := Install().Run(context.Background(), "newapp", "test", "", "0.0.1") + err := Install().Run(context.Background(), "newapp", "test", "", "0.0.1") if err != nil { klog.Error(err) t.Fail() diff --git a/pkg/development/command/createapp.go b/pkg/development/command/createapp.go index 7111f19..f326603 100644 --- a/pkg/development/command/createapp.go +++ b/pkg/development/command/createapp.go @@ -3,1049 +3,49 @@ package command import ( "context" "encoding/json" - "fmt" - "io/ioutil" - "k8s.io/klog/v2" - "os" - "path/filepath" - "strconv" - "strings" - - "github.com/beclab/devbox/pkg/utils" - "github.com/beclab/oachecker" - - "github.com/AlecAivazis/survey/v2" - "github.com/Masterminds/semver/v3" - "github.com/beclab/devbox/pkg/constants" - "github.com/jedib0t/go-pretty/v6/table" + oac "github.com/beclab/Olares/framework/oac" "helm.sh/helm/v3/pkg/chart" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - rbacv1 "k8s.io/api/rbac/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/yaml" ) const ( - defaultIcon = "https://app.cdn.olares.com/appstore/default/defaulticon.webp" - traefik = "traefik" - appKubernetesName = "app.kubernetes.io/name" - appKubernetesInstance = "app.kubernetes.io/instance" + defaultIcon = "https://app.cdn.olares.com/appstore/default/defaulticon.webp" ) -type CreateConfig struct { - Title string `json:"title"` - Name string `json:"name"` - Type string `json:"type"` - - SystemDB bool `json:"systemDB,omitempty"` - Redis bool `json:"redis,omitempty"` - MongoDB bool `json:"mongodb,omitempty"` - PostgreSQL bool `json:"postgreSQL,omitempty"` - - SystemCall bool `json:"systemCall,omitempty"` - - Img string `json:"img"` - Ports []int `json:"ports,omitempty"` - - IngressRouter bool `json:"ingressRouter,omitempty"` - Traefik bool `json:"traefik,omitempty"` - WebsitePort string `json:"websitePort,omitempty"` - EntranceHost string `json:"entranceHost,omitempty"` - - AppData bool `json:"appData,omitempty"` - AppCache bool `json:"appCache,omitempty"` - UserData []string `json:"userData,omitempty"` - - NeedGPU bool `json:"needGpu,omitempty"` - RequiredGPU string `json:"requiredGpu,omitempty"` - RequiredMemory string `json:"requiredMemory,omitempty"` - RequiredDisk string `json:"requiredDisk,omitempty"` - RequiredCPU string `json:"requiredCpu,omitempty"` - LimitedMemory string `json:"limitedMemory,omitempty"` - LimitedCPU string `json:"limitedCpu,omitempty"` - OSVersion string `json:"osVersion"` - - DevEnv string `json:"devEnv"` -} - -type createApp struct { - baseCommand -} - -func CreateApp() *createApp { - return &createApp{ - *newBaseCommand(), - } -} - -func (c *createApp) WithDir(dir string) *createApp { - c.baseCommand.withDir(dir) - return c -} - -func (c *createApp) Run(ctx context.Context, cfg *CreateConfig, owner string) error { - at := AppTemplate{} - at.WithAppCfg(cfg).WithDeployment(cfg).WithService(cfg).WithChartMetadata(cfg).WithOwner(cfg) - if cfg.Traefik { - at.WithTraefik(cfg) - } - - return at.WriteFile(cfg, owner) -} - type AppTemplate struct { - appCfg *oachecker.AppConfiguration + appCfg *oac.AppConfiguration deployment *appsv1.Deployment services []*corev1.Service chartMetadata *chart.Metadata - traefik *Traefik owner *Owner -} -type Owner struct { -} + // useNewSchema is set once at the entry of Run-style commands by + // inspecting the cluster's Terminus CR. When true, the builder writes the + // new-schema OlaresManifest layout (ConfigVersion 0.12.0, + // spec.resources[Mode=cpu], no spec.requiredX/limitedX); when false the + // legacy layout is used. + useNewSchema bool -type Traefik struct { - sa *corev1.ServiceAccount - pvc *corev1.PersistentVolumeClaim - role *rbacv1.Role - roleBinding *rbacv1.RoleBinding - svc *corev1.Service - deployment *appsv1.Deployment + // ctx is captured at construction so later builder methods can issue + // cluster lookups (e.g. GPU type discovery) that respect the caller's + // cancellation. It is never nil; NewAppTemplate substitutes + // context.Background() when given a nil ctx. + ctx context.Context } -func (at *AppTemplate) WithAppCfg(cfg *CreateConfig) *AppTemplate { - appRef := make([]string, 0) - configType := cfg.Type - if configType == "" { - configType = "app" - } - appcfg := oachecker.AppConfiguration{ - ConfigVersion: "0.8.0", - ConfigType: configType, - Metadata: oachecker.AppMetaData{ - Name: cfg.Name, - Icon: defaultIcon, - Description: fmt.Sprintf("app %s", cfg.Name), - AppID: cfg.Name, - Version: "0.0.1", - Title: cfg.Name, - Categories: []string{"dev"}, - }, - Spec: oachecker.AppSpec{ - RequiredMemory: "100Mi", - RequiredCPU: "50m", - RequiredDisk: "50Mi", - LimitedMemory: "1000Mi", - LimitedCPU: "1000m", - VersionName: "0.0.1", - SupportArch: []string{"amd64", "arm64"}, - }, - Options: oachecker.Options{ - AppScope: &oachecker.AppScope{ - AppRef: appRef, - }, - }, +// NewAppTemplate returns an AppTemplate with useNewSchema initialised by +// detecting the cluster's Terminus CR version. Use this at every entry point +// that builds an AppTemplate so the schema choice stays consistent. +func NewAppTemplate(ctx context.Context) *AppTemplate { + if ctx == nil { + ctx = context.Background() } - entrances := make([]oachecker.Entrance, 0) - name := cfg.Name - port, _ := strconv.Atoi(cfg.WebsitePort) - - if cfg.IngressRouter { - if cfg.Traefik { - name = "traefik" - } else { - name = "" - } - } - entrances = append(entrances, oachecker.Entrance{ - Name: name, - Host: func() string { - if cfg.EntranceHost != "" { - return cfg.EntranceHost - } - return name - }(), - Port: int32(port), - Title: cfg.Name, - Icon: defaultIcon, - AuthLevel: "private", - OpenMethod: "default", - }) - - appcfg.Entrances = entrances - - if cfg.AppData { - appcfg.Permission.AppData = true - } - if cfg.AppCache { - appcfg.Permission.AppCache = true - } - if len(cfg.UserData) > 0 { - appcfg.Permission.UserData = cfg.UserData - } else { - appcfg.Permission.UserData = make([]string, 0) - } - - middleware := oachecker.Middleware{} - if cfg.SystemDB { - if cfg.Redis { - middleware.Redis = &oachecker.RedisConfig{ - Namespace: "redis", - } - } - if cfg.MongoDB { - middleware.MongoDB = &oachecker.MongodbConfig{ - Username: "root", - Databases: []oachecker.Database{ - { - Name: cfg.Name, - }, - }, - } - } - if cfg.PostgreSQL { - middleware.Postgres = &oachecker.PostgresConfig{ - Username: "postgres", - Databases: []oachecker.Database{ - { - Name: cfg.Name, - Distributed: true, - }, - }, - } - } - } - - if cfg.NeedGPU && cfg.RequiredGPU != "" { - appcfg.Spec.RequiredGPU = cfg.RequiredGPU - } - if cfg.RequiredMemory != "" { - appcfg.Spec.RequiredMemory = cfg.RequiredMemory - } - - if cfg.RequiredDisk != "" { - appcfg.Spec.RequiredDisk = cfg.RequiredDisk - } - - if cfg.RequiredCPU != "" { - appcfg.Spec.RequiredCPU = cfg.RequiredCPU - } - - if cfg.LimitedMemory != "" { - appcfg.Spec.LimitedMemory = cfg.LimitedMemory - } - - if cfg.LimitedCPU != "" { - appcfg.Spec.LimitedCPU = cfg.LimitedCPU - } - requiredCPU, _ := resource.ParseQuantity(appcfg.Spec.RequiredCPU) - requiredMemory, _ := resource.ParseQuantity(appcfg.Spec.RequiredMemory) - limitedCPU, _ := resource.ParseQuantity(appcfg.Spec.LimitedCPU) - limitedMemory, _ := resource.ParseQuantity(appcfg.Spec.LimitedMemory) - - if requiredCPU.Cmp(limitedCPU) > 0 { - appcfg.Spec.LimitedCPU = appcfg.Spec.RequiredCPU - } - - if requiredMemory.Cmp(limitedMemory) > 0 { - appcfg.Spec.LimitedMemory = appcfg.Spec.RequiredMemory - } - - if cfg.OSVersion != "" { - if appcfg.Options.Dependencies == nil { - dependencies := make([]oachecker.Dependency, 0) - appcfg.Options.Dependencies = &dependencies - } - *appcfg.Options.Dependencies = []oachecker.Dependency{ - { - Name: "olares", - Type: "system", - Version: cfg.OSVersion, - }, - } - } - at.appCfg = &appcfg - return at -} - -func (at *AppTemplate) WithDeployment(cfg *CreateConfig) *AppTemplate { - replicas := int32(1) - requestCPU, _ := resource.ParseQuantity(at.appCfg.Spec.RequiredCPU) - requestMemory, _ := resource.ParseQuantity(at.appCfg.Spec.RequiredMemory) - limitedCPU, _ := resource.ParseQuantity(at.appCfg.Spec.LimitedCPU) - limitedMemory, _ := resource.ParseQuantity(at.appCfg.Spec.LimitedMemory) - - deployment := appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: cfg.Name, - Namespace: "{{ .Release.Namespace }}", - Labels: map[string]string{ - "io.kompose.service": cfg.Name, - }, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: &replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "io.kompose.service": cfg.Name, - }, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "io.kompose.network/chrome-default": "true", - "io.kompose.service": cfg.Name, - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Name: cfg.Name, - Image: cfg.Img, - Resources: corev1.ResourceRequirements{ - Requests: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: requestCPU, - corev1.ResourceMemory: requestMemory, - }, - Limits: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: limitedCPU, - corev1.ResourceMemory: limitedMemory, - }, - }, - }, - }, - RestartPolicy: corev1.RestartPolicyAlways, - }, - }, - }, - } - ports := make([]corev1.ContainerPort, 0) - for _, port := range cfg.Ports { - ports = append(ports, corev1.ContainerPort{ - ContainerPort: int32(port), - }) - } - deployment.Spec.Template.Spec.Containers[0].Ports = ports - - env := []corev1.EnvVar{ - { - Name: "PGID", - Value: "1000", - }, - { - Name: "PUID", - Value: "1000", - }, - { - Name: "TZ", - Value: "Etc/UTC", - }, - } - if cfg.MongoDB { - mongoEnv := []corev1.EnvVar{ - { - Name: "MONGODB_HOST", - Value: "{{ .Values.mongodb.host }}", - }, - { - Name: "MONGODB_PORT", - Value: "{{ .Values.mongodb.port }}", - }, - { - Name: "MONGODB_USER", - Value: "{{ .Values.mongodb.username }}", - }, - { - Name: "MONGODB_PASS", - Value: "{{ .Values.mongodb.password }}", - }, - { - Name: "MONGODB_DBNAME", - Value: "{{ .Values.mongodb.databases." + cfg.Name + " }}", - }, - } - env = append(env, mongoEnv...) - } - if cfg.PostgreSQL { - postgresEnv := []corev1.EnvVar{ - { - Name: "PG_HOST", - Value: "{{ .Values.postgres.host }}", - }, - { - Name: "PG_PORT", - Value: "{{ .Values.postgres.port }}", - }, - { - Name: "PG_USER", - Value: "{{ .Values.postgres.username }}", - }, - { - Name: "PG_PASS", - Value: "{{ .Values.postgres.password }}", - }, - { - Name: "PG_DBNAME", - Value: "{{ .Values.postgres.databases." + cfg.Name + " }}", - }, - } - env = append(env, postgresEnv...) - } - if cfg.Redis { - redisEnv := []corev1.EnvVar{ - { - Name: "REDIS_HOST", - Value: "{{ .Values.redis.host }}", - }, - { - Name: "REDIS_PORT", - Value: "{{ .Values.redis.port }}", - }, - { - Name: "REDIS_USER", - Value: "{{ .Values.redis.username }}", - }, - { - Name: "REDIS_PASS", - Value: "{{ .Values.redis.password }}", - }, - } - env = append(env, redisEnv...) - } - deployment.Spec.Template.Spec.Containers[0].Env = env - - volumeMounts := make([]corev1.VolumeMount, 0) - klog.Info("cfg.AppCache: ", cfg.AppCache) - //if cfg.AppCache { - // volumeMounts = append(volumeMounts, corev1.VolumeMount{ - // Name: "appcache", - // MountPath: "/appcache", - // }) - //} - //if len(cfg.UserData) > 0 { - // volumeMounts = append(volumeMounts, corev1.VolumeMount{ - // Name: "userdata", - // MountPath: "/userdata", - // }) - //} - if len(volumeMounts) > 0 { - deployment.Spec.Template.Spec.Containers[0].VolumeMounts = volumeMounts - } - - volumes := make([]corev1.Volume, 0) - //t := corev1.HostPathDirectoryOrCreate - //if cfg.AppCache { - // volumes = append(volumes, corev1.Volume{ - // Name: "appcache", - // VolumeSource: corev1.VolumeSource{ - // HostPath: &corev1.HostPathVolumeSource{ - // Type: &t, - // Path: "{{ .Values.userspace.appCache }}/" + cfg.Name, - // }, - // }, - // }) - //} - - //if len(cfg.UserData) > 0 { - // volumes = append(volumes, corev1.Volume{ - // Name: "userdata", - // VolumeSource: corev1.VolumeSource{ - // HostPath: &corev1.HostPathVolumeSource{ - // Type: &t, - // Path: "{{ .Values.userspace.userData }}", - // }, - // }, - // }) - //} - if len(volumes) > 0 { - deployment.Spec.Template.Spec.Volumes = volumes - } - at.deployment = &deployment - return at - -} - -func (at *AppTemplate) WithService(cfg *CreateConfig) *AppTemplate { - service := corev1.Service{ - TypeMeta: metav1.TypeMeta{ - Kind: "Service", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "io.kompose.service": cfg.Name, - }, - Name: cfg.Name, - Namespace: "{{ .Release.Namespace }}", - }, - Spec: corev1.ServiceSpec{ - Selector: map[string]string{ - "io.kompose.service": cfg.Name, - }, - }, - Status: corev1.ServiceStatus{ - LoadBalancer: corev1.LoadBalancerStatus{}, - }, - } - ports := make([]corev1.ServicePort, 0) - for _, port := range cfg.Ports { - ports = append(ports, corev1.ServicePort{ - Name: strconv.Itoa(port), - Port: int32(port), - TargetPort: intstr.Parse(strconv.Itoa(port)), - }) - } - if len(ports) > 0 { - service.Spec.Ports = ports - } - at.services = append(at.services, &service) - return at -} - -func (at *AppTemplate) WithChartMetadata(cfg *CreateConfig) *AppTemplate { - metadata := chart.Metadata{ - APIVersion: "v2", - Name: cfg.Name, - Description: "description", - Type: "application", - Version: "0.0.1", - AppVersion: "0.0.1", - } - at.chartMetadata = &metadata - return at + return &AppTemplate{useNewSchema: detectNewSchema(ctx), ctx: ctx} } -func (at *AppTemplate) WithOwner(cfg *CreateConfig) *AppTemplate { - at.owner = &Owner{} - return at -} - -func (at *AppTemplate) WithTraefik(cfg *CreateConfig) *AppTemplate { - sa := &corev1.ServiceAccount{ - TypeMeta: metav1.TypeMeta{ - Kind: "ServiceAccount", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: traefik, - Namespace: "{{ .Release.Namespace }}", - Labels: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - }, - } - storage, _ := resource.ParseQuantity("5G") - pvc := &corev1.PersistentVolumeClaim{ - TypeMeta: metav1.TypeMeta{ - Kind: "PersistentVolumeClaim", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: traefik, - Namespace: "{{ .Release.Namespace }}", - Labels: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - }, - Spec: corev1.PersistentVolumeClaimSpec{ - AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, - Resources: corev1.VolumeResourceRequirements{ - Requests: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceStorage: storage, - }, - }, - }, - } - role := &rbacv1.Role{ - TypeMeta: metav1.TypeMeta{ - Kind: "Role", - APIVersion: "rbac.authorization.k8s.io/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: traefik + "-" + "{{ .Release.Namespace }}", - Namespace: "{{ .Release.Namespace }}", - Labels: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - }, - Rules: []rbacv1.PolicyRule{ - { - APIGroups: []string{ - "extensions", - "networking.k8s.io", - }, - Resources: []string{ - "ingressclasses", - "ingresses", - }, - Verbs: []string{ - "get", - "list", - "watch", - }, - }, - { - APIGroups: []string{""}, - Resources: []string{"services", "endpoints", "secrets"}, - Verbs: []string{"get", "list", "watch"}, - }, - { - APIGroups: []string{"extensions", "networking.k8s.io"}, - Resources: []string{"ingresses/status"}, - Verbs: []string{"update"}, - }, - { - APIGroups: []string{"traefik.containo.us"}, - Resources: []string{ - "ingressroutes", - "ingressroutetcps", - "ingressrouteudps", - "middlewares", - "middlewaretcps", - "tlsoptions", - "tlsstores", - "traefikservices", - "serverstransports", - }, - Verbs: []string{"get", "list", "watch"}, - }, - }, - } - - roleBinding := &rbacv1.RoleBinding{ - TypeMeta: metav1.TypeMeta{ - Kind: "RoleBinding", - APIVersion: "rbac.authorization.k8s.io/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: traefik + "-" + "{{ .Release.Namespace }}", - Namespace: "{{ .Release.Namespace }}", - Labels: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - }, - RoleRef: rbacv1.RoleRef{ - APIGroup: "rbac.authorization.k8s.i", - Kind: "Role", - Name: traefik + "-" + "{{ .Release.Namespace }}", - }, - Subjects: []rbacv1.Subject{ - { - Kind: "ServiceAccount", - Name: traefik, - Namespace: "{{ .Release.Namespace }}", - }, - }, - } - - svc := &corev1.Service{ - TypeMeta: metav1.TypeMeta{ - Kind: "Service", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: traefik, - Namespace: "{{ .Release.Namespace }}", - Labels: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - }, - Spec: corev1.ServiceSpec{ - Type: corev1.ServiceTypeClusterIP, - Selector: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - Ports: []corev1.ServicePort{ - { - Name: traefik, - Port: int32(9000), - TargetPort: intstr.Parse("traefik"), - Protocol: corev1.ProtocolTCP, - }, - { - Name: traefik, - Port: int32(80), - TargetPort: intstr.Parse("web"), - Protocol: corev1.ProtocolTCP, - }, - { - Name: "websecure", - Port: int32(443), - TargetPort: intstr.Parse("websecure"), - Protocol: corev1.ProtocolTCP, - }, - }, - }, - } - replicas := int32(1) - maxSurge := intstr.Parse("1") - maxUnavailable := intstr.Parse("0") - terminationGracePeriodSeconds := int64(60) - requestCPU, _ := resource.ParseQuantity("50m") - requestMemory, _ := resource.ParseQuantity("200Mi") - limitedCPU, _ := resource.ParseQuantity("1000m") - limitedMemory, _ := resource.ParseQuantity("2Gi") - readOnlyRootFilesystem := true - runAsGroup := int64(0) - runAsNonRoot := false - runAsUser := int64(0) - fsGroup := int64(65532) - - deployment := &appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: traefik, - Namespace: "{{ .Release.Namespace }}", - Labels: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: &replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - }, - Strategy: appsv1.DeploymentStrategy{ - Type: appsv1.RollingUpdateDeploymentStrategyType, - RollingUpdate: &appsv1.RollingUpdateDeployment{ - MaxSurge: &maxSurge, - MaxUnavailable: &maxUnavailable, - }, - }, - MinReadySeconds: int32(0), - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - "prometheus.io/scrape": "true", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "9100", - }, - Labels: map[string]string{ - appKubernetesName: traefik, - appKubernetesInstance: traefik + "-" + "{{ .Release.Namespace }}", - }, - }, - Spec: corev1.PodSpec{ - ServiceAccountName: traefik, - TerminationGracePeriodSeconds: &terminationGracePeriodSeconds, - HostNetwork: false, - Containers: []corev1.Container{ - { - Name: traefik, - Image: "traefik:v2.9.7", - ImagePullPolicy: corev1.PullIfNotPresent, - Resources: corev1.ResourceRequirements{ - Requests: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: requestCPU, - corev1.ResourceMemory: requestMemory, - }, - Limits: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: limitedCPU, - corev1.ResourceMemory: limitedMemory, - }, - }, - ReadinessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/ping", - Port: intstr.Parse("8080"), - Scheme: corev1.URISchemeHTTP, - }, - }, - FailureThreshold: int32(1), - InitialDelaySeconds: int32(2), - PeriodSeconds: int32(10), - SuccessThreshold: int32(1), - TimeoutSeconds: int32(2), - }, - LivenessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/ping", - Port: intstr.Parse("8080"), - Scheme: corev1.URISchemeHTTP, - }, - }, - FailureThreshold: int32(3), - InitialDelaySeconds: int32(2), - PeriodSeconds: int32(10), - SuccessThreshold: int32(1), - TimeoutSeconds: int32(2), - }, - Ports: []corev1.ContainerPort{ - { - Name: "metrics", - ContainerPort: 9100, - Protocol: corev1.ProtocolTCP, - }, - { - Name: traefik, - ContainerPort: 8080, - Protocol: corev1.ProtocolTCP, - }, - { - Name: "web", - ContainerPort: 80, - Protocol: corev1.ProtocolTCP, - }, - { - Name: "websecure", - ContainerPort: 443, - Protocol: corev1.ProtocolTCP, - }, - }, - SecurityContext: &corev1.SecurityContext{ - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"NET_BIND_SERVICE"}, - Drop: []corev1.Capability{"ALL"}, - }, - ReadOnlyRootFilesystem: &readOnlyRootFilesystem, - RunAsGroup: &runAsGroup, - RunAsNonRoot: &runAsNonRoot, - RunAsUser: &runAsUser, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "data", - MountPath: "/data", - }, - { - Name: "tmp", - MountPath: "/tmp", - }, - }, - Args: []string{ - "--global.checknewversion", - "--global.sendanonymoususage", - "--entrypoints.metrics.address=:9100/tcp", - "--entrypoints.traefik.address=:8080/tcp", - "--entrypoints.web.address=:80/tcp", - "--entrypoints.websecure.address=:443/tcp", - "--api.dashboard=true", - "--ping=true", - "--metrics.prometheus=true", - "--metrics.prometheus.entrypoint=metrics", - "--providers.kubernetescrd", - "--providers.kubernetesingress=true", - "--providers.kubernetescrd.namespaces={{ .Release.Namespace }", - "--providers.kubernetesingress.namespaces={{ .Release.Namespace }}", - "--entrypoints.websecure.http.tls=true", - "--entrypoints.websecure.http.tls.domains[0].main=olares.com", - "--entrypoints.websecure.http.tls.domains[0].sans=*.olares.com", - "--log.level=DEBUG", - "--accesslog=true", - "--accesslog.fields.defaultmode=keep", - "--accesslog.fields.headers.defaultmode=drop", - "--serversTransport.insecureSkipVerify=true", - "--api.insecure=true", - "--api.dashboard=true", - }, - }, - }, - Volumes: []corev1.Volume{ - { - Name: "data", - VolumeSource: corev1.VolumeSource{ - PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{ - ClaimName: traefik, - }, - }, - }, - { - Name: "tmp", - VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, - }, - }, - }, - SecurityContext: &corev1.PodSecurityContext{ - FSGroup: &fsGroup, - }, - }, - }, - }, - } - - at.traefik = &Traefik{ - sa: sa, - pvc: pvc, - role: role, - roleBinding: roleBinding, - svc: svc, - deployment: deployment, - } - return at -} - -func (at *AppTemplate) WriteFile(cfg *CreateConfig, owner string) (err error) { - path := utils.GetAppPath(owner, cfg.Name) - if existDir(path) { - return os.ErrExist - } - createPath := filepath.Join(path, "templates") - err = os.MkdirAll(createPath, os.ModePerm) - if err != nil { - klog.Errorf("failed to mkdir path %s err=%v", createPath, err) - return err - } - if at.appCfg != nil { - yml, err := ToYaml(at.appCfg) - if err != nil { - klog.Errorf("failed to convert appCfg to yaml %v", err) - return err - } - filename := filepath.Join(path, constants.AppCfgFileName) - err = ioutil.WriteFile(filename, yml, 0644) - if err != nil { - klog.Errorf("failed to write file %s err=%v", filename, err) - return err - } - } - if at.chartMetadata != nil { - yml, err := ToYaml(at.chartMetadata) - if err != nil { - klog.Errorf("failed to convert chart metadata to yaml %v", err) - return err - } - filename := filepath.Join(path, "Chart.yaml") - err = ioutil.WriteFile(filename, yml, 0644) - if err != nil { - klog.Errorf("failed to write file %s, err=%v", filename, err) - return err - } - } - - if at.owner != nil { - filename := filepath.Join(path, "owners") - err = ioutil.WriteFile(filename, []byte{}, 0644) - if err != nil { - klog.Errorf("failed to write file %s, err=%v", filename, err) - return err - } - } - var yml []byte - if at.deployment != nil { - yml, err = ToYaml(at.deployment) - if err != nil { - klog.Errorf("failed to convert deployment to yaml %v", err) - return err - } - - } - var sep = []byte("\n---\n") - for _, svc := range at.services { - serviceYml, err := ToYaml(svc) - if err != nil { - klog.Errorf("failed to convert service to yaml %v", err) - return err - } - yml = append(yml, sep...) - yml = append(yml, serviceYml...) - - } - - filename := filepath.Join(path, "templates", "deployment.yaml") - err = ioutil.WriteFile(filename, yml, 0644) - if err != nil { - klog.Errorf("failed to write file %s, err=%v", filename, err) - return err - } - filename = filepath.Join(path, "values.yaml") - err = ioutil.WriteFile(filename, nil, 0644) - if err != nil { - klog.Errorf("failed to write file %s, err=%v", filename, err) - return err - } - if cfg.Traefik { - err = at.WriteTraefikFile(path) - } - - return err -} - -func (at *AppTemplate) WriteTraefikFile(path string) error { - var sep = []byte("\n---\n") - - // ServiceAccount - yml, err := ToYaml(at.traefik.sa) - if err != nil { - klog.Errorf("failed to convert traefik.sa to yaml %v", err) - return err - } - source := []byte("# Source: traefik/templates/rbac/serviceaccount.yaml\n") - yml = append(append(source, yml...), sep...) - - // PersistentVolumeClaim - pvcYml, err := ToYaml(at.traefik.pvc) - if err != nil { - klog.Errorf("failed to convert traefik.pvc to yaml %v", err) - return err - } - source = []byte("# Source: traefik/templates/pvc.yaml\n") - yml = append(append(yml, source...), pvcYml...) - yml = append(yml, sep...) - - // Role - roleYml, err := ToYaml(at.traefik.role) - if err != nil { - klog.Errorf("failed to convert traefik.role to yaml %v", err) - return err - } - source = []byte("# Source: traefik/templates/rbac/clusterrole.yaml\n") - yml = append(append(yml, source...), roleYml...) - yml = append(yml, sep...) - - // RoleBinding - roleBindingYml, err := ToYaml(at.traefik.roleBinding) - if err != nil { - klog.Errorf("failed to convert traefik.roleBinding to yaml %v", err) - return err - } - source = []byte("# Source: traefik/templates/rbac/clusterrolebinding.yaml\n") - yml = append(append(yml, source...), roleBindingYml...) - yml = append(yml, sep...) - - // Service - svcYml, err := ToYaml(at.traefik.svc) - if err != nil { - klog.Errorf("failed to convert traefik.svc to yaml %v", err) - return err - } - source = []byte("# Source: traefik/templates/service.yaml\n") - yml = append(append(yml, source...), svcYml...) - yml = append(yml, sep...) - - // Deployment - deploymentYml, err := ToYaml(at.traefik.deployment) - if err != nil { - return err - } - source = []byte("# Source: traefik/templates/deployment.yaml\n") - yml = append(append(yml, source...), deploymentYml...) - - err = ioutil.WriteFile(filepath.Join(path, "templates", "traefik.yaml"), yml, 0644) - return err +type Owner struct { } func ToYaml(v any) ([]byte, error) { @@ -1059,294 +59,3 @@ func ToYaml(v any) ([]byte, error) { } return yml, err } - -func SetCreateConfigByPrompt() (*CreateConfig, error) { - cfg := &CreateConfig{} - yes, no := "yes", "no" - options := []string{yes, no} - - promptAppName := survey.Input{Message: "please enter application name:"} - err := survey.AskOne(&promptAppName, &cfg.Name, survey.WithValidator(survey.Required)) - if err != nil { - return nil, err - } - - promptSysDB := survey.Select{ - Message: "do you need system db?", - Options: options, - Default: no, - } - var systemDB string - err = survey.AskOne(&promptSysDB, &systemDB) - if err != nil { - return nil, err - } - - if systemDB == yes { - cfg.SystemDB = true - } - if cfg.SystemDB { - selectedDB := make([]string, 0) - - promptDB := survey.MultiSelect{ - Message: "pick databases", - Options: []string{"Redis", "Mongodb", "PostgreSQL"}, - } - err = survey.AskOne(&promptDB, &selectedDB) - if err != nil { - return nil, err - } - for _, db := range selectedDB { - if db == "Redis" { - cfg.Redis = true - } - if db == "Mongodb" { - cfg.MongoDB = true - } - if db == "PostgreSQL" { - cfg.PostgreSQL = true - } - } - } - - promptSysCall := survey.Select{ - Message: "do you need any API from other Applications?", - Options: options, - Default: no, - } - var systemCall string - err = survey.AskOne(&promptSysCall, &systemCall) - if err != nil { - return nil, err - } - if systemCall == yes { - cfg.SystemCall = true - } - - promptImage := survey.Input{ - Message: "please enter a mirror of the main program:", - } - err = survey.AskOne(&promptImage, &cfg.Img, survey.WithValidator(survey.Required)) - if err != nil { - return nil, err - } - - promptPort := survey.Input{ - Message: "which ports do you want to enable", - Help: "separated with comma,like 80,443", - } - var portStr string - err = survey.AskOne(&promptPort, &portStr, survey.WithValidator(func(s interface{}) error { - ports := strings.Split(s.(string), ",") - for _, port := range ports { - _, e := strconv.Atoi(port) - if e != nil { - return e - } - } - return nil - })) - if err != nil { - return nil, err - } - for _, p := range strings.Split(portStr, ",") { - port, _ := strconv.Atoi(p) - cfg.Ports = append(cfg.Ports, port) - } - - var ingressRouter string - promptIngress := survey.Select{ - Message: "do you need a IngressRouter inside your Application?", - Options: options, - Default: no, - } - err = survey.AskOne(&promptIngress, &ingressRouter) - if err != nil { - return nil, err - } - if ingressRouter == yes { - cfg.IngressRouter = true - } - - if cfg.IngressRouter { - var ingress string - promptRouter := survey.Select{ - Message: "pick a router", - Options: []string{"Traefik"}, - } - err = survey.AskOne(&promptRouter, &ingress) - if err != nil { - return nil, err - } - if ingress == "Traefik" { - cfg.Traefik = true - } - } else { - ports := make([]string, 0) - for _, p := range cfg.Ports { - ports = append(ports, strconv.Itoa(p)) - } - if len(ports) > 1 { - promptWebPort := survey.Select{ - Message: "pick a port for website", - Options: ports, - } - err = survey.AskOne(&promptWebPort, &cfg.WebsitePort) - if err != nil { - return nil, err - } - } else { - cfg.WebsitePort = strconv.Itoa(cfg.Ports[0]) - } - } - - var appData string - promptAppData := survey.Select{ - Message: "do you need something files on local only you can visit", - Options: options, - Default: no, - } - err = survey.AskOne(&promptAppData, &appData) - if err != nil { - return nil, err - } - if appData == yes { - cfg.AppData = true - } - - var userData string - promptUserData := survey.Select{ - Message: "do you want visit users data", - Options: options, - } - err = survey.AskOne(&promptUserData, &userData) - if err != nil { - return nil, err - } - if userData == yes { - cfg.UserData = []string{} - } - - var needGpu string - promptGpu := survey.Select{ - Message: "do you need gpu", - Options: options, - Default: no, - } - err = survey.AskOne(&promptGpu, &needGpu) - if err != nil { - return nil, err - } - if needGpu == yes { - cfg.NeedGPU = true - } - if cfg.NeedGPU { - promptRequiredGPU := survey.Input{ - Message: "What size gpu do you need? (G)", - } - err = survey.AskOne(&promptRequiredGPU, &cfg.RequiredGPU) - if err != nil { - return nil, err - } - } - - promptRequiredMemory := survey.Input{ - Message: "How much memory your application needs? (G)", - } - err = survey.AskOne(&promptRequiredMemory, &cfg.RequiredMemory) - if err != nil { - return nil, err - } - - var osVersion string - promptOsVersion := survey.Input{ - Message: "The minimum system version you support? (eg: 0.3.0-0) or need a max version you can enter , (eg: 0.4.0-0)", - } - err = survey.AskOne(&promptOsVersion, &osVersion, survey.WithValidator(survey.Required), survey.WithValidator(func(obj interface{}) error { - s := obj.(string) - var version string - versions := strings.Split(s, ",") - version = ">= " + versions[0] - if len(versions) > 1 { - version = version + " <=" + versions[1] - } - _, e := semver.NewConstraint(version) - return e - })) - if err != nil { - return nil, err - } - versions := strings.Split(osVersion, ",") - cfg.OSVersion = ">= " + versions[0] - if len(versions) > 1 { - cfg.OSVersion = cfg.OSVersion + " <=" + versions[1] - } - - var specialOsVersion string - promptOsVersion2 := survey.Input{ - Message: "Do you support some special version?", - } - err = survey.AskOne(&promptOsVersion2, &specialOsVersion, survey.WithValidator(func(obj interface{}) error { - s := obj.(string) - if len(s) == 0 { - return nil - } - var version string - for _, v := range strings.Split(s, ",") { - if len(version) > 0 { - version += "|| " - } - version = version + "=" + v - } - _, e := semver.NewConstraint(version) - return e - })) - if err != nil { - return nil, err - } - if len(specialOsVersion) != 0 { - for _, v := range strings.Split(specialOsVersion, ",") { - cfg.OSVersion = cfg.OSVersion + "|| =" + v - } - } - - printTable(cfg) - return cfg, nil -} - -func printTable(cfg *CreateConfig) { - t := table.NewWriter() - t.SetOutputMirror(os.Stdout) - t.AppendHeader(table.Row{"Field", "Value"}) - t.AppendRows([]table.Row{ - {"name", cfg.Name}, - {"systemDB", cfg.SystemDB}, - {"redis", cfg.Redis}, - {"mongodb", cfg.MongoDB}, - {"postgreSQL", cfg.PostgreSQL}, - {"systemCall", cfg.SystemCall}, - {"img", cfg.Img}, - {"ports", cfg.Ports}, - {"ingressRouter", cfg.IngressRouter}, - {"traefik", cfg.Traefik}, - {"appData", cfg.AppData}, - {"userData", cfg.UserData}, - {"needGpu", cfg.NeedGPU}, - - {"requiredMemory", cfg.RequiredMemory}, - {"osVersion", cfg.OSVersion}, - }) - if len(cfg.WebsitePort) > 0 { - t.AppendRows([]table.Row{ - {"websitePort", cfg.WebsitePort}, - }) - } - if cfg.NeedGPU { - t.AppendRows([]table.Row{ - {"requiredGpu", cfg.RequiredGPU}, - }) - } - t.AppendSeparator() - t.SetStyle(table.StyleLight) - t.Render() -} diff --git a/pkg/development/command/createapp_dev.go b/pkg/development/command/createapp_dev.go index 4856be4..d93574e 100644 --- a/pkg/development/command/createapp_dev.go +++ b/pkg/development/command/createapp_dev.go @@ -1,6 +1,8 @@ package command import ( + "context" + "github.com/beclab/devbox/pkg/utils" ) @@ -57,7 +59,7 @@ func CreateAppWithDevConfig(cfg *CreateDevContainerConfig, owner, name string) e } localConfig.SshEnable = cfg.SshEnable } - at := AppTemplate{} + at := NewAppTemplate(context.Background()) at.WithDockerCfg(&localConfig).WithDockerDeployment(&localConfig). WithDockerService(&localConfig).WithDockerChartMetadata(&localConfig).WithDockerOwner(&localConfig) err := at.WriteDockerFile(&localConfig, appPath) diff --git a/pkg/development/command/createapp_helloword.go b/pkg/development/command/createapp_helloword.go index e0b24d9..2212c8d 100644 --- a/pkg/development/command/createapp_helloword.go +++ b/pkg/development/command/createapp_helloword.go @@ -1,6 +1,7 @@ package command import ( + "context" "fmt" "github.com/beclab/devbox/pkg/utils" @@ -9,7 +10,7 @@ import ( ) func CreateAppWithHelloWorldConfig(owner, name string, cfg *CreateWithHelloConfig) error { - at := &AppTemplate{} + at := NewAppTemplate(context.Background()) createConfigExample := &CreateWithOneDockerConfig{ Title: cfg.Title, Name: name, diff --git a/pkg/development/command/createapp_kompose.go b/pkg/development/command/createapp_kompose.go index 098b91c..667f1b1 100644 --- a/pkg/development/command/createapp_kompose.go +++ b/pkg/development/command/createapp_kompose.go @@ -1,6 +1,7 @@ package command import ( + "context" "errors" "fmt" "io/ioutil" @@ -10,9 +11,11 @@ import ( "strings" "sync" + oac "github.com/beclab/Olares/framework/oac" + appv1 "github.com/beclab/api/api/app.bytetrade.io/v1alpha1" + "github.com/beclab/api/manifest" "github.com/beclab/devbox/pkg/constants" "github.com/beclab/devbox/pkg/utils" - "github.com/beclab/oachecker" "helm.sh/helm/v3/pkg/chart" appsv1 "k8s.io/api/apps/v1" @@ -57,10 +60,11 @@ func writeManifest(opts *KomposeFileOpts, totalRequests, totalLimits corev1.Reso if configType == "" { configType = "app" } - appcfg := oachecker.AppConfiguration{ - ConfigVersion: "0.8.0", + useNewSchema := detectNewSchema(context.Background()) + appcfg := oac.AppConfiguration{ + ConfigVersion: configVersionFor(useNewSchema), ConfigType: configType, - Metadata: oachecker.AppMetaData{ + Metadata: manifest.AppMetaData{ Name: opts.Name, Icon: defaultIcon, Description: fmt.Sprintf("app %s", opts.Name), @@ -69,35 +73,30 @@ func writeManifest(opts *KomposeFileOpts, totalRequests, totalLimits corev1.Reso Title: opts.Cfg.Title, Categories: []string{"dev"}, }, - Spec: oachecker.AppSpec{ - RequiredMemory: func() string { - q := totalRequests[corev1.ResourceMemory] - return q.String() - }(), - RequiredCPU: func() string { - q := totalRequests[corev1.ResourceCPU] - return q.String() - }(), - RequiredDisk: "50Mi", - LimitedMemory: func() string { - q := totalLimits[corev1.ResourceMemory] - return q.String() - }(), - LimitedCPU: func() string { - q := totalLimits[corev1.ResourceCPU] - return q.String() - }(), + Spec: manifest.AppSpec{ VersionName: "0.0.1", SupportArch: []string{"amd64", "arm64"}, }, - Options: oachecker.Options{ - AppScope: &oachecker.AppScope{ + Options: manifest.Options{ + AppScope: manifest.AppScope{ AppRef: appRef, }, }, } - entrances := make([]oachecker.Entrance, 0) - entrances = append(entrances, oachecker.Entrance{ + cpuReq := totalRequests[corev1.ResourceCPU] + memReq := totalRequests[corev1.ResourceMemory] + cpuLim := totalLimits[corev1.ResourceCPU] + memLim := totalLimits[corev1.ResourceMemory] + applyAppResources(&appcfg.Spec, useNewSchema, oac.ManifestResourceLimits{ + RequiredCPU: cpuReq.String(), + RequiredMemory: memReq.String(), + RequiredDisk: "50Mi", + LimitedDisk: "5Gi", + LimitedCPU: cpuLim.String(), + LimitedMemory: memLim.String(), + }) + entrances := make([]appv1.Entrance, 0) + entrances = append(entrances, appv1.Entrance{ Name: opts.Name, Host: opts.EntranceHost, Port: opts.EntrancePort, diff --git a/pkg/development/command/createapp_onedocker.go b/pkg/development/command/createapp_onedocker.go index bda6c9a..6a0b36b 100644 --- a/pkg/development/command/createapp_onedocker.go +++ b/pkg/development/command/createapp_onedocker.go @@ -1,19 +1,23 @@ package command import ( + "context" "encoding/json" "fmt" "io/ioutil" + "k8s.io/klog/v2" "os" "path/filepath" "strconv" "strings" "unicode" + oac "github.com/beclab/Olares/framework/oac" + appv1 "github.com/beclab/api/api/app.bytetrade.io/v1alpha1" + "github.com/beclab/api/manifest" "github.com/beclab/devbox/pkg/appcfg" "github.com/beclab/devbox/pkg/constants" "github.com/beclab/devbox/pkg/utils" - "github.com/beclab/oachecker" jvalidator "github.com/go-playground/validator/v10" "helm.sh/helm/v3/pkg/chart" @@ -24,11 +28,11 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" ) -var vendorGpuMap = map[string]string{ - "nvidia": "nvidia.com/gpu", - "amd": "amd.com/gpu", - "intel": "gpu.intel.com/i915", -} +//var vendorGpuMap = map[string]string{ +// "nvidia": "nvidia.com/gpu", +// "amd": "amd.com/gpu", +// "intel": "gpu.intel.com/i915", +//} var validate = jvalidator.New() @@ -83,7 +87,7 @@ func (c *createWithOneDocker) WithDir(dir string) *createWithOneDocker { } func (c *createWithOneDocker) Run(cfg *CreateWithOneDockerConfig, owner string) error { - at := AppTemplate{} + at := NewAppTemplate(context.Background()) at.WithDockerCfg(cfg).WithDockerDeployment(cfg).WithDockerService(cfg).WithDockerChartMetadata(cfg).WithDockerOwner(cfg) appPath := utils.GetAppPath(owner, cfg.Name) @@ -105,10 +109,11 @@ func (at *AppTemplate) checkMountPath(mounts map[string]string, prefix string) b func (at *AppTemplate) WithDockerCfg(config *CreateWithOneDockerConfig) *AppTemplate { configType := "app" - appcfg := oachecker.AppConfiguration{ - ConfigVersion: "0.8.0", + appcfg := oac.AppConfiguration{ + APIVersion: "v1", + ConfigVersion: configVersionFor(at.useNewSchema), ConfigType: configType, - Metadata: oachecker.AppMetaData{ + Metadata: manifest.AppMetaData{ Name: config.Name, Icon: defaultIcon, Description: fmt.Sprintf("app %s", config.Name), @@ -117,14 +122,9 @@ func (at *AppTemplate) WithDockerCfg(config *CreateWithOneDockerConfig) *AppTemp Title: config.Title, Categories: []string{"Utilities"}, }, - Spec: oachecker.AppSpec{ - RequiredMemory: config.RequiredMemory, - RequiredCPU: config.RequiredCpu, - RequiredDisk: "50Mi", - LimitedMemory: config.LimitedMemory, - LimitedCPU: config.LimitedCpu, - VersionName: "0.0.1", - SupportArch: []string{"amd64", "arm64"}, + Spec: manifest.AppSpec{ + VersionName: "0.0.1", + SupportArch: []string{"amd64", "arm64"}, }, } @@ -140,18 +140,18 @@ func (at *AppTemplate) WithDockerCfg(config *CreateWithOneDockerConfig) *AppTemp } } - //middleware := oachecker.Middleware{} - appcfg.Middleware = &oachecker.Middleware{} + //middleware := manifest.Middleware{} + appcfg.Middleware = &manifest.Middleware{} if config.NeedRedis { - appcfg.Middleware.Redis = &oachecker.RedisConfig{ + appcfg.Middleware.Redis = &manifest.RedisConfig{ Namespace: "redis", } } if config.NeedPg { - appcfg.Middleware.Postgres = &oachecker.PostgresConfig{ + appcfg.Middleware.Postgres = &manifest.PostgresConfig{ Username: "postgres", - Databases: []oachecker.Database{ + Databases: []manifest.Database{ { Name: config.Name, Distributed: true, @@ -160,11 +160,11 @@ func (at *AppTemplate) WithDockerCfg(config *CreateWithOneDockerConfig) *AppTemp } } - entrances := make([]oachecker.Entrance, 0) + entrances := make([]appv1.Entrance, 0) name := config.Name //port := config.Container.Port - entrances = append(entrances, oachecker.Entrance{ + entrances = append(entrances, appv1.Entrance{ Name: name, Host: name, Port: int32(config.Container.Port), @@ -179,7 +179,7 @@ func (at *AppTemplate) WithDockerCfg(config *CreateWithOneDockerConfig) *AppTemp if err != nil { continue } - entrances = append(entrances, oachecker.Entrance{ + entrances = append(entrances, appv1.Entrance{ Name: fmt.Sprintf("%s-dev-%s", name, portStr), Host: name, Port: int32(port), @@ -193,11 +193,8 @@ func (at *AppTemplate) WithDockerCfg(config *CreateWithOneDockerConfig) *AppTemp appcfg.Entrances = entrances - if config.RequiredGpu { - appcfg.Spec.RequiredGPU = "1" - } if config.SshEnable { - appcfg.Ports = append(appcfg.Ports, oachecker.ServicePort{ + appcfg.Ports = append(appcfg.Ports, appv1.ServicePort{ Name: "ssh", Host: name, Port: 22, @@ -205,54 +202,65 @@ func (at *AppTemplate) WithDockerCfg(config *CreateWithOneDockerConfig) *AppTemp }) } - appcfg.Spec.RequiredCPU = config.RequiredCpu - appcfg.Spec.RequiredMemory = config.RequiredMemory - if config.LimitedCpu == "" { - appcfg.Spec.LimitedCPU = config.RequiredCpu - } else { - appcfg.Spec.LimitedCPU = config.LimitedCpu - + res := oac.ManifestResourceLimits{ + RequiredCPU: config.RequiredCpu, + RequiredMemory: config.RequiredMemory, + RequiredDisk: "50Mi", + LimitedDisk: "5Gi", + LimitedCPU: config.LimitedCpu, + LimitedMemory: config.LimitedMemory, } - if config.LimitedMemory == "" { - appcfg.Spec.LimitedMemory = config.RequiredMemory - } else { - appcfg.Spec.LimitedMemory = config.LimitedMemory + if res.LimitedCPU == "" { + res.LimitedCPU = res.RequiredCPU + } + if res.LimitedMemory == "" { + res.LimitedMemory = res.RequiredMemory } - - requiredCPU, _ := resource.ParseQuantity(appcfg.Spec.RequiredCPU) - requiredMemory, _ := resource.ParseQuantity(appcfg.Spec.RequiredMemory) - limitedCPU, _ := resource.ParseQuantity(appcfg.Spec.LimitedCPU) - limitedMemory, _ := resource.ParseQuantity(appcfg.Spec.LimitedMemory) if config.RequiredDisk != "" { - //requiredDisk, _ := resource.ParseQuantity(config.RequiredDisk) - appcfg.Spec.RequiredDisk = config.RequiredDisk + res.RequiredDisk = config.RequiredDisk } + requiredCPU, _ := resource.ParseQuantity(res.RequiredCPU) + requiredMemory, _ := resource.ParseQuantity(res.RequiredMemory) + limitedCPU, _ := resource.ParseQuantity(res.LimitedCPU) + limitedMemory, _ := resource.ParseQuantity(res.LimitedMemory) + if requiredCPU.Cmp(limitedCPU) > 0 { - appcfg.Spec.LimitedCPU = appcfg.Spec.RequiredCPU + res.LimitedCPU = res.RequiredCPU } - if requiredMemory.Cmp(limitedMemory) > 0 { - appcfg.Spec.LimitedMemory = appcfg.Spec.RequiredMemory + res.LimitedMemory = res.RequiredMemory } - deps := []oachecker.Dependency{ + + if config.RequiredGpu { + res.RequiredGPU = "1Gi" + gpuType, _ := utils.GetFirstClusterGpuType(context.Background()) + applyAppGpuMode(&appcfg.Spec, at.useNewSchema, gpuType, res) + } else { + applyAppResources(&appcfg.Spec, at.useNewSchema, res) + } + appcfg.Options.Dependencies = []manifest.Dependency{ { Name: "olares", Type: "system", Version: constants.SupportOsVersion, }, } - appcfg.Options.Dependencies = &deps at.appCfg = &appcfg return at } func (at *AppTemplate) WithDockerDeployment(config *CreateWithOneDockerConfig) *AppTemplate { replicas := int32(1) - requestCPU, _ := resource.ParseQuantity(at.appCfg.Spec.RequiredCPU) - requestMemory, _ := resource.ParseQuantity(at.appCfg.Spec.RequiredMemory) - limitedCPU, _ := resource.ParseQuantity(at.appCfg.Spec.LimitedCPU) - limitedMemory, _ := resource.ParseQuantity(at.appCfg.Spec.LimitedMemory) + gpuType, _ := utils.GetFirstClusterGpuType(context.Background()) + res := extractAppResources(at.appCfg.Spec, gpuType) + requestCPU, _ := resource.ParseQuantity(res.RequiredCPU) + requestMemory, _ := resource.ParseQuantity(res.RequiredMemory) + limitedCPU, _ := resource.ParseQuantity(res.LimitedCPU) + limitedMemory, _ := resource.ParseQuantity(res.LimitedMemory) + + klog.Infof("WithDockerDeployment: requestCPU: %v", requestCPU.String()) + klog.Infof("WithDockerDeployment: limitedCPU: %v", limitedCPU.String()) deployment := appsv1.Deployment{ TypeMeta: metav1.TypeMeta{ @@ -260,12 +268,18 @@ func (at *AppTemplate) WithDockerDeployment(config *CreateWithOneDockerConfig) * APIVersion: "apps/v1", }, ObjectMeta: metav1.ObjectMeta{ - Name: config.Name, - Namespace: "{{ .Release.Namespace }}", - Annotations: map[string]string{}, + Name: config.Name, + Namespace: "{{ .Release.Namespace }}", Labels: map[string]string{ "io.kompose.service": config.Name, }, + Annotations: func() map[string]string { + anno := map[string]string{} + if gpuType != "" && config.RequiredGpu { + anno[constants.ApplicationGpuInjectKey] = "true" + } + return anno + }(), }, Spec: appsv1.DeploymentSpec{ Replicas: &replicas, @@ -314,13 +328,7 @@ func (at *AppTemplate) WithDockerDeployment(config *CreateWithOneDockerConfig) * if len(config.Container.StartCmdArgs) > 0 { deployment.Spec.Template.Spec.Containers[0].Args = []string{config.Container.StartCmdArgs} } - if config.RequiredGpu && len(config.GpuVendor) > 0 { - limitKey := corev1.ResourceName(vendorGpuMap[config.GpuVendor]) - deployment.Spec.Template.Spec.Containers[0].Resources.Limits[limitKey] = func() resource.Quantity { - gpu, _ := resource.ParseQuantity("1") - return gpu - }() - } + if config.ExposePorts != "" { exposePorts := strings.Split(config.ExposePorts, ",") allDomainConfigs := make([]appcfg.DefaultThirdLevelDomainConfig, 0) @@ -595,47 +603,6 @@ func (at *AppTemplate) WriteDockerFile(cfg *CreateWithOneDockerConfig, path stri return err } -//func (at *AppTemplate) WithDockerDevService(config *CreateWithOneDockerConfig) *AppTemplate { -// if len(config.ExposePorts) > 0 { -// service := corev1.Service{ -// TypeMeta: metav1.TypeMeta{ -// Kind: "Service", -// APIVersion: "v1", -// }, -// ObjectMeta: metav1.ObjectMeta{ -// Labels: map[string]string{ -// "io.kompose.service": fmt.Sprintf("%s-dev", config.Name), -// }, -// Name: fmt.Sprintf("%s-dev", config.Name), -// Namespace: "{{ .Release.Namespace }}", -// }, -// Spec: corev1.ServiceSpec{ -// Selector: map[string]string{ -// "io.kompose.service": config.Name, -// }, -// }, -// Status: corev1.ServiceStatus{ -// LoadBalancer: corev1.LoadBalancerStatus{}, -// }, -// } -// ports := make([]corev1.ServicePort, 0) -// for _, port := range config.ExposePorts { -// ports = append(ports, corev1.ServicePort{ -// Name: strconv.Itoa(port), -// Port: int32(port), -// TargetPort: intstr.Parse(strconv.Itoa(port)), -// }) -// } -// -// if len(ports) > 0 { -// service.Spec.Ports = ports -// } -// at.services = append(at.services, &service) -// } -// -// return at -//} - func ParseCommand(cmd string) []string { if cmd == "" { return []string{} diff --git a/pkg/development/command/createapp_onedocker_test.go b/pkg/development/command/createapp_onedocker_test.go index 2774288..8ed6422 100644 --- a/pkg/development/command/createapp_onedocker_test.go +++ b/pkg/development/command/createapp_onedocker_test.go @@ -1,6 +1,7 @@ package command import ( + "context" "encoding/json" "fmt" "testing" @@ -29,7 +30,7 @@ func TestWithDockerAppCfg(t *testing.T) { Env: map[string]string{}, Mounts: map[string]string{"/app/data/aaa": "/aaa", "/app/cache/bbb": "/bbb", "/Home/ccc": "/ccc", "/app/data/aaa2": "/aaa2"}, } - at := AppTemplate{} + at := NewAppTemplate(context.Background()) at.WithDockerCfg(cfg).WithDockerDeployment(cfg).WithDockerDeployment(cfg).WithDockerService(cfg).WithDockerChartMetadata(cfg).WithDockerOwner(cfg) b, _ := json.Marshal(at.appCfg) yml, _ := yaml.JSONToYAML(b) diff --git a/pkg/development/command/createapp_test.go b/pkg/development/command/createapp_test.go deleted file mode 100644 index 6df83d0..0000000 --- a/pkg/development/command/createapp_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package command - -import ( - "testing" -) - -func TestWithAppCfg(t *testing.T) { - createConfig := CreateConfig{ - Name: "cc", - OSVersion: ">=0.1.0", - Img: "busybox", - Ports: []int{8080}, - WebsitePort: "8080", - SystemDB: false, - Redis: false, - MongoDB: false, - PostgreSQL: false, - SystemCall: false, - IngressRouter: false, - Traefik: true, - AppData: true, - UserData: []string{}, - NeedGPU: false, - RequiredGPU: "", - RequiredMemory: "1Mi", - } - at := AppTemplate{} - at.WithAppCfg(&createConfig). - WithDeployment(&createConfig). - WithService(&createConfig). - WithChartMetadata(&createConfig). - WithTraefik(&createConfig) - //b, _ := json.Marshal(at.appcfg) - //yml, _ := yaml.JSONToYAML(b) - //fmt.Println(string(yml)) - at.WriteFile(&createConfig, "/tmp") -} diff --git a/pkg/development/command/lint.go b/pkg/development/command/lint.go index 20f00a6..6e43693 100644 --- a/pkg/development/command/lint.go +++ b/pkg/development/command/lint.go @@ -6,7 +6,7 @@ import ( "k8s.io/klog/v2" - "github.com/beclab/oachecker" + oac "github.com/beclab/Olares/framework/oac" ) type lint struct { @@ -25,14 +25,8 @@ func (l *lint) WithDir(dir string) *lint { func (l *lint) Run(ctx context.Context, owner, chart string) error { chartPath := filepath.Join(l.baseCommand.dir, owner, chart) - err := oachecker.Lint(chartPath, oachecker.DefaultLintOptions().SkipSameVersion().WithOwner("owner").WithAdmin("admin")) - if err != nil { - klog.Errorf("failed to lint chart path=%s with different owner and admin %v", chartPath, err) - return err - } - err = oachecker.Lint(chartPath, oachecker.DefaultLintOptions().SkipSameVersion().WithOwner("admin").WithAdmin("admin")) - if err != nil { - klog.Errorf("failed to lint chart path=%s with same owner and admin %v", chartPath, err) + if err := oac.LintBothOwnerScenarios(chartPath, oac.SkipSameVersionCheck()); err != nil { + klog.Errorf("failed to lint chart path=%s: %v", chartPath, err) return err } return nil diff --git a/pkg/development/command/resources.go b/pkg/development/command/resources.go new file mode 100644 index 0000000..572176f --- /dev/null +++ b/pkg/development/command/resources.go @@ -0,0 +1,249 @@ +package command + +import ( + "context" + "github.com/beclab/Olares/framework/oac" + + "github.com/beclab/api/manifest" + "k8s.io/klog/v2" + + "github.com/beclab/devbox/pkg/utils" + "github.com/beclab/devbox/pkg/utils/version" +) + +const ( + // newSchemaConfigVersion is the OlaresManifest schema version used when the + // running system reports a version that satisfies version.IsSupported. In + // this schema the resource fields move from spec.requiredX/limitedX into + // spec.resources[Mode=cpu]. + newSchemaConfigVersion = "0.12.0" + + // legacySchemaConfigVersion is the OlaresManifest schema version used when + // running on older systems. + legacySchemaConfigVersion = "0.8.0" + + // resourceModeCPU is the mode key used inside spec.resources for the CPU + // resource profile. + resourceModeCPU = "cpu" +) + +// detectNewSchema reports whether the running system supports the new +// OlaresManifest schema (>= newSchemaConfigVersion). It falls back to false +// (legacy schema) when the system version cannot be obtained or parsed. +func detectNewSchema(ctx context.Context) bool { + if ctx == nil { + ctx = context.Background() + } + sysVer, err := utils.GetSystemVersion(ctx) + if err != nil { + klog.Warningf("detectNewSchema: cannot read system version, fallback to legacy schema: %v", err) + return false + } + if !version.IsSupported(sysVer) { + klog.V(2).Infof("detectNewSchema: system version %q < supported, using legacy schema", sysVer) + return false + } + klog.V(2).Infof("detectNewSchema: system version %q is supported, using new schema", sysVer) + return true +} + +// applyAppResources writes r into spec depending on the active schema. +// +// New schema: clear the legacy fields and project r into +// spec.Resources[Mode=cpu]; replace any existing cpu mode entry. Disk fields +// stay on the legacy spec field because spec.requiredDisk has no analogue in +// the resources mode (it's a global app constraint). +// +// Legacy schema: write r directly to spec.RequiredX/LimitedX. +func applyAppResources(spec *manifest.AppSpec, useNewSchema bool, r oac.ManifestResourceLimits) { + if !useNewSchema { + spec.RequiredCPU = r.RequiredCPU + spec.LimitedCPU = r.LimitedCPU + spec.RequiredMemory = r.RequiredMemory + spec.LimitedMemory = r.LimitedMemory + spec.RequiredDisk = r.RequiredDisk + spec.LimitedDisk = r.LimitedDisk + return + } + + spec.RequiredCPU = "" + spec.RequiredMemory = "" + spec.RequiredDisk = "" + spec.LimitedDisk = "" + spec.LimitedCPU = "" + spec.LimitedMemory = "" + + mode := manifest.ResourceMode{ + Mode: resourceModeCPU, + ResourceRequirement: manifest.ResourceRequirement{ + RequiredCPU: r.RequiredCPU, + RequiredMemory: r.RequiredMemory, + RequiredDisk: r.RequiredDisk, + LimitedDisk: r.LimitedDisk, + LimitedCPU: r.LimitedCPU, + LimitedMemory: r.LimitedMemory, + }, + } + for i := range spec.Resources { + if spec.Resources[i].Mode == resourceModeCPU { + spec.Resources[i] = mode + return + } + } + spec.Resources = append(spec.Resources, mode) +} + +// applyAppGpuMode is the GPU-aware counterpart of applyAppResources. It is +// the only resource writer that should be used when the app requires a GPU; +// callers MUST NOT additionally call applyAppResources, otherwise the cpu +// mode and the gpu mode would carry duplicated requirements. +// +// New schema with a known gpuType: clear the legacy spec.requiredX/limitedX +// fields, drop any pre-existing cpu mode (this app is selected by GPU mode, +// not CPU mode), and write the full resource bundle into a single +// ResourceMode keyed by gpuType. An existing entry for the same gpuType is +// replaced in place; other modes are preserved. +// +// New schema without a gpuType (cluster reports no GPU-labelled nodes), or +// legacy schema: write the full resource bundle - including +// RequiredGPU/LimitedGPU - directly into spec.RequiredX/LimitedX so the +// requirement is preserved. A warning is logged in the new-schema fallback +// case so the missing cluster signal is visible. +func applyAppGpuMode(spec *manifest.AppSpec, useNewSchema bool, gpuType string, r oac.ManifestResourceLimits) { + // Whenever applyAppGpuMode is invoked the app is selected by GPU mode + // instead of CPU mode, so any pre-existing cpu entry in spec.Resources + // (typically seeded by an earlier applyAppResources call) must go - even + // on the legacy/fallback paths below where the actual write target is + // the spec.RequiredX/LimitedX fields. Otherwise the manifest would + // advertise both mode:cpu and the GPU requirement at the same time. + if len(spec.Resources) > 0 { + filtered := spec.Resources[:0] + for _, m := range spec.Resources { + if m.Mode == resourceModeCPU { + continue + } + filtered = append(filtered, m) + } + spec.Resources = filtered + } + + writeLegacy := func() { + spec.RequiredCPU = r.RequiredCPU + spec.LimitedCPU = r.LimitedCPU + spec.RequiredMemory = r.RequiredMemory + spec.LimitedMemory = r.LimitedMemory + spec.RequiredDisk = r.RequiredDisk + spec.LimitedDisk = r.LimitedDisk + spec.RequiredGPU = r.RequiredGPU + spec.LimitedGPU = r.LimitedGPU + } + + if !useNewSchema { + writeLegacy() + return + } + if gpuType == "" { + klog.Warningf("applyAppGpuMode: no cluster GPU type discovered, recording resources on legacy spec fields") + writeLegacy() + return + } + + spec.RequiredCPU = "" + spec.LimitedCPU = "" + spec.RequiredMemory = "" + spec.LimitedMemory = "" + spec.RequiredDisk = "" + spec.LimitedDisk = "" + spec.RequiredGPU = "" + spec.LimitedGPU = "" + + mode := manifest.ResourceMode{ + Mode: gpuType, + ResourceRequirement: manifest.ResourceRequirement{ + RequiredCPU: r.RequiredCPU, + LimitedCPU: r.LimitedCPU, + RequiredMemory: r.RequiredMemory, + LimitedMemory: r.LimitedMemory, + RequiredDisk: r.RequiredDisk, + LimitedDisk: r.LimitedDisk, + RequiredGPU: r.RequiredGPU, + LimitedGPU: func() string { + if r.LimitedGPU != "" { + return r.LimitedGPU + } + return r.RequiredGPU + }(), + }, + } + + for i := range spec.Resources { + if spec.Resources[i].Mode == gpuType { + spec.Resources[i] = mode + return + } + } + spec.Resources = append(spec.Resources, mode) +} + +// extractAppResources reads the active resource bundle out of spec. It +// inverts what applyAppGpuMode / applyAppResources wrote, looking up entries +// in this preference order: +// +// 1. If a non-empty gpuType is supplied, the spec.Resources entry whose +// Mode equals gpuType (the layout written by applyAppGpuMode under the +// new schema). +// 2. The spec.Resources cpu-mode entry (the layout written by +// applyAppResources under the new schema). +// 3. The legacy spec.RequiredX/LimitedX fields (legacy schema, or the +// fallback that applyAppGpuMode takes when the cluster reports no GPU +// type). +// +// The deployment builders pass the cluster's first GPU type so that an app +// requiring a GPU sizes its container off the gpu-mode bundle; non-GPU +// callers pass "" and naturally fall through to the cpu-mode bundle. +func extractAppResources(spec manifest.AppSpec, gpuType string) oac.ManifestResourceLimits { + if gpuType != "" { + for _, res := range spec.Resources { + if res.Mode == gpuType { + return resourceModeToLimits(res) + } + } + } + for _, res := range spec.Resources { + if res.Mode == resourceModeCPU { + return resourceModeToLimits(res) + } + } + return oac.ManifestResourceLimits{ + RequiredCPU: spec.RequiredCPU, + LimitedCPU: spec.LimitedCPU, + RequiredMemory: spec.RequiredMemory, + LimitedMemory: spec.LimitedMemory, + RequiredDisk: spec.RequiredDisk, + LimitedDisk: spec.LimitedDisk, + RequiredGPU: spec.RequiredGPU, + LimitedGPU: spec.LimitedGPU, + } +} + +func resourceModeToLimits(res manifest.ResourceMode) oac.ManifestResourceLimits { + return oac.ManifestResourceLimits{ + RequiredCPU: res.RequiredCPU, + LimitedCPU: res.LimitedCPU, + RequiredMemory: res.RequiredMemory, + LimitedMemory: res.LimitedMemory, + RequiredDisk: res.RequiredDisk, + LimitedDisk: res.LimitedDisk, + RequiredGPU: res.RequiredGPU, + LimitedGPU: res.LimitedGPU, + } +} + +// configVersionFor returns the manifest config version string that matches the +// active schema. +func configVersionFor(useNewSchema bool) string { + if useNewSchema { + return newSchemaConfigVersion + } + return legacySchemaConfigVersion +} diff --git a/pkg/development/command/utils.go b/pkg/development/command/utils.go index cd3ffb1..7e5a585 100644 --- a/pkg/development/command/utils.go +++ b/pkg/development/command/utils.go @@ -34,7 +34,7 @@ func copyDir(src string, dest string) error { return err } if !file.IsDir() { - return fmt.Errorf("Source " + file.Name() + " is not a directory!") + return errors.New("Source " + file.Name() + " is not a directory!") } err = os.MkdirAll(dest, 0755) @@ -55,7 +55,7 @@ func copyDir(src string, dest string) error { err = copyDir(src+"/"+f.Name(), dest+"/"+f.Name()) if err != nil { - klog.Errorf("failed to copy dir from %s to %s, err=%v", src+"/"+f.Name(), dest+"/"+f.Name()) + klog.Errorf("failed to copy dir from %s to %s, err=%v", src+"/"+f.Name(), dest+"/"+f.Name(), err) return err } diff --git a/pkg/development/envoy/sidecar.go b/pkg/development/envoy/sidecar.go index 5e821f5..9fde858 100644 --- a/pkg/development/envoy/sidecar.go +++ b/pkg/development/envoy/sidecar.go @@ -5,8 +5,8 @@ import ( "fmt" "strconv" + "github.com/beclab/api/manifest" "github.com/beclab/devbox/pkg/appcfg" - "github.com/beclab/oachecker" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -178,7 +178,7 @@ EOF return cmd } -func getWebSocketSideCarContainerSpec(wsConfig *oachecker.WsConfig) corev1.Container { +func getWebSocketSideCarContainerSpec(wsConfig *manifest.WsConfig) corev1.Container { return corev1.Container{ Name: WsContainerName, Image: WsContainerImage, diff --git a/pkg/services/chart_op.go b/pkg/services/chart_op.go index 6fcb603..cbb59fa 100644 --- a/pkg/services/chart_op.go +++ b/pkg/services/chart_op.go @@ -5,12 +5,13 @@ import ( "encoding/json" "errors" "fmt" + "net/http" + "time" + "github.com/beclab/devbox/pkg/constants" "github.com/go-resty/resty/v2" "github.com/thoas/go-funk" "k8s.io/klog/v2" - "net/http" - "time" ) const ( @@ -105,7 +106,7 @@ func (c *chartOp) CheckVersion(ctx context.Context, owner, devAppName, version s return false, nil } if resp.StatusCode() != http.StatusOK { - klog.Errorf("/api/v1/charts/%s/versions status code not = 200, err=%v", string(resp.Body())) + klog.Errorf("/api/v1/charts/%s/versions status code not = 200, err=%v", devAppName,string(resp.Body())) return false, errors.New(string(resp.Body())) } var ret ChartVersions diff --git a/pkg/store/db/operator.go b/pkg/store/db/operator.go index 9acfeda..72339f5 100644 --- a/pkg/store/db/operator.go +++ b/pkg/store/db/operator.go @@ -3,6 +3,7 @@ package db import ( "fmt" "os" + "sync" "github.com/beclab/devbox/pkg/store/db/model" @@ -15,30 +16,36 @@ type DbOperator struct { } var ( - db *gorm.DB + db *gorm.DB + initOnce sync.Once + initErr error ) -func init() { - dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=5432 sslmode=allow", - os.Getenv("DB_HOST"), - os.Getenv("DB_USERNAME"), - os.Getenv("DB_PASSWORD"), - os.Getenv("DB_NAME")) +// ensureDB lazily opens the postgres connection and runs migrations on first +// use. Doing this in init() would panic any binary (or test binary) that just +// transitively imports this package without ever touching the DB; lazy init +// keeps that case quiet while preserving the original "fail fast at first +// use" behavior for real callers. +func ensureDB() (*gorm.DB, error) { + initOnce.Do(func() { + dsn := fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=5432 sslmode=allow", + os.Getenv("DB_HOST"), + os.Getenv("DB_USERNAME"), + os.Getenv("DB_PASSWORD"), + os.Getenv("DB_NAME")) - var err error - db, err = gorm.Open(postgres.New( - postgres.Config{ - DSN: dsn, - PreferSimpleProtocol: true, - }), - &gorm.Config{}) - if err != nil { - panic(err) - } - err = createTableIfNotExists() - if err != nil { - panic(err) - } + db, initErr = gorm.Open(postgres.New( + postgres.Config{ + DSN: dsn, + PreferSimpleProtocol: true, + }), + &gorm.Config{}) + if initErr != nil { + return + } + initErr = createTableIfNotExists() + }) + return db, initErr } func createTableIfNotExists() (err error) { @@ -134,7 +141,11 @@ func createTableIfNotExists() (err error) { } func NewDbOperator() *DbOperator { - return &DbOperator{DB: db} + d, err := ensureDB() + if err != nil { + panic(err) + } + return &DbOperator{DB: d} } func (db *DbOperator) Close() error { diff --git a/pkg/utils/gpu.go b/pkg/utils/gpu.go new file mode 100644 index 0000000..732e3f5 --- /dev/null +++ b/pkg/utils/gpu.go @@ -0,0 +1,76 @@ +package utils + +import ( + "context" + "errors" + "sort" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" + ctrl "sigs.k8s.io/controller-runtime" +) + +// NodeGPUTypeLabel is the label that app-service writes onto cluster nodes +// to advertise the GPU model present on each node. Mirrors the constant used +// by the Olares app-service so devbox sees the same values. +const NodeGPUTypeLabel = "gpu.bytetrade.io/type" + +// GetAllGpuTypesFromNodes extracts the set of unique GPU type strings from +// the NodeGPUTypeLabel of each node. Empty label values are ignored. It +// returns an error only when nodes is nil so callers can distinguish a +// missing list from a cluster that genuinely has no GPU-labelled nodes. +func GetAllGpuTypesFromNodes(nodes *corev1.NodeList) (map[string]struct{}, error) { + gpuTypes := make(map[string]struct{}) + if nodes == nil { + return gpuTypes, errors.New("empty node list") + } + for _, n := range nodes.Items { + if typeLabel, ok := n.Labels[NodeGPUTypeLabel]; ok && typeLabel != "" { + gpuTypes[typeLabel] = struct{}{} + } + } + return gpuTypes, nil +} + +// GetClusterGpuTypes lists nodes from the running cluster and returns the +// unique GPU types reported via NodeGPUTypeLabel. Errors talking to the +// cluster surface to the caller; an empty (but non-nil) map with a nil error +// means the cluster has no GPU-labelled nodes. +func GetClusterGpuTypes(ctx context.Context) (map[string]struct{}, error) { + cfg, err := ctrl.GetConfig() + if err != nil { + return nil, err + } + cs, err := kubernetes.NewForConfig(cfg) + if err != nil { + return nil, err + } + nodes, err := cs.CoreV1().Nodes().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + return GetAllGpuTypesFromNodes(nodes) +} + +// GetFirstClusterGpuType returns the lexicographically first GPU type +// reported by cluster nodes, or "" with a nil error when the cluster has no +// GPU types. Cluster-API errors are logged and surface to the caller so the +// caller can decide whether to proceed. +func GetFirstClusterGpuType(ctx context.Context) (string, error) { + types, err := GetClusterGpuTypes(ctx) + if err != nil { + klog.Warningf("GetFirstClusterGpuType: cannot read cluster gpu types: %v", err) + return "", err + } + if len(types) == 0 { + return "", nil + } + keys := make([]string, 0, len(types)) + for k := range types { + keys = append(keys, k) + } + sort.Strings(keys) + return keys[0], nil +} diff --git a/pkg/utils/sysversion.go b/pkg/utils/sysversion.go new file mode 100644 index 0000000..856ccbf --- /dev/null +++ b/pkg/utils/sysversion.go @@ -0,0 +1,34 @@ +package utils + +import ( + "context" + + "github.com/beclab/api/pkg/generated/clientset/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/klog/v2" + ctrl "sigs.k8s.io/controller-runtime" +) + +const terminusCRName = "terminus" + +// GetSystemVersion returns the version reported by the cluster's Terminus CR +// (sys.bytetrade.io/v1alpha1, name "terminus"). It returns an empty string and +// the underlying error when the CR cannot be fetched. +func GetSystemVersion(ctx context.Context) (string, error) { + config, err := ctrl.GetConfig() + if err != nil { + klog.Errorf("GetSystemVersion: get kube config %v", err) + return "", err + } + c, err := versioned.NewForConfig(config) + if err != nil { + klog.Errorf("GetSystemVersion: new versioned client %v", err) + return "", err + } + t, err := c.SysV1alpha1().Terminus().Get(ctx, terminusCRName, metav1.GetOptions{}) + if err != nil { + klog.Errorf("GetSystemVersion: get terminus CR %v", err) + return "", err + } + return t.Spec.Version, nil +} diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 761f6ee..a17ba78 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -6,8 +6,10 @@ import ( "encoding/hex" "encoding/json" "fmt" + "os" + + oac "github.com/beclab/Olares/framework/oac" "github.com/beclab/devbox/pkg/appcfg" - "github.com/beclab/oachecker" "github.com/containerd/containerd/reference/docker" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -15,7 +17,6 @@ import ( runtimeSchema "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/dynamic" "k8s.io/klog/v2" - "os" ctrl "sigs.k8s.io/controller-runtime" ) @@ -57,7 +58,7 @@ func GetAdminUsername(ctx context.Context) (string, error) { return admin, nil } -func GetAppConfig(owner string, data []byte) (*oachecker.AppConfiguration, error) { +func GetAppConfig(owner string, data []byte) (*oac.AppConfiguration, error) { admin, err := GetAdminUsername(context.TODO()) if err != nil { klog.Errorf("failed to get admin %v", err) @@ -69,19 +70,17 @@ func GetAppConfig(owner string, data []byte) (*oachecker.AppConfiguration, error return nil, err } - opts := []func(map[string]interface{}){ - oachecker.WithAdmin(admin), - oachecker.WithOwner(owner), + opts := []oac.Option{ + oac.WithAdmin(admin), + oac.WithOwner(owner), WithIsAdmin(isAdmin), } - appcfg, err := oachecker.GetAppConfigurationFromContent(data, opts...) - return appcfg, nil + appcfg, err := oac.LoadAppConfigurationContent(data, opts...) + return appcfg, err } -func WithIsAdmin(isAdmin bool) func(map[string]interface{}) { - return func(values map[string]interface{}) { - values["isAdmin"] = isAdmin - } +func WithIsAdmin(isAdmin bool) oac.Option { + return oac.WithValues(map[string]interface{}{"isAdmin": isAdmin}) } // GetAdminUserList returns admin list, an error if there is any. diff --git a/pkg/utils/version/version.go b/pkg/utils/version/version.go new file mode 100644 index 0000000..0071b75 --- /dev/null +++ b/pkg/utils/version/version.go @@ -0,0 +1,68 @@ +package version + +import ( + "strings" + + "github.com/Masterminds/semver/v3" + "k8s.io/klog/v2" +) + +const ( + // minFormalVersion is the lower bound (inclusive) for formal releases + // (versions without any prerelease suffix). + minFormalVersion = "1.12.6" + + // minPrereleaseVersion is the lower bound (inclusive) for general + // prerelease builds (e.g. dated build numbers). + minPrereleaseVersion = "1.12.7-20260507" +) + +// allowedBaselinePrereleaseTags lists prerelease prefixes that are accepted at +// the minFormalVersion baseline. e.g. "1.12.6-rc1" and "1.12.6-beta2" are +// considered supported even though they fall below minPrereleaseVersion. +var allowedBaselinePrereleaseTags = []string{"rc", "beta", "alpha"} + +// IsSupported reports whether version satisfies the supported range: +// +// - formal release (no prerelease suffix): >= 1.12.6 +// - prerelease at the 1.12.6 baseline tagged "rc*" or "beta*" +// (e.g. 1.12.6-rc1, 1.12.6-beta2) +// - any other prerelease build: >= 1.12.7-20260507 +// +// Returns false (without error) when the input cannot be parsed as semver. +func IsSupported(ver string) bool { + v, err := semver.NewVersion(ver) + if err != nil { + klog.V(4).Infof("version.IsSupported: invalid semver %q: %v", ver, err) + return false + } + + if v.Prerelease() == "" { + return v.GreaterThanEqual(semver.MustParse(minFormalVersion)) + } + + if isAllowedBaselinePrerelease(v) { + return true + } + + return v.GreaterThanEqual(semver.MustParse(minPrereleaseVersion)) +} + +// isAllowedBaselinePrerelease reports whether v sits exactly on the +// minFormalVersion (e.g. 1.12.6) and carries a prerelease tag listed in +// allowedBaselinePrereleaseTags. +func isAllowedBaselinePrerelease(v *semver.Version) bool { + baseline := semver.MustParse(minFormalVersion) + if v.Major() != baseline.Major() || + v.Minor() != baseline.Minor() || + v.Patch() != baseline.Patch() { + return false + } + pre := v.Prerelease() + for _, tag := range allowedBaselinePrereleaseTags { + if strings.HasPrefix(pre, tag) { + return true + } + } + return false +} diff --git a/pkg/utils/version/version_test.go b/pkg/utils/version/version_test.go new file mode 100644 index 0000000..46f76f4 --- /dev/null +++ b/pkg/utils/version/version_test.go @@ -0,0 +1,54 @@ +package version + +import "testing" + +func TestIsSupported(t *testing.T) { + cases := []struct { + name string + version string + want bool + }{ + {"formal: greater than threshold", "1.12.7", true}, + {"formal: with v prefix", "v1.12.7", true}, + {"formal: minor bump", "1.13.0", true}, + {"formal: major bump", "2.0.0", true}, + + {"formal: equal to threshold", "1.12.6", true}, + {"formal: less than threshold (patch)", "1.12.5", false}, + {"formal: less than threshold (minor)", "1.11.99", false}, + {"formal: less than threshold (major)", "0.99.99", false}, + + {"prerelease: greater build number", "1.12.7-20260508", true}, + {"prerelease: future build number", "1.12.7-20270101", true}, + {"prerelease: greater base version", "1.13.0-rc1", true}, + {"prerelease: greater base version 0", "1.13.0-0", true}, + { + // SemVer 2.0.0: numeric prerelease identifiers have lower + // precedence than alphanumeric ones, so "rc1" > "20260507". + name: "prerelease: alphanumeric tag at same base", + version: "1.12.7-rc1", + want: true, + }, + + {"prerelease: equal to threshold", "1.12.7-20260507", true}, + {"prerelease: smaller build number", "1.12.7-20260506", false}, + {"prerelease: smaller base version", "1.12.6-rc1", true}, + {"prerelease: smaller base version", "1.12.6-rc.1", true}, + {"prerelease: smaller base version", "1.12.6-beta.1", true}, + {"prerelease: smaller base version", "1.12.6-alpha.1", true}, + + {"prerelease: smaller base version 0", "1.12.6-0", false}, + + {"empty string", "", false}, + {"garbage", "not-a-version", false}, + {"incomplete: only major.minor", "1.12", false}, + } + + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + if got := IsSupported(c.version); got != c.want { + t.Errorf("IsSupported(%q) = %v, want %v", c.version, got, c.want) + } + }) + } +} diff --git a/pkg/webhook/funcs.go b/pkg/webhook/funcs.go index b8d70c1..6d0bb69 100644 --- a/pkg/webhook/funcs.go +++ b/pkg/webhook/funcs.go @@ -5,16 +5,17 @@ import ( "encoding/json" "errors" "fmt" - "github.com/beclab/devbox/pkg/appcfg" - "github.com/beclab/devbox/pkg/constants" - "github.com/beclab/devbox/pkg/utils" - "k8s.io/apimachinery/pkg/types" "os" "path/filepath" "sort" "strconv" "strings" + "github.com/beclab/devbox/pkg/appcfg" + "github.com/beclab/devbox/pkg/constants" + "github.com/beclab/devbox/pkg/utils" + "k8s.io/apimachinery/pkg/types" + "github.com/beclab/devbox/pkg/development/container" "github.com/beclab/devbox/pkg/development/envoy" "github.com/beclab/devbox/pkg/store/db" @@ -241,7 +242,7 @@ func getEntrancePort(appManagerName string, entranceName string) (int32, error) func (wh *Webhook) MutatePodContainers(ctx context.Context, namespace string, raw []byte, proxyUUID uuid.UUID, baseDir string) (patch []byte, err error) { var pod corev1.Pod if err := json.Unmarshal(raw, &pod); err != nil { - klog.Errorf("Error unmarshaling request to pod, ", err) + klog.Errorf("Error unmarshaling request to pod %v", err) return nil, err }