From 469842f0510b404014e626c26c0d8df1dade4408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=AF=E8=88=AA?= <101104760+ZhangSetSail@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:56:09 +0800 Subject: [PATCH] feat: v5.16.0 version (#1790) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support virtual machines (#1782) * feat: support virtual machines * perf: code make format --------- Co-authored-by: 张启航 * perf: solve go dependency problem * fix: container disk information collection failed * perf: some detailed optimizations in the virtual machine * perf: adjust the maximum number of buildkit build retries * perf: virtual machine function optimization * perf: virtual machine image source detection * fix: avoid using shared storage at the same address * perf: local virtual machine image skips detection * perf: optimize builder and runner image acquisition logic (#1789) Co-authored-by: 张启航 --------- Co-authored-by: 张启航 --- api/api/api_interface.go | 2 + api/api_routers/version2/v2Routers.go | 2 + api/api_routers/websocket/websocket.go | 8 +- api/controller/service_action.go | 155 +++-- api/handler/gateway_action.go | 22 +- api/handler/group/group_backup.go | 34 +- api/handler/handler.go | 4 +- api/handler/netRules.go | 10 +- api/handler/netRules_test.go | 1 - api/handler/nodes.go | 6 + api/handler/registry_auth_secret_action.go | 4 +- api/handler/service.go | 124 ++-- api/handler/service_handler.go | 3 +- api/handler/service_operation.go | 47 +- api/handler/share/plugin_share.go | 10 +- api/handler/share/service_share.go | 8 +- api/model/model.go | 14 +- api/server/api.go | 2 +- builder/build/build.go | 2 + builder/build/code_build.go | 4 +- builder/exector/build_from_image_run.go | 11 +- builder/exector/build_from_sourcecode_run.go | 2 + builder/exector/build_from_vm.go | 170 +++++ builder/exector/exector.go | 42 ++ builder/exector/exector_test.go | 1 - builder/exector/groupapp_restore.go | 20 +- builder/exector/service_check.go | 15 +- builder/exector/share_image.go | 14 +- builder/exector/share_plugin.go | 16 +- builder/exector/share_slug.go | 14 +- builder/parser/code/lang.go | 61 +- builder/parser/source_code.go | 28 +- builder/parser/vm_service.go | 115 ++++ builder/repostory.go | 43 +- builder/sources/container_client.go | 12 +- builder/sources/containerd_client.go | 2 +- builder/sources/docker_client.go | 2 +- builder/sources/image.go | 47 +- builder/sources/image_containerd_client.go | 17 +- cmd/api/server/server.go | 9 +- cmd/builder/option/option.go | 3 +- cmd/node/option/conf.go | 16 +- cmd/worker/server/server.go | 8 +- db/etcd/etcd.go | 7 +- db/model/component.go | 4 + db/model/tenant.go | 108 ++-- db/mysql/dao/tenants.go | 216 +++---- discover/discover.go | 8 +- discover/register.go | 8 +- eventlog/cluster/cluster.go | 16 +- eventlog/cluster/discover/etcdManager.go | 4 +- eventlog/cluster/discover/manager.go | 44 +- eventlog/cluster/distribution/distribution.go | 10 +- eventlog/exit/web/manager.go | 22 +- gateway/cluster/ipmanager.go | 8 +- gateway/cluster/node.go | 10 +- gateway/controller/controller.go | 4 +- go.mod | 219 +++---- go.sum | 579 +++++++++++------- grctl/cmd/gpushare.go | 12 +- hack/contrib/docker/eventlog/build/Dockerfile | 2 +- .../docker/eventlog/build/Dockerfile.arm | 2 +- monitor/monitor.go | 9 +- mq/api/mq/mq.go | 8 +- node/api/manager.go | 14 +- node/api/model/model.go | 32 +- node/core/config/datacenter.go | 26 +- node/core/service/app_service.go | 8 +- node/core/store/client.go | 34 +- node/monitormessage/udpserver.go | 4 +- node/nodem/client/cluster_client.go | 12 +- node/nodem/client/cluster_client_test.go | 1 - node/nodem/controller/manager_service.go | 36 +- node/nodem/controller/manager_service_test.go | 1 - node/nodem/logger/copier.go | 2 +- node/nodem/logger/cri_logger_file.go | 2 +- node/nodem/logger/manage.go | 2 +- node/nodem/logger/streamlog/streamlog.go | 22 +- node/statsd/exporter/exporter.go | 47 +- release.sh | 2 +- util/criutil/criutil.go | 10 +- worker/appm/controller/controller.go | 31 +- worker/appm/controller/start.go | 8 +- worker/appm/controller/stop.go | 9 +- worker/appm/controller/upgrade.go | 2 +- worker/appm/conversion/plugin.go | 21 +- worker/appm/conversion/resource.go | 14 +- worker/appm/conversion/service.go | 32 +- worker/appm/conversion/version.go | 340 ++++++++-- worker/appm/store/store.go | 83 ++- worker/appm/types/v1/status.go | 60 +- worker/appm/types/v1/v1.go | 210 ++++--- worker/appm/volume/share-file.go | 53 +- worker/appm/volume/volume.go | 25 +- .../master/controller/helmapp/suite_test.go | 10 - .../controller/thirdcomponent/controller.go | 2 +- worker/monitor/exporter.go | 13 +- worker/util/pod.go | 24 +- 98 files changed, 2378 insertions(+), 1244 deletions(-) create mode 100644 builder/exector/build_from_vm.go create mode 100644 builder/parser/vm_service.go diff --git a/api/api/api_interface.go b/api/api/api_interface.go index f09011545..51590951e 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -143,6 +143,8 @@ type TenantInterfaceWithV1 interface { VerticalService(w http.ResponseWriter, r *http.Request) HorizontalService(w http.ResponseWriter, r *http.Request) BuildService(w http.ResponseWriter, r *http.Request) + PauseService(w http.ResponseWriter, r *http.Request) + UNPauseService(w http.ResponseWriter, r *http.Request) DeployService(w http.ResponseWriter, r *http.Request) UpgradeService(w http.ResponseWriter, r *http.Request) StatusService(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index 896b8aea3..60e6b6748 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -263,6 +263,8 @@ func (v2 *V2) serviceRouter() chi.Router { // component build r.Post("/build", middleware.WrapEL(controller.GetManager().BuildService, dbmodel.TargetTypeService, "build-service", dbmodel.ASYNEVENTTYPE)) // component start + r.Post("/pause", middleware.WrapEL(controller.GetManager().PauseService, dbmodel.TargetTypeService, "pause-service", dbmodel.ASYNEVENTTYPE)) + r.Post("/un_pause", middleware.WrapEL(controller.GetManager().UNPauseService, dbmodel.TargetTypeService, "unpause-service", dbmodel.ASYNEVENTTYPE)) r.Post("/start", middleware.WrapEL(controller.GetManager().StartService, dbmodel.TargetTypeService, "start-service", dbmodel.ASYNEVENTTYPE)) // component stop event set to synchronous event, not wait. r.Post("/stop", middleware.WrapEL(controller.GetManager().StopService, dbmodel.TargetTypeService, "stop-service", dbmodel.SYNEVENTTYPE)) diff --git a/api/api_routers/websocket/websocket.go b/api/api_routers/websocket/websocket.go index 62745523d..34bfffd47 100644 --- a/api/api_routers/websocket/websocket.go +++ b/api/api_routers/websocket/websocket.go @@ -24,7 +24,7 @@ import ( "github.com/go-chi/chi" ) -//Routes routes +// Routes routes func Routes() chi.Router { r := chi.NewRouter() r.Get("/docker_console", controller.GetDockerConsole().Get) @@ -36,7 +36,7 @@ func Routes() chi.Router { return r } -//LogRoutes 日志下载路由 +// LogRoutes 日志下载路由 func LogRoutes() chi.Router { r := chi.NewRouter() r.Get("/{gid}/{filename}", controller.GetLogFile().Get) @@ -44,7 +44,7 @@ func LogRoutes() chi.Router { return r } -//AppRoutes 应用导出包下载路由 +// AppRoutes 应用导出包下载路由 func AppRoutes() chi.Router { r := chi.NewRouter() r.Get("/download/{format}/{fileName}", controller.GetManager().Download) @@ -53,7 +53,7 @@ func AppRoutes() chi.Router { return r } -//PackageBuildRoutes 本地文件上传路由 +// PackageBuildRoutes 本地文件上传路由 func PackageBuildRoutes() chi.Router { r := chi.NewRouter() r.Post("/component/events/{eventID}", controller.GetManager().UploadPackage) diff --git a/api/controller/service_action.go b/api/controller/service_action.go index eb0befc18..3f3f77b5a 100644 --- a/api/controller/service_action.go +++ b/api/controller/service_action.go @@ -40,7 +40,7 @@ import ( "github.com/sirupsen/logrus" ) -//StartService StartService +// StartService StartService // swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/start v2 startService // // 启动应用 @@ -57,10 +57,11 @@ import ( // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) StartService(w http.ResponseWriter, r *http.Request) { tenantID := r.Context().Value(ctxutil.ContextKey("tenant_id")).(string) serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) @@ -88,7 +89,7 @@ func (t *TenantStruct) StartService(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, sEvent) } -//StopService StopService +// StopService StopService // swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/stop v2 stopService // // 关闭应用 @@ -105,10 +106,11 @@ func (t *TenantStruct) StartService(w http.ResponseWriter, r *http.Request) { // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) StopService(w http.ResponseWriter, r *http.Request) { tenantID := r.Context().Value(ctxutil.ContextKey("tenant_id")).(string) serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) @@ -128,7 +130,7 @@ func (t *TenantStruct) StopService(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, sEvent) } -//RestartService RestartService +// RestartService RestartService // swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/restart v2 restartService // // 重启应用 @@ -145,10 +147,11 @@ func (t *TenantStruct) StopService(w http.ResponseWriter, r *http.Request) { // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) RestartService(w http.ResponseWriter, r *http.Request) { tenantID := r.Context().Value(ctxutil.ContextKey("tenant_id")).(string) serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) @@ -180,7 +183,7 @@ func (t *TenantStruct) RestartService(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, sEvent) } -//VerticalService VerticalService +// VerticalService VerticalService // swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/vertical v2 verticalService // // 应用垂直伸缩 @@ -197,10 +200,11 @@ func (t *TenantStruct) RestartService(w http.ResponseWriter, r *http.Request) { // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) VerticalService(w http.ResponseWriter, r *http.Request) { rules := validator.MapData{ "container_cpu": []string{"required"}, @@ -249,7 +253,7 @@ func (t *TenantStruct) VerticalService(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, sEvent) } -//HorizontalService HorizontalService +// HorizontalService HorizontalService // swagger:operation PUT /v2/tenants/{tenant_name}/services/{service_alias}/horizontal v2 horizontalService // // 应用水平伸缩 @@ -266,10 +270,11 @@ func (t *TenantStruct) VerticalService(w http.ResponseWriter, r *http.Request) { // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) HorizontalService(w http.ResponseWriter, r *http.Request) { rules := validator.MapData{ "node_num": []string{"required"}, @@ -305,7 +310,7 @@ func (t *TenantStruct) HorizontalService(w http.ResponseWriter, r *http.Request) httputil.ReturnSuccess(r, w, sEvent) } -//BuildService BuildService +// BuildService BuildService // swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/build v2 serviceBuild // // 应用构建 @@ -322,10 +327,11 @@ func (t *TenantStruct) HorizontalService(w http.ResponseWriter, r *http.Request) // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) BuildService(w http.ResponseWriter, r *http.Request) { var build api_model.ComponentBuildReq ok := httputil.ValidatorRequestStructAndErrorResponse(r, w, &build, nil) @@ -356,7 +362,39 @@ func (t *TenantStruct) BuildService(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, res) } -//BuildList BuildList +// PauseService virtual machine paused +func (t *TenantStruct) PauseService(w http.ResponseWriter, r *http.Request) { + serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) + sEvent := r.Context().Value(ctxutil.ContextKey("event")).(*dbmodel.ServiceEvent) + if err := handler.GetServiceManager().PauseUNPauseService(serviceID, "pause"); err != nil { + httputil.ReturnError(r, w, 500, "get service info error.") + return + } + err := db.GetManager().ServiceEventDao().SetEventStatus(r.Context(), dbmodel.EventStatusSuccess) + if err != nil { + httputil.ReturnError(r, w, 500, fmt.Sprintf("pause update event failure: %v", err)) + return + } + httputil.ReturnSuccess(r, w, sEvent) +} + +// UNPauseService virtual machine unpaused +func (t *TenantStruct) UNPauseService(w http.ResponseWriter, r *http.Request) { + serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) + sEvent := r.Context().Value(ctxutil.ContextKey("event")).(*dbmodel.ServiceEvent) + if err := handler.GetServiceManager().PauseUNPauseService(serviceID, "unpause"); err != nil { + httputil.ReturnError(r, w, 500, "get service info error.") + return + } + err := db.GetManager().ServiceEventDao().SetEventStatus(r.Context(), dbmodel.EventStatusSuccess) + if err != nil { + httputil.ReturnError(r, w, 500, fmt.Sprintf("unpause update event failure: %v", err)) + return + } + httputil.ReturnSuccess(r, w, sEvent) +} + +// BuildList BuildList func (t *TenantStruct) BuildList(w http.ResponseWriter, r *http.Request) { serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) @@ -370,7 +408,7 @@ func (t *TenantStruct) BuildList(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, resp) } -//BuildVersionIsExist - +// BuildVersionIsExist - func (t *TenantStruct) BuildVersionIsExist(w http.ResponseWriter, r *http.Request) { statusMap := make(map[string]bool) serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) @@ -389,7 +427,7 @@ func (t *TenantStruct) BuildVersionIsExist(w http.ResponseWriter, r *http.Reques } -//DeleteBuildVersion - +// DeleteBuildVersion - func (t *TenantStruct) DeleteBuildVersion(w http.ResponseWriter, r *http.Request) { serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) buildVersion := chi.URLParam(r, "build_version") @@ -430,7 +468,7 @@ func (t *TenantStruct) DeleteBuildVersion(w http.ResponseWriter, r *http.Request } -//UpdateBuildVersion - +// UpdateBuildVersion - func (t *TenantStruct) UpdateBuildVersion(w http.ResponseWriter, r *http.Request) { var build api_model.UpdateBuildVersionReq ok := httputil.ValidatorRequestStructAndErrorResponse(r, w, &build, nil) @@ -453,7 +491,7 @@ func (t *TenantStruct) UpdateBuildVersion(w http.ResponseWriter, r *http.Request httputil.ReturnSuccess(r, w, nil) } -//BuildVersionInfo - +// BuildVersionInfo - func (t *TenantStruct) BuildVersionInfo(w http.ResponseWriter, r *http.Request) { switch r.Method { case "DELETE": @@ -466,7 +504,7 @@ func (t *TenantStruct) BuildVersionInfo(w http.ResponseWriter, r *http.Request) } -//GetDeployVersion GetDeployVersion by service +// GetDeployVersion GetDeployVersion by service func (t *TenantStruct) GetDeployVersion(w http.ResponseWriter, r *http.Request) { service := r.Context().Value(ctxutil.ContextKey("service")).(*dbmodel.TenantServices) version, err := db.GetManager().VersionInfoDao().GetVersionByDeployVersion(service.DeployVersion, service.ServiceID) @@ -481,7 +519,7 @@ func (t *TenantStruct) GetDeployVersion(w http.ResponseWriter, r *http.Request) httputil.ReturnSuccess(r, w, version) } -//GetManyDeployVersion GetDeployVersion by some service id +// GetManyDeployVersion GetDeployVersion by some service id func (t *TenantStruct) GetManyDeployVersion(w http.ResponseWriter, r *http.Request) { rules := validator.MapData{ "service_ids": []string{"required"}, @@ -516,13 +554,13 @@ func (t *TenantStruct) GetManyDeployVersion(w http.ResponseWriter, r *http.Reque httputil.ReturnSuccess(r, w, versionList) } -//DeployService DeployService +// DeployService DeployService func (t *TenantStruct) DeployService(w http.ResponseWriter, r *http.Request) { logrus.Debugf("trans deploy service") w.Write([]byte("deploy service")) } -//UpgradeService UpgradeService +// UpgradeService UpgradeService // swagger:operation POST /v2/tenants/{tenant_name}/services/{service_alias}/upgrade v2 upgradeService // // 升级应用 @@ -539,10 +577,11 @@ func (t *TenantStruct) DeployService(w http.ResponseWriter, r *http.Request) { // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) UpgradeService(w http.ResponseWriter, r *http.Request) { var upgradeRequest api_model.ComponentUpgradeReq ok := httputil.ValidatorRequestStructAndErrorResponse(r, w, &upgradeRequest, nil) @@ -574,7 +613,7 @@ func (t *TenantStruct) UpgradeService(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, res) } -//CheckCode CheckCode +// CheckCode CheckCode // swagger:operation POST /v2/tenants/{tenant_name}/code-check v2 checkCode // // 应用代码检测 @@ -591,10 +630,11 @@ func (t *TenantStruct) UpgradeService(w http.ResponseWriter, r *http.Request) { // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) CheckCode(w http.ResponseWriter, r *http.Request) { var ccs api_model.CheckCodeStruct @@ -614,7 +654,7 @@ func (t *TenantStruct) CheckCode(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, nil) } -//RollBack RollBack +// RollBack RollBack // swagger:operation Post /v2/tenants/{tenant_name}/services/{service_alias}/rollback v2 rollback // // 应用版本回滚 @@ -631,10 +671,11 @@ func (t *TenantStruct) CheckCode(w http.ResponseWriter, r *http.Request) { // - application/xml // // responses: -// default: -// schema: -// "$ref": "#/responses/commandResponse" -// description: 统一返回格式 +// +// default: +// schema: +// "$ref": "#/responses/commandResponse" +// description: 统一返回格式 func (t *TenantStruct) RollBack(w http.ResponseWriter, r *http.Request) { var rollbackRequest api_model.RollbackInfoRequestStruct ok := httputil.ValidatorRequestStructAndErrorResponse(r, w, &rollbackRequest, nil) @@ -664,7 +705,7 @@ type limitMemory struct { LimitMemory int `json:"limit_memory"` } -//LimitTenantMemory - +// LimitTenantMemory - func (t *TenantStruct) LimitTenantMemory(w http.ResponseWriter, r *http.Request) { var lm limitMemory body, err := ioutil.ReadAll(r.Body) @@ -693,7 +734,7 @@ func (t *TenantStruct) LimitTenantMemory(w http.ResponseWriter, r *http.Request) } -//SourcesInfo - +// SourcesInfo - type SourcesInfo struct { TenantID string `json:"tenant_id"` AvailableMemory int `json:"available_memory"` @@ -704,7 +745,7 @@ type SourcesInfo struct { CPUUsed int `json:"cpu_used"` } -//TenantResourcesStatus tenant resources status +// TenantResourcesStatus tenant resources status func (t *TenantStruct) TenantResourcesStatus(w http.ResponseWriter, r *http.Request) { tenantID := r.Context().Value(ctxutil.ContextKey("tenant_id")).(string) @@ -763,7 +804,7 @@ func (t *TenantStruct) TenantResourcesStatus(w http.ResponseWriter, r *http.Requ } } -//GetServiceDeployInfo get service deploy info +// GetServiceDeployInfo get service deploy info func GetServiceDeployInfo(w http.ResponseWriter, r *http.Request) { tenantID := r.Context().Value(ctxutil.ContextKey("tenant_id")).(string) serviceID := r.Context().Value(ctxutil.ContextKey("service_id")).(string) diff --git a/api/handler/gateway_action.go b/api/handler/gateway_action.go index 3785e2e1b..e644f6937 100644 --- a/api/handler/gateway_action.go +++ b/api/handler/gateway_action.go @@ -55,7 +55,7 @@ type GatewayAction struct { kubeClient kubernetes.Interface } -//CreateGatewayManager creates gateway manager. +// CreateGatewayManager creates gateway manager. func CreateGatewayManager(dbmanager db.Manager, mqclient client.MQClient, etcdCli *clientv3.Client, gatewayClient *gateway.GatewayV1beta1Client, kubeClient kubernetes.Interface) *GatewayAction { return &GatewayAction{ dbmanager: dbmanager, @@ -66,7 +66,7 @@ func CreateGatewayManager(dbmanager db.Manager, mqclient client.MQClient, etcdCl } } -//BatchGetGatewayHTTPRoute batch get gateway http route +// BatchGetGatewayHTTPRoute batch get gateway http route func (g *GatewayAction) BatchGetGatewayHTTPRoute(namespace, appID string) ([]*apimodel.GatewayHTTPRouteConcise, error) { var httpRoutes []v1beta1.HTTPRoute if appID != "" { @@ -115,7 +115,7 @@ func (g *GatewayAction) BatchGetGatewayHTTPRoute(namespace, appID string) ([]*ap return HTTPRouteConcise, nil } -//AddGatewayCertificate create gateway certificate +// AddGatewayCertificate create gateway certificate func (g *GatewayAction) AddGatewayCertificate(req *apimodel.GatewayCertificate) error { _, err := g.kubeClient.CoreV1().Secrets(req.Namespace).Create(context.Background(), &corev1.Secret{ TypeMeta: metav1.TypeMeta{ @@ -139,7 +139,7 @@ func (g *GatewayAction) AddGatewayCertificate(req *apimodel.GatewayCertificate) return nil } -//UpdateGatewayCertificate update gateway certificate +// UpdateGatewayCertificate update gateway certificate func (g *GatewayAction) UpdateGatewayCertificate(req *apimodel.GatewayCertificate) error { secret, err := g.kubeClient.CoreV1().Secrets(req.Namespace).Get(context.Background(), req.Name, metav1.GetOptions{}) if err != nil { @@ -180,7 +180,7 @@ func (g *GatewayAction) UpdateGatewayCertificate(req *apimodel.GatewayCertificat return nil } -//DeleteGatewayCertificate delete gateway certificate +// DeleteGatewayCertificate delete gateway certificate func (g *GatewayAction) DeleteGatewayCertificate(name, namespace string) error { err := g.kubeClient.CoreV1().Secrets(namespace).Delete(context.Background(), name, metav1.DeleteOptions{}) if err != nil { @@ -312,7 +312,7 @@ func handleGatewayRules(req *apimodel.GatewayHTTPRouteStruct) []v1beta1.HTTPRout return rules } -//AddGatewayHTTPRoute create gateway http route +// AddGatewayHTTPRoute create gateway http route func (g *GatewayAction) AddGatewayHTTPRoute(req *apimodel.GatewayHTTPRouteStruct) (*model.K8sResource, error) { gatewayNamespace := v1beta1.Namespace(req.GatewayNamespace) var hosts []v1beta1.Hostname @@ -376,7 +376,7 @@ func (g *GatewayAction) AddGatewayHTTPRoute(req *apimodel.GatewayHTTPRouteStruct return k8sresource[0], nil } -//GetGatewayHTTPRoute get gateway http route +// GetGatewayHTTPRoute get gateway http route func (g *GatewayAction) GetGatewayHTTPRoute(name, namespace string) (*apimodel.GatewayHTTPRouteStruct, error) { var req apimodel.GatewayHTTPRouteStruct route, err := g.gatewayClient.HTTPRoutes(namespace).Get(context.Background(), name, metav1.GetOptions{}) @@ -548,7 +548,7 @@ func (g *GatewayAction) GetGatewayHTTPRoute(name, namespace string) (*apimodel.G return &req, nil } -//UpdateGatewayHTTPRoute update gateway http route +// UpdateGatewayHTTPRoute update gateway http route func (g *GatewayAction) UpdateGatewayHTTPRoute(req *apimodel.GatewayHTTPRouteStruct) (*model.K8sResource, error) { rules := handleGatewayRules(req) gatewayNamespace := v1beta1.Namespace(req.GatewayNamespace) @@ -597,7 +597,7 @@ func (g *GatewayAction) UpdateGatewayHTTPRoute(req *apimodel.GatewayHTTPRouteStr return &res, nil } -//DeleteGatewayHTTPRoute delete gateway http route +// DeleteGatewayHTTPRoute delete gateway http route func (g *GatewayAction) DeleteGatewayHTTPRoute(name, namespace, appID string) error { err := g.gatewayClient.HTTPRoutes(namespace).Delete(context.Background(), name, metav1.DeleteOptions{}) if err != nil { @@ -1407,13 +1407,13 @@ func (g *GatewayAction) ListHTTPRulesByCertID(certID string) ([]*model.HTTPRule, return db.GetManager().HTTPRuleDao().ListByCertID(certID) } -//IPAndAvailablePort ip and advice available port +// IPAndAvailablePort ip and advice available port type IPAndAvailablePort struct { IP string `json:"ip"` AvailablePort int `json:"available_port"` } -//GetGatewayIPs get all gateway node ips +// GetGatewayIPs get all gateway node ips func (g *GatewayAction) GetGatewayIPs() []IPAndAvailablePort { defaultAvailablePort, _ := g.GetAvailablePort("0.0.0.0", false) defaultIps := []IPAndAvailablePort{{ diff --git a/api/handler/group/group_backup.go b/api/handler/group/group_backup.go index 8a40268b6..b72d92a33 100644 --- a/api/handler/group/group_backup.go +++ b/api/handler/group/group_backup.go @@ -42,7 +42,7 @@ import ( v1 "github.com/goodrain/rainbond/worker/appm/types/v1" ) -//Backup GroupBackup +// Backup GroupBackup // swagger:parameters groupBackup type Backup struct { // in: path @@ -69,19 +69,19 @@ type Backup struct { } } -//BackupHandle group app backup handle +// BackupHandle group app backup handle type BackupHandle struct { mqcli mqclient.MQClient statusCli *client.AppRuntimeSyncClient etcdCli *clientv3.Client } -//CreateBackupHandle CreateBackupHandle +// CreateBackupHandle CreateBackupHandle func CreateBackupHandle(MQClient mqclient.MQClient, statusCli *client.AppRuntimeSyncClient, etcdCli *clientv3.Client) *BackupHandle { return &BackupHandle{mqcli: MQClient, statusCli: statusCli, etcdCli: etcdCli} } -//NewBackup new backup task +// NewBackup new backup task func (h *BackupHandle) NewBackup(b Backup) (*dbmodel.AppBackup, *util.APIHandleError) { logger := event.GetManager().GetLogger(b.Body.EventID) var appBackup = dbmodel.AppBackup{ @@ -147,7 +147,7 @@ func (h *BackupHandle) NewBackup(b Backup) (*dbmodel.AppBackup, *util.APIHandleE return &appBackup, nil } -//GetBackup get one backup info +// GetBackup get one backup info func (h *BackupHandle) GetBackup(backupID string) (*dbmodel.AppBackup, *util.APIHandleError) { backup, err := db.GetManager().AppBackupDao().GetAppBackup(backupID) if err != nil { @@ -156,7 +156,7 @@ func (h *BackupHandle) GetBackup(backupID string) (*dbmodel.AppBackup, *util.API return backup, nil } -//DeleteBackup delete backup +// DeleteBackup delete backup func (h *BackupHandle) DeleteBackup(backupID string) error { backup, err := db.GetManager().AppBackupDao().GetAppBackup(backupID) if err != nil { @@ -182,7 +182,7 @@ func (h *BackupHandle) DeleteBackup(backupID string) error { return tx.Commit().Error } -//GetBackupByGroupID get some backup info by group id +// GetBackupByGroupID get some backup info by group id func (h *BackupHandle) GetBackupByGroupID(groupID string) ([]*dbmodel.AppBackup, *util.APIHandleError) { backups, err := db.GetManager().AppBackupDao().GetAppBackups(groupID) if err != nil { @@ -198,7 +198,7 @@ type AppSnapshot struct { PluginBuildVersions []*dbmodel.TenantPluginBuildVersion } -//RegionServiceSnapshot RegionServiceSnapshot +// RegionServiceSnapshot RegionServiceSnapshot type RegionServiceSnapshot struct { ServiceID string Service *dbmodel.TenantServices @@ -220,7 +220,7 @@ type RegionServiceSnapshot struct { PluginStreamPorts []*dbmodel.TenantServicesStreamPluginPort } -//snapshot +// snapshot func (h *BackupHandle) snapshot(ids []string, sourceDir string, force bool) error { var pluginIDs []string var services []*RegionServiceSnapshot @@ -353,7 +353,7 @@ func (h *BackupHandle) snapshot(ids []string, sourceDir string, force bool) erro return nil } -//BackupRestore BackupRestore +// BackupRestore BackupRestore type BackupRestore struct { BackupID string `json:"backup_id"` Body struct { @@ -375,7 +375,7 @@ type BackupRestore struct { } } -//RestoreResult RestoreResult +// RestoreResult RestoreResult type RestoreResult struct { Status string `json:"status"` Message string `json:"message"` @@ -389,7 +389,7 @@ type RestoreResult struct { CacheDir string `json:"cache_dir"` } -//Info service cache info +// Info service cache info type Info struct { ServiceID string ServiceAlias string @@ -397,8 +397,8 @@ type Info struct { LBPorts map[int]int } -//RestoreBackup restore a backup version -//all app could be closed before restore +// RestoreBackup restore a backup version +// all app could be closed before restore func (h *BackupHandle) RestoreBackup(br BackupRestore) (*RestoreResult, *util.APIHandleError) { logger := event.GetManager().GetLogger(br.Body.EventID) backup, Aerr := h.GetBackup(br.BackupID) @@ -448,7 +448,7 @@ func (h *BackupHandle) RestoreBackup(br BackupRestore) (*RestoreResult, *util.AP return rr, nil } -//RestoreBackupResult RestoreBackupResult +// RestoreBackupResult RestoreBackupResult func (h *BackupHandle) RestoreBackupResult(restoreID string) (*RestoreResult, *util.APIHandleError) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -474,7 +474,7 @@ func (h *BackupHandle) RestoreBackupResult(restoreID string) (*RestoreResult, *u return &rr, nil } -//BackupCopy BackupCopy +// BackupCopy BackupCopy type BackupCopy struct { Body struct { EventID string `json:"event_id" validate:"event_id|required"` @@ -489,7 +489,7 @@ type BackupCopy struct { } } -//BackupCopy BackupCopy +// BackupCopy BackupCopy func (h *BackupHandle) BackupCopy(b BackupCopy) (*dbmodel.AppBackup, *util.APIHandleError) { var ab dbmodel.AppBackup ab.BackupID = core_util.NewUUID() diff --git a/api/handler/handler.go b/api/handler/handler.go index ead0fbd26..4ace3ceb8 100644 --- a/api/handler/handler.go +++ b/api/handler/handler.go @@ -34,6 +34,7 @@ import ( "k8s.io/client-go/dynamic" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" + "kubevirt.io/client-go/kubecli" k8sclient "sigs.k8s.io/controller-runtime/pkg/client" gateway "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/typed/apis/v1beta1" ) @@ -50,6 +51,7 @@ func InitHandle(conf option.Config, mapper meta.RESTMapper, dynamicClient dynamic.Interface, gatewayClient *gateway.GatewayV1beta1Client, + kubevirtCli kubecli.KubevirtClient, ) error { mq := api_db.MQManager{ EtcdClientArgs: etcdClientArgs, @@ -68,7 +70,7 @@ func InitHandle(conf option.Config, return err } dbmanager := db.GetManager() - defaultServieHandler = CreateManager(conf, mqClient, etcdcli, statusCli, prometheusCli, rainbondClient, kubeClient) + defaultServieHandler = CreateManager(conf, mqClient, etcdcli, statusCli, prometheusCli, rainbondClient, kubeClient, kubevirtCli, dbmanager) defaultPluginHandler = CreatePluginManager(mqClient) defaultAppHandler = CreateAppManager(mqClient) defaultTenantHandler = CreateTenManager(mqClient, statusCli, &conf, kubeClient, prometheusCli, k8sClient) diff --git a/api/handler/netRules.go b/api/handler/netRules.go index 7a4fc5bb7..4b372db48 100644 --- a/api/handler/netRules.go +++ b/api/handler/netRules.go @@ -31,19 +31,19 @@ import ( "github.com/sirupsen/logrus" ) -//NetRulesAction rules action struct +// NetRulesAction rules action struct type NetRulesAction struct { etcdCli *clientv3.Client } -//CreateNetRulesManager get net rules manager +// CreateNetRulesManager get net rules manager func CreateNetRulesManager(etcdCli *clientv3.Client) *NetRulesAction { return &NetRulesAction{ etcdCli: etcdCli, } } -//CreateDownStreamNetRules CreateDownStreamNetRules +// CreateDownStreamNetRules CreateDownStreamNetRules func (n *NetRulesAction) CreateDownStreamNetRules( tenantID string, rs *api_model.SetNetDownStreamRuleStruct) *util.APIHandleError { @@ -70,7 +70,7 @@ func (n *NetRulesAction) CreateDownStreamNetRules( return nil } -//GetDownStreamNetRule GetDownStreamNetRule +// GetDownStreamNetRule GetDownStreamNetRule func (n *NetRulesAction) GetDownStreamNetRule( tenantID, serviceAlias, @@ -103,7 +103,7 @@ func (n *NetRulesAction) GetDownStreamNetRule( return nil, nil } -//UpdateDownStreamNetRule UpdateDownStreamNetRule +// UpdateDownStreamNetRule UpdateDownStreamNetRule func (n *NetRulesAction) UpdateDownStreamNetRule( tenantID string, urs *api_model.UpdateNetDownStreamRuleStruct) *util.APIHandleError { diff --git a/api/handler/netRules_test.go b/api/handler/netRules_test.go index 5f8d68214..35aa41a8c 100644 --- a/api/handler/netRules_test.go +++ b/api/handler/netRules_test.go @@ -23,7 +23,6 @@ import ( "fmt" "time" - "github.com/coreos/etcd/clientv3" api_model "github.com/goodrain/rainbond/api/model" "testing" diff --git a/api/handler/nodes.go b/api/handler/nodes.go index 210477660..c3d1be310 100644 --- a/api/handler/nodes.go +++ b/api/handler/nodes.go @@ -194,6 +194,12 @@ func (n *nodesHandle) GetNodeInfo(ctx context.Context, nodeName string) (res mod break } } + if containerDiskCap == 0 { + containerDiskCap = diskCap + } + if containerDiskAvail == 0 { + containerDiskAvail = diskAvail + } res.Resource.CapDisk = diskCap res.Resource.ReqDisk = diskCap - diskAvail diff --git a/api/handler/registry_auth_secret_action.go b/api/handler/registry_auth_secret_action.go index 56cd7e002..74a43cb59 100644 --- a/api/handler/registry_auth_secret_action.go +++ b/api/handler/registry_auth_secret_action.go @@ -34,7 +34,7 @@ type RegistryAuthSecretAction struct { etcdCli *clientv3.Client } -//CreateRegistryAuthSecretManager creates registry auth secret manager +// CreateRegistryAuthSecretManager creates registry auth secret manager func CreateRegistryAuthSecretManager(dbmanager db.Manager, mqclient client.MQClient, etcdCli *clientv3.Client) *RegistryAuthSecretAction { return &RegistryAuthSecretAction{ dbmanager: dbmanager, @@ -43,7 +43,7 @@ func CreateRegistryAuthSecretManager(dbmanager db.Manager, mqclient client.MQCli } } -//AddOrUpdateRegistryAuthSecret adds or updates registry auth secret +// AddOrUpdateRegistryAuthSecret adds or updates registry auth secret func (g *RegistryAuthSecretAction) AddOrUpdateRegistryAuthSecret(req *apimodel.AddOrUpdateRegistryAuthSecretStruct) error { body := make(map[string]interface{}) body["action"] = "apply" diff --git a/api/handler/service.go b/api/handler/service.go index 98db56e55..c4586d4fc 100644 --- a/api/handler/service.go +++ b/api/handler/service.go @@ -24,6 +24,8 @@ import ( "fmt" "github.com/goodrain/rainbond/util/constants" "io" + v1 "kubevirt.io/api/core/v1" + "kubevirt.io/client-go/kubecli" "net/http" "os" "strconv" @@ -64,7 +66,7 @@ import ( // ErrServiceNotClosed - var ErrServiceNotClosed = errors.New("Service has not been closed") -//ServiceAction service act +// ServiceAction service act type ServiceAction struct { MQClient gclient.MQClient EtcdCli *clientv3.Client @@ -73,6 +75,8 @@ type ServiceAction struct { conf option.Config rainbondClient versioned.Interface kubeClient kubernetes.Interface + kubevirtClient kubecli.KubevirtClient + dbmanager db.Manager } type dCfg struct { @@ -83,14 +87,16 @@ type dCfg struct { Password string `json:"password"` } -//CreateManager create Manger +// CreateManager create Manger func CreateManager(conf option.Config, mqClient gclient.MQClient, etcdCli *clientv3.Client, statusCli *client.AppRuntimeSyncClient, prometheusCli prometheus.Interface, rainbondClient versioned.Interface, - kubeClient kubernetes.Interface) *ServiceAction { + kubeClient kubernetes.Interface, + kubevirtClient kubecli.KubevirtClient, + dbmanager db.Manager) *ServiceAction { return &ServiceAction{ MQClient: mqClient, EtcdCli: etcdCli, @@ -99,10 +105,12 @@ func CreateManager(conf option.Config, prometheusCli: prometheusCli, rainbondClient: rainbondClient, kubeClient: kubeClient, + kubevirtClient: kubevirtClient, + dbmanager: dbmanager, } } -//ServiceBuild service build +// ServiceBuild service build func (s *ServiceAction) ServiceBuild(tenantID, serviceID string, r *api_model.BuildServiceStruct) error { eventID := r.Body.EventID logger := event.GetManager().GetLogger(eventID) @@ -260,7 +268,7 @@ func (s *ServiceAction) isWindowsService(serviceID string) bool { return true } -//AddLabel add labels +// AddLabel add labels func (s *ServiceAction) AddLabel(l *api_model.LabelsStruct, serviceID string) error { tx := db.GetManager().Begin() @@ -289,7 +297,7 @@ func (s *ServiceAction) AddLabel(l *api_model.LabelsStruct, serviceID string) er return nil } -//UpdateLabel updates labels +// UpdateLabel updates labels func (s *ServiceAction) UpdateLabel(l *api_model.LabelsStruct, serviceID string) error { tx := db.GetManager().Begin() defer func() { @@ -328,7 +336,7 @@ func (s *ServiceAction) UpdateLabel(l *api_model.LabelsStruct, serviceID string) return nil } -//DeleteLabel deletes label +// DeleteLabel deletes label func (s *ServiceAction) DeleteLabel(l *api_model.LabelsStruct, serviceID string) error { tx := db.GetManager().Begin() defer func() { @@ -353,7 +361,7 @@ func (s *ServiceAction) DeleteLabel(l *api_model.LabelsStruct, serviceID string) return nil } -//StartStopService start service +// StartStopService start service func (s *ServiceAction) StartStopService(sss *api_model.StartStopStruct) error { services, err := db.GetManager().TenantServiceDao().GetServiceByID(sss.ServiceID) if err != nil { @@ -379,7 +387,29 @@ func (s *ServiceAction) StartStopService(sss *api_model.StartStopStruct) error { return nil } -//ServiceVertical vertical service +// PauseUNPauseService - +func (s *ServiceAction) PauseUNPauseService(serviceID string, pauseORunpause string) error { + vmis, err := s.kubevirtClient.VirtualMachineInstance("").List(context.Background(), &metav1.ListOptions{LabelSelector: "service_id=" + serviceID}) + if err != nil { + return err + } + if vmis.Items != nil && len(vmis.Items) > 0 { + vm := vmis.Items[0] + if pauseORunpause == "pause" { + err = s.kubevirtClient.VirtualMachineInstance(vm.Namespace).Pause(context.Background(), vm.Name, &v1.PauseOptions{}) + } else if pauseORunpause == "unpause" { + err = s.kubevirtClient.VirtualMachineInstance(vm.Namespace).Unpause(context.Background(), vm.Name, &v1.UnpauseOptions{}) + } + if err != nil { + return err + } + } else { + return fmt.Errorf("service id is %v vm is not exist", serviceID) + } + return nil +} + +// ServiceVertical vertical service func (s *ServiceAction) ServiceVertical(ctx context.Context, vs *model.VerticalScalingTaskBody) error { service, err := db.GetManager().TenantServiceDao().GetServiceByID(vs.ServiceID) if err != nil { @@ -435,7 +465,7 @@ func (s *ServiceAction) ServiceVertical(ctx context.Context, vs *model.VerticalS return nil } -//ServiceHorizontal Service Horizontal +// ServiceHorizontal Service Horizontal func (s *ServiceAction) ServiceHorizontal(hs *model.HorizontalScalingTaskBody) error { service, err := db.GetManager().TenantServiceDao().GetServiceByID(hs.ServiceID) if err != nil { @@ -483,7 +513,7 @@ func (s *ServiceAction) ServiceHorizontal(hs *model.HorizontalScalingTaskBody) e return nil } -//ServiceUpgrade service upgrade +// ServiceUpgrade service upgrade func (s *ServiceAction) ServiceUpgrade(ru *model.RollingUpgradeTaskBody) error { services, err := db.GetManager().TenantServiceDao().GetServiceByID(ru.ServiceID) if err != nil { @@ -524,7 +554,7 @@ func (s *ServiceAction) ServiceUpgrade(ru *model.RollingUpgradeTaskBody) error { return nil } -//ServiceCreate create service +// ServiceCreate create service func (s *ServiceAction) ServiceCreate(sc *api_model.ServiceStruct) error { jsonSC, err := ffjson.Marshal(sc) if err != nil { @@ -880,7 +910,7 @@ func (s *ServiceAction) convertProbeModel(req *api_model.ServiceProbe, serviceID } } -//ServiceUpdate update service +// ServiceUpdate update service func (s *ServiceAction) ServiceUpdate(sc map[string]interface{}) error { ts, err := db.GetManager().TenantServiceDao().GetServiceByID(sc["service_id"].(string)) if err != nil { @@ -947,7 +977,7 @@ func (s *ServiceAction) ServiceUpdate(sc map[string]interface{}) error { return nil } -//LanguageSet language set +// LanguageSet language set func (s *ServiceAction) LanguageSet(langS *api_model.LanguageSet) error { logrus.Debugf("service id is %s, language is %s", langS.ServiceID, langS.Language) services, err := db.GetManager().TenantServiceDao().GetServiceByID(langS.ServiceID) @@ -965,7 +995,7 @@ func (s *ServiceAction) LanguageSet(langS *api_model.LanguageSet) error { return nil } -//GetService get service(s) +// GetService get service(s) func (s *ServiceAction) GetService(tenantID string) ([]*dbmodel.TenantServices, error) { services, err := db.GetManager().TenantServiceDao().GetServicesAllInfoByTenantID(tenantID) if err != nil { @@ -985,7 +1015,7 @@ func (s *ServiceAction) GetService(tenantID string) ([]*dbmodel.TenantServices, return services, nil } -//GetServicesByAppID get service(s) by appID +// GetServicesByAppID get service(s) by appID func (s *ServiceAction) GetServicesByAppID(appID string, page, pageSize int) (*api_model.ListServiceResponse, error) { var resp api_model.ListServiceResponse services, total, err := db.GetManager().TenantServiceDao().GetServicesInfoByAppID(appID, page, pageSize) @@ -1015,7 +1045,7 @@ func (s *ServiceAction) GetServicesByAppID(appID string, page, pageSize int) (*a return &resp, nil } -//GetPagedTenantRes get pagedTenantServiceRes(s) +// GetPagedTenantRes get pagedTenantServiceRes(s) func (s *ServiceAction) GetPagedTenantRes(offset, len int) ([]*api_model.TenantResource, int, error) { allstatus := s.statusCli.GetAllStatus() var serviceIDs []string @@ -1044,7 +1074,7 @@ func (s *ServiceAction) GetPagedTenantRes(offset, len int) ([]*api_model.TenantR return result, count, nil } -//GetTenantRes get pagedTenantServiceRes(s) +// GetTenantRes get pagedTenantServiceRes(s) func (s *ServiceAction) GetTenantRes(uuid string) (*api_model.TenantResource, error) { if logrus.IsLevelEnabled(logrus.DebugLevel) { defer core_util.Elapsed("[ServiceAction] get tenant resource")() @@ -1125,7 +1155,7 @@ func (s *ServiceAction) GetTenantRes(uuid string) (*api_model.TenantResource, er // return &res, nil // } -//GetServicesDiskDeprecated get service disk +// GetServicesDiskDeprecated get service disk // // Deprecated func GetServicesDiskDeprecated(ids []string, prometheusCli prometheus.Interface) map[string]float64 { @@ -1146,7 +1176,7 @@ func GetServicesDiskDeprecated(ids []string, prometheusCli prometheus.Interface) return result } -//CodeCheck code check +// CodeCheck code check func (s *ServiceAction) CodeCheck(c *api_model.CheckCodeStruct) error { err := s.MQClient.SendBuilderTopic(gclient.TaskStruct{ TaskType: "code_check", @@ -1160,7 +1190,7 @@ func (s *ServiceAction) CodeCheck(c *api_model.CheckCodeStruct) error { return nil } -//ServiceDepend service depend +// ServiceDepend service depend func (s *ServiceAction) ServiceDepend(action string, ds *api_model.DependService) error { switch action { case "add": @@ -1188,7 +1218,7 @@ func (s *ServiceAction) ServiceDepend(action string, ds *api_model.DependService return nil } -//EnvAttr env attr +// EnvAttr env attr func (s *ServiceAction) EnvAttr(action string, at *dbmodel.TenantServiceEnvVar) error { switch action { case "add": @@ -1296,7 +1326,7 @@ func (s *ServiceAction) SyncComponentPorts(tx *gorm.DB, app *dbmodel.Application return db.GetManager().TenantServicesPortDaoTransactions(tx).CreateOrUpdatePortsInBatch(ports) } -//PortVar port var +// PortVar port var func (s *ServiceAction) PortVar(action, tenantID, serviceID string, vps *api_model.ServicePorts, oldPort int) error { crt, err := db.GetManager().TenantServicePluginRelationDao().CheckSomeModelPluginByServiceID( serviceID, @@ -1386,7 +1416,7 @@ func (s *ServiceAction) PortVar(action, tenantID, serviceID string, vps *api_mod return nil } -//PortOuter 端口对外服务操作 +// PortOuter 端口对外服务操作 func (s *ServiceAction) PortOuter(tenantName, serviceID string, containerPort int, servicePort *api_model.ServicePortInnerOrOuter) (*dbmodel.TenantServiceLBMappingPort, string, error) { p, err := db.GetManager().TenantServicesPortDao().GetPort(serviceID, containerPort) @@ -1513,8 +1543,8 @@ func (s *ServiceAction) PortOuter(tenantName, serviceID string, containerPort in return vsPort, p.Protocol, nil } -//PortInner 端口对内服务操作 -//TODO: send task to worker +// PortInner 端口对内服务操作 +// TODO: send task to worker func (s *ServiceAction) PortInner(tenantName, serviceID, operation string, port int) error { p, err := db.GetManager().TenantServicesPortDao().GetPort(serviceID, port) if err != nil { @@ -1629,7 +1659,7 @@ func (s *ServiceAction) PortInner(tenantName, serviceID, operation string, port return nil } -//VolumnVar var volumn +// VolumnVar var volumn func (s *ServiceAction) VolumnVar(tsv *dbmodel.TenantServiceVolume, tenantID, fileContent, action string) *util.APIHandleError { localPath := os.Getenv("LOCAL_DATA_PATH") sharePath := os.Getenv("SHARE_DATA_PATH") @@ -1659,6 +1689,8 @@ func (s *ServiceAction) VolumnVar(tsv *dbmodel.TenantServiceVolume, tenantID, fi return util.CreateAPIHandleError(400, fmt.Errorf("应用类型为'无状态'.不支持本地存储")) } tsv.HostPath = fmt.Sprintf("%s/tenant/%s/service/%s%s", localPath, tenantID, tsv.ServiceID, tsv.VolumePath) + case dbmodel.VMVolumeType.String(): + tsv.HostPath = fmt.Sprintf("%s/tenant/%s/service/%s%s", sharePath, tenantID, tsv.ServiceID, tsv.VolumePath) } } util.SetVolumeDefaultValue(tsv) @@ -1781,7 +1813,7 @@ func (s *ServiceAction) UpdVolume(sid string, req *api_model.UpdVolumeReq) error return nil } -//GetVolumes 获取应用全部存储 +// GetVolumes 获取应用全部存储 func (s *ServiceAction) GetVolumes(serviceID string) ([]*api_model.VolumeWithStatusStruct, *util.APIHandleError) { volumeWithStatusList := make([]*api_model.VolumeWithStatusStruct, 0) vs, err := db.GetManager().TenantServiceVolumeDao().GetTenantServiceVolumesByServiceID(serviceID) @@ -1835,7 +1867,7 @@ func (s *ServiceAction) GetVolumes(serviceID string) ([]*api_model.VolumeWithSta return volumeWithStatusList, nil } -//VolumeDependency VolumeDependency +// VolumeDependency VolumeDependency func (s *ServiceAction) VolumeDependency(tsr *dbmodel.TenantServiceMountRelation, action string) *util.APIHandleError { switch action { case "add": @@ -1870,7 +1902,7 @@ func (s *ServiceAction) VolumeDependency(tsr *dbmodel.TenantServiceMountRelation return nil } -//GetDepVolumes 获取依赖存储 +// GetDepVolumes 获取依赖存储 func (s *ServiceAction) GetDepVolumes(serviceID string) ([]*dbmodel.TenantServiceMountRelation, *util.APIHandleError) { dbManager := db.GetManager() mounts, err := dbManager.TenantServiceMountRelationDao().GetTenantServiceMountRelationsByService(serviceID) @@ -1880,7 +1912,7 @@ func (s *ServiceAction) GetDepVolumes(serviceID string) ([]*dbmodel.TenantServic return mounts, nil } -//ServiceProbe ServiceProbe +// ServiceProbe ServiceProbe func (s *ServiceAction) ServiceProbe(tsp *dbmodel.TenantServiceProbe, action string) error { switch action { case "add": @@ -1899,7 +1931,7 @@ func (s *ServiceAction) ServiceProbe(tsp *dbmodel.TenantServiceProbe, action str return nil } -//RollBack RollBack +// RollBack RollBack func (s *ServiceAction) RollBack(rs *api_model.RollbackStruct) error { service, err := db.GetManager().TenantServiceDao().GetServiceByID(rs.ServiceID) if err != nil { @@ -1931,7 +1963,7 @@ func (s *ServiceAction) RollBack(rs *api_model.RollbackStruct) error { return nil } -//GetStatus GetStatus +// GetStatus GetStatus func (s *ServiceAction) GetStatus(serviceID string) (*api_model.StatusList, error) { services, errS := db.GetManager().TenantServiceDao().GetServiceByID(serviceID) if errS != nil { @@ -1962,7 +1994,7 @@ func (s *ServiceAction) GetStatus(serviceID string) (*api_model.StatusList, erro return sl, nil } -//GetServicesStatus 获取一组应用状态,若 serviceIDs为空,获取租户所有应用状态 +// GetServicesStatus 获取一组应用状态,若 serviceIDs为空,获取租户所有应用状态 func (s *ServiceAction) GetServicesStatus(tenantID string, serviceIDs []string) []map[string]interface{} { if len(serviceIDs) == 0 { services, _ := db.GetManager().TenantServiceDao().GetServicesByTenantID(tenantID) @@ -2009,7 +2041,7 @@ func (s *ServiceAction) GetEnterpriseServicesStatus(enterpriseID string) (map[st return statusList, nil } -//CreateTenant create tenant +// CreateTenant create tenant func (s *ServiceAction) CreateTenant(t *dbmodel.Tenants) error { tenant, _ := db.GetManager().TenantDao().GetTenantIDByName(t.Name) if tenant != nil { @@ -2050,7 +2082,7 @@ func (s *ServiceAction) CreateTenant(t *dbmodel.Tenants) error { }) } -//CreateTenandIDAndName create tenant_id and tenant_name +// CreateTenandIDAndName create tenant_id and tenant_name func (s *ServiceAction) CreateTenandIDAndName(eid string) (string, string, error) { id := uuid.NewV4().String() uid := strings.Replace(id, "-", "", -1) @@ -2059,13 +2091,13 @@ func (s *ServiceAction) CreateTenandIDAndName(eid string) (string, string, error return uid, name, nil } -//K8sPodInfos - +// K8sPodInfos - type K8sPodInfos struct { NewPods []*K8sPodInfo `json:"new_pods"` OldPods []*K8sPodInfo `json:"old_pods"` } -//K8sPodInfo for api +// K8sPodInfo for api type K8sPodInfo struct { PodName string `json:"pod_name"` PodIP string `json:"pod_ip"` @@ -2074,7 +2106,7 @@ type K8sPodInfo struct { Container map[string]map[string]string `json:"container"` } -//GetPods get pods +// GetPods get pods func (s *ServiceAction) GetPods(serviceID string) (*K8sPodInfos, error) { pods, err := s.statusCli.GetServicePods(serviceID) if err != nil && !strings.Contains(err.Error(), server.ErrAppServiceNotFound.Error()) && @@ -2123,7 +2155,7 @@ func (s *ServiceAction) GetPods(serviceID string) (*K8sPodInfos, error) { }, nil } -//GetMultiServicePods get pods +// GetMultiServicePods get pods func (s *ServiceAction) GetMultiServicePods(serviceIDs []string) (*K8sPodInfos, error) { mpods, err := s.statusCli.GetMultiServicePods(serviceIDs) if err != nil && !strings.Contains(err.Error(), server.ErrAppServiceNotFound.Error()) && @@ -2170,7 +2202,7 @@ func (s *ServiceAction) GetComponentPodNums(ctx context.Context, componentIDs [] return podNums, nil } -//GetPodContainerMemory Use Prometheus to query memory resources +// GetPodContainerMemory Use Prometheus to query memory resources func (s *ServiceAction) GetPodContainerMemory(podNames []string) (map[string]map[string]string, error) { memoryUsageMap := make(map[string]map[string]string, 10) queryName := strings.Join(podNames, "|") @@ -2195,7 +2227,7 @@ func (s *ServiceAction) GetPodContainerMemory(podNames []string) (map[string]map return memoryUsageMap, nil } -//TransServieToDelete trans service info to delete table +// TransServieToDelete trans service info to delete table func (s *ServiceAction) TransServieToDelete(ctx context.Context, tenantID, serviceID string) error { _, err := db.GetManager().TenantServiceDao().GetServiceByID(serviceID) if err != nil && gorm.ErrRecordNotFound == err { @@ -2352,7 +2384,7 @@ func (s *ServiceAction) gcTaskBody(tenantID, serviceID string) (map[string]inter }, nil } -//GetServiceDeployInfo get service deploy info +// GetServiceDeployInfo get service deploy info func (s *ServiceAction) GetServiceDeployInfo(tenantID, serviceID string) (*pb.DeployInfo, *util.APIHandleError) { info, err := s.statusCli.GetServiceDeployInfo(serviceID) if err != nil { @@ -2861,7 +2893,7 @@ func (s *ServiceAction) SyncComponentPlugins(tx *gorm.DB, app *dbmodel.Applicati return db.GetManager().TenantPluginVersionConfigDaoTransactions(tx).CreateOrUpdatePluginVersionConfigsInBatch(pluginVersionConfigs) } -//handlePluginMappingPort - +// handlePluginMappingPort - func (s *ServiceAction) handlePluginMappingPort(tenantID, componentID, pluginModel string, ports []*api_model.BasePort) []*dbmodel.TenantServicesStreamPluginPort { existPorts := make(map[int]struct{}) for _, port := range ports { @@ -3013,7 +3045,7 @@ func (s *ServiceAction) Log(w http.ResponseWriter, r *http.Request, component *d return nil } -//TransStatus trans service status +// TransStatus trans service status func TransStatus(eStatus string) string { switch eStatus { case "starting": @@ -3040,6 +3072,8 @@ func TransStatus(eStatus string) string { return "已部署" case "succeeded": return "已完成" + case "paused": + return "挂起" } return "" } diff --git a/api/handler/service_handler.go b/api/handler/service_handler.go index 52b9dcc32..9c6b38149 100644 --- a/api/handler/service_handler.go +++ b/api/handler/service_handler.go @@ -31,13 +31,14 @@ import ( "github.com/jinzhu/gorm" ) -//ServiceHandler service handler +// ServiceHandler service handler type ServiceHandler interface { ServiceBuild(tenantID, serviceID string, r *api_model.BuildServiceStruct) error AddLabel(l *api_model.LabelsStruct, serviceID string) error DeleteLabel(l *api_model.LabelsStruct, serviceID string) error UpdateLabel(l *api_model.LabelsStruct, serviceID string) error StartStopService(s *api_model.StartStopStruct) error + PauseUNPauseService(serviceID string, pauseORunpause string) error ServiceVertical(ctx context.Context, v *model.VerticalScalingTaskBody) error ServiceHorizontal(h *model.HorizontalScalingTaskBody) error ServiceUpgrade(r *model.RollingUpgradeTaskBody) error diff --git a/api/handler/service_operation.go b/api/handler/service_operation.go index 2430f792c..abc922d55 100644 --- a/api/handler/service_operation.go +++ b/api/handler/service_operation.go @@ -33,7 +33,7 @@ import ( "github.com/sirupsen/logrus" ) -//OperationHandler operation handler +// OperationHandler operation handler type OperationHandler struct { mqCli gclient.MQClient dryRun bool @@ -42,7 +42,7 @@ type OperationHandler struct { end bool } -//OperationResult batch operation result +// OperationResult batch operation result type OperationResult struct { ServiceID string `json:"service_id"` Operation string `json:"operation"` @@ -52,14 +52,14 @@ type OperationResult struct { DeployVersion string `json:"deploy_version"` } -//CreateOperationHandler create operation handler +// CreateOperationHandler create operation handler func CreateOperationHandler(mqCli gclient.MQClient) *OperationHandler { return &OperationHandler{ mqCli: mqCli, } } -//SetHelmParameter pass the helm parameter +// SetHelmParameter pass the helm parameter func (o *OperationHandler) SetHelmParameter(dryRun bool, helmChart *model.HelmChart, eventIDs []string, end bool) { o.helmChart = helmChart o.dryRun = dryRun @@ -67,8 +67,8 @@ func (o *OperationHandler) SetHelmParameter(dryRun bool, helmChart *model.HelmCh o.end = end } -//Build service build,will create new version -//if deploy version not define, will create by time +// Build service build,will create new version +// if deploy version not define, will create by time func (o *OperationHandler) Build(batchOpReq model.ComponentOpReq) (*model.ComponentOpResult, error) { res := batchOpReq.BatchOpFailureItem() if err := o.build(batchOpReq); err != nil { @@ -148,13 +148,19 @@ func (o *OperationHandler) build(batchOpReq model.ComponentOpReq) error { if err = o.exportHelmChart(buildReq, service); err != nil { return err } + case model.FromVMBuildKing: + version.ImageName = buildReq.ImageInfo.ImageURL + err = db.GetManager().VersionInfoDao().UpdateModel(&version) + if err := o.buildFromVM(buildReq, service); err != nil { + return err + } default: return errors.New("unsupported build kind: " + buildReq.Kind) } return nil } -//Stop service stop +// Stop service stop func (o *OperationHandler) Stop(batchOpReq model.ComponentOpReq) error { service, err := db.GetManager().TenantServiceDao().GetServiceByID(batchOpReq.GetComponentID()) if err != nil { @@ -172,7 +178,7 @@ func (o *OperationHandler) Stop(batchOpReq model.ComponentOpReq) error { return nil } -//Start service start +// Start service start func (o *OperationHandler) Start(batchOpReq model.ComponentOpReq) error { service, err := db.GetManager().TenantServiceDao().GetServiceByID(batchOpReq.GetComponentID()) if err != nil { @@ -191,7 +197,7 @@ func (o *OperationHandler) Start(batchOpReq model.ComponentOpReq) error { return nil } -//Upgrade service upgrade +// Upgrade service upgrade func (o *OperationHandler) Upgrade(batchOpReq model.ComponentOpReq) (*model.ComponentOpResult, error) { res := batchOpReq.BatchOpFailureItem() if err := o.upgrade(batchOpReq); err != nil { @@ -244,7 +250,7 @@ func (o *OperationHandler) upgrade(batchOpReq model.ComponentOpReq) error { return nil } -//RollBack service rollback +// RollBack service rollback func (o *OperationHandler) RollBack(rollback model.RollbackInfoRequestStruct) (re OperationResult) { re.Operation = "rollback" re.ServiceID = rollback.ServiceID @@ -403,3 +409,24 @@ func (o *OperationHandler) isWindowsService(serviceID string) bool { } return true } + +func (o *OperationHandler) buildFromVM(r *model.ComponentBuildReq, service *dbmodel.TenantServices) error { + if logrus.IsLevelEnabled(logrus.DebugLevel) { + util.Elapsed(fmt.Sprintf("[buildFromImage] build component(%s)", r.GetComponentID()))() + } + + if r.ImageInfo.ImageURL == "" || r.DeployVersion == "" { + return fmt.Errorf("build from image failure, args error") + } + body := make(map[string]interface{}) + body["arch"] = r.Arch + body["vm_image_source"] = r.ImageInfo.VMImageSource + body["service_id"] = r.ServiceID + body["deploy_version"] = r.DeployVersion + body["tenant_id"] = service.TenantID + body["configs"] = r.Configs + body["action"] = r.Action + body["event_id"] = r.EventID + body["image"] = r.ImageInfo.ImageURL + return o.sendBuildTopic(service.ServiceID, "build_from_vm", body, r.Arch) +} diff --git a/api/handler/share/plugin_share.go b/api/handler/share/plugin_share.go index bbdd05206..a3628b19c 100644 --- a/api/handler/share/plugin_share.go +++ b/api/handler/share/plugin_share.go @@ -33,20 +33,20 @@ import ( "github.com/twinj/uuid" ) -//PluginShareHandle plugin share +// PluginShareHandle plugin share type PluginShareHandle struct { MQClient client.MQClient EtcdCli *clientv3.Client } -//PluginResult share plugin api return +// PluginResult share plugin api return type PluginResult struct { EventID string `json:"event_id"` ShareID string `json:"share_id"` ImageName string `json:"image_name"` } -//PluginShare PluginShare +// PluginShare PluginShare type PluginShare struct { // in: path // required: true @@ -74,7 +74,7 @@ type PluginShare struct { } } -//Share share app +// Share share app func (s *PluginShareHandle) Share(ss PluginShare) (*PluginResult, *util.APIHandleError) { _, err := db.GetManager().TenantPluginDao().GetPluginByID(ss.PluginID, ss.TenantID) if err != nil { @@ -111,7 +111,7 @@ func (s *PluginShareHandle) Share(ss PluginShare) (*PluginResult, *util.APIHandl return &PluginResult{EventID: ss.Body.EventID, ShareID: shareID, ImageName: shareImageName}, nil } -//ShareResult 分享应用结果查询 +// ShareResult 分享应用结果查询 func (s *PluginShareHandle) ShareResult(shareID string) (i exector.ShareStatus, e *util.APIHandleError) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/api/handler/share/service_share.go b/api/handler/share/service_share.go index 1dd5ea570..f8331dec0 100644 --- a/api/handler/share/service_share.go +++ b/api/handler/share/service_share.go @@ -38,13 +38,13 @@ import ( "github.com/sirupsen/logrus" ) -//ServiceShareHandle service share +// ServiceShareHandle service share type ServiceShareHandle struct { MQClient client.MQClient EtcdCli *clientv3.Client } -//APIResult 分享接口返回 +// APIResult 分享接口返回 type APIResult struct { EventID string `json:"event_id"` ShareID string `json:"share_id"` @@ -52,7 +52,7 @@ type APIResult struct { SlugPath string `json:"slug_path,omitempty"` } -//Share 分享应用 +// Share 分享应用 func (s *ServiceShareHandle) Share(serviceID string, ss api_model.ServiceShare) (*APIResult, *util.APIHandleError) { service, err := db.GetManager().TenantServiceDao().GetServiceByID(serviceID) if err != nil { @@ -121,7 +121,7 @@ func (s *ServiceShareHandle) Share(serviceID string, ss api_model.ServiceShare) return &APIResult{EventID: ss.Body.EventID, ShareID: shareID, ImageName: shareImageName, SlugPath: slugPath}, nil } -//ShareResult 分享应用结果查询 +// ShareResult 分享应用结果查询 func (s *ServiceShareHandle) ShareResult(shareID string) (i exector.ShareStatus, e *util.APIHandleError) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/api/model/model.go b/api/model/model.go index 800599725..66fe0207d 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1099,7 +1099,7 @@ type ServiceCheckStruct struct { //检测来源类型 // in: body // required: true - SourceType string `json:"source_type" validate:"source_type|required|in:docker-run,docker-compose,sourcecode,third-party-service,package_build"` + SourceType string `json:"source_type" validate:"source_type|required|in:docker-run,vm-run,docker-compose,sourcecode,third-party-service,package_build"` CheckOS string `json:"check_os"` // 检测来源定义, @@ -1671,10 +1671,11 @@ type BuildImageInfo struct { // 镜像地址 // in: body // required: false - ImageURL string `json:"image_url" validate:"image_url"` - User string `json:"user" validate:"user"` - Password string `json:"password" validate:"password"` - Cmd string `json:"cmd"` + ImageURL string `json:"image_url" validate:"image_url"` + User string `json:"user" validate:"user"` + Password string `json:"password" validate:"password"` + Cmd string `json:"cmd"` + VMImageSource string `json:"vm_image_source"` } // BuildCodeInfo - @@ -1714,6 +1715,9 @@ type BuildSlugInfo struct { // FromImageBuildKing build from image var FromImageBuildKing = "build_from_image" +// FromVMBuildKing build from vm +var FromVMBuildKing = "build_from_vm" + // FromCodeBuildKing build from code var FromCodeBuildKing = "build_from_source_code" diff --git a/api/server/api.go b/api/server/api.go index 3427972f0..c05ab5574 100644 --- a/api/server/api.go +++ b/api/server/api.go @@ -22,6 +22,7 @@ import ( "context" "crypto/tls" "crypto/x509" + "github.com/coreos/etcd/clientv3" "io/ioutil" "log" "net/http" @@ -36,7 +37,6 @@ import ( "github.com/goodrain/rainbond/util" - "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/cmd/api/option" "github.com/goodrain/rainbond/api/api_routers/doc" diff --git a/builder/build/build.go b/builder/build/build.go index 4361e2904..7658c7468 100644 --- a/builder/build/build.go +++ b/builder/build/build.go @@ -50,6 +50,7 @@ func init() { buildcreaters[code.Golang] = slugBuilder buildcreaters[code.OSS] = slugBuilder buildcreaters[code.NodeJSDockerfile] = customDockerBuilder + buildcreaters[code.VMDockerfile] = customDockerBuilder } var buildcreaters map[code.Lang]CreaterBuild @@ -112,6 +113,7 @@ type Request struct { HostAlias []HostAlias Ctx context.Context Arch string + BRVersion string } // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the diff --git a/builder/build/code_build.go b/builder/build/code_build.go index de1014f09..e421a7b0c 100644 --- a/builder/build/code_build.go +++ b/builder/build/code_build.go @@ -138,7 +138,7 @@ func (s *slugBuild) buildRunnerImage(slugPackage string) (string, error) { return "", fmt.Errorf("write default runtime dockerfile error:%s", err.Error()) } //build runtime image - if err := s.re.ImageClient.ImagesPullAndPush(builder.RUNNERIMAGENAME, builder.ONLINERUNNERIMAGENAME, "", "", s.re.Logger); err != nil { + if err := s.re.ImageClient.ImagesPullAndPush(builder.RUNNERIMAGENAME, builder.GetRunnerImage(s.re.BRVersion), "", "", s.re.Logger); err != nil { return "", fmt.Errorf("pull image %s: %v", builder.RUNNERIMAGENAME, err) } logrus.Infof("pull image %s successfully.", builder.RUNNERIMAGENAME) @@ -472,7 +472,7 @@ func (s *slugBuild) runBuildJob(re *Request) error { defer cancel() // Get builder image at build time - if err := s.re.ImageClient.ImagesPullAndPush(builder.BUILDERIMAGENAME, builder.ONLINEBUILDERIMAGENAME, "", "", re.Logger); err != nil { + if err := s.re.ImageClient.ImagesPullAndPush(builder.BUILDERIMAGENAME, builder.GetBuilderImage(s.re.BRVersion), "", "", re.Logger); err != nil { return err } diff --git a/builder/exector/build_from_image_run.go b/builder/exector/build_from_image_run.go index 3e388e838..42e438919 100644 --- a/builder/exector/build_from_image_run.go +++ b/builder/exector/build_from_image_run.go @@ -32,13 +32,14 @@ import ( "github.com/tidwall/gjson" ) -//ImageBuildItem ImageBuildItem +// ImageBuildItem ImageBuildItem type ImageBuildItem struct { Namespace string `json:"namespace"` TenantName string `json:"tenant_name"` ServiceAlias string `json:"service_alias"` Image string `json:"image"` DestImage string `json:"dest_image"` + VMImageSource string `json:"vm_image_source"` Logger event.Logger `json:"logger"` EventID string `json:"event_id"` ImageClient sources.ImageClient @@ -52,7 +53,7 @@ type ImageBuildItem struct { FailCause string } -//NewImageBuildItem 创建实体 +// NewImageBuildItem 创建实体 func NewImageBuildItem(in []byte) *ImageBuildItem { eventID := gjson.GetBytes(in, "event_id").String() logger := event.GetManager().GetLogger(eventID) @@ -72,7 +73,7 @@ func NewImageBuildItem(in []byte) *ImageBuildItem { } } -//Run Run +// Run Run func (i *ImageBuildItem) Run(timeout time.Duration) error { user, pass := builder.GetImageUserInfoV2(i.Image, i.HubUser, i.HubPassword) _, err := i.ImageClient.ImagePull(i.Image, user, pass, i.Logger, 30) @@ -119,7 +120,7 @@ func (i *ImageBuildItem) Run(timeout time.Duration) error { return nil } -//StorageVersionInfo 存储version信息 +// StorageVersionInfo 存储version信息 func (i *ImageBuildItem) StorageVersionInfo(imageURL string) error { version, err := db.GetManager().VersionInfoDao().GetVersionByDeployVersion(i.DeployVersion, i.ServiceID) if err != nil { @@ -137,7 +138,7 @@ func (i *ImageBuildItem) StorageVersionInfo(imageURL string) error { return nil } -//UpdateVersionInfo 更新任务执行结果 +// UpdateVersionInfo 更新任务执行结果 func (i *ImageBuildItem) UpdateVersionInfo(status string) error { version, err := db.GetManager().VersionInfoDao().GetVersionByEventID(i.EventID) if err != nil { diff --git a/builder/exector/build_from_sourcecode_run.go b/builder/exector/build_from_sourcecode_run.go index b7b43879d..9c2c06cd0 100644 --- a/builder/exector/build_from_sourcecode_run.go +++ b/builder/exector/build_from_sourcecode_run.go @@ -79,6 +79,7 @@ type SourceCodeBuildItem struct { Configs map[string]gjson.Result `json:"configs"` Ctx context.Context FailCause string + BRVersion string } // Commit code Commit @@ -365,6 +366,7 @@ func (i *SourceCodeBuildItem) codeBuild() (*build.Response, error) { CacheMode: i.CacheMode, CachePath: i.CachePath, Arch: i.Arch, + BRVersion: i.BRVersion, } res, err := codeBuild.Build(buildReq) return res, err diff --git a/builder/exector/build_from_vm.go b/builder/exector/build_from_vm.go new file mode 100644 index 000000000..e1ec4092c --- /dev/null +++ b/builder/exector/build_from_vm.go @@ -0,0 +1,170 @@ +package exector + +import ( + "fmt" + humanize "github.com/dustin/go-humanize" + "github.com/goodrain/rainbond/builder" + "github.com/goodrain/rainbond/builder/sources" + "github.com/goodrain/rainbond/event" + "github.com/goodrain/rainbond/util" + "github.com/sirupsen/logrus" + "github.com/tidwall/gjson" + "io" + "io/ioutil" + "k8s.io/client-go/kubernetes" + "net/http" + "os" + "path" + "path/filepath" + "strings" +) + +var vmDockerfileTmpl = ` +FROM scratch +ADD ${VM_PATH} /disk/ +` + +// VMBuildItem - +type VMBuildItem struct { + Logger event.Logger `json:"logger"` + Arch string `json:"arch"` + VMImageSource string `json:"vm_image_source"` + ImageClient sources.ImageClient + Configs map[string]gjson.Result `json:"configs"` + ServiceID string `json:"service_id"` + DeployVersion string `json:"deploy_version"` + Image string `json:"image"` + BuildKitImage string + BuildKitArgs []string + BuildKitCache bool + Action string `json:"action"` + EventID string `json:"event_id"` + TenantID string `json:"tenant_id"` + kubeClient kubernetes.Interface +} + +// NewVMBuildItem - +func NewVMBuildItem(in []byte) *VMBuildItem { + eventID := gjson.GetBytes(in, "event_id").String() + logger := event.GetManager().GetLogger(eventID) + return &VMBuildItem{ + Logger: logger, + Arch: gjson.GetBytes(in, "arch").String(), + VMImageSource: gjson.GetBytes(in, "vm_image_source").String(), + ServiceID: gjson.GetBytes(in, "service_id").String(), + DeployVersion: gjson.GetBytes(in, "deploy_version").String(), + TenantID: gjson.GetBytes(in, "tenant_id").String(), + Configs: gjson.GetBytes(in, "configs").Map(), + Action: gjson.GetBytes(in, "action").String(), + EventID: gjson.GetBytes(in, "event_id").String(), + Image: gjson.GetBytes(in, "image").String(), + } +} + +func (v *VMBuildItem) vmBuild(sourcePath string) error { + envs := make(map[string]string) + fileInfoList, err := ioutil.ReadDir(sourcePath) + if err != nil { + return err + } + if len(fileInfoList) != 1 { + return fmt.Errorf("%v file len is not 1", sourcePath) + } + envs["VM_PATH"] = path.Join("./", fileInfoList[0].Name()) + dockerfile := util.ParseVariable(vmDockerfileTmpl, envs) + + dfpath := path.Join(sourcePath, "Dockerfile") + logrus.Debugf("dest: %s; write dockerfile: %s", dfpath, dockerfile) + err = ioutil.WriteFile(dfpath, []byte(dockerfile), 0755) + if err != nil { + return err + } + imageName := fmt.Sprintf("%v/%v", builder.REGISTRYDOMAIN, v.Image) + err = sources.ImageBuild(v.Arch, sourcePath, "", "", "rbd-system", v.ServiceID, v.DeployVersion, v.Logger, "vm-build", imageName, v.BuildKitImage, v.BuildKitArgs, v.BuildKitCache, v.kubeClient) + if err != nil { + v.Logger.Error(fmt.Sprintf("build image %s failure, find log in rbd-chaos", imageName), map[string]string{"step": "builder-exector", "status": "failure"}) + logrus.Errorf("build image error: %s", err.Error()) + return err + } + v.Logger.Info("push image to push local image registry success", map[string]string{"step": "builder-exector"}) + if err := v.ImageClient.ImageRemove(imageName); err != nil { + logrus.Errorf("remove image %s failure %s", imageName, err.Error()) + } + return nil +} + +// RunVMBuild - +func (v *VMBuildItem) RunVMBuild() error { + if strings.HasPrefix(v.VMImageSource, "/grdata") { + defer os.RemoveAll(v.VMImageSource) + return v.vmBuild(v.VMImageSource) + } + vmImageSource := fmt.Sprintf("/grdata/package_build/temp/events/%v", v.ServiceID) + err := downloadFile(vmImageSource, v.VMImageSource, v.Logger) + if err != nil { + return err + } + defer os.RemoveAll(vmImageSource) + return v.vmBuild(vmImageSource) +} + +func downloadFile(downPath, url string, Logger event.Logger) error { + rsp, err := http.Get(url) + defer func() { + _ = rsp.Body.Close() + }() + baseURL := filepath.Base(url) + fileName := strings.Split(baseURL, "?")[0] + downPath = path.Join(downPath, fileName) + dir := filepath.Dir(downPath) + // 递归创建目录 + if err := os.MkdirAll(dir, os.ModePerm); err != nil { + return err + } + f, err := os.OpenFile(downPath, os.O_CREATE|os.O_APPEND|os.O_RDWR, 0666) + if err != nil { + return err + } + defer func() { + _ = f.Close() + }() + + myDownloader := &MyDownloader{ + Reader: rsp.Body, + Total: rsp.ContentLength, + Logger: Logger, + Pace: 10, + } + + Logger.Info(fmt.Sprintf("begin download vm image %v, image name is %v", url, fileName), map[string]string{"step": "builder-exector"}) + Logger.Info(fmt.Sprintf("image size is %v, downloading will take some time, please be patient.", humanize.Bytes(uint64(rsp.ContentLength))), map[string]string{"step": "builder-exector"}) + + _, err = io.Copy(f, myDownloader) + if err != nil { + downError := fmt.Sprintf("download vm image %v failre: %v", url, err.Error()) + Logger.Error(downError, map[string]string{"step": "builder-exector", "status": "failure"}) + } + return err +} + +type MyDownloader struct { + io.Reader // 读取器 + Total int64 // 总大小 + Current int64 // 当前大小 + Logger event.Logger + Pace float64 +} + +func (d *MyDownloader) Read(p []byte) (n int, err error) { + n, err = d.Reader.Read(p) + d.Current += int64(n) + if float64(d.Current*10000/d.Total)/100 == d.Pace { + downLog := fmt.Sprintf("virtual machine image is being downloaded.current download progress is:%.2f%%", float64(d.Current*10000/d.Total)/100) + d.Logger.Info(downLog, map[string]string{"step": "builder-exector"}) + d.Pace += 10 + } + if float64(d.Current*10000/d.Total)/100 == 100 { + d.Logger.Info("download vm image success", map[string]string{"step": "builder-exector"}) + } + return +} diff --git a/builder/exector/exector.go b/builder/exector/exector.go index 32a74c3d6..ac50778b6 100644 --- a/builder/exector/exector.go +++ b/builder/exector/exector.go @@ -245,6 +245,8 @@ func (e *exectorManager) RunTask(task *pb.TaskMessage) { switch task.TaskType { case "build_from_image": go e.runTask(e.buildFromImage, task, false) + case "build_from_vm": + go e.runTask(e.buildFromVM, task, false) case "build_from_source_code": go e.runTask(e.buildFromSourceCode, task, true) case "build_from_market_slug": @@ -360,6 +362,7 @@ func (e *exectorManager) buildFromSourceCode(task *pb.TaskMessage) { i.GRDataPVCName = e.cfg.GRDataPVCName i.CacheMode = e.cfg.CacheMode i.CachePath = e.cfg.CachePath + i.BRVersion = e.cfg.BRVersion i.Logger.Info("Build app version from source code start", map[string]string{"step": "builder-exector", "status": "starting"}) start := time.Now() defer event.GetManager().ReleaseLogger(i.Logger) @@ -406,6 +409,45 @@ func (e *exectorManager) buildFromSourceCode(task *pb.TaskMessage) { } } +// buildFromVM build app from vm +func (e *exectorManager) buildFromVM(task *pb.TaskMessage) { + v := NewVMBuildItem(task.TaskBody) + v.ImageClient = e.imageClient + v.BuildKitImage = e.BuildKitImage + v.BuildKitArgs = e.BuildKitArgs + v.BuildKitCache = e.BuildKitCache + v.kubeClient = e.KubeClient + v.Logger.Info("Start with the vm build application task", map[string]string{"step": "builder-exector", "status": "starting"}) + defer event.GetManager().ReleaseLogger(v.Logger) + defer func() { + if r := recover(); r != nil { + debug.PrintStack() + v.Logger.Error("Back end service drift. Please check the rbd-chaos log", map[string]string{"step": "builder-exector", "status": "starting"}) + } + }() + start := time.Now() + defer func() { + logrus.Debugf("complete build from source code, consuming time %s", time.Since(start).String()) + }() + if v.VMImageSource != "" { + err := v.RunVMBuild() + if err != nil { + logrus.Errorf("failure") + } + } + var configs = make(map[string]string, len(v.Configs)) + for k, u := range v.Configs { + configs[k] = u.String() + } + if err := e.UpdateDeployVersion(v.ServiceID, v.DeployVersion); err != nil { + logrus.Errorf("Update app service deploy version failure %s, service %s do not auto upgrade", err.Error(), v.ServiceID) + } + err := e.sendAction(v.TenantID, v.ServiceID, v.EventID, v.DeployVersion, v.Action, configs, v.Logger) + if err != nil { + v.Logger.Error("Send upgrade action failed", map[string]string{"step": "callback", "status": "failure"}) + } +} + // buildFromMarketSlug build app from market slug func (e *exectorManager) buildFromMarketSlug(task *pb.TaskMessage) { eventID := gjson.GetBytes(task.TaskBody, "event_id").String() diff --git a/builder/exector/exector_test.go b/builder/exector/exector_test.go index 1c849ccfc..358c84b1e 100644 --- a/builder/exector/exector_test.go +++ b/builder/exector/exector_test.go @@ -25,7 +25,6 @@ import ( "testing" "time" - "github.com/coreos/etcd/clientv3" "github.com/docker/docker/client" "k8s.io/client-go/kubernetes" diff --git a/builder/exector/groupapp_restore.go b/builder/exector/groupapp_restore.go index 6a5667700..d923fadc5 100644 --- a/builder/exector/groupapp_restore.go +++ b/builder/exector/groupapp_restore.go @@ -44,7 +44,7 @@ import ( "github.com/tidwall/gjson" ) -//BackupAPPRestore restrore the group app backup +// BackupAPPRestore restrore the group app backup type BackupAPPRestore struct { //full-online,full-offline EventID string @@ -72,7 +72,7 @@ type BackupAPPRestore struct { } `json:"s3_config"` } -//Info service cache info +// Info service cache info type Info struct { ServiceID string ServiceAlias string @@ -84,7 +84,7 @@ func init() { RegisterWorker("backup_apps_restore", BackupAPPRestoreCreater) } -//BackupAPPRestoreCreater create +// BackupAPPRestoreCreater create func BackupAPPRestoreCreater(in []byte, m *exectorManager) (TaskWorker, error) { eventID := gjson.GetBytes(in, "event_id").String() logger := event.GetManager().GetLogger(eventID) @@ -102,7 +102,7 @@ func BackupAPPRestoreCreater(in []byte, m *exectorManager) (TaskWorker, error) { return backupRestore, nil } -//Run Run +// Run Run func (b *BackupAPPRestore) Run(timeout time.Duration) error { //download or copy backup data backup, err := db.GetManager().AppBackupDao().GetAppBackup(b.BackupID) @@ -410,7 +410,7 @@ func (b *BackupAPPRestore) downloadImage(backup *dbmodel.AppBackup, app *RegionS return nil } -//if restore error, will clear +// if restore error, will clear func (b *BackupAPPRestore) clear() { //clear db manager := db.GetManager() @@ -769,22 +769,22 @@ func (b *BackupAPPRestore) downloadFromS3(sourceDir string) error { return nil } -//Stop stop +// Stop stop func (b *BackupAPPRestore) Stop() error { return nil } -//Name return worker name +// Name return worker name func (b *BackupAPPRestore) Name() string { return "backup_apps_restore" } -//GetLogger GetLogger +// GetLogger GetLogger func (b *BackupAPPRestore) GetLogger() event.Logger { return b.Logger } -//ErrorCallBack if run error will callback +// ErrorCallBack if run error will callback func (b *BackupAPPRestore) ErrorCallBack(err error) { if err != nil { logrus.Errorf("restore backup group app failure %s", err) @@ -794,7 +794,7 @@ func (b *BackupAPPRestore) ErrorCallBack(err error) { } } -//RestoreResult RestoreResult +// RestoreResult RestoreResult type RestoreResult struct { Status string `json:"status"` Message string `json:"message"` diff --git a/builder/exector/service_check.go b/builder/exector/service_check.go index bcf05c63b..37cc9c90a 100644 --- a/builder/exector/service_check.go +++ b/builder/exector/service_check.go @@ -32,7 +32,7 @@ import ( "github.com/sirupsen/logrus" ) -//ServiceCheckInput 任务输入数据 +// ServiceCheckInput 任务输入数据 type ServiceCheckInput struct { CheckUUID string `json:"uuid"` //检测来源类型 @@ -49,7 +49,7 @@ type ServiceCheckInput struct { EventID string `json:"event_id"` } -//ServiceCheckResult 应用检测结果 +// ServiceCheckResult 应用检测结果 type ServiceCheckResult struct { //检测状态 Success Failure CheckStatus string `json:"check_status"` @@ -57,7 +57,7 @@ type ServiceCheckResult struct { ServiceInfo []parser.ServiceInfo `json:"service_info"` } -//CreateResult 创建检测结果 +// CreateResult 创建检测结果 func CreateResult(ErrorInfos parser.ParseErrorList, ServiceInfo []parser.ServiceInfo) (ServiceCheckResult, error) { var sr ServiceCheckResult if ErrorInfos != nil && ErrorInfos.IsFatalError() { @@ -77,7 +77,7 @@ func CreateResult(ErrorInfos parser.ParseErrorList, ServiceInfo []parser.Service return sr, nil } -//serviceCheck 应用创建源检测 +// serviceCheck 应用创建源检测 func (e *exectorManager) serviceCheck(task *pb.TaskMessage) { //step1 判断应用源类型 //step2 获取应用源介质,镜像Or源码 @@ -121,6 +121,8 @@ func (e *exectorManager) serviceCheck(task *pb.TaskMessage) { pr = parser.CreateThirdPartyServiceParse(input.SourceBody, logger) case "package_build": pr = parser.CreateSourceCodeParse(input.SourceBody, logger) + case "vm-run": + pr = parser.CreateVMServiceParse(input.SourceBody, logger) } if pr == nil { logger.Error("Creating component source types is not supported", map[string]string{"step": "callback", "status": "failure"}) @@ -128,7 +130,10 @@ func (e *exectorManager) serviceCheck(task *pb.TaskMessage) { } errList := pr.Parse() for i, err := range errList { - if err.SolveAdvice == "" && input.SourceType != "sourcecode" { + if err.SolveAdvice == "" && input.SourceType == "vm-run" { + errList[i].SolveAdvice = "镜像地址或镜像格式不正确,请检查镜像地址和镜像格式" + } + if err.SolveAdvice == "" && input.SourceType != "sourcecode" && input.SourceType != "vm-run" { errList[i].SolveAdvice = fmt.Sprintf("解析器认为镜像名为:%s,请确认是否正确或镜像是否存在", pr.GetImage()) } if err.SolveAdvice == "" && input.SourceType == "sourcecode" { diff --git a/builder/exector/share_image.go b/builder/exector/share_image.go index f76b2d9ca..c4b6d5dd2 100644 --- a/builder/exector/share_image.go +++ b/builder/exector/share_image.go @@ -21,16 +21,16 @@ package exector import ( "context" "fmt" + "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/builder" - "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/event" "github.com/pquerna/ffjson/ffjson" "github.com/sirupsen/logrus" ) -//ImageShareItem ImageShareItem +// ImageShareItem ImageShareItem type ImageShareItem struct { Namespace string `json:"namespace"` TenantName string `json:"tenant_name"` @@ -60,7 +60,7 @@ type ImageShareItem struct { EtcdCli *clientv3.Client } -//NewImageShareItem 创建实体 +// NewImageShareItem 创建实体 func NewImageShareItem(in []byte, imageClient sources.ImageClient, EtcdCli *clientv3.Client) (*ImageShareItem, error) { var isi ImageShareItem if err := ffjson.Unmarshal(in, &isi); err != nil { @@ -75,7 +75,7 @@ func NewImageShareItem(in []byte, imageClient sources.ImageClient, EtcdCli *clie return &isi, nil } -//ShareService ShareService +// ShareService ShareService func (i *ImageShareItem) ShareService() error { hubuser, hubpass := builder.GetImageUserInfoV2(i.LocalImageName, i.LocalImageUsername, i.LocalImagePassword) _, err := i.ImageClient.ImagePull(i.LocalImageName, hubuser, hubpass, i.Logger, 20) @@ -107,8 +107,8 @@ func (i *ImageShareItem) ShareService() error { return nil } -//ShareStatus share status result -//ShareStatus share status result +// ShareStatus share status result +// ShareStatus share status result type ShareStatus struct { ShareID string `json:"share_id,omitempty"` Status string `json:"status,omitempty"` @@ -119,7 +119,7 @@ func (s ShareStatus) String() string { return string(b) } -//UpdateShareStatus 更新任务执行结果 +// UpdateShareStatus 更新任务执行结果 func (i *ImageShareItem) UpdateShareStatus(status string) error { var ss = ShareStatus{ ShareID: i.ShareID, diff --git a/builder/exector/share_plugin.go b/builder/exector/share_plugin.go index 99837db52..834496507 100644 --- a/builder/exector/share_plugin.go +++ b/builder/exector/share_plugin.go @@ -33,7 +33,7 @@ import ( "github.com/tidwall/gjson" ) -//PluginShareItem PluginShareItem +// PluginShareItem PluginShareItem type PluginShareItem struct { EventID string `json:"event_id"` ImageName string `json:"image_name"` @@ -55,7 +55,7 @@ func init() { RegisterWorker("share-plugin", SharePluginItemCreater) } -//SharePluginItemCreater create +// SharePluginItemCreater create func SharePluginItemCreater(in []byte, m *exectorManager) (TaskWorker, error) { eventID := gjson.GetBytes(in, "event_id").String() logger := event.GetManager().GetLogger(eventID) @@ -72,7 +72,7 @@ func SharePluginItemCreater(in []byte, m *exectorManager) (TaskWorker, error) { return pluginShare, nil } -//Run Run +// Run Run func (i *PluginShareItem) Run(timeout time.Duration) error { _, err := i.ImageClient.ImagePull(i.LocalImageName, builder.REGISTRYUSER, builder.REGISTRYPASS, i.Logger, 10) if err != nil { @@ -103,27 +103,27 @@ func (i *PluginShareItem) Run(timeout time.Duration) error { return i.updateShareStatus("success") } -//Stop +// Stop - func (i *PluginShareItem) Stop() error { return nil } -//Name return worker name +// Name return worker name func (i *PluginShareItem) Name() string { return "share-plugin" } -//GetLogger GetLogger +// GetLogger GetLogger func (i *PluginShareItem) GetLogger() event.Logger { return i.Logger } -//ErrorCallBack if run error will callback +// ErrorCallBack if run error will callback func (i *PluginShareItem) ErrorCallBack(err error) { i.updateShareStatus("failure") } -//updateShareStatus update share task result +// updateShareStatus update share task result func (i *PluginShareItem) updateShareStatus(status string) error { var ss = ShareStatus{ ShareID: i.ShareID, diff --git a/builder/exector/share_slug.go b/builder/exector/share_slug.go index df78d87e0..90075aaaf 100644 --- a/builder/exector/share_slug.go +++ b/builder/exector/share_slug.go @@ -33,7 +33,7 @@ import ( "github.com/sirupsen/logrus" ) -//SlugShareItem SlugShareItem +// SlugShareItem SlugShareItem type SlugShareItem struct { Namespace string `json:"namespace"` TenantName string `json:"tenant_name"` @@ -61,7 +61,7 @@ type SlugShareItem struct { PackageName string } -//NewSlugShareItem 创建实体 +// NewSlugShareItem 创建实体 func NewSlugShareItem(in []byte, etcdCli *clientv3.Client) (*SlugShareItem, error) { var ssi SlugShareItem if err := ffjson.Unmarshal(in, &ssi); err != nil { @@ -73,7 +73,7 @@ func NewSlugShareItem(in []byte, etcdCli *clientv3.Client) (*SlugShareItem, erro return &ssi, nil } -//ShareService Run +// ShareService Run func (i *SlugShareItem) ShareService() error { logrus.Debugf("share app local slug path: %s ,target path: %s", i.LocalSlugPath, i.SlugPath) @@ -111,7 +111,7 @@ func createMD5(packageName string) (string, error) { return md5Path, nil } -//ShareToFTP ShareToFTP +// ShareToFTP ShareToFTP func (i *SlugShareItem) ShareToFTP() error { i.Logger.Info("开始上传应用介质到FTP服务器", map[string]string{"step": "slug-share"}) sFTPClient, err := sources.NewSFTPClient(i.ShareInfo.SlugInfo.FTPUser, i.ShareInfo.SlugInfo.FTPPassword, i.ShareInfo.SlugInfo.FTPHost, i.ShareInfo.SlugInfo.FTPPort) @@ -128,7 +128,7 @@ func (i *SlugShareItem) ShareToFTP() error { return nil } -//ShareToLocal ShareToLocal +// ShareToLocal ShareToLocal func (i *SlugShareItem) ShareToLocal() error { file := i.LocalSlugPath i.Logger.Info("开始分享应用到本地目录", map[string]string{"step": "slug-share"}) @@ -154,7 +154,7 @@ func (i *SlugShareItem) ShareToLocal() error { return nil } -//UpdateShareStatus 更新任务执行结果 +// UpdateShareStatus 更新任务执行结果 func (i *SlugShareItem) UpdateShareStatus(status string) error { var ss = ShareStatus{ ShareID: i.ShareID, @@ -175,7 +175,7 @@ func (i *SlugShareItem) UpdateShareStatus(status string) error { return nil } -//CheckMD5FileExist CheckMD5FileExist +// CheckMD5FileExist CheckMD5FileExist func (i *SlugShareItem) CheckMD5FileExist(md5path, packageName string) bool { return false } diff --git a/builder/parser/code/lang.go b/builder/parser/code/lang.go index 9f1786c50..b3cb9d917 100644 --- a/builder/parser/code/lang.go +++ b/builder/parser/code/lang.go @@ -44,84 +44,87 @@ func init() { checkFuncList = append(checkFuncList, netcore) } -//ErrCodeNotExist 代码为空错误 +// ErrCodeNotExist 代码为空错误 var ErrCodeNotExist = fmt.Errorf("code is not exist") -//ErrCodeDirNotExist 代码目录不存在 +// ErrCodeDirNotExist 代码目录不存在 var ErrCodeDirNotExist = fmt.Errorf("code dir is not exist") -//ErrCodeUnableIdentify 代码无法识别语言 +// ErrCodeUnableIdentify 代码无法识别语言 var ErrCodeUnableIdentify = fmt.Errorf("code lang unable to identify") -//ErrRainbondFileNotFound rainbond file not found +// ErrRainbondFileNotFound rainbond file not found var ErrRainbondFileNotFound = fmt.Errorf("rainbond file not found") -//Lang 语言类型 +// Lang 语言类型 type Lang string -//String return lang string +// String return lang string func (l Lang) String() string { return string(l) } -//NO 空语言类型 +// NO 空语言类型 var NO Lang = "no" -//Dockerfile Lang +// Dockerfile Lang var Dockerfile Lang = "dockerfile" -//Docker Lang +// Docker Lang var Docker Lang = "docker" -//Python Lang +// Python Lang var Python Lang = "Python" -//Ruby Lang +// Ruby Lang var Ruby Lang = "Ruby" -//PHP Lang +// PHP Lang var PHP Lang = "PHP" -//JavaMaven Lang +// JavaMaven Lang var JavaMaven Lang = "Java-maven" -//JaveWar Lang +// JaveWar Lang var JaveWar Lang = "Java-war" -//JavaJar Lang +// JavaJar Lang var JavaJar Lang = "Java-jar" -//Nodejs Lang +// Nodejs Lang var Nodejs Lang = "Node.js" -//NodeJSDockerfile Lang +// NodeJSDockerfile Lang var NodeJSDockerfile Lang = "NodeJSDockerfile" -//NodeJSStatic static Lang +// VMDockerfile Lang +var VMDockerfile Lang = "VMDockerfile" + +// NodeJSStatic static Lang var NodeJSStatic Lang = "NodeJSStatic" -//Static Lang +// Static Lang var Static Lang = "static" -//Clojure Lang +// Clojure Lang var Clojure Lang = "Clojure" -//Golang Lang +// Golang Lang var Golang Lang = "Go" -//Gradle Lang +// Gradle Lang var Gradle Lang = "Gradle" -//Grails Lang +// Grails Lang var Grails Lang = "Grails" -//NetCore Lang +// NetCore Lang var NetCore Lang = ".NetCore" -//OSS Lang +// OSS Lang var OSS Lang = "OSS" -//GetLangType check code lang +// GetLangType check code lang func GetLangType(homepath string) (Lang, error) { if ok, _ := util.FileExists(homepath); !ok { return NO, ErrCodeDirNotExist @@ -212,7 +215,7 @@ func javaWar(homepath string) Lang { return NO } -//javaJar Procfile必须定义 +// javaJar Procfile必须定义 func javaJar(homepath string) Lang { if ok := util.FileExistsWithSuffix(homepath, ".jar"); ok { return JavaJar @@ -293,7 +296,7 @@ func grails(homepath string) Lang { return NO } -//netcore +// netcore func netcore(homepath string) Lang { if ok := util.FileExistsWithSuffix(homepath, ".sln"); ok { return NetCore @@ -304,7 +307,7 @@ func netcore(homepath string) Lang { return NO } -//暂时不支持 +// 暂时不支持 func scala(homepath string) Lang { return NO } diff --git a/builder/parser/source_code.go b/builder/parser/source_code.go index 7f0edb87e..55d11ebde 100644 --- a/builder/parser/source_code.go +++ b/builder/parser/source_code.go @@ -44,7 +44,7 @@ import ( "gopkg.in/src-d/go-git.v4/plumbing/transport" //"github.com/docker/docker/client" ) -//SourceCodeParse docker run 命令解析或直接镜像名解析 +// SourceCodeParse docker run 命令解析或直接镜像名解析 type SourceCodeParse struct { ports map[int]*types.Port volumes map[string]*types.Volume @@ -66,7 +66,7 @@ type SourceCodeParse struct { services []*types.Service } -//CreateSourceCodeParse create parser +// CreateSourceCodeParse create parser func CreateSourceCodeParse(source string, logger event.Logger) Parser { return &SourceCodeParse{ source: source, @@ -79,7 +79,7 @@ func CreateSourceCodeParse(source string, logger event.Logger) Parser { } } -//Parse 获取代码 解析代码 检验代码 +// Parse 获取代码 解析代码 检验代码 func (d *SourceCodeParse) Parse() ParseErrorList { if d.source == "" { d.logger.Error("源码检查输入参数错误", map[string]string{"step": "parse"}) @@ -481,7 +481,7 @@ func (d *SourceCodeParse) Parse() ParseErrorList { return d.errors } -//ReadRbdConfigAndLang read rainbondfile and lang +// ReadRbdConfigAndLang read rainbondfile and lang func ReadRbdConfigAndLang(buildInfo *sources.RepostoryBuildInfo) (*code.RainbondFileConfig, code.Lang, error) { rbdfileConfig, err := code.ReadRainbondFile(buildInfo.GetCodeBuildAbsPath()) if err != nil { @@ -520,12 +520,12 @@ func (d *SourceCodeParse) errappend(pe ParseError) { d.errors = append(d.errors, pe) } -//GetBranchs 获取分支列表 +// GetBranchs 获取分支列表 func (d *SourceCodeParse) GetBranchs() []string { return d.branchs } -//GetPorts 获取端口列表 +// GetPorts 获取端口列表 func (d *SourceCodeParse) GetPorts() (ports []types.Port) { for _, cv := range d.ports { ports = append(ports, *cv) @@ -533,7 +533,7 @@ func (d *SourceCodeParse) GetPorts() (ports []types.Port) { return ports } -//GetVolumes 获取存储列表 +// GetVolumes 获取存储列表 func (d *SourceCodeParse) GetVolumes() (volumes []types.Volume) { for _, cv := range d.volumes { volumes = append(volumes, *cv) @@ -541,12 +541,12 @@ func (d *SourceCodeParse) GetVolumes() (volumes []types.Volume) { return } -//GetValid 获取源是否合法 +// GetValid 获取源是否合法 func (d *SourceCodeParse) GetValid() bool { return false } -//GetEnvs 环境变量 +// GetEnvs 环境变量 func (d *SourceCodeParse) GetEnvs() (envs []types.Env) { for _, cv := range d.envs { envs = append(envs, *cv) @@ -554,12 +554,12 @@ func (d *SourceCodeParse) GetEnvs() (envs []types.Env) { return } -//GetImage 获取镜像 +// GetImage 获取镜像 func (d *SourceCodeParse) GetImage() Image { return d.image } -//GetArgs 启动参数 +// GetArgs 启动参数 func (d *SourceCodeParse) GetArgs() []string { if d.Lang == code.Nodejs { return nil @@ -567,17 +567,17 @@ func (d *SourceCodeParse) GetArgs() []string { return d.args } -//GetMemory 获取内存 +// GetMemory 获取内存 func (d *SourceCodeParse) GetMemory() int { return d.memory } -//GetLang 获取识别语言 +// GetLang 获取识别语言 func (d *SourceCodeParse) GetLang() code.Lang { return d.Lang } -//GetServiceInfo 获取service info +// GetServiceInfo 获取service info func (d *SourceCodeParse) GetServiceInfo() []ServiceInfo { serviceInfo := ServiceInfo{ Ports: d.GetPorts(), diff --git a/builder/parser/vm_service.go b/builder/parser/vm_service.go new file mode 100644 index 000000000..c4ff255df --- /dev/null +++ b/builder/parser/vm_service.go @@ -0,0 +1,115 @@ +// Copyright (C) 2014-2018 Goodrain Co., Ltd. +// RAINBOND, Application Management Platform + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. For any non-GPL usage of Rainbond, +// one or multiple Commercial Licenses authorized by Goodrain Co., Ltd. +// must be obtained first. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package parser + +import ( + "github.com/goodrain/rainbond/builder/parser/discovery" + "github.com/goodrain/rainbond/event" + "github.com/sirupsen/logrus" + "io/ioutil" + "net/http" + "path" + "path/filepath" + "strings" +) + +// VMServiceParse is one of the implematation of parser.Parser +type VMServiceParse struct { + sourceBody string + + endpoints []*discovery.Endpoint + + errors []ParseError + logger event.Logger +} + +// CreateVMServiceParse creates a new CreateVMServiceParse. +func CreateVMServiceParse(sourceBody string, logger event.Logger) Parser { + return &VMServiceParse{ + sourceBody: sourceBody, + logger: logger, + } +} + +// Parse blablabla +func (t *VMServiceParse) Parse() ParseErrorList { + if t.sourceBody == "" { + return []ParseError{} + } + var fileExt string + if strings.HasPrefix(t.sourceBody, "/grdata") { + fileInfoList, err := ioutil.ReadDir(t.sourceBody) + if err != nil { + logrus.Errorf("read package path %v failure: %v", t.sourceBody, err) + t.errappend(Errorf(FatalError, "http get failure")) + return t.errors + } + if len(fileInfoList) != 1 { + logrus.Errorf("the current directory contains multiple files: %v", t.sourceBody) + t.logger.Error("镜像只可以拥有一个,当前上传了多个文件", map[string]string{"step": "parse"}) + t.errappend(Errorf(FatalError, "http get failure")) + return t.errors + } + fileExt = path.Ext(fileInfoList[0].Name()) + } else { + rsp, err := http.Get(t.sourceBody) + if err != nil { + logrus.Errorf("http get %v failure: %v", t.sourceBody, err) + t.errappend(Errorf(FatalError, "http get failure")) + return t.errors + } + if rsp.StatusCode != http.StatusOK { + logrus.Errorf("url %v cannot be accessed", t.sourceBody) + t.logger.Error("镜像下载地址不可用", map[string]string{"step": "parse"}) + t.errappend(Errorf(FatalError, "url address cannot be accessed")) + return t.errors + } + defer func() { + _ = rsp.Body.Close() + }() + + baseURL := filepath.Base(t.sourceBody) + fileName := strings.Split(baseURL, "?")[0] + fileExt = path.Ext(fileName) + } + if fileExt != ".iso" && fileExt != ".qcow2" && fileExt != ".img" && fileExt != ".tar" && fileExt != ".gz" && fileExt != ".xz" { + t.logger.Error("上传包格式校验失败,不符合包要求", map[string]string{"step": "parse"}) + t.errappend(Errorf(FatalError, "image package format verification failed")) + return t.errors + } + return []ParseError{} +} + +// GetServiceInfo returns information of third-party service from +// the receiver *ThirdPartyServiceParse. +func (t *VMServiceParse) GetServiceInfo() []ServiceInfo { + serviceInfo := ServiceInfo{ + Image: t.GetImage(), + } + return []ServiceInfo{serviceInfo} +} + +// GetImage is a dummy method. there is no image for Third-party service. +func (t *VMServiceParse) GetImage() Image { + return Image{} +} + +func (t *VMServiceParse) errappend(pe ParseError) { + t.errors = append(t.errors, pe) +} diff --git a/builder/repostory.go b/builder/repostory.go index 6c50c3602..af34cc975 100644 --- a/builder/repostory.go +++ b/builder/repostory.go @@ -53,8 +53,13 @@ func init() { if os.Getenv("ABROAD") != "" { ONLINEREGISTRYDOMAIN = "docker.io/rainbond" } - ONLINEBUILDERIMAGENAME = fmt.Sprintf("%s:%s-%s", path.Join(ONLINEREGISTRYDOMAIN, "builder"), CIVERSION, arch) - ONLINERUNNERIMAGENAME = fmt.Sprintf("%s:%s-%s", path.Join(ONLINEREGISTRYDOMAIN, "runner"), CIVERSION, arch) + if release := os.Getenv("RELEASE_DESC"); release != "" { + releaseList := strings.Split(release, "-") + if len(releaseList) > 0 { + CIVERSION = fmt.Sprintf("%v-%v", releaseList[0], releaseList[1]) + } + } + } // GetImageUserInfoV2 - @@ -68,7 +73,7 @@ func GetImageUserInfoV2(domain, user, pass string) (string, string) { return "", "" } -//GetImageRepo - +// GetImageRepo - func GetImageRepo(imageRepo string) string { if imageRepo == "" { return REGISTRYDOMAIN @@ -76,29 +81,41 @@ func GetImageRepo(imageRepo string) string { return imageRepo } -//REGISTRYDOMAIN REGISTRY_DOMAIN +// REGISTRYDOMAIN REGISTRY_DOMAIN var REGISTRYDOMAIN = constants.DefImageRepository -//REGISTRYUSER REGISTRY USER NAME +// REGISTRYUSER REGISTRY USER NAME var REGISTRYUSER = "" -//REGISTRYPASS REGISTRY PASSWORD +// REGISTRYPASS REGISTRY PASSWORD var REGISTRYPASS = "" -//RUNNERIMAGENAME runner image name +// RUNNERIMAGENAME runner image name var RUNNERIMAGENAME string -//BUILDERIMAGENAME builder image name +// BUILDERIMAGENAME builder image name var BUILDERIMAGENAME string // ONLINEREGISTRYDOMAIN online REGISTRY_DOMAIN var ONLINEREGISTRYDOMAIN = constants.DefOnlineImageRepository -// ONLINEBUILDERIMAGENAME online builder image name -var ONLINEBUILDERIMAGENAME string +// GetBuilderImage GetBuilderImage +func GetBuilderImage(brVersion string) string { + arch := runtime.GOARCH + if brVersion == "" { + brVersion = CIVERSION + } + return fmt.Sprintf("%s:%s-%s", path.Join(ONLINEREGISTRYDOMAIN, "builder"), brVersion, arch) +} -// ONLINERUNNERIMAGENAME online runner image name -var ONLINERUNNERIMAGENAME string +// GetRunnerImage GetRunnerImage +func GetRunnerImage(brVersion string) string { + arch := runtime.GOARCH + if brVersion == "" { + brVersion = CIVERSION + } + return fmt.Sprintf("%s:%s-%s", path.Join(ONLINEREGISTRYDOMAIN, "runner"), brVersion, arch) +} // CIVERSION - -var CIVERSION = "v5.14.0-release" +var CIVERSION = "v5.16.0-release" diff --git a/builder/sources/container_client.go b/builder/sources/container_client.go index 05e91fe96..7eff72dcc 100644 --- a/builder/sources/container_client.go +++ b/builder/sources/container_client.go @@ -6,7 +6,7 @@ import ( "github.com/docker/docker/api/types" dockercli "github.com/docker/docker/client" "github.com/sirupsen/logrus" - runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "time" ) @@ -38,7 +38,7 @@ const ( CONTAINER_ACTION_DIE = "die" ) -//ContainerDesc - +// ContainerDesc - type ContainerDesc struct { ContainerRuntime string // Info is extra information of the Container. The key could be arbitrary string, and @@ -51,7 +51,7 @@ type ContainerDesc struct { *types.ContainerJSON } -//GetLogPath - +// GetLogPath - func (c *ContainerDesc) GetLogPath() string { if c.ContainerRuntime == ContainerRuntimeDocker { logrus.Debugf("docker container log path %s", c.ContainerJSON.LogPath) @@ -61,7 +61,7 @@ func (c *ContainerDesc) GetLogPath() string { return c.ContainerStatus.GetLogPath() } -//GetId - +// GetId - func (c *ContainerDesc) GetId() string { if c.ContainerRuntime == ContainerRuntimeDocker { logrus.Debugf("docker container id %s", c.ContainerJSON.ID) @@ -107,13 +107,13 @@ func NewContainerImageClient(containerRuntime, endpoint string, timeout time.Dur return } -//ContainerEvent container event +// ContainerEvent container event type ContainerEvent struct { Action string Container *ContainerDesc } -//CacheContainer cache container +// CacheContainer cache container func CacheContainer(cchan chan ContainerEvent, cs ...ContainerEvent) { for _, container := range cs { logrus.Debugf("found a container %s %s", container.Container.GetMetadata().GetName(), container.Action) diff --git a/builder/sources/containerd_client.go b/builder/sources/containerd_client.go index 5377b3abc..c821600bf 100644 --- a/builder/sources/containerd_client.go +++ b/builder/sources/containerd_client.go @@ -14,7 +14,7 @@ import ( "strings" "github.com/goodrain/rainbond/util/criutil" - runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "time" ) diff --git a/builder/sources/docker_client.go b/builder/sources/docker_client.go index edae35237..4ac69de44 100644 --- a/builder/sources/docker_client.go +++ b/builder/sources/docker_client.go @@ -8,7 +8,7 @@ import ( "github.com/docker/docker/api/types/filters" dockercli "github.com/docker/docker/client" "github.com/sirupsen/logrus" - runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "os" "strings" "time" diff --git a/builder/sources/image.go b/builder/sources/image.go index faa105ff0..1fa2cecb7 100644 --- a/builder/sources/image.go +++ b/builder/sources/image.go @@ -64,16 +64,16 @@ import ( "time" ) -//ErrorNoAuth error no auth +// ErrorNoAuth error no auth var ErrorNoAuth = fmt.Errorf("pull image require docker login") -//ErrorNoImage error no image +// ErrorNoImage error no image var ErrorNoImage = fmt.Errorf("image not exist") -//Namespace containerd image namespace +// Namespace containerd image namespace var Namespace = "k8s.io" -//ImagePull pull docker image +// ImagePull pull docker image // Deprecated: use sources.ImageClient.ImagePull instead func ImagePull(client *containerd.Client, ref string, username, password string, logger event.Logger, timeout int) (*containerd.Image, error) { printLog(logger, "info", fmt.Sprintf("start get image:%s", ref), map[string]string{"step": "pullimage"}) @@ -171,7 +171,7 @@ func ImageTag(containerdClient *containerd.Client, source, target string, logger return nil } -//ImageNameHandle 解析imagename +// ImageNameHandle 解析imagename func ImageNameHandle(imageName string) *model.ImageName { var i model.ImageName if strings.Contains(imageName, "/") { @@ -199,7 +199,7 @@ func ImageNameHandle(imageName string) *model.ImageName { return &i } -//ImageNameWithNamespaceHandle if have namespace,will parse namespace +// ImageNameWithNamespaceHandle if have namespace,will parse namespace func ImageNameWithNamespaceHandle(imageName string) *model.ImageName { var i model.ImageName if strings.Contains(imageName, "/") { @@ -231,8 +231,8 @@ func ImageNameWithNamespaceHandle(imageName string) *model.ImageName { return &i } -//ImagePush push image to registry -//timeout minutes of the unit +// ImagePush push image to registry +// timeout minutes of the unit // Deprecated: use sources.ImageClient.ImagePush instead func ImagePush(client *containerd.Client, rawRef, user, pass string, logger event.Logger, timeout int) error { printLog(logger, "info", fmt.Sprintf("start push image:%s", rawRef), map[string]string{"step": "pushimage"}) @@ -325,7 +325,7 @@ func ImagePush(client *containerd.Client, rawRef, user, pass string, logger even return nil } -//TrustedImagePush push image to trusted registry +// TrustedImagePush push image to trusted registry func TrustedImagePush(containerdClient *containerd.Client, image, user, pass string, logger event.Logger, timeout int) error { if err := CheckTrustedRepositories(image, user, pass); err != nil { return err @@ -333,7 +333,7 @@ func TrustedImagePush(containerdClient *containerd.Client, image, user, pass str return ImagePush(containerdClient, image, user, pass, logger, timeout) } -//CheckTrustedRepositories check Repositories is exist ,if not create it. +// CheckTrustedRepositories check Repositories is exist ,if not create it. func CheckTrustedRepositories(image, user, pass string) error { ref, err := reference.ParseNormalizedNamed(image) if err != nil { @@ -391,11 +391,11 @@ func EncodeAuthToBase64(authConfig types.AuthConfig) (string, error) { return base64.URLEncoding.EncodeToString(buf), nil } -//ImageBuild use buildkit build image +// ImageBuild use buildkit build image func ImageBuild(arch, contextDir, cachePVCName, cacheMode, RbdNamespace, ServiceID, DeployVersion string, logger event.Logger, buildType, plugImageName, BuildKitImage string, BuildKitArgs []string, BuildKitCache bool, kubeClient kubernetes.Interface) error { // create image name var buildImageName string - if buildType == "plug-build" { + if buildType == "plug-build" || buildType == "vm-build" { buildImageName = plugImageName } else { buildImageName = CreateImageName(ServiceID, DeployVersion) @@ -459,6 +459,11 @@ func ImageBuild(arch, contextDir, cachePVCName, cacheMode, RbdNamespace, Service Stdin: true, StdinOnce: true, Command: []string{"buildctl-daemonless.sh"}, + Env: []corev1.EnvVar{{ + Name: "BUILDCTL_CONNECT_RETRIES_MAX", + Value: "20", + }, + }, Args: []string{ "build", "--frontend", @@ -500,7 +505,7 @@ func ImageBuild(arch, contextDir, cachePVCName, cacheMode, RbdNamespace, Service return nil } -//ImageInspectWithRaw get image inspect +// ImageInspectWithRaw get image inspect func ImageInspectWithRaw(dockerCli *client.Client, image string) (*types.ImageInspect, error) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -511,7 +516,7 @@ func ImageInspectWithRaw(dockerCli *client.Client, image string) (*types.ImageIn return &ins, nil } -//ImageSave save image to tar file +// ImageSave save image to tar file // destination destination file name eg. /tmp/xxx.tar func ImageSave(dockerCli *client.Client, image, destination string, logger event.Logger) error { ctx, cancel := context.WithCancel(context.Background()) @@ -524,7 +529,7 @@ func ImageSave(dockerCli *client.Client, image, destination string, logger event return CopyToFile(destination, rc) } -//MultiImageSave save multi image to tar file +// MultiImageSave save multi image to tar file // destination destination file name eg. /tmp/xxx.tar func MultiImageSave(ctx context.Context, dockerCli *client.Client, destination string, logger event.Logger, images ...string) error { rc, err := dockerCli.ImageSave(ctx, images) @@ -535,7 +540,7 @@ func MultiImageSave(ctx context.Context, dockerCli *client.Client, destination s return CopyToFile(destination, rc) } -//ImageLoad load image from tar file +// ImageLoad load image from tar file // destination destination file name eg. /tmp/xxx.tar func ImageLoad(dockerCli *client.Client, tarFile string, logger event.Logger) error { ctx, cancel := context.WithCancel(context.Background()) @@ -577,7 +582,7 @@ func ImageLoad(dockerCli *client.Client, tarFile string, logger event.Logger) er return nil } -//ImageImport save image to tar file +// ImageImport save image to tar file // source source file name eg. /tmp/xxx.tar func ImageImport(dockerCli *client.Client, image, source string, logger event.Logger) error { ctx, cancel := context.WithCancel(context.Background()) @@ -648,7 +653,7 @@ func CopyToFile(outfile string, r io.Reader) error { return nil } -//ImageRemove remove image +// ImageRemove remove image func ImageRemove(containerdClient *containerd.Client, image string) error { ctx := namespaces.WithNamespace(context.Background(), Namespace) imageStore := containerdClient.ImageService() @@ -769,7 +774,7 @@ func CreateImageName(ServiceID, DeployVersion string) string { return strings.ToLower(fmt.Sprintf("%s/%s:%s", builder.REGISTRYDOMAIN, workloadName, DeployVersion)) } -//GetImageFirstPart - +// GetImageFirstPart - func GetImageFirstPart(str string) (string, string) { imageDomain, imageName := str, "" if strings.Contains(str, "/") { @@ -781,7 +786,7 @@ func GetImageFirstPart(str string) (string, string) { return imageDomain, imageName } -//PrepareBuildKitTomlCM - +// PrepareBuildKitTomlCM - func PrepareBuildKitTomlCM(ctx context.Context, kubeClient kubernetes.Interface, namespace, buildKitTomlCMName, imageDomain string) error { buildKitTomlCM, err := kubeClient.CoreV1().ConfigMaps(namespace).Get(ctx, buildKitTomlCMName, metav1.GetOptions{}) if err != nil && !k8serror.IsNotFound(err) { @@ -923,7 +928,7 @@ func CreateVolumesAndMounts(ServiceID, contextDir, buildType, cacheMode, cachePV } volumeMounts = append(volumeMounts, volumeMount) } - if buildType == "run-build" { + if buildType == "run-build" || buildType == "vm-build" { volume := corev1.Volume{ Name: "run-build", VolumeSource: corev1.VolumeSource{ diff --git a/builder/sources/image_containerd_client.go b/builder/sources/image_containerd_client.go index 69a23d6c2..94fe8eaa5 100644 --- a/builder/sources/image_containerd_client.go +++ b/builder/sources/image_containerd_client.go @@ -29,7 +29,7 @@ import ( "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" "google.golang.org/grpc" - runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "os" "sync" "time" @@ -111,7 +111,6 @@ func (c *containerdImageCliImpl) ImagePull(image string, username, password stri pctx, stopProgress := context.WithCancel(ctx) progress := make(chan struct{}) - go func() { ShowProgress(pctx, ongoing, c.client.ContentStore(), logger) close(progress) @@ -262,7 +261,7 @@ func (c *containerdImageCliImpl) ImagePush(image, user, pass string, logger even return nil } -//ImageTag change docker image tag +// ImageTag change docker image tag func (c *containerdImageCliImpl) ImageTag(source, target string, logger event.Logger, timeout int) error { srcNamed, err := refdocker.ParseDockerRef(source) if err != nil { @@ -330,7 +329,7 @@ func (c *containerdImageCliImpl) ImagesPullAndPush(sourceImage, targetImage, use return nil } -//ImageRemove remove image +// ImageRemove remove image func (c *containerdImageCliImpl) ImageRemove(image string) error { named, err := refdocker.ParseDockerRef(image) if err != nil { @@ -346,7 +345,7 @@ func (c *containerdImageCliImpl) ImageRemove(image string) error { return err } -//ImageSave save image to tar file +// ImageSave save image to tar file // destination destination file name eg. /tmp/xxx.tar func (c *containerdImageCliImpl) ImageSave(image, destination string) error { named, err := refdocker.ParseDockerRef(image) @@ -363,7 +362,7 @@ func (c *containerdImageCliImpl) ImageSave(image, destination string) error { return c.client.Export(ctx, w, exportOpts...) } -//TrustedImagePush push image to trusted registry +// TrustedImagePush push image to trusted registry func (c *containerdImageCliImpl) TrustedImagePush(image, user, pass string, logger event.Logger, timeout int) error { if err := CheckTrustedRepositories(image, user, pass); err != nil { return err @@ -371,7 +370,7 @@ func (c *containerdImageCliImpl) TrustedImagePush(image, user, pass string, logg return c.ImagePush(image, user, pass, logger, timeout) } -//ImageLoad load image from tar file +// ImageLoad load image from tar file // destination destination file name eg. /tmp/xxx.tar func (c *containerdImageCliImpl) ImageLoad(tarFile string, logger event.Logger) error { ctx := namespaces.WithNamespace(context.Background(), Namespace) @@ -581,7 +580,7 @@ func Display(statuses []ctrcontent.StatusInfo, start time.Time, logger event.Log } } -func containerdLogFormat(status ctrcontent.StatusInfo, barFormat string, logger event.Logger) { +func containerdLogFormat(status ctrcontent.StatusInfo, barFormat string, logger event.Logger) { var jm JSONMessage jm = JSONMessage{ Status: status.Status, @@ -590,7 +589,7 @@ func containerdLogFormat(status ctrcontent.StatusInfo, barFormat string, logger Total: status.Total, }, ProgressMessage: barFormat, - ID: status.Ref, + ID: status.Ref, } printLog(logger, "debug", fmt.Sprintf(jm.JSONString()), map[string]string{"step": "progress"}) } diff --git a/cmd/api/server/server.go b/cmd/api/server/server.go index 491a7971f..ddf720351 100644 --- a/cmd/api/server/server.go +++ b/cmd/api/server/server.go @@ -39,6 +39,7 @@ import ( "k8s.io/client-go/kubernetes" clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/restmapper" + "kubevirt.io/client-go/kubecli" "os" "os/signal" k8sclient "sigs.k8s.io/controller-runtime/pkg/client" @@ -134,10 +135,16 @@ func Run(s *option.APIServer) error { return err } + kubevirtCli, err := kubecli.GetKubevirtClientFromRESTConfig(config) + if err != nil { + logrus.Errorf("create kubevirt cli failure: %v", err) + return err + } + //初始化 middleware handler.InitProxy(s.Config) //创建handle - if err := handler.InitHandle(s.Config, etcdClientArgs, cli, etcdcli, clientset, rainbondClient, k8sClient, config, mapper, dynamicClient, gatewayClient); err != nil { + if err := handler.InitHandle(s.Config, etcdClientArgs, cli, etcdcli, clientset, rainbondClient, k8sClient, config, mapper, dynamicClient, gatewayClient, kubevirtCli); err != nil { logrus.Errorf("init all handle error, %v", err) return err } diff --git a/cmd/builder/option/option.go b/cmd/builder/option/option.go index 409a80362..2c57dbca8 100644 --- a/cmd/builder/option/option.go +++ b/cmd/builder/option/option.go @@ -62,6 +62,7 @@ type Config struct { RuntimeEndpoint string KeepCount int CleanInterval int + BRVersion string } // Builder builder server @@ -112,7 +113,7 @@ func (a *Builder) AddFlags(fs *pflag.FlagSet) { fs.BoolVar(&a.BuildKitCache, "buildkit-cache", false, "whether to enable the buildkit image cache") fs.IntVar(&a.KeepCount, "keep-count", 5, "default number of reserved copies for images") fs.IntVar(&a.CleanInterval, "clean-interval", 60, "clean image interval,default 60 minute") - + fs.StringVar(&a.BRVersion, "br-version", "v5.16.0-release", "builder and runner version") } // SetLog 设置log diff --git a/cmd/node/option/conf.go b/cmd/node/option/conf.go index f77e27aab..6caa54428 100644 --- a/cmd/node/option/conf.go +++ b/cmd/node/option/conf.go @@ -50,7 +50,7 @@ var ( exitChan = make(chan struct{}) ) -//Init init config +// Init init config func Init() error { if initialized { return nil @@ -64,7 +64,7 @@ func Init() error { return nil } -//Conf Conf +// Conf Conf type Conf struct { APIAddr string //api server listen port GrpcAPIAddr string //grpc api server listen port @@ -135,7 +135,7 @@ type Conf struct { HostsFile string } -//StatsdConfig StatsdConfig +// StatsdConfig StatsdConfig type StatsdConfig struct { StatsdListenAddress string StatsdListenUDP string @@ -144,13 +144,13 @@ type StatsdConfig struct { ReadBuffer int } -//UDPMonitorConfig UDPMonitorConfig +// UDPMonitorConfig UDPMonitorConfig type UDPMonitorConfig struct { ListenHost string ListenPort string } -//AddFlags AddFlags +// AddFlags AddFlags func (a *Conf) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&a.LogLevel, "log-level", "info", "the log level") fs.StringVar(&a.LogFile, "log-file", "", "the log file path that log output") @@ -201,7 +201,7 @@ func (a *Conf) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&a.RuntimeEndpoint, "runtime-endpoint", sources.RuntimeEndpointContainerd, "container runtime endpoint") } -//SetLog 设置log +// SetLog 设置log func (a *Conf) SetLog() { level, err := logrus.ParseLevel(a.LogLevel) if err != nil { @@ -234,7 +234,7 @@ func newClient(namespace, address string, opts ...containerd.ClientOpt) (*contai return client, ctx, cancel, nil } -//ParseClient handle config and create some api +// ParseClient handle config and create some api func (a *Conf) ParseClient(ctx context.Context, etcdClientArgs *etcdutil.ClientArgs) (err error) { logrus.Infof("begin create container image client, runtime [%s] runtime endpoint [%s]", a.ContainerRuntime, a.RuntimeEndpoint, a.EtcdEndpoints) containerImageCli, err := sources.NewContainerImageClient(a.ContainerRuntime, a.RuntimeEndpoint, time.Second*3) @@ -257,7 +257,7 @@ func (a *Conf) ParseClient(ctx context.Context, etcdClientArgs *etcdutil.ClientA return nil } -//parse parse +// parse parse func (a *Conf) parse() error { if a.TTL <= 0 { a.TTL = 10 diff --git a/cmd/worker/server/server.go b/cmd/worker/server/server.go index 5affa1341..a4c500d6d 100644 --- a/cmd/worker/server/server.go +++ b/cmd/worker/server/server.go @@ -20,6 +20,7 @@ package server import ( "k8s.io/client-go/restmapper" + "kubevirt.io/client-go/kubecli" "os" "os/signal" "syscall" @@ -47,7 +48,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) -//Run start run +// Run start run func Run(s *option.Worker) error { errChan := make(chan error, 2) dbconfig := config.Config{ @@ -82,6 +83,7 @@ func Run(s *option.Worker) error { return err } restConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(float32(s.Config.KubeAPIQPS), s.Config.KubeAPIBurst) + kubevirtCli, err := kubecli.GetKubevirtClientFromRESTConfig(restConfig) clientset, err := kubernetes.NewForConfig(restConfig) if err != nil { logrus.Errorf("create kube client error: %s", err.Error()) @@ -106,14 +108,14 @@ func Run(s *option.Worker) error { //step 4: create component resource store updateCh := channels.NewRingChannel(1024) k8sVersion := k8sutil.GetKubeVersion() - cachestore := store.NewStore(restConfig, clientset, rainbondClient, db.GetManager(), s.Config, k8sVersion) + cachestore := store.NewStore(restConfig, clientset, rainbondClient, db.GetManager(), s.Config, k8sVersion, kubevirtCli) if err := cachestore.Start(); err != nil { logrus.Error("start kube cache store error", err) return err } //step 5: create controller manager - controllerManager := controller.NewManager(s.Config, cachestore, clientset, runtimeClient) + controllerManager := controller.NewManager(s.Config, cachestore, clientset, runtimeClient, kubevirtCli) defer controllerManager.Stop() //step 6 : start runtime master diff --git a/db/etcd/etcd.go b/db/etcd/etcd.go index 1158b62fe..45f859eda 100644 --- a/db/etcd/etcd.go +++ b/db/etcd/etcd.go @@ -27,11 +27,10 @@ import ( etcdutil "github.com/goodrain/rainbond/util/etcd" - "github.com/coreos/etcd/clientv3" "github.com/sirupsen/logrus" ) -//Manager db manager +// Manager db manager type Manager struct { client *clientv3.Client config config.Config @@ -39,7 +38,7 @@ type Manager struct { models []model.Interface } -//CreateManager 创建manager +// CreateManager 创建manager func CreateManager(config config.Config) (*Manager, error) { etcdClientArgs := &etcdutil.ClientArgs{ Endpoints: config.EtcdEndPoints, @@ -61,7 +60,7 @@ func CreateManager(config config.Config) (*Manager, error) { return manager, nil } -//CloseManager 关闭管理器 +// CloseManager 关闭管理器 func (m *Manager) CloseManager() error { return m.client.Close() } diff --git a/db/model/component.go b/db/model/component.go index bfcb9d5b3..5374c6efc 100644 --- a/db/model/component.go +++ b/db/model/component.go @@ -57,6 +57,10 @@ const ( K8sAttributeNameENVFromSource = "envFromSource" //K8sAttributeNameSecurityContext - K8sAttributeNameSecurityContext = "securityContext" + //K8sAttributeNameReadinessProbe - + K8sAttributeNameReadinessProbe = "readinessProbe" + //K8sAttributeNameLiveNessProbe - + K8sAttributeNameLiveNessProbe = "livenessProbe" ) // ComponentK8sAttributes - diff --git a/db/model/tenant.go b/db/model/tenant.go index 4d8c7d1b9..7aae15f15 100644 --- a/db/model/tenant.go +++ b/db/model/tenant.go @@ -27,18 +27,18 @@ import ( "github.com/goodrain/rainbond/util/commonutil" ) -//Model 默认字段 +// Model 默认字段 type Model struct { ID uint `gorm:"column:ID;primary_key"` CreatedAt time.Time `gorm:"column:create_time" json:"create_time"` } -//IDModel 默认ID字段 +// IDModel 默认ID字段 type IDModel struct { ID uint `gorm:"column:ID;primary_key"` } -//Interface model interface +// Interface model interface type Interface interface { TableName() string } @@ -59,7 +59,7 @@ func (t TenantStatus) String() string { return string(t) } -//Tenants 租户信息 +// Tenants 租户信息 type Tenants struct { Model Name string `gorm:"column:name;size:40;unique_index"` @@ -70,7 +70,7 @@ type Tenants struct { Namespace string `gorm:"column:namespace;size:32;unique_index"` } -//TableName 返回租户表名称 +// TableName 返回租户表名称 func (t *Tenants) TableName() string { return "tenants" } @@ -81,6 +81,9 @@ type ServiceKind string // ServiceKindThirdParty means third-party service var ServiceKindThirdParty ServiceKind = "third_party" +// ServiceKindVirtualMachine - +var ServiceKindVirtualMachine ServiceKind = "virtualmachine" + // ServiceKindInternal means internal service var ServiceKindInternal ServiceKind = "internal" @@ -107,6 +110,14 @@ func (s ServiceType) IsState() bool { return false } +// IsVM is vm type or not +func (s ServiceType) IsVM() bool { + if s == ServiceTypeVM { + return true + } + return false +} + // IsJob is job func (s ServiceType) IsJob() bool { if s == ServiceTypeJob { @@ -143,6 +154,13 @@ func (t *TenantServices) IsState() bool { return ServiceType(t.ExtendMethod).IsState() } +func (t *TenantServices) IsVM() bool { + if t.ExtendMethod == "" { + return false + } + return ServiceType(t.ExtendMethod).IsVM() +} + // IsJob is job func (t *TenantServices) IsJob() bool { if ServiceType(t.ExtendMethod).IsJob() { @@ -170,7 +188,7 @@ func (t *TenantServices) IsSingleton() bool { // ServiceTypeUnknown unknown var ServiceTypeUnknown ServiceType = "unknown" -//ServiceTypeStatelessSingleton stateless_singleton +// ServiceTypeStatelessSingleton stateless_singleton var ServiceTypeStatelessSingleton ServiceType = "stateless_singleton" // ServiceTypeStatelessMultiple stateless_multiple @@ -182,13 +200,16 @@ var ServiceTypeStateSingleton ServiceType = "state_singleton" // ServiceTypeStateMultiple state_multiple var ServiceTypeStateMultiple ServiceType = "state_multiple" +// ServiceTypeVM vm +var ServiceTypeVM ServiceType = "vm" + // ServiceTypeJob job var ServiceTypeJob ServiceType = "job" // ServiceTypeCronJob cronjob var ServiceTypeCronJob ServiceType = "cronjob" -//TenantServices app service base info +// TenantServices app service base info type TenantServices struct { Model TenantID string `gorm:"column:tenant_id;size:32" json:"tenant_id"` @@ -253,7 +274,7 @@ type ComponentWorkload struct { ServiceAlias string `gorm:"column:service_alias"` } -//Image 镜像 +// Image 镜像 type Image struct { Host string Namespace string @@ -267,7 +288,7 @@ func (i Image) String() string { return fmt.Sprintf("%s/%s/%s", i.Host, i.Namespace, i.Name) } -//ParseImage 简单解析镜像名 +// ParseImage 简单解析镜像名 func ParseImage(name string) (image Image) { i := strings.IndexRune(name, '/') if i == -1 || (!strings.ContainsAny(name[:i], ".:") && name[:i] != "localhost") { @@ -284,19 +305,19 @@ func ParseImage(name string) (image Image) { return } -//CreateShareSlug 生成源码包分享的地址 +// CreateShareSlug 生成源码包分享的地址 func (t *TenantServices) CreateShareSlug(servicekey, namespace, version string) string { return fmt.Sprintf("%s/%s/%s_%s.tgz", namespace, servicekey, version, t.DeployVersion) } -//ChangeDelete ChangeDelete +// ChangeDelete ChangeDelete func (t *TenantServices) ChangeDelete() *TenantServicesDelete { delete := TenantServicesDelete(*t) delete.UpdateTime = time.Now() return &delete } -//Autodomain 构建默认域名 +// Autodomain 构建默认域名 func (t *TenantServices) Autodomain(tenantName string, containerPort int) string { exDomain := os.Getenv("EX_DOMAIN") if exDomain == "" { @@ -308,12 +329,12 @@ func (t *TenantServices) Autodomain(tenantName string, containerPort int) string return fmt.Sprintf("%d.%s.%s.%s", containerPort, t.ServiceAlias, tenantName, exDomain) } -//TableName 表名 +// TableName 表名 func (t *TenantServices) TableName() string { return "tenant_services" } -//TenantServicesDelete 已删除的应用表 +// TenantServicesDelete 已删除的应用表 type TenantServicesDelete struct { Model TenantID string `gorm:"column:tenant_id;size:32" json:"tenant_id"` @@ -368,12 +389,12 @@ type TenantServicesDelete struct { JobStrategy string `gorm:"column:job_strategy" json:"job_strategy"` } -//TableName 表名 +// TableName 表名 func (t *TenantServicesDelete) TableName() string { return "tenant_services_delete" } -//TenantServicesPort 应用端口信息 +// TenantServicesPort 应用端口信息 type TenantServicesPort struct { Model TenantID string `gorm:"column:tenant_id;size:32" validate:"tenant_id|between:30,33" json:"tenant_id"` @@ -393,7 +414,7 @@ func (t *TenantServicesPort) Key() string { return fmt.Sprintf("%s/%s/%d", t.TenantID, t.ServiceID, t.ContainerPort) } -//TableName 表名 +// TableName 表名 func (t *TenantServicesPort) TableName() string { return "tenant_services_port" } @@ -403,7 +424,7 @@ func (t *TenantServicesPort) IsOpen() bool { return commonutil.BoolValue(t.IsOuterService) || commonutil.BoolValue(t.IsInnerService) } -//TenantServiceLBMappingPort stream应用端口映射情况 +// TenantServiceLBMappingPort stream应用端口映射情况 type TenantServiceLBMappingPort struct { Model ServiceID string `gorm:"column:service_id;size:32"` @@ -415,12 +436,12 @@ type TenantServiceLBMappingPort struct { ContainerPort int `gorm:"column:container_port"` } -//TableName 表名 +// TableName 表名 func (t *TenantServiceLBMappingPort) TableName() string { return "tenant_lb_mapping_port" } -//TenantServiceRelation 应用依赖关系 +// TenantServiceRelation 应用依赖关系 type TenantServiceRelation struct { Model TenantID string `gorm:"column:tenant_id;size:32" validate:"tenant_id" json:"tenant_id"` @@ -430,12 +451,12 @@ type TenantServiceRelation struct { DependOrder int `gorm:"column:dep_order" validate:"dep_order" json:"dep_order"` } -//TableName 表名 +// TableName 表名 func (t *TenantServiceRelation) TableName() string { return "tenant_services_relation" } -//TenantServiceEnvVar 应用环境变量 +// TenantServiceEnvVar 应用环境变量 type TenantServiceEnvVar struct { Model TenantID string `gorm:"column:tenant_id;size:32" validate:"tenant_id|between:30,33" json:"tenant_id"` @@ -448,13 +469,13 @@ type TenantServiceEnvVar struct { Scope string `gorm:"column:scope;default:'outer'" validate:"scope|in:outer,inner,both" json:"scope"` } -//TableName 表名 +// TableName 表名 func (t *TenantServiceEnvVar) TableName() string { //TODO:表名修改 return "tenant_services_envs" } -//TenantServiceMountRelation 应用挂载依赖纪录 +// TenantServiceMountRelation 应用挂载依赖纪录 type TenantServiceMountRelation struct { Model TenantID string `gorm:"column:tenant_id;size:32" json:"tenant_id" validate:"tenant_id|between:30,33"` @@ -469,29 +490,32 @@ type TenantServiceMountRelation struct { VolumeType string `gorm:"column:volume_type" json:"volume_type" validate:"volume_type|required"` } -//TableName 表名 +// TableName 表名 func (t *TenantServiceMountRelation) TableName() string { return "tenant_services_mnt_relation" } -//VolumeType 存储类型 +// VolumeType 存储类型 type VolumeType string -//ShareFileVolumeType 共享文件存储 +// ShareFileVolumeType 共享文件存储 var ShareFileVolumeType VolumeType = "share-file" -//LocalVolumeType 本地文件存储 +// LocalVolumeType 本地文件存储 var LocalVolumeType VolumeType = "local" -//PluginStorageType 插件存储 +// PluginStorageType 插件存储 var PluginStorageType VolumeType = "plugin-storage" -//MemoryFSVolumeType 内存文件存储 +// MemoryFSVolumeType 内存文件存储 var MemoryFSVolumeType VolumeType = "memoryfs" -//ConfigFileVolumeType configuration file volume type +// ConfigFileVolumeType configuration file volume type var ConfigFileVolumeType VolumeType = "config-file" +// VMVolumeType vm file volume type +var VMVolumeType VolumeType = "vm-file" + // CephRBDVolumeType ceph rbd volume type var CephRBDVolumeType VolumeType = "ceph-rbd" @@ -507,7 +531,7 @@ func (vt VolumeType) String() string { return string(vt) } -//TenantServiceVolume 应用持久化纪录 +// TenantServiceVolume 应用持久化纪录 type TenantServiceVolume struct { Model ServiceID string `gorm:"column:service_id;size:32" json:"service_id"` @@ -540,7 +564,7 @@ type TenantServiceVolume struct { Mode *int32 `gorm:"column:mode" json:"mode"` } -//TableName 表名 +// TableName 表名 func (t *TenantServiceVolume) TableName() string { return "tenant_services_volume" } @@ -563,7 +587,7 @@ func (t *TenantServiceConfigFile) TableName() string { return "tenant_service_config_file" } -//TenantServiceLable 应用高级标签 +// TenantServiceLable 应用高级标签 type TenantServiceLable struct { Model ServiceID string `gorm:"column:service_id;size:32"` @@ -571,31 +595,31 @@ type TenantServiceLable struct { LabelValue string `gorm:"column:label_value;size:50"` } -//TableName 表名 +// TableName 表名 func (t *TenantServiceLable) TableName() string { return "tenant_services_label" } -//LabelKeyNodeSelector 节点选择标签 +// LabelKeyNodeSelector 节点选择标签 var LabelKeyNodeSelector = "node-selector" -//LabelKeyNodeAffinity 节点亲和标签 +// LabelKeyNodeAffinity 节点亲和标签 var LabelKeyNodeAffinity = "node-affinity" -//LabelKeyServiceType 应用部署类型标签 +// LabelKeyServiceType 应用部署类型标签 // TODO fanyangyang 待删除,组件类型记录在tenant_service表中 var LabelKeyServiceType = "service-type" -//LabelKeyServiceAffinity 应用亲和标签 +// LabelKeyServiceAffinity 应用亲和标签 var LabelKeyServiceAffinity = "service-affinity" -//LabelKeyServiceAntyAffinity 应用反亲和标签 +// LabelKeyServiceAntyAffinity 应用反亲和标签 var LabelKeyServiceAntyAffinity = "service-anti-affinity" // LabelKeyServicePrivileged - var LabelKeyServicePrivileged = "privileged" -//TenantServiceProbe 应用探针信息 +// TenantServiceProbe 应用探针信息 type TenantServiceProbe struct { Model ServiceID string `gorm:"column:service_id;size:32" json:"service_id" validate:"service_id|between:30,33"` @@ -638,7 +662,7 @@ const ( RestartFailureAction FailureActionType = "liveness" ) -//TableName 表名 +// TableName 表名 func (t *TenantServiceProbe) TableName() string { return "tenant_services_probe" } diff --git a/db/mysql/dao/tenants.go b/db/mysql/dao/tenants.go index 5b31e1abf..cc77885a5 100644 --- a/db/mysql/dao/tenants.go +++ b/db/mysql/dao/tenants.go @@ -36,12 +36,12 @@ import ( "github.com/sirupsen/logrus" ) -//TenantDaoImpl 租户信息管理 +// TenantDaoImpl 租户信息管理 type TenantDaoImpl struct { DB *gorm.DB } -//AddModel 添加租户 +// AddModel 添加租户 func (t *TenantDaoImpl) AddModel(mo model.Interface) error { tenant := mo.(*model.Tenants) var oldTenant model.Tenants @@ -55,7 +55,7 @@ func (t *TenantDaoImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel 更新租户 +// UpdateModel 更新租户 func (t *TenantDaoImpl) UpdateModel(mo model.Interface) error { tenant := mo.(*model.Tenants) if err := t.DB.Save(tenant).Error; err != nil { @@ -64,7 +64,7 @@ func (t *TenantDaoImpl) UpdateModel(mo model.Interface) error { return nil } -//GetTenantByUUID 获取租户 +// GetTenantByUUID 获取租户 func (t *TenantDaoImpl) GetTenantByUUID(uuid string) (*model.Tenants, error) { var tenant model.Tenants if err := t.DB.Where("uuid = ?", uuid).Find(&tenant).Error; err != nil { @@ -73,7 +73,7 @@ func (t *TenantDaoImpl) GetTenantByUUID(uuid string) (*model.Tenants, error) { return &tenant, nil } -//GetTenantByUUIDIsExist 获取租户 +// GetTenantByUUIDIsExist 获取租户 func (t *TenantDaoImpl) GetTenantByUUIDIsExist(uuid string) bool { var tenant model.Tenants isExist := t.DB.Where("uuid = ?", uuid).First(&tenant).RecordNotFound() @@ -81,7 +81,7 @@ func (t *TenantDaoImpl) GetTenantByUUIDIsExist(uuid string) bool { } -//GetTenantIDByName 获取租户 +// GetTenantIDByName 获取租户 func (t *TenantDaoImpl) GetTenantIDByName(name string) (*model.Tenants, error) { var tenant model.Tenants if err := t.DB.Where("name = ?", name).Find(&tenant).Error; err != nil { @@ -90,7 +90,7 @@ func (t *TenantDaoImpl) GetTenantIDByName(name string) (*model.Tenants, error) { return &tenant, nil } -//GetALLTenants GetALLTenants +// GetALLTenants GetALLTenants func (t *TenantDaoImpl) GetALLTenants(query string) ([]*model.Tenants, error) { var tenants []*model.Tenants if query != "" { @@ -105,7 +105,7 @@ func (t *TenantDaoImpl) GetALLTenants(query string) ([]*model.Tenants, error) { return tenants, nil } -//GetTenantByEid get tenants by eid +// GetTenantByEid get tenants by eid func (t *TenantDaoImpl) GetTenantByEid(eid, query string) ([]*model.Tenants, error) { var tenants []*model.Tenants if query != "" { @@ -120,7 +120,7 @@ func (t *TenantDaoImpl) GetTenantByEid(eid, query string) ([]*model.Tenants, err return tenants, nil } -//GetTenantIDsByNames get tenant ids by names +// GetTenantIDsByNames get tenant ids by names func (t *TenantDaoImpl) GetTenantIDsByNames(names []string) (re []string, err error) { rows, err := t.DB.Raw("select uuid from tenants where name in (?)", names).Rows() if err != nil { @@ -135,7 +135,7 @@ func (t *TenantDaoImpl) GetTenantIDsByNames(names []string) (re []string, err er return } -//GetTenantLimitsByNames get tenants memory limit +// GetTenantLimitsByNames get tenants memory limit func (t *TenantDaoImpl) GetTenantLimitsByNames(names []string) (limit map[string]int, err error) { limit = make(map[string]int) rows, err := t.DB.Raw("select uuid,limit_memory from tenants where name in (?)", names).Rows() @@ -170,7 +170,7 @@ func (t *TenantDaoImpl) DelByTenantID(tenantID string) error { return nil } -//TenantServicesDaoImpl 租户应用dao +// TenantServicesDaoImpl 租户应用dao type TenantServicesDaoImpl struct { DB *gorm.DB } @@ -196,7 +196,7 @@ func (t *TenantServicesDaoImpl) GetServiceTypeByID(serviceID string) (*model.Ten return &service, nil } -//GetAllServicesID get all service sample info +// GetAllServicesID get all service sample info func (t *TenantServicesDaoImpl) GetAllServicesID() ([]*model.TenantServices, error) { var services []*model.TenantServices if err := t.DB.Select("service_id,service_alias,tenant_id,app_id").Find(&services).Error; err != nil { @@ -218,7 +218,7 @@ func (t *TenantServicesDaoImpl) ListServicesByTenantID(tenantID string) ([]*mode return services, nil } -//UpdateDeployVersion update service current deploy version +// UpdateDeployVersion update service current deploy version func (t *TenantServicesDaoImpl) UpdateDeployVersion(serviceID, deployversion string) error { if err := t.DB.Exec("update tenant_services set deploy_version=? where service_id=?", deployversion, serviceID).Error; err != nil { return err @@ -226,7 +226,7 @@ func (t *TenantServicesDaoImpl) UpdateDeployVersion(serviceID, deployversion str return nil } -//AddModel 添加租户应用 +// AddModel 添加租户应用 func (t *TenantServicesDaoImpl) AddModel(mo model.Interface) error { service := mo.(*model.TenantServices) var oldService model.TenantServices @@ -240,7 +240,7 @@ func (t *TenantServicesDaoImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel 更新租户应用 +// UpdateModel 更新租户应用 func (t *TenantServicesDaoImpl) UpdateModel(mo model.Interface) error { service := mo.(*model.TenantServices) if err := t.DB.Save(service).Error; err != nil { @@ -249,7 +249,7 @@ func (t *TenantServicesDaoImpl) UpdateModel(mo model.Interface) error { return nil } -//GetServiceByID 获取服务通过服务id +// GetServiceByID 获取服务通过服务id func (t *TenantServicesDaoImpl) GetServiceByID(serviceID string) (*model.TenantServices, error) { var service model.TenantServices if err := t.DB.Where("service_id=?", serviceID).Find(&service).Error; err != nil { @@ -258,7 +258,7 @@ func (t *TenantServicesDaoImpl) GetServiceByID(serviceID string) (*model.TenantS return &service, nil } -//GetServiceByServiceAlias 获取服务通过服务别名 +// GetServiceByServiceAlias 获取服务通过服务别名 func (t *TenantServicesDaoImpl) GetServiceByServiceAlias(serviceAlias string) (*model.TenantServices, error) { var service model.TenantServices if err := t.DB.Where("service_alias=?", serviceAlias).Find(&service).Error; err != nil { @@ -267,7 +267,7 @@ func (t *TenantServicesDaoImpl) GetServiceByServiceAlias(serviceAlias string) (* return &service, nil } -//GetServiceMemoryByTenantIDs get service memory by tenant ids +// GetServiceMemoryByTenantIDs get service memory by tenant ids func (t *TenantServicesDaoImpl) GetServiceMemoryByTenantIDs(tenantIDs []string, runningServiceIDs []string) (map[string]map[string]interface{}, error) { rows, err := t.DB.Raw("select tenant_id, sum(container_cpu) as cpu,sum(container_memory * replicas) as memory from tenant_services where tenant_id in (?) and service_id in (?) group by tenant_id", tenantIDs, runningServiceIDs).Rows() if err != nil { @@ -294,7 +294,7 @@ func (t *TenantServicesDaoImpl) GetServiceMemoryByTenantIDs(tenantIDs []string, return rc, nil } -//GetServiceMemoryByServiceIDs get service memory by service ids +// GetServiceMemoryByServiceIDs get service memory by service ids func (t *TenantServicesDaoImpl) GetServiceMemoryByServiceIDs(serviceIDs []string) (map[string]map[string]interface{}, error) { rows, err := t.DB.Raw("select service_id, container_cpu as cpu, container_memory as memory from tenant_services where service_id in (?)", serviceIDs).Rows() if err != nil { @@ -321,7 +321,7 @@ func (t *TenantServicesDaoImpl) GetServiceMemoryByServiceIDs(serviceIDs []string return rc, nil } -//GetPagedTenantService GetPagedTenantResource +// GetPagedTenantService GetPagedTenantResource func (t *TenantServicesDaoImpl) GetPagedTenantService(offset, length int, serviceIDs []string) ([]map[string]interface{}, int, error) { var count int var service model.TenantServices @@ -391,7 +391,7 @@ func (t *TenantServicesDaoImpl) GetPagedTenantService(offset, length int, servic return result, count, nil } -//GetServiceAliasByIDs 获取应用别名 +// GetServiceAliasByIDs 获取应用别名 func (t *TenantServicesDaoImpl) GetServiceAliasByIDs(uids []string) ([]*model.TenantServices, error) { var services []*model.TenantServices if err := t.DB.Where("service_id in (?)", uids).Select("service_alias,service_id").Find(&services).Error; err != nil { @@ -416,7 +416,7 @@ func (t *TenantServicesDaoImpl) GetWorkloadNameByIDs(uids []string) ([]*model.Co return componentWorkload, nil } -//GetServiceByIDs get some service by service ids +// GetServiceByIDs get some service by service ids func (t *TenantServicesDaoImpl) GetServiceByIDs(uids []string) ([]*model.TenantServices, error) { var services []*model.TenantServices if err := t.DB.Where("service_id in (?)", uids).Find(&services).Error; err != nil { @@ -428,7 +428,7 @@ func (t *TenantServicesDaoImpl) GetServiceByIDs(uids []string) ([]*model.TenantS return services, nil } -//GetServiceByTenantIDAndServiceAlias 根据租户名和服务名 +// GetServiceByTenantIDAndServiceAlias 根据租户名和服务名 func (t *TenantServicesDaoImpl) GetServiceByTenantIDAndServiceAlias(tenantID, serviceName string) (*model.TenantServices, error) { var service model.TenantServices if err := t.DB.Where("service_alias = ? and tenant_id=?", serviceName, tenantID).Find(&service).Error; err != nil { @@ -437,7 +437,7 @@ func (t *TenantServicesDaoImpl) GetServiceByTenantIDAndServiceAlias(tenantID, se return &service, nil } -//GetServicesByTenantID GetServicesByTenantID +// GetServicesByTenantID GetServicesByTenantID func (t *TenantServicesDaoImpl) GetServicesByTenantID(tenantID string) ([]*model.TenantServices, error) { var services []*model.TenantServices if err := t.DB.Where("tenant_id=?", tenantID).Find(&services).Error; err != nil { @@ -449,7 +449,7 @@ func (t *TenantServicesDaoImpl) GetServicesByTenantID(tenantID string) ([]*model return services, nil } -//GetServicesByTenantIDs GetServicesByTenantIDs +// GetServicesByTenantIDs GetServicesByTenantIDs func (t *TenantServicesDaoImpl) GetServicesByTenantIDs(tenantIDs []string) ([]*model.TenantServices, error) { var services []*model.TenantServices if err := t.DB.Where("tenant_id in (?)", tenantIDs).Find(&services).Error; err != nil { @@ -461,7 +461,7 @@ func (t *TenantServicesDaoImpl) GetServicesByTenantIDs(tenantIDs []string) ([]*m return services, nil } -//GetServicesAllInfoByTenantID GetServicesAllInfoByTenantID +// GetServicesAllInfoByTenantID GetServicesAllInfoByTenantID func (t *TenantServicesDaoImpl) GetServicesAllInfoByTenantID(tenantID string) ([]*model.TenantServices, error) { var services []*model.TenantServices if err := t.DB.Where("tenant_id= ?", tenantID).Find(&services).Error; err != nil { @@ -511,7 +511,7 @@ func (t *TenantServicesDaoImpl) GetServiceIDsByAppID(appID string) (re []model.S return } -//GetServicesByServiceIDs Get Services By ServiceIDs +// GetServicesByServiceIDs Get Services By ServiceIDs func (t *TenantServicesDaoImpl) GetServicesByServiceIDs(serviceIDs []string) ([]*model.TenantServices, error) { var services []*model.TenantServices if err := t.DB.Where("service_id in (?)", serviceIDs).Find(&services).Error; err != nil { @@ -523,7 +523,7 @@ func (t *TenantServicesDaoImpl) GetServicesByServiceIDs(serviceIDs []string) ([] return services, nil } -//SetTenantServiceStatus SetTenantServiceStatus +// SetTenantServiceStatus SetTenantServiceStatus func (t *TenantServicesDaoImpl) SetTenantServiceStatus(serviceID, status string) error { var service model.TenantServices if status == "closed" || status == "undeploy" { @@ -538,7 +538,7 @@ func (t *TenantServicesDaoImpl) SetTenantServiceStatus(serviceID, status string) return nil } -//DeleteServiceByServiceID DeleteServiceByServiceID +// DeleteServiceByServiceID DeleteServiceByServiceID func (t *TenantServicesDaoImpl) DeleteServiceByServiceID(serviceID string) error { ts := &model.TenantServices{ ServiceID: serviceID, @@ -604,7 +604,7 @@ func (t *TenantServicesDaoImpl) DeleteByComponentIDs(tenantID, appID string, com return nil } -//IsK8sComponentNameDuplicate - +// IsK8sComponentNameDuplicate - func (t *TenantServicesDaoImpl) IsK8sComponentNameDuplicate(appID, serviceID, k8sComponentName string) bool { var count int64 if err := t.DB.Model(&model.TenantServices{}).Where("app_id=? and service_id<>? and k8s_component_name=?", appID, serviceID, k8sComponentName).Count(&count).Error; err != nil { @@ -614,12 +614,12 @@ func (t *TenantServicesDaoImpl) IsK8sComponentNameDuplicate(appID, serviceID, k8 return count > 0 } -//TenantServicesDeleteImpl TenantServiceDeleteImpl +// TenantServicesDeleteImpl TenantServiceDeleteImpl type TenantServicesDeleteImpl struct { DB *gorm.DB } -//AddModel 添加已删除的应用 +// AddModel 添加已删除的应用 func (t *TenantServicesDeleteImpl) AddModel(mo model.Interface) error { service := mo.(*model.TenantServicesDelete) var oldService model.TenantServicesDelete @@ -631,7 +631,7 @@ func (t *TenantServicesDeleteImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel 更新租户应用 +// UpdateModel 更新租户应用 func (t *TenantServicesDeleteImpl) UpdateModel(mo model.Interface) error { service := mo.(*model.TenantServicesDelete) if err := t.DB.Save(service).Error; err != nil { @@ -669,12 +669,12 @@ func (t *TenantServicesDeleteImpl) List() ([]*model.TenantServicesDelete, error) return components, nil } -//TenantServicesPortDaoImpl 租户应用端口操作 +// TenantServicesPortDaoImpl 租户应用端口操作 type TenantServicesPortDaoImpl struct { DB *gorm.DB } -//AddModel 添加应用端口 +// AddModel 添加应用端口 func (t *TenantServicesPortDaoImpl) AddModel(mo model.Interface) error { port := mo.(*model.TenantServicesPort) var oldPort model.TenantServicesPort @@ -688,7 +688,7 @@ func (t *TenantServicesPortDaoImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel 更新租户 +// UpdateModel 更新租户 func (t *TenantServicesPortDaoImpl) UpdateModel(mo model.Interface) error { port := mo.(*model.TenantServicesPort) if port.ID == 0 { @@ -736,7 +736,7 @@ func (t *TenantServicesPortDaoImpl) CreateOrUpdatePortsInBatch(ports []*model.Te return nil } -//DeleteModel 删除端口 +// DeleteModel 删除端口 func (t *TenantServicesPortDaoImpl) DeleteModel(serviceID string, args ...interface{}) error { if len(args) < 1 { return fmt.Errorf("can not provide containerPort") @@ -765,7 +765,7 @@ func (t *TenantServicesPortDaoImpl) GetByTenantAndName(tenantID, name string) (* return &port, nil } -//GetPortsByServiceID 通过服务获取port +// GetPortsByServiceID 通过服务获取port func (t *TenantServicesPortDaoImpl) GetPortsByServiceID(serviceID string) ([]*model.TenantServicesPort, error) { var oldPort []*model.TenantServicesPort if err := t.DB.Where("service_id = ?", serviceID).Find(&oldPort).Error; err != nil { @@ -777,7 +777,7 @@ func (t *TenantServicesPortDaoImpl) GetPortsByServiceID(serviceID string) ([]*mo return oldPort, nil } -//GetOuterPorts 获取对外端口 +// GetOuterPorts 获取对外端口 func (t *TenantServicesPortDaoImpl) GetOuterPorts(serviceID string) ([]*model.TenantServicesPort, error) { var oldPort []*model.TenantServicesPort if err := t.DB.Where("service_id = ? and is_outer_service=?", serviceID, true).Find(&oldPort).Error; err != nil { @@ -789,7 +789,7 @@ func (t *TenantServicesPortDaoImpl) GetOuterPorts(serviceID string) ([]*model.Te return oldPort, nil } -//GetInnerPorts 获取对内端口 +// GetInnerPorts 获取对内端口 func (t *TenantServicesPortDaoImpl) GetInnerPorts(serviceID string) ([]*model.TenantServicesPort, error) { var oldPort []*model.TenantServicesPort if err := t.DB.Where("service_id = ? and is_inner_service=?", serviceID, true).Find(&oldPort).Error; err != nil { @@ -798,7 +798,7 @@ func (t *TenantServicesPortDaoImpl) GetInnerPorts(serviceID string) ([]*model.Te return oldPort, nil } -//GetPort get port +// GetPort get port func (t *TenantServicesPortDaoImpl) GetPort(serviceID string, port int) (*model.TenantServicesPort, error) { var oldPort model.TenantServicesPort if err := t.DB.Where("service_id = ? and container_port=?", serviceID, port).Find(&oldPort).Error; err != nil { @@ -820,7 +820,7 @@ func (t *TenantServicesPortDaoImpl) GetOpenedPorts(serviceID string) ([]*model.T return ports, nil } -//DELPortsByServiceID DELPortsByServiceID +// DELPortsByServiceID DELPortsByServiceID func (t *TenantServicesPortDaoImpl) DELPortsByServiceID(serviceID string) error { var port model.TenantServicesPort if err := t.DB.Where("service_id=?", serviceID).Delete(&port).Error; err != nil { @@ -842,7 +842,7 @@ func (t *TenantServicesPortDaoImpl) HasOpenPort(sid string) bool { return true } -//GetDepUDPPort get all depend service udp port +// GetDepUDPPort get all depend service udp port func (t *TenantServicesPortDaoImpl) GetDepUDPPort(serviceID string) ([]*model.TenantServicesPort, error) { var portInfos []*model.TenantServicesPort var port model.TenantServicesPort @@ -882,12 +882,12 @@ func (t *TenantServicesPortDaoImpl) ListByK8sServiceNames(k8sServiceNames []stri return ports, nil } -//TenantServiceRelationDaoImpl TenantServiceRelationDaoImpl +// TenantServiceRelationDaoImpl TenantServiceRelationDaoImpl type TenantServiceRelationDaoImpl struct { DB *gorm.DB } -//AddModel 添加应用依赖关系 +// AddModel 添加应用依赖关系 func (t *TenantServiceRelationDaoImpl) AddModel(mo model.Interface) error { relation := mo.(*model.TenantServiceRelation) var oldRelation model.TenantServiceRelation @@ -901,7 +901,7 @@ func (t *TenantServiceRelationDaoImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel 更新应用依赖关系 +// UpdateModel 更新应用依赖关系 func (t *TenantServiceRelationDaoImpl) UpdateModel(mo model.Interface) error { relation := mo.(*model.TenantServiceRelation) if relation.ID == 0 { @@ -913,7 +913,7 @@ func (t *TenantServiceRelationDaoImpl) UpdateModel(mo model.Interface) error { return nil } -//DeleteModel 删除依赖 +// DeleteModel 删除依赖 func (t *TenantServiceRelationDaoImpl) DeleteModel(serviceID string, args ...interface{}) error { depServiceID := args[0].(string) relation := &model.TenantServiceRelation{ @@ -927,7 +927,7 @@ func (t *TenantServiceRelationDaoImpl) DeleteModel(serviceID string, args ...int return nil } -//DeleteRelationByDepID DeleteRelationByDepID +// DeleteRelationByDepID DeleteRelationByDepID func (t *TenantServiceRelationDaoImpl) DeleteRelationByDepID(serviceID, depID string) error { relation := &model.TenantServiceRelation{ ServiceID: serviceID, @@ -939,7 +939,7 @@ func (t *TenantServiceRelationDaoImpl) DeleteRelationByDepID(serviceID, depID st return nil } -//DeleteByComponentIDs - +// DeleteByComponentIDs - func (t *TenantServiceRelationDaoImpl) DeleteByComponentIDs(componentIDs []string) error { return t.DB.Where("service_id in (?)", componentIDs).Delete(&model.TenantServiceRelation{}).Error } @@ -973,7 +973,7 @@ func (t *TenantServiceRelationDaoImpl) CreateOrUpdateRelationsInBatch(relations return nil } -//GetTenantServiceRelations 获取应用依赖关系 +// GetTenantServiceRelations 获取应用依赖关系 func (t *TenantServiceRelationDaoImpl) GetTenantServiceRelations(serviceID string) ([]*model.TenantServiceRelation, error) { var oldRelation []*model.TenantServiceRelation if err := t.DB.Where("service_id = ?", serviceID).Find(&oldRelation).Error; err != nil { @@ -995,7 +995,7 @@ func (t *TenantServiceRelationDaoImpl) ListByServiceIDs(serviceIDs []string) ([] return relations, nil } -//HaveRelations 是否有依赖 +// HaveRelations 是否有依赖 func (t *TenantServiceRelationDaoImpl) HaveRelations(serviceID string) bool { var oldRelation []*model.TenantServiceRelation if err := t.DB.Where("service_id = ?", serviceID).Find(&oldRelation).Error; err != nil { @@ -1007,7 +1007,7 @@ func (t *TenantServiceRelationDaoImpl) HaveRelations(serviceID string) bool { return false } -//DELRelationsByServiceID DELRelationsByServiceID +// DELRelationsByServiceID DELRelationsByServiceID func (t *TenantServiceRelationDaoImpl) DELRelationsByServiceID(serviceID string) error { relation := &model.TenantServiceRelation{ ServiceID: serviceID, @@ -1019,7 +1019,7 @@ func (t *TenantServiceRelationDaoImpl) DELRelationsByServiceID(serviceID string) return nil } -//GetTenantServiceRelationsByDependServiceID 获取全部依赖当前服务的应用 +// GetTenantServiceRelationsByDependServiceID 获取全部依赖当前服务的应用 func (t *TenantServiceRelationDaoImpl) GetTenantServiceRelationsByDependServiceID(dependServiceID string) ([]*model.TenantServiceRelation, error) { var oldRelation []*model.TenantServiceRelation if err := t.DB.Where("dep_service_id = ?", dependServiceID).Find(&oldRelation).Error; err != nil { @@ -1028,12 +1028,12 @@ func (t *TenantServiceRelationDaoImpl) GetTenantServiceRelationsByDependServiceI return oldRelation, nil } -//TenantServiceEnvVarDaoImpl TenantServiceEnvVarDaoImpl +// TenantServiceEnvVarDaoImpl TenantServiceEnvVarDaoImpl type TenantServiceEnvVarDaoImpl struct { DB *gorm.DB } -//AddModel 添加应用环境变量 +// AddModel 添加应用环境变量 func (t *TenantServiceEnvVarDaoImpl) AddModel(mo model.Interface) error { relation := mo.(*model.TenantServiceEnvVar) var oldRelation model.TenantServiceEnvVar @@ -1050,7 +1050,7 @@ func (t *TenantServiceEnvVarDaoImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel update env support attr_value\is_change\scope +// UpdateModel update env support attr_value\is_change\scope func (t *TenantServiceEnvVarDaoImpl) UpdateModel(mo model.Interface) error { env := mo.(*model.TenantServiceEnvVar) return t.DB.Table(env.TableName()).Where("service_id=? and attr_name = ?", env.ServiceID, env.AttrName).Update(map[string]interface{}{ @@ -1060,7 +1060,7 @@ func (t *TenantServiceEnvVarDaoImpl) UpdateModel(mo model.Interface) error { }).Error } -//DeleteByComponentIDs - +// DeleteByComponentIDs - func (t *TenantServiceEnvVarDaoImpl) DeleteByComponentIDs(componentIDs []string) error { return t.DB.Where("service_id in (?)", componentIDs).Delete(&model.TenantServiceEnvVar{}).Error } @@ -1101,7 +1101,7 @@ func (t *TenantServiceEnvVarDaoImpl) CreateOrUpdateEnvsInBatch(envs []*model.Ten return nil } -//DeleteModel 删除env +// DeleteModel 删除env func (t *TenantServiceEnvVarDaoImpl) DeleteModel(serviceID string, args ...interface{}) error { envName := args[0].(string) relation := &model.TenantServiceEnvVar{ @@ -1114,7 +1114,7 @@ func (t *TenantServiceEnvVarDaoImpl) DeleteModel(serviceID string, args ...inter return nil } -//GetDependServiceEnvs 获取依赖服务的环境变量 +// GetDependServiceEnvs 获取依赖服务的环境变量 func (t *TenantServiceEnvVarDaoImpl) GetDependServiceEnvs(serviceIDs []string, scopes []string) ([]*model.TenantServiceEnvVar, error) { var envs []*model.TenantServiceEnvVar if err := t.DB.Where("service_id in (?) and scope in (?)", serviceIDs, scopes).Find(&envs).Error; err != nil { @@ -1126,7 +1126,7 @@ func (t *TenantServiceEnvVarDaoImpl) GetDependServiceEnvs(serviceIDs []string, s return envs, nil } -//GetServiceEnvs 获取服务环境变量 +// GetServiceEnvs 获取服务环境变量 func (t *TenantServiceEnvVarDaoImpl) GetServiceEnvs(serviceID string, scopes []string) ([]*model.TenantServiceEnvVar, error) { var envs []*model.TenantServiceEnvVar if scopes == nil { @@ -1147,7 +1147,7 @@ func (t *TenantServiceEnvVarDaoImpl) GetServiceEnvs(serviceID string, scopes []s return envs, nil } -//GetEnv 获取某个环境变量 +// GetEnv 获取某个环境变量 func (t *TenantServiceEnvVarDaoImpl) GetEnv(serviceID, envName string) (*model.TenantServiceEnvVar, error) { var env model.TenantServiceEnvVar if err := t.DB.Where("service_id=? and attr_name=? ", serviceID, envName).Find(&env).Error; err != nil { @@ -1156,7 +1156,7 @@ func (t *TenantServiceEnvVarDaoImpl) GetEnv(serviceID, envName string) (*model.T return &env, nil } -//DELServiceEnvsByServiceID 通过serviceID 删除envs +// DELServiceEnvsByServiceID 通过serviceID 删除envs func (t *TenantServiceEnvVarDaoImpl) DELServiceEnvsByServiceID(serviceID string) error { var env model.TenantServiceEnvVar if err := t.DB.Where("service_id=?", serviceID).Find(&env).Error; err != nil { @@ -1177,12 +1177,12 @@ func (t *TenantServiceEnvVarDaoImpl) DelByServiceIDAndScope(sid, scope string) e return nil } -//TenantServiceMountRelationDaoImpl 依赖存储 +// TenantServiceMountRelationDaoImpl 依赖存储 type TenantServiceMountRelationDaoImpl struct { DB *gorm.DB } -//AddModel 添加应用依赖挂载 +// AddModel 添加应用依赖挂载 func (t *TenantServiceMountRelationDaoImpl) AddModel(mo model.Interface) error { relation := mo.(*model.TenantServiceMountRelation) var oldRelation model.TenantServiceMountRelation @@ -1196,7 +1196,7 @@ func (t *TenantServiceMountRelationDaoImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel 更新应用依赖挂载 +// UpdateModel 更新应用依赖挂载 func (t *TenantServiceMountRelationDaoImpl) UpdateModel(mo model.Interface) error { relation := mo.(*model.TenantServiceMountRelation) if relation.ID == 0 { @@ -1208,7 +1208,7 @@ func (t *TenantServiceMountRelationDaoImpl) UpdateModel(mo model.Interface) erro return nil } -//DElTenantServiceMountRelationByServiceAndName DElTenantServiceMountRelationByServiceAndName +// DElTenantServiceMountRelationByServiceAndName DElTenantServiceMountRelationByServiceAndName func (t *TenantServiceMountRelationDaoImpl) DElTenantServiceMountRelationByServiceAndName(serviceID, name string) error { var relation model.TenantServiceMountRelation if err := t.DB.Where("service_id=? and volume_name=? ", serviceID, name).Find(&relation).Error; err != nil { @@ -1220,7 +1220,7 @@ func (t *TenantServiceMountRelationDaoImpl) DElTenantServiceMountRelationByServi return nil } -//DElTenantServiceMountRelationByDepService del mount relation +// DElTenantServiceMountRelationByDepService del mount relation func (t *TenantServiceMountRelationDaoImpl) DElTenantServiceMountRelationByDepService(serviceID, depServiceID string) error { var relation model.TenantServiceMountRelation if err := t.DB.Where("service_id=? and dep_service_id=?", serviceID, depServiceID).Find(&relation).Error; err != nil { @@ -1232,7 +1232,7 @@ func (t *TenantServiceMountRelationDaoImpl) DElTenantServiceMountRelationByDepSe return nil } -//DELTenantServiceMountRelationByServiceID DELTenantServiceMountRelationByServiceID +// DELTenantServiceMountRelationByServiceID DELTenantServiceMountRelationByServiceID func (t *TenantServiceMountRelationDaoImpl) DELTenantServiceMountRelationByServiceID(serviceID string) error { var relation model.TenantServiceMountRelation if err := t.DB.Where("service_id=?", serviceID).Delete(&relation).Error; err != nil { @@ -1241,7 +1241,7 @@ func (t *TenantServiceMountRelationDaoImpl) DELTenantServiceMountRelationByServi return nil } -//GetTenantServiceMountRelationsByService 获取应用的所有挂载依赖 +// GetTenantServiceMountRelationsByService 获取应用的所有挂载依赖 func (t *TenantServiceMountRelationDaoImpl) GetTenantServiceMountRelationsByService(serviceID string) ([]*model.TenantServiceMountRelation, error) { var relations []*model.TenantServiceMountRelation if err := t.DB.Where("service_id=? ", serviceID).Find(&relations).Error; err != nil { @@ -1287,12 +1287,12 @@ func (t *TenantServiceMountRelationDaoImpl) CreateOrUpdateVolumeRelsInBatch(volR return nil } -//TenantServiceVolumeDaoImpl 应用存储 +// TenantServiceVolumeDaoImpl 应用存储 type TenantServiceVolumeDaoImpl struct { DB *gorm.DB } -//GetAllVolumes 获取全部存储信息 +// GetAllVolumes 获取全部存储信息 func (t *TenantServiceVolumeDaoImpl) GetAllVolumes() ([]*model.TenantServiceVolume, error) { var volumes []*model.TenantServiceVolume if err := t.DB.Find(&volumes).Error; err != nil { @@ -1304,21 +1304,27 @@ func (t *TenantServiceVolumeDaoImpl) GetAllVolumes() ([]*model.TenantServiceVolu return volumes, nil } -//AddModel 添加应用挂载 +// AddModel 添加应用挂载 func (t *TenantServiceVolumeDaoImpl) AddModel(mo model.Interface) error { volume := mo.(*model.TenantServiceVolume) var oldvolume model.TenantServiceVolume - if ok := t.DB.Where("(volume_name=? or volume_path = ?) and service_id=?", volume.VolumeName, volume.VolumePath, volume.ServiceID).Find(&oldvolume).RecordNotFound(); ok { + if volume.VolumeType == model.VMVolumeType.String() { if err := t.DB.Create(volume).Error; err != nil { return err } } else { - return fmt.Errorf("service %s volume name %s path %s is exist ", volume.ServiceID, volume.VolumeName, volume.VolumePath) + if ok := t.DB.Where("(volume_name=? or volume_path = ?) and service_id=?", volume.VolumeName, volume.VolumePath, volume.ServiceID).Find(&oldvolume).RecordNotFound(); ok { + if err := t.DB.Create(volume).Error; err != nil { + return err + } + } else { + return fmt.Errorf("service %s volume name %s path %s is exist ", volume.ServiceID, volume.VolumeName, volume.VolumePath) + } } return nil } -//UpdateModel 更��应用挂载 +// UpdateModel 更��应用挂载 func (t *TenantServiceVolumeDaoImpl) UpdateModel(mo model.Interface) error { volume := mo.(*model.TenantServiceVolume) if volume.ID == 0 { @@ -1330,7 +1336,7 @@ func (t *TenantServiceVolumeDaoImpl) UpdateModel(mo model.Interface) error { return nil } -//GetTenantServiceVolumesByServiceID 获取应用挂载 +// GetTenantServiceVolumesByServiceID 获取应用挂载 func (t *TenantServiceVolumeDaoImpl) GetTenantServiceVolumesByServiceID(serviceID string) ([]*model.TenantServiceVolume, error) { var volumes []*model.TenantServiceVolume if err := t.DB.Where("service_id=? ", serviceID).Find(&volumes).Error; err != nil { @@ -1351,12 +1357,12 @@ func (t *TenantServiceVolumeDaoImpl) ListVolumesByComponentIDs(componentIDs []st return volumes, nil } -//DeleteByVolumeIDs - +// DeleteByVolumeIDs - func (t *TenantServiceVolumeDaoImpl) DeleteByVolumeIDs(volumeIDs []uint) error { return t.DB.Where("ID in (?)", volumeIDs).Delete(&model.TenantServiceVolume{}).Error } -//DeleteByComponentIDs - +// DeleteByComponentIDs - func (t *TenantServiceVolumeDaoImpl) DeleteByComponentIDs(componentIDs []string) error { return t.DB.Where("service_id in (?)", componentIDs).Delete(&model.TenantServiceVolume{}).Error } @@ -1390,7 +1396,7 @@ func (t *TenantServiceVolumeDaoImpl) CreateOrUpdateVolumesInBatch(volumes []*mod return nil } -//DeleteModel 删除挂载 +// DeleteModel 删除挂载 func (t *TenantServiceVolumeDaoImpl) DeleteModel(serviceID string, args ...interface{}) error { var volume model.TenantServiceVolume volumeName := args[0].(string) @@ -1403,7 +1409,7 @@ func (t *TenantServiceVolumeDaoImpl) DeleteModel(serviceID string, args ...inter return nil } -//DeleteByServiceIDAndVolumePath 删除挂载通过挂载的目录 +// DeleteByServiceIDAndVolumePath 删除挂载通过挂载的目录 func (t *TenantServiceVolumeDaoImpl) DeleteByServiceIDAndVolumePath(serviceID string, volumePath string) error { var volume model.TenantServiceVolume if err := t.DB.Where("volume_path = ? and service_id=?", volumePath, serviceID).Find(&volume).Error; err != nil { @@ -1415,7 +1421,7 @@ func (t *TenantServiceVolumeDaoImpl) DeleteByServiceIDAndVolumePath(serviceID st return nil } -//GetVolumeByServiceIDAndName 获取存储信息 +// GetVolumeByServiceIDAndName 获取存储信息 func (t *TenantServiceVolumeDaoImpl) GetVolumeByServiceIDAndName(serviceID, name string) (*model.TenantServiceVolume, error) { var volume model.TenantServiceVolume if err := t.DB.Where("service_id=? and volume_name=? ", serviceID, name).Find(&volume).Error; err != nil { @@ -1424,7 +1430,7 @@ func (t *TenantServiceVolumeDaoImpl) GetVolumeByServiceIDAndName(serviceID, name return &volume, nil } -//GetVolumeByID get volume by id +// GetVolumeByID get volume by id func (t *TenantServiceVolumeDaoImpl) GetVolumeByID(id int) (*model.TenantServiceVolume, error) { var volume model.TenantServiceVolume if err := t.DB.Where("ID=?", id).Find(&volume).Error; err != nil { @@ -1436,7 +1442,7 @@ func (t *TenantServiceVolumeDaoImpl) GetVolumeByID(id int) (*model.TenantService return &volume, nil } -//DeleteTenantServiceVolumesByServiceID 删除挂载 +// DeleteTenantServiceVolumesByServiceID 删除挂载 func (t *TenantServiceVolumeDaoImpl) DeleteTenantServiceVolumesByServiceID(serviceID string) error { var volume model.TenantServiceVolume if err := t.DB.Where("service_id=? ", serviceID).Delete(&volume).Error; err != nil { @@ -1451,7 +1457,7 @@ func (t *TenantServiceVolumeDaoImpl) DelShareableBySID(sid string) error { return t.DB.Where(query, sid).Delete(&model.TenantServiceVolume{}).Error } -//TenantServiceConfigFileDaoImpl is a implementation of TenantServiceConfigFileDao +// TenantServiceConfigFileDaoImpl is a implementation of TenantServiceConfigFileDao type TenantServiceConfigFileDaoImpl struct { DB *gorm.DB } @@ -1552,12 +1558,12 @@ func (t *TenantServiceConfigFileDaoImpl) CreateOrUpdateConfigFilesInBatch(config return nil } -//TenantServiceLBMappingPortDaoImpl stream服务映射 +// TenantServiceLBMappingPortDaoImpl stream服务映射 type TenantServiceLBMappingPortDaoImpl struct { DB *gorm.DB } -//AddModel 添加应用端口映射 +// AddModel 添加应用端口映射 func (t *TenantServiceLBMappingPortDaoImpl) AddModel(mo model.Interface) error { mapPort := mo.(*model.TenantServiceLBMappingPort) var oldMapPort model.TenantServiceLBMappingPort @@ -1571,7 +1577,7 @@ func (t *TenantServiceLBMappingPortDaoImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel 更新应用端口映射 +// UpdateModel 更新应用端口映射 func (t *TenantServiceLBMappingPortDaoImpl) UpdateModel(mo model.Interface) error { mapPort := mo.(*model.TenantServiceLBMappingPort) if mapPort.ID == 0 { @@ -1583,7 +1589,7 @@ func (t *TenantServiceLBMappingPortDaoImpl) UpdateModel(mo model.Interface) erro return nil } -//GetTenantServiceLBMappingPort 获取端口映射 +// GetTenantServiceLBMappingPort 获取端口映射 func (t *TenantServiceLBMappingPortDaoImpl) GetTenantServiceLBMappingPort(serviceID string, containerPort int) (*model.TenantServiceLBMappingPort, error) { var mapPort model.TenantServiceLBMappingPort if err := t.DB.Where("service_id=? and container_port=?", serviceID, containerPort).Find(&mapPort).Error; err != nil { @@ -1610,7 +1616,7 @@ func (t *TenantServiceLBMappingPortDaoImpl) GetLBPortsASC() ([]*model.TenantServ return ports, nil } -//CreateTenantServiceLBMappingPort 创建负载均衡VS端口,如果端口分配已存在,直接返回 +// CreateTenantServiceLBMappingPort 创建负载均衡VS端口,如果端口分配已存在,直接返回 func (t *TenantServiceLBMappingPortDaoImpl) CreateTenantServiceLBMappingPort(serviceID string, containerPort int) (*model.TenantServiceLBMappingPort, error) { var mapPorts []*model.TenantServiceLBMappingPort var mapPort model.TenantServiceLBMappingPort @@ -1695,7 +1701,7 @@ func (t *TenantServiceLBMappingPortDaoImpl) CreateTenantServiceLBMappingPort(ser return nil, fmt.Errorf("no more lb port can be use,max port is %d", maxPort) } -//GetTenantServiceLBMappingPortByService 获取端口映射 +// GetTenantServiceLBMappingPortByService 获取端口映射 func (t *TenantServiceLBMappingPortDaoImpl) GetTenantServiceLBMappingPortByService(serviceID string) ([]*model.TenantServiceLBMappingPort, error) { var mapPort []*model.TenantServiceLBMappingPort if err := t.DB.Where("service_id=?", serviceID).Find(&mapPort).Error; err != nil { @@ -1704,7 +1710,7 @@ func (t *TenantServiceLBMappingPortDaoImpl) GetTenantServiceLBMappingPortByServi return mapPort, nil } -//DELServiceLBMappingPortByServiceID DELServiceLBMappingPortByServiceID +// DELServiceLBMappingPortByServiceID DELServiceLBMappingPortByServiceID func (t *TenantServiceLBMappingPortDaoImpl) DELServiceLBMappingPortByServiceID(serviceID string) error { mapPorts := &model.TenantServiceLBMappingPort{ ServiceID: serviceID, @@ -1715,7 +1721,7 @@ func (t *TenantServiceLBMappingPortDaoImpl) DELServiceLBMappingPortByServiceID(s return nil } -//DELServiceLBMappingPortByServiceIDAndPort DELServiceLBMappingPortByServiceIDAndPort +// DELServiceLBMappingPortByServiceIDAndPort DELServiceLBMappingPortByServiceIDAndPort func (t *TenantServiceLBMappingPortDaoImpl) DELServiceLBMappingPortByServiceIDAndPort(serviceID string, lbport int) error { var mapPorts model.TenantServiceLBMappingPort if err := t.DB.Where("service_id=? and port=?", serviceID, lbport).Delete(&mapPorts).Error; err != nil { @@ -1739,12 +1745,12 @@ func (t *TenantServiceLBMappingPortDaoImpl) PortExists(port int) bool { return !t.DB.Where("port=?", port).Find(&mapPorts).RecordNotFound() } -//ServiceLabelDaoImpl ServiceLabelDaoImpl +// ServiceLabelDaoImpl ServiceLabelDaoImpl type ServiceLabelDaoImpl struct { DB *gorm.DB } -//AddModel 添加应用Label +// AddModel 添加应用Label func (t *ServiceLabelDaoImpl) AddModel(mo model.Interface) error { label := mo.(*model.TenantServiceLable) var oldLabel model.TenantServiceLable @@ -1758,7 +1764,7 @@ func (t *ServiceLabelDaoImpl) AddModel(mo model.Interface) error { return nil } -//UpdateModel 更新应用Label +// UpdateModel 更新应用Label func (t *ServiceLabelDaoImpl) UpdateModel(mo model.Interface) error { label := mo.(*model.TenantServiceLable) if label.ID == 0 { @@ -1770,7 +1776,7 @@ func (t *ServiceLabelDaoImpl) UpdateModel(mo model.Interface) error { return nil } -//DeleteModel 删除应用label +// DeleteModel 删除应用label func (t *ServiceLabelDaoImpl) DeleteModel(serviceID string, args ...interface{}) error { label := &model.TenantServiceLable{ ServiceID: serviceID, @@ -1784,7 +1790,7 @@ func (t *ServiceLabelDaoImpl) DeleteModel(serviceID string, args ...interface{}) return nil } -//DeleteLabelByServiceID 删除应用全部label +// DeleteLabelByServiceID 删除应用全部label func (t *ServiceLabelDaoImpl) DeleteLabelByServiceID(serviceID string) error { label := &model.TenantServiceLable{ ServiceID: serviceID, @@ -1795,7 +1801,7 @@ func (t *ServiceLabelDaoImpl) DeleteLabelByServiceID(serviceID string) error { return nil } -//GetTenantServiceLabel GetTenantServiceLabel +// GetTenantServiceLabel GetTenantServiceLabel func (t *ServiceLabelDaoImpl) GetTenantServiceLabel(serviceID string) ([]*model.TenantServiceLable, error) { var labels []*model.TenantServiceLable if err := t.DB.Where("service_id=?", serviceID).Find(&labels).Error; err != nil { @@ -1807,7 +1813,7 @@ func (t *ServiceLabelDaoImpl) GetTenantServiceLabel(serviceID string) ([]*model. return labels, nil } -//GetTenantServiceNodeSelectorLabel GetTenantServiceNodeSelectorLabel +// GetTenantServiceNodeSelectorLabel GetTenantServiceNodeSelectorLabel func (t *ServiceLabelDaoImpl) GetTenantServiceNodeSelectorLabel(serviceID string) ([]*model.TenantServiceLable, error) { var labels []*model.TenantServiceLable if err := t.DB.Where("service_id=? and label_key=?", serviceID, model.LabelKeyNodeSelector).Find(&labels).Error; err != nil { @@ -1829,7 +1835,7 @@ func (t *ServiceLabelDaoImpl) GetLabelByNodeSelectorKey(serviceID string, labelV return &label, nil } -//GetTenantNodeAffinityLabel returns TenantServiceLable matching serviceID and LabelKeyNodeAffinity +// GetTenantNodeAffinityLabel returns TenantServiceLable matching serviceID and LabelKeyNodeAffinity func (t *ServiceLabelDaoImpl) GetTenantNodeAffinityLabel(serviceID string) (*model.TenantServiceLable, error) { var label model.TenantServiceLable if err := t.DB.Where("service_id=? and label_key = ?", serviceID, model.LabelKeyNodeAffinity). @@ -1842,7 +1848,7 @@ func (t *ServiceLabelDaoImpl) GetTenantNodeAffinityLabel(serviceID string) (*mod return &label, nil } -//GetTenantServiceAffinityLabel GetTenantServiceAffinityLabel +// GetTenantServiceAffinityLabel GetTenantServiceAffinityLabel func (t *ServiceLabelDaoImpl) GetTenantServiceAffinityLabel(serviceID string) ([]*model.TenantServiceLable, error) { var labels []*model.TenantServiceLable if err := t.DB.Where("service_id=? and label_key in (?)", serviceID, []string{model.LabelKeyNodeSelector, model.LabelKeyNodeAffinity, @@ -1855,7 +1861,7 @@ func (t *ServiceLabelDaoImpl) GetTenantServiceAffinityLabel(serviceID string) ([ return labels, nil } -//GetTenantServiceTypeLabel GetTenantServiceTypeLabel +// GetTenantServiceTypeLabel GetTenantServiceTypeLabel // no usages func. get tenant service type use TenantServiceDao.GetServiceTypeByID(serviceID string) func (t *ServiceLabelDaoImpl) GetTenantServiceTypeLabel(serviceID string) (*model.TenantServiceLable, error) { var label model.TenantServiceLable @@ -1871,7 +1877,7 @@ func (t *ServiceLabelDaoImpl) GetPrivilegedLabel(serviceID string) (*model.Tenan return &label, nil } -//DelTenantServiceLabelsByLabelValuesAndServiceID DELTenantServiceLabelsByLabelvaluesAndServiceID +// DelTenantServiceLabelsByLabelValuesAndServiceID DELTenantServiceLabelsByLabelvaluesAndServiceID func (t *ServiceLabelDaoImpl) DelTenantServiceLabelsByLabelValuesAndServiceID(serviceID string) error { var label model.TenantServiceLable if err := t.DB.Where("service_id=? and label_value=?", serviceID, model.LabelKeyNodeSelector).Delete(&label).Error; err != nil { @@ -1880,7 +1886,7 @@ func (t *ServiceLabelDaoImpl) DelTenantServiceLabelsByLabelValuesAndServiceID(se return nil } -//DelTenantServiceLabelsByServiceIDKeyValue deletes labels +// DelTenantServiceLabelsByServiceIDKeyValue deletes labels func (t *ServiceLabelDaoImpl) DelTenantServiceLabelsByServiceIDKeyValue(serviceID string, labelKey string, labelValue string) error { var label model.TenantServiceLable @@ -1891,7 +1897,7 @@ func (t *ServiceLabelDaoImpl) DelTenantServiceLabelsByServiceIDKeyValue(serviceI return nil } -//DelTenantServiceLabelsByServiceIDKey deletes labels by serviceID and labelKey +// DelTenantServiceLabelsByServiceIDKey deletes labels by serviceID and labelKey func (t *ServiceLabelDaoImpl) DelTenantServiceLabelsByServiceIDKey(serviceID string, labelKey string) error { var label model.TenantServiceLable if err := t.DB.Where("service_id=? and label_key=?", serviceID, labelKey).Delete(&label).Error; err != nil { diff --git a/discover/discover.go b/discover/discover.go index 5fff0d992..cdba3b55d 100644 --- a/discover/discover.go +++ b/discover/discover.go @@ -36,7 +36,7 @@ import ( "github.com/sirupsen/logrus" ) -//CallbackUpdate 每次返还变化 +// CallbackUpdate 每次返还变化 type CallbackUpdate interface { //TODO: //weight自动发现更改实现暂时不 Ready @@ -45,21 +45,21 @@ type CallbackUpdate interface { Error(error) } -//Callback 每次返回全部节点 +// Callback 每次返回全部节点 type Callback interface { UpdateEndpoints(endpoints ...*config.Endpoint) //when watch occurred error,will exec this method Error(error) } -//Discover 后端服务自动发现 +// Discover 后端服务自动发现 type Discover interface { AddProject(name string, callback Callback) AddUpdateProject(name string, callback CallbackUpdate) Stop() } -//GetDiscover 获取服务发现管理器 +// GetDiscover 获取服务发现管理器 func GetDiscover(opt config.DiscoverConfig) (Discover, error) { if opt.Ctx == nil { opt.Ctx = context.Background() diff --git a/discover/register.go b/discover/register.go index ab75e8bdf..04fb4f3d0 100644 --- a/discover/register.go +++ b/discover/register.go @@ -31,7 +31,7 @@ import ( "github.com/sirupsen/logrus" ) -//KeepAlive 服务注册 +// KeepAlive 服务注册 type KeepAlive struct { cancel context.CancelFunc EtcdClentArgs *etcdutil.ClientArgs @@ -44,7 +44,7 @@ type KeepAlive struct { etcdClient *client.Client } -//CreateKeepAlive create keepalive for server +// CreateKeepAlive create keepalive for server func CreateKeepAlive(etcdClientArgs *etcdutil.ClientArgs, serverName string, hostName string, HostIP string, Port int) (*KeepAlive, error) { if serverName == "" || Port == 0 { return nil, fmt.Errorf("servername or serverport can not be empty") @@ -74,7 +74,7 @@ func CreateKeepAlive(etcdClientArgs *etcdutil.ClientArgs, serverName string, hos }, nil } -//Start 开始 +// Start 开始 func (k *KeepAlive) Start() error { duration := time.Duration(k.TTL) * time.Second timer := time.NewTimer(duration) @@ -140,7 +140,7 @@ func (k *KeepAlive) reg() error { return nil } -//Stop 结束 +// Stop 结束 func (k *KeepAlive) Stop() error { close(k.Done) defer k.cancel() diff --git a/eventlog/cluster/cluster.go b/eventlog/cluster/cluster.go index 2d71c7f10..21ad8d4e3 100644 --- a/eventlog/cluster/cluster.go +++ b/eventlog/cluster/cluster.go @@ -38,7 +38,7 @@ import ( "github.com/sirupsen/logrus" ) -//Cluster 集群模块对外服务 +// Cluster 集群模块对外服务 type Cluster interface { //获取一个承接日志的节点 GetSuitableInstance(serviceID string) *discover.Instance @@ -51,7 +51,7 @@ type Cluster interface { Scrape(ch chan<- prometheus.Metric, namespace, exporter string) error } -//ClusterManager 控制器 +// ClusterManager 控制器 type ClusterManager struct { discover discover.Manager zmqPub *connect.Pub @@ -65,7 +65,7 @@ type ClusterManager struct { etcdClient *clientv3.Client } -//NewCluster 创建集群控制器 +// NewCluster 创建集群控制器 func NewCluster(etcdClient *clientv3.Client, conf conf.ClusterConf, log *logrus.Entry, storeManager store.Manager) Cluster { ctx, cancel := context.WithCancel(context.Background()) discover := discover.New(etcdClient, conf.Discover, log.WithField("module", "Discover")) @@ -87,7 +87,7 @@ func NewCluster(etcdClient *clientv3.Client, conf conf.ClusterConf, log *logrus. } } -//Start 启动 +// Start 启动 func (s *ClusterManager) Start() error { if err := s.discover.Run(); err != nil { return err @@ -105,7 +105,7 @@ func (s *ClusterManager) Start() error { return nil } -//Stop 停止 +// Stop 停止 func (s *ClusterManager) Stop() { s.cancel() s.distribution.Stop() @@ -114,12 +114,12 @@ func (s *ClusterManager) Stop() { s.discover.Stop() } -//GetSuitableInstance 获取适合的日志接收节点 +// GetSuitableInstance 获取适合的日志接收节点 func (s *ClusterManager) GetSuitableInstance(serviceID string) *discover.Instance { return s.distribution.GetSuitableInstance(serviceID) } -//MessageRadio 消息广播 +// MessageRadio 消息广播 func (s *ClusterManager) MessageRadio(mes ...db.ClusterMessage) { for _, m := range mes { s.zmqPub.RadioChan <- m @@ -153,7 +153,7 @@ func (s *ClusterManager) monitor() { } } -//Scrape prometheus monitor metrics +// Scrape prometheus monitor metrics func (s *ClusterManager) Scrape(ch chan<- prometheus.Metric, namespace, exporter string) error { s.discover.Scrape(ch, namespace, exporter) return nil diff --git a/eventlog/cluster/discover/etcdManager.go b/eventlog/cluster/discover/etcdManager.go index d054daba9..c520103a3 100644 --- a/eventlog/cluster/discover/etcdManager.go +++ b/eventlog/cluster/discover/etcdManager.go @@ -28,7 +28,7 @@ import ( "golang.org/x/net/context" ) -//SaveDockerLogInInstance 存储service和node 的对应关系 +// SaveDockerLogInInstance 存储service和node 的对应关系 func SaveDockerLogInInstance(etcdClient *clientv3.Client, conf conf.DiscoverConf, serviceID, instanceID string) error { ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) defer cancel() @@ -40,7 +40,7 @@ func SaveDockerLogInInstance(etcdClient *clientv3.Client, conf conf.DiscoverConf return nil } -//GetDokerLogInInstance 获取应用日志接收节点 +// GetDokerLogInInstance 获取应用日志接收节点 func GetDokerLogInInstance(etcdClient *clientv3.Client, conf conf.DiscoverConf, serviceID string) (string, error) { ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) defer cancel() diff --git a/eventlog/cluster/discover/manager.go b/eventlog/cluster/discover/manager.go index 290b9b0b1..0c88c13ba 100644 --- a/eventlog/cluster/discover/manager.go +++ b/eventlog/cluster/discover/manager.go @@ -21,13 +21,13 @@ package discover import ( "encoding/json" "fmt" + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/mvcc/mvccpb" "net" "os" "strings" "time" - "github.com/coreos/etcd/clientv3" - "github.com/coreos/etcd/mvcc/mvccpb" "github.com/goodrain/rainbond/eventlog/conf" "github.com/goodrain/rainbond/eventlog/util" etcdutil "github.com/goodrain/rainbond/util/etcd" @@ -36,7 +36,7 @@ import ( "golang.org/x/net/context" ) -//Manager 节点动态发现管理器 +// Manager 节点动态发现管理器 type Manager interface { RegisteredInstance(host string, port int, stopRegister *bool) *Instance CancellationInstance(instance *Instance) @@ -51,7 +51,7 @@ type Manager interface { Scrape(ch chan<- prometheus.Metric, namespace, exporter string) error } -//EtcdDiscoverManager 基于ETCD自动发现 +// EtcdDiscoverManager 基于ETCD自动发现 type EtcdDiscoverManager struct { cancel func() context context.Context @@ -66,7 +66,7 @@ type EtcdDiscoverManager struct { stopDiscover bool } -//New 创建 +// New 创建 func New(etcdClient *clientv3.Client, conf conf.DiscoverConf, log *logrus.Entry) Manager { ctx, cancel := context.WithCancel(context.Background()) return &EtcdDiscoverManager{ @@ -82,12 +82,12 @@ func New(etcdClient *clientv3.Client, conf conf.DiscoverConf, log *logrus.Entry) } } -//GetCurrentInstance 获取当前节点 +// GetCurrentInstance 获取当前节点 func (d *EtcdDiscoverManager) GetCurrentInstance() Instance { return *d.selfInstance } -//RegisteredInstance 注册实例 +// RegisteredInstance 注册实例 func (d *EtcdDiscoverManager) RegisteredInstance(host string, port int, stopRegister *bool) *Instance { instance := &Instance{} for !*stopRegister { @@ -143,22 +143,22 @@ func (d *EtcdDiscoverManager) RegisteredInstance(host string, port int, stopRegi return nil } -//MonitorAddInstances 实例通知 +// MonitorAddInstances 实例通知 func (d *EtcdDiscoverManager) MonitorAddInstances() chan *Instance { return d.addChan } -//MonitorDelInstances 实例通知 +// MonitorDelInstances 实例通知 func (d *EtcdDiscoverManager) MonitorDelInstances() chan *Instance { return d.delChan } -//MonitorUpdateInstances 实例通知 +// MonitorUpdateInstances 实例通知 func (d *EtcdDiscoverManager) MonitorUpdateInstances() chan *Instance { return d.updateChan } -//Run 启动 +// Run 启动 func (d *EtcdDiscoverManager) Run() error { d.log.Info("Discover manager start ") etcdClientArgs := &etcdutil.ClientArgs{ @@ -176,7 +176,7 @@ func (d *EtcdDiscoverManager) Run() error { return nil } -//Discover 发现 +// Discover 发现 func (d *EtcdDiscoverManager) discover() { tike := time.NewTicker(time.Second * 5) defer tike.Stop() @@ -307,7 +307,7 @@ func (d *EtcdDiscoverManager) update(node *Node) { } -//DeleteSlice 从数组中删除某元素 +// DeleteSlice 从数组中删除某元素 func DeleteSlice(source []*Instance, index int) []*Instance { if len(source) == 1 { return make([]*Instance, 0) @@ -321,14 +321,14 @@ func DeleteSlice(source []*Instance, index int) []*Instance { return append(source[0:index-1], source[index+1:]...) } -//Stop 停止 +// Stop 停止 func (d *EtcdDiscoverManager) Stop() { d.stopDiscover = true d.cancel() d.log.Info("Stop the discover manager.") } -//CancellationInstance 注销实例 +// CancellationInstance 注销实例 func (d *EtcdDiscoverManager) CancellationInstance(instance *Instance) { ctx, cancel := context.WithTimeout(d.context, time.Second*5) defer cancel() @@ -340,7 +340,7 @@ func (d *EtcdDiscoverManager) CancellationInstance(instance *Instance) { } } -//UpdateInstance 更新实例 +// UpdateInstance 更新实例 func (d *EtcdDiscoverManager) UpdateInstance(instance *Instance) { instance.Status = "update" data, err := json.Marshal(instance) @@ -356,10 +356,10 @@ func (d *EtcdDiscoverManager) UpdateInstance(instance *Instance) { } } -//InstanceCheckHealth 将由distribution调用,当发现节点不正常时 -//此处检查,如果节点已经下线,返回 delete -//如果节点未下线标记为异常,返回 abnormal -//如果节点被集群判断为故障,返回 delete +// InstanceCheckHealth 将由distribution调用,当发现节点不正常时 +// 此处检查,如果节点已经下线,返回 delete +// 如果节点未下线标记为异常,返回 abnormal +// 如果节点被集群判断为故障,返回 delete func (d *EtcdDiscoverManager) InstanceCheckHealth(instanceID string) string { d.log.Info("Start check instance health.") if d.selfInstance.HostID == instanceID { @@ -383,7 +383,7 @@ func (d *EtcdDiscoverManager) InstanceCheckHealth(instanceID string) string { return "delete" } -//GetInstance 获取实例 +// GetInstance 获取实例 func (d *EtcdDiscoverManager) GetInstance(id string) *Instance { if id == d.selfInstance.HostID { return d.selfInstance @@ -396,7 +396,7 @@ func (d *EtcdDiscoverManager) GetInstance(id string) *Instance { return nil } -//Scrape prometheus monitor metrics +// Scrape prometheus monitor metrics func (d *EtcdDiscoverManager) Scrape(ch chan<- prometheus.Metric, namespace, exporter string) error { instanceDesc := prometheus.NewDesc( prometheus.BuildFQName(namespace, exporter, "instance_up"), diff --git a/eventlog/cluster/distribution/distribution.go b/eventlog/cluster/distribution/distribution.go index c17955679..f27bf9751 100644 --- a/eventlog/cluster/distribution/distribution.go +++ b/eventlog/cluster/distribution/distribution.go @@ -33,7 +33,7 @@ import ( "github.com/sirupsen/logrus" ) -//Distribution 数据分区 +// Distribution 数据分区 type Distribution struct { monitorDatas map[string]*db.MonitorData updateTime map[string]time.Time @@ -63,18 +63,18 @@ func NewDistribution(etcdClient *clientv3.Client, conf conf.DiscoverConf, dis di return d } -//Start 开始健康监测 +// Start 开始健康监测 func (d *Distribution) Start() error { go d.checkHealth() return nil } -//Stop 停止 +// Stop 停止 func (d *Distribution) Stop() { d.cancel() } -//Update 更新监控数据 +// Update 更新监控数据 func (d *Distribution) Update(m db.MonitorData) { d.lock.Lock() defer d.lock.Unlock() @@ -121,7 +121,7 @@ func (d *Distribution) checkHealth() { } } -//GetSuitableInstance 获取推荐节点 +// GetSuitableInstance 获取推荐节点 func (d *Distribution) GetSuitableInstance(serviceID string) *discover.Instance { d.lock.Lock() defer d.lock.Unlock() diff --git a/eventlog/exit/web/manager.go b/eventlog/exit/web/manager.go index 62a08f1c2..b51e3bbb7 100644 --- a/eventlog/exit/web/manager.go +++ b/eventlog/exit/web/manager.go @@ -21,6 +21,7 @@ package web import ( "encoding/json" "fmt" + "github.com/coreos/etcd/clientv3" "io/ioutil" "net/http" "strings" @@ -34,7 +35,6 @@ import ( "github.com/goodrain/rainbond/util" httputil "github.com/goodrain/rainbond/util/http" - "github.com/coreos/etcd/clientv3" "github.com/go-chi/chi" "github.com/go-chi/chi/middleware" "github.com/gorilla/websocket" @@ -46,7 +46,7 @@ import ( "golang.org/x/net/context" ) -//SocketServer socket 服务 +// SocketServer socket 服务 type SocketServer struct { conf conf.WebSocketConf discoverConf conf.DiscoverConf @@ -63,7 +63,7 @@ type SocketServer struct { pubsubCtx map[string]*PubContext } -//NewSocket 创建zmq sub客户端 +// NewSocket 创建zmq sub客户端 func NewSocket(conf conf.WebSocketConf, discoverConf conf.DiscoverConf, etcdClient *clientv3.Client, log *logrus.Entry, storeManager store.Manager, c cluster.Cluster, healthInfo map[string]string) *SocketServer { ctx, cancel := context.WithCancel(context.Background()) d, err := time.ParseDuration(conf.TimeOut) @@ -435,7 +435,7 @@ func (s *SocketServer) reader(ws *websocket.Conn, ch chan struct{}) { close(ch) } -//Run 执行 +// Run 执行 func (s *SocketServer) Run() error { s.log.Info("WebSocker Server start") go s.listen() @@ -533,18 +533,18 @@ func (s *SocketServer) checkHealth() { } } -//ListenError 返回错误通道 +// ListenError 返回错误通道 func (s *SocketServer) ListenError() chan error { return s.errorStop } -//Stop 停止 +// Stop 停止 func (s *SocketServer) Stop() { s.log.Info("WebSocker Server stop") s.cancel() } -//receiveEventMessage 接收操作日志API +// receiveEventMessage 接收操作日志API func (s *SocketServer) receiveEventMessage(w http.ResponseWriter, r *http.Request) { if r.Method != "POST" { w.WriteHeader(http.StatusMethodNotAllowed) @@ -579,7 +579,7 @@ func (s *SocketServer) prometheus(r *chi.Mux) { r.Handle(s.conf.PrometheusMetricPath, promhttp.Handler()) } -//ResponseType 返回内容 +// ResponseType 返回内容 type ResponseType struct { Code int `json:"code"` Message string `json:"msg"` @@ -587,7 +587,7 @@ type ResponseType struct { Body ResponseBody `json:"body,omitempty"` } -//ResponseBody 返回主体 +// ResponseBody 返回主体 type ResponseBody struct { Bean interface{} `json:"bean,omitempty"` List []interface{} `json:"list,omitempty"` @@ -596,7 +596,7 @@ type ResponseBody struct { Total int `json:"total,omitempty"` } -//NewResponseType 构建返回结构 +// NewResponseType 构建返回结构 func NewResponseType(code int, message string, messageCN string, bean interface{}, list []interface{}) ResponseType { return ResponseType{ Code: code, @@ -609,7 +609,7 @@ func NewResponseType(code int, message string, messageCN string, bean interface{ } } -//NewSuccessResponse 创建成功返回结构 +// NewSuccessResponse 创建成功返回结构 func NewSuccessResponse(bean interface{}, list []interface{}) ResponseType { return NewResponseType(200, "", "", bean, list) } diff --git a/gateway/cluster/ipmanager.go b/gateway/cluster/ipmanager.go index 517e57ac7..0aeec5750 100644 --- a/gateway/cluster/ipmanager.go +++ b/gateway/cluster/ipmanager.go @@ -33,8 +33,8 @@ import ( "github.com/goodrain/rainbond/util" ) -//IPManager ip manager -//Gets all available IP addresses for synchronizing the current node +// IPManager ip manager +// Gets all available IP addresses for synchronizing the current node type IPManager interface { //Whether the IP address belongs to the current node IPInCurrentHost(net.IP) bool @@ -56,7 +56,7 @@ type ipManager struct { needUpdate chan util.IPEVENT } -//CreateIPManager create ip manage +// CreateIPManager create ip manage func CreateIPManager(ctx context.Context, config option.Config, etcdcli *clientv3.Client) (IPManager, error) { newCtx, cancel := context.WithCancel(ctx) IPPool := util.NewIPPool(config.IgnoreInterface) @@ -75,7 +75,7 @@ func (i *ipManager) NeedUpdateGatewayPolicy() <-chan util.IPEVENT { return i.needUpdate } -//IPInCurrentHost Whether the IP address belongs to the current node +// IPInCurrentHost Whether the IP address belongs to the current node func (i *ipManager) IPInCurrentHost(in net.IP) bool { for _, exit := range i.IPPool.GetHostIPs() { if exit.Equal(in) { diff --git a/gateway/cluster/node.go b/gateway/cluster/node.go index 64dada546..f9838715b 100644 --- a/gateway/cluster/node.go +++ b/gateway/cluster/node.go @@ -21,21 +21,21 @@ package cluster import ( "context" "fmt" + "github.com/coreos/etcd/clientv3" "net" "time" - "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/cmd/gateway/option" "github.com/sirupsen/logrus" ) -//NodeManager node manager +// NodeManager node manager type NodeManager struct { config option.Config ipManager IPManager } -//CreateNodeManager create node manager +// CreateNodeManager create node manager func CreateNodeManager(ctx context.Context, config option.Config, etcdcli *clientv3.Client) (*NodeManager, error) { nm := &NodeManager{ config: config, @@ -75,7 +75,7 @@ func (n *NodeManager) checkGatewayPort() bool { return n.CheckPortAvailable("tcp", ports...) } -//CheckPortAvailable checks whether the specified port is available +// CheckPortAvailable checks whether the specified port is available func (n *NodeManager) CheckPortAvailable(protocol string, ports ...uint32) bool { if protocol == "" { protocol = "tcp" @@ -91,7 +91,7 @@ func (n *NodeManager) CheckPortAvailable(protocol string, ports ...uint32) bool return true } -//IPManager ip manager +// IPManager ip manager func (n *NodeManager) IPManager() IPManager { return n.ipManager } diff --git a/gateway/controller/controller.go b/gateway/controller/controller.go index 99f3557a9..7eb1025e3 100644 --- a/gateway/controller/controller.go +++ b/gateway/controller/controller.go @@ -21,12 +21,12 @@ package controller import ( "context" "fmt" + client "github.com/coreos/etcd/clientv3" "sync" "time" "github.com/goodrain/rainbond/gateway/cluster" - client "github.com/coreos/etcd/clientv3" "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/gateway/option" "github.com/goodrain/rainbond/gateway/controller/openresty" @@ -177,7 +177,7 @@ func (gwc *GWController) syncGateway(key interface{}) error { return nil } -//NewGWController new Gateway controller +// NewGWController new Gateway controller func NewGWController(ctx context.Context, clientset kubernetes.Interface, cfg *option.Config, mc metric.Collector, node *cluster.NodeManager) (*GWController, error) { gwc := &GWController{ updateCh: channels.NewRingChannel(1024), diff --git a/go.mod b/go.mod index c62ab50e7..1975a59e1 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,13 @@ module github.com/goodrain/rainbond -go 1.18 +go 1.19 require ( cuelang.org/go v0.2.2 github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/aliyun/aliyun-oss-go-sdk v2.1.5+incompatible github.com/atcdot/gorm-bulk-upsert v1.0.0 - github.com/aws/aws-sdk-go v1.38.49 + github.com/aws/aws-sdk-go v1.44.116 github.com/barnettZQG/gotty v1.0.1-0.20200904091006-a0a1f7d747dc github.com/beorn7/perks v1.0.1 github.com/bitly/go-simplejson v0.5.0 @@ -22,12 +22,12 @@ require ( github.com/docker/go-units v0.4.0 github.com/docker/libcompose v0.4.1-0.20190808084053-143e0f3f1ab9 github.com/eapache/channels v1.1.0 - github.com/emicklei/go-restful v2.14.2+incompatible + github.com/emicklei/go-restful v2.15.0+incompatible github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6 - github.com/envoyproxy/go-control-plane v0.10.1 + github.com/envoyproxy/go-control-plane v0.10.3 github.com/fatih/color v1.13.0 github.com/fatih/structs v1.1.0 - github.com/fsnotify/fsnotify v1.5.1 + github.com/fsnotify/fsnotify v1.6.0 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/go-chi/chi v4.1.2+incompatible github.com/go-chi/render v1.0.1 @@ -39,13 +39,13 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/golang/glog v1.0.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/goodrain/rainbond-oam v0.0.0-20221115150510-dd668a6d6765 github.com/goodrain/rainbond-operator v1.3.1-0.20210401055914-f8fe4bf89a21 - github.com/gorilla/websocket v1.4.2 + github.com/gorilla/websocket v1.5.0 github.com/gosuri/uitable v0.0.4 github.com/howeyc/fsnotify v0.9.0 - github.com/imdario/mergo v0.3.12 + github.com/imdario/mergo v0.3.15 github.com/jinzhu/gorm v1.9.16 github.com/json-iterator/go v1.1.12 github.com/kr/pty v1.1.8 @@ -58,50 +58,49 @@ require ( github.com/ncabatoff/process-exporter v0.7.1 github.com/oam-dev/kubevela v1.1.0-alpha.4.0.20210625105426-e176fcfc56f0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.19.0 + github.com/onsi/gomega v1.27.10 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198 github.com/pborman/uuid v1.2.1 github.com/pebbe/zmq4 v1.2.1 github.com/pkg/errors v0.9.1 - github.com/pkg/sftp v1.12.0 + github.com/pkg/sftp v1.13.1 github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.45.0 github.com/prometheus-operator/prometheus-operator/pkg/client v0.45.0 - github.com/prometheus/client_golang v1.12.1 - github.com/prometheus/client_model v0.2.0 - github.com/prometheus/common v0.32.1 + github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/client_model v0.4.0 + github.com/prometheus/common v0.44.0 github.com/prometheus/node_exporter v1.0.1 - github.com/prometheus/procfs v0.7.3 + github.com/prometheus/procfs v0.10.1 github.com/shirou/gopsutil v3.21.3+incompatible github.com/sirupsen/logrus v1.8.1 github.com/smartystreets/goconvey v1.6.4 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.2 github.com/testcontainers/testcontainers-go v0.8.0 github.com/thejerf/suture v3.0.3+incompatible github.com/tidwall/gjson v1.9.3 github.com/twinj/uuid v1.0.0 github.com/urfave/cli v1.22.4 github.com/yudai/umutex v0.0.0-20150817080136-18216d265c6b - golang.org/x/crypto v0.1.0 - golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 - golang.org/x/sys v0.3.0 - golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 - google.golang.org/grpc v1.45.0 - google.golang.org/protobuf v1.28.1 + golang.org/x/crypto v0.14.0 + golang.org/x/net v0.17.0 + golang.org/x/sys v0.13.0 + golang.org/x/time v0.3.0 + google.golang.org/grpc v1.54.0 + google.golang.org/protobuf v1.30.0 gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/src-d/go-git.v4 v4.13.1 gopkg.in/yaml.v2 v2.4.0 helm.sh/helm/v3 v3.8.2 - k8s.io/api v0.26.0 - k8s.io/apiextensions-apiserver v0.26.0 - k8s.io/apimachinery v0.26.0 - k8s.io/apiserver v0.24.1 - k8s.io/cli-runtime v0.24.1 + k8s.io/api v0.28.3 + k8s.io/apiextensions-apiserver v0.28.3 + k8s.io/apiserver v0.28.3 + k8s.io/cli-runtime v0.26.4 k8s.io/client-go v12.0.0+incompatible - k8s.io/code-generator v0.26.0 - k8s.io/component-base v0.24.1 + k8s.io/code-generator v0.26.4 + k8s.io/component-base v0.28.3 k8s.io/cri-api v0.23.1 k8s.io/kubernetes v1.23.12 sigs.k8s.io/controller-runtime v0.12.1 @@ -110,17 +109,21 @@ require ( require ( github.com/coreos/etcd v3.3.13+incompatible + github.com/dustin/go-humanize v1.0.0 github.com/go-playground/assert/v2 v2.0.1 github.com/helm/helm v2.17.0+incompatible - golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 - k8s.io/klog/v2 v2.80.1 + golang.org/x/sync v0.2.0 + k8s.io/apimachinery v0.28.3 + k8s.io/klog/v2 v2.100.1 + kubevirt.io/api v1.1.0 + kubevirt.io/client-go v1.1.0 sigs.k8s.io/gateway-api v0.6.1 ) require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/BurntSushi/toml v1.0.0 // indirect - github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect + github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect @@ -131,15 +134,15 @@ require ( github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect - github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beevik/ntp v0.3.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect - github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect - github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect + github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chai2010/gettext-go v1.0.2 // indirect + github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect + github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b // indirect github.com/cockroachdb/apd/v2 v2.0.1 // indirect github.com/containerd/cgroups v1.0.3 // indirect github.com/containerd/console v1.0.3 // indirect @@ -147,6 +150,7 @@ require ( github.com/containerd/fifo v1.0.0 // indirect github.com/containerd/ttrpc v1.1.0 // indirect github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect + github.com/coreos/prometheus-operator v0.41.1 // indirect github.com/creack/pty v1.1.11 // indirect github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -157,20 +161,21 @@ require ( github.com/eapache/queue v1.1.0 // indirect github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/emirpasic/gods v1.12.0 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect + github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect - github.com/go-errors/errors v1.0.1 // indirect + github.com/go-errors/errors v1.4.2 // indirect github.com/go-gorp/gorp/v3 v3.0.2 // indirect - github.com/go-logfmt/logfmt v0.5.0 // indirect - github.com/go-logr/zapr v1.2.0 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logr/zapr v1.2.4 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/go-playground/locales v0.14.0 // indirect github.com/go-playground/universal-translator v0.18.0 // indirect github.com/gobwas/glob v0.2.3 // indirect @@ -185,25 +190,27 @@ require ( github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/hodgesds/perf-utils v0.0.8 // indirect github.com/huandu/xstrings v1.3.2 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmoiron/sqlx v1.3.4 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jtolds/gls v4.20.0+incompatible // indirect + github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20191119172530-79f836b90111 // indirect github.com/kr/fs v0.1.0 // indirect + github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/lib/pq v1.10.4 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/lufia/iostat v1.1.0 // indirect - github.com/mailru/easyjson v0.7.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-xmlrpc v0.0.3 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mdlayher/genetlink v1.0.0 // indirect github.com/mdlayher/netlink v1.1.0 // indirect github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee // indirect @@ -213,7 +220,7 @@ require ( github.com/moby/locker v1.0.1 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect - github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect + github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect @@ -226,11 +233,13 @@ require ( github.com/opencontainers/runc v1.1.4 // indirect github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect github.com/opencontainers/selinux v1.10.1 // indirect + github.com/openshift/api v0.0.0-20230503133300-8bbcb7ca7183 // indirect + github.com/openshift/client-go v0.0.0-20210112165513-ebc401615f47 // indirect + github.com/openshift/custom-resource-status v1.1.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rubenv/sql-migrate v1.1.1 // indirect - github.com/russross/blackfriday v1.6.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect @@ -244,50 +253,53 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opencensus.io v0.23.0 // indirect + go.opencensus.io v0.24.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect - go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.19.1 // indirect - golang.org/x/mod v0.6.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.25.0 // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect + k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect k8s.io/helm v2.17.0+incompatible // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect + kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 // indirect + kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect oras.land/oras-go v1.1.1 // indirect - sigs.k8s.io/kustomize/api v0.11.4 // indirect - sigs.k8s.io/kustomize/kyaml v0.13.6 // indirect + sigs.k8s.io/kustomize/api v0.12.1 // indirect + sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) require ( - github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4 // indirect + github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect - github.com/klauspost/compress v1.15.4 // indirect - github.com/mattn/go-sqlite3 v1.14.8 // indirect + github.com/klauspost/compress v1.15.9 // indirect + github.com/mattn/go-sqlite3 v1.14.14 // indirect github.com/mitchellh/hashstructure/v2 v2.0.1 - github.com/spf13/cobra v1.6.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/xanzy/ssh-agent v0.3.0 // indirect - github.com/xlab/treeprint v1.1.0 // indirect - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/tools v0.2.0 // indirect - golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect - google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3 // indirect + github.com/xlab/treeprint v1.2.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/tools v0.9.3 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect k8s.io/kubectl v0.24.0 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect ) // Pinned to kubernetes-1.23.12 @@ -300,35 +312,36 @@ replace ( github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.9.5 github.com/godbus/dbus => github.com/godbus/dbus/v5 v5.0.4 github.com/goodrain/rainbond-oam => github.com/goodrain/rainbond-oam v0.0.0-20230823084937-0067a4cf0912 - github.com/prometheus/common => github.com/prometheus/common v0.15.0 + github.com/prometheus/procfs => github.com/prometheus/procfs v0.7.3 google.golang.org/grpc => google.golang.org/grpc v1.27.1 helm.sh/helm/v3 => helm.sh/helm/v3 v3.9.0 - k8s.io/api => k8s.io/api v0.24.1 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.1 - k8s.io/apimachinery => k8s.io/apimachinery v0.24.1 - k8s.io/apiserver => k8s.io/apiserver v0.24.1 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.24.1 - k8s.io/client-go => k8s.io/client-go v0.24.1 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.24.1 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.24.1 - k8s.io/code-generator => k8s.io/code-generator v0.24.1 - k8s.io/component-base => k8s.io/component-base v0.24.1 - k8s.io/component-helpers => k8s.io/component-helpers v0.24.1 - k8s.io/controller-manager => k8s.io/controller-manager v0.24.1 - k8s.io/cri-api => k8s.io/cri-api v0.24.1 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.24.1 - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.24.1 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.24.1 - k8s.io/kube-proxy => k8s.io/kube-proxy v0.24.1 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.24.1 - k8s.io/kubectl => k8s.io/kubectl v0.24.1 - k8s.io/kubelet => k8s.io/kubelet v0.24.1 + k8s.io/api => k8s.io/api v0.26.4 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.26.4 + k8s.io/apimachinery => k8s.io/apimachinery v0.26.4 + k8s.io/apiserver => k8s.io/apiserver v0.26.4 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.26.4 + k8s.io/client-go => k8s.io/client-go v0.26.4 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.26.4 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.26.4 + k8s.io/code-generator => k8s.io/code-generator v0.26.4 + k8s.io/component-base => k8s.io/component-base v0.26.4 + k8s.io/component-helpers => k8s.io/component-helpers v0.26.4 + k8s.io/controller-manager => k8s.io/controller-manager v0.26.4 + k8s.io/cri-api => k8s.io/cri-api v0.26.4 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.26.4 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.26.4 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.26.4 + k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.26.4 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.26.4 + k8s.io/kubectl => k8s.io/kubectl v0.26.4 + k8s.io/kubelet => k8s.io/kubelet v0.26.4 k8s.io/kubernetes => k8s.io/kubernetes v1.24.1 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.24.1 - k8s.io/metrics => k8s.io/metrics v0.24.1 - k8s.io/mount-utils => k8s.io/mount-utils v0.24.1 - k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.1 - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.1 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.26.4 + k8s.io/metrics => k8s.io/metrics v0.26.4 + k8s.io/mount-utils => k8s.io/mount-utils v0.26.4 + k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.26.4 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.26.4 sigs.k8s.io/apiserver-network-proxy/konnectivity-client => sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.24 - sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.11.0 + sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.14.7 ) diff --git a/go.sum b/go.sum index 6d904ddf6..f98826b0a 100644 --- a/go.sum +++ b/go.sum @@ -89,12 +89,15 @@ github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUd github.com/Azure/go-autorest/autorest v0.10.2/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.20/go.mod h1:o3tqFY+QR40VOlk+pV4d77mORO64jOXSgEnPQgLK6JY= +github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.15/go.mod h1:tGMin8I49Yij6AQ+rvV+Xa/zwxYQB5hmsd6DkfAx2+A= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= @@ -102,6 +105,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= @@ -123,11 +127,13 @@ github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GoogleCloudPlatform/k8s-cloud-provider v1.16.1-0.20210702024009-ea6160c1d0e3/go.mod h1:8XasY4ymP2V/tn2OOV9ZadmiTE1FIB/h3W+yNlPttKw= +github.com/GoogleCloudPlatform/k8s-cloud-provider v1.18.1-0.20220218231025-f11817397a1b/go.mod h1:FNj4KYEAAHfYu68kRYolGoxkaJn+6mdEsaM12VTwuI0= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +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.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -170,10 +176,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= 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= @@ -189,14 +193,15 @@ github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4Rq github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWrKI6ocU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4 h1:EBTWhcAX7rNQ80RLwLCpHZBBrJuzallFHnF+yMXo928= -github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alessio/shellescape v1.2.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= @@ -212,7 +217,8 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220418222510-f25a4f6275ed/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -234,8 +240,9 @@ github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b/go.mod h1:DAHtR1m6l github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -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/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/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= github.com/auth0/go-jwt-middleware v1.0.1/go.mod h1:YSeUX3z6+TF2H+7padiEqNJ73Zy9vXW72U//IgN0BIM= @@ -251,8 +258,9 @@ github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU github.com/aws/aws-sdk-go v1.34.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.38.49 h1:E31vxjCe6a5I+mJLmUGaZobiWmg9KdWaud9IfceYeYQ= github.com/aws/aws-sdk-go v1.38.49/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.44.116 h1:NpLIhcvLWXJZAEwvPj3TDHeqp7DleK6ZUVYyW01WNHY= +github.com/aws/aws-sdk-go v1.44.116/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= @@ -260,9 +268,8 @@ github.com/barnettZQG/gotty v1.0.1-0.20200904091006-a0a1f7d747dc h1:p1n5cGlpNzkQ github.com/barnettZQG/gotty v1.0.1-0.20200904091006-a0a1f7d747dc/go.mod h1:ipHYE8YbqnmNQOBXarIuFY9OANGqhOYtoWtRGgMEMfw= github.com/beevik/ntp v0.3.0 h1:xzVrPrE4ziasFXgBVBZJDP0Wg/KpMwk2KHJ4Ba8GrDw= github.com/beevik/ntp v0.3.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 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= @@ -309,19 +316,22 @@ github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6 github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 h1:7aWHqerlJ41y6FOsEUvknqgXnGmJyJSbjhAWq5pO4F8= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +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/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= @@ -339,11 +349,11 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= github.com/cncf/udpa/go v0.0.0-20200313221541-5f7e5dd04533/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 h1:KwaoQzs/WeUxxJqiJsZ4euOly1Az/IgZXXSxlD/UBNk= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b h1:ACGZRIr7HsgBKHsueQ1yM4WaVaXh21ynwqsF8M8tXhA= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.1 h1:y1Rh3tEU89D+7Tgbw+lp52T6p/GJLpDmNvr10UWqLTE= @@ -388,6 +398,7 @@ github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izU github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= @@ -415,6 +426,7 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/prometheus-operator v0.41.1 h1:MEhY9syliPlQg+VlFRUfNodUEVXRXJ2n1pFG0aBp+mI= github.com/coreos/prometheus-operator v0.41.1/go.mod h1:LhLfEBydppl7nvfEA1jIqlF3xJ9myHCnzrU+HHDxRd4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -438,12 +450,11 @@ github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjI github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= +github.com/daviddengcn/go-colortext v1.0.0/go.mod h1:zDqEI5NVUop5QPpVJUxE9UO10hRnmkD5G4Pmri9+m4c= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= @@ -460,6 +471,7 @@ github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8 github.com/distribution/distribution/v3 v3.0.0-20211118083504-a29a3c99a684 h1:DBZ2sN7CK6dgvHVpQsQj4sRMCbWTmd17l+5SUCjnQSY= github.com/distribution/distribution/v3 v3.0.0-20211118083504-a29a3c99a684/go.mod h1:UfCu3YXJJCI+IdnqGgYP82dk2+Joxmv+mUTVBES6wac= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/cli v0.0.0-20190711175710-5b38d82aa076/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.11+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= @@ -494,6 +506,7 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k= github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0= @@ -514,14 +527,16 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7fo github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043 h1:I3hLsM87FSASssIrIOGwJCio31dvLkvpYDKn2+r31ec= github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.14.2+incompatible h1:uyx8VgUCryEkh7qbr8rEtrA0rGDEJ73F5lOJdB5m3V8= -github.com/emicklei/go-restful v2.14.2+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.10.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.15.0+incompatible h1:8KpYO/Xl/ZudZs5RNOEhWMBY4hmzlZhhRd9cu+jrZP4= +github.com/emicklei/go-restful v2.15.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6 h1:V94anc0ZG3Pa/cAMwP2m1aQW3+/FF8Qmw/GsFyTJAp4= github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/proto v1.6.15/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= @@ -529,20 +544,24 @@ github.com/envoyproxy/go-control-plane v0.9.5 h1:lRJIqDD8yjV1YyPRqecMdytjDLs2fTX github.com/envoyproxy/go-control-plane v0.9.5/go.mod h1:OXl5to++W0ctG+EHWTFUjiypVxC/Y4VLc/KFU+al13s= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/esimonov/ifshort v1.0.3/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +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/evanphx/json-patch/v5 v5.1.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= @@ -557,8 +576,9 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -570,17 +590,16 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gertd/go-pluralize v0.1.7/go.mod h1:O4eNeeIf91MHh1GJ2I47DNtaesm66NYvjYgAahcqSDQ= github.com/getkin/kin-openapi v0.34.0/go.mod h1:ZJSfy1PxJv2QQvH9EdBj3nupRTVvV42mkW6zKUlRBwk= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= @@ -604,8 +623,9 @@ github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxm github.com/go-chi/render v1.0.1 h1:4/5tis2cKaNdnv9zFLfXzcquC9HbeZgCnxGnKrltBS8= github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= github.com/go-critic/go-critic v0.6.1/go.mod h1:SdNCfU0yF3UBjtaZGw6586/WocupMOJuiqgom5DsQxM= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +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-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -616,21 +636,28 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= 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-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -648,15 +675,14 @@ github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQH github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= @@ -664,8 +690,10 @@ github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3Hfo github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +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/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -679,7 +707,6 @@ github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhte github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= @@ -698,7 +725,6 @@ github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6 github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= @@ -707,8 +733,10 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= @@ -740,6 +768,7 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= @@ -806,6 +835,7 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -832,7 +862,6 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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= @@ -850,8 +879,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -865,7 +895,10 @@ github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZ github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= -github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= +github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= +github.com/golangplus/bytes v1.0.0/go.mod h1:AdRaCFwmc/00ZzELMWb01soso6W1R/++O1XL80yAn+A= +github.com/golangplus/fmt v1.0.0/go.mod h1:zpM0OfbMCjPtd2qkTD/jX2MgiFCqklhSUFyDW44gVQE= +github.com/golangplus/testing v1.0.0/go.mod h1:ZDreixUV3YzhoVraIDyOzHrr76p6NUh6k/pPg/Q3gYA= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/goodrain/gorm-bulk-upsert v1.0.1-0.20210608013724-7e7870d16357 h1:kdSSrpA5yNvgqbfpMlEr8bvQWiLc1Uz9g0vYf3JVT7s= @@ -879,8 +912,7 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/cadvisor v0.44.1/go.mod h1:GQ9KQfz0iNHQk3D6ftzJWK4TXabfIgM10Oy3FkR+Gzg= -github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= +github.com/google/cel-go v0.12.6/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -898,12 +930,13 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -926,8 +959,10 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= @@ -946,13 +981,10 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= @@ -979,8 +1011,9 @@ github.com/gorilla/websocket v0.0.0-20150811171432-b6ab76f1fe98/go.mod h1:E7qHFY github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= @@ -996,6 +1029,7 @@ github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Rep 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-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= 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/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -1014,6 +1048,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6 github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= @@ -1087,18 +1122,21 @@ github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.0.0-20171009183408-7fe0c75c13ab/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= @@ -1192,11 +1230,14 @@ github.com/juju/version v0.0.0-20161031051906-1f41e27e54f2/go.mod h1:kE8gK5X0CIm github.com/juju/version v0.0.0-20180108022336-b64dbd566305/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= github.com/juju/version v0.0.0-20191219164919-81c1be00b9a6/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= github.com/julienschmidt/httprouter v1.1.1-0.20151013225520-77a895ad01eb/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20191119172530-79f836b90111 h1:Lq6HJa0JqSg5ko/mkizFWlpIrY7845g9Dzz9qeD5aXI= +github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20191119172530-79f836b90111/go.mod h1:MP2HbArq3QT+oVp8pmtHNZnSnkhdkHtDnc7h6nJXmBU= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= @@ -1220,8 +1261,8 @@ github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdY github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.4 h1:1kn4/7MepF/CHmYub99/nNX8az0IJjfSOU/jbnTVfqQ= -github.com/klauspost/compress v1.15.4/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= @@ -1237,8 +1278,8 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v0.0.0-20150511174710-5cf931ef8f76/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -1248,6 +1289,8 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= 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-csi/external-snapshotter/client/v4 v4.2.0 h1:nHHjmvjitIiyPlUHk/ofpgvBcNcawJLtf4PYHORLjAA= +github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys= github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= @@ -1291,19 +1334,18 @@ github.com/lufia/iostat v1.1.0 h1:Z1wa4Hhxwi8uSKfgRsFc5RLtt3SuFPIOgkiPGkUtHDY= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lunixbochs/vtclean v0.0.0-20160125035106-4fbf7632a2c6/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI= github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= @@ -1341,8 +1383,9 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-oci8 v0.1.1/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1359,15 +1402,17 @@ github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsO github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU= -github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/mattn/go-xmlrpc v0.0.3 h1:Y6WEMLEsqs3RviBrAa1/7qmbGB7DVD3brZIbqMbQdGY= github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mdlayher/genetlink v1.0.0 h1:OoHN1OdyEIkScEmRgxLEe2M9U8ClMytqA5niynLtfj0= @@ -1443,16 +1488,17 @@ github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vyg github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= 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-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 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 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= @@ -1476,6 +1522,7 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m 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/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= @@ -1521,10 +1568,10 @@ github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXW github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -1534,10 +1581,18 @@ github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= +github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= +github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= +github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -1546,8 +1601,16 @@ github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDs github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= +github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= +github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1576,6 +1639,14 @@ github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuh github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w= github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/openkruise/kruise-api v0.7.0/go.mod h1:nCf5vVOjQJX5OaV7Qi0Z51/Rn9cd7s5kVrg8YLgFp1I= +github.com/openshift/api v0.0.0-20210105115604-44119421ec6b/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg= +github.com/openshift/api v0.0.0-20230503133300-8bbcb7ca7183 h1:t/CahSnpqY46sQR01SoS+Jt0jtjgmhgE6lFmRnO4q70= +github.com/openshift/api v0.0.0-20230503133300-8bbcb7ca7183/go.mod h1:4VWG+W22wrB4HfBL88P40DxLEpSOaiBVxUnfalfJo9k= +github.com/openshift/build-machinery-go v0.0.0-20200917070002-f171684f77ab/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= +github.com/openshift/client-go v0.0.0-20210112165513-ebc401615f47 h1:+TEY29DK0XhqB7HFC9OfV8qf3wffSyi7MWv3AP28DGQ= +github.com/openshift/client-go v0.0.0-20210112165513-ebc401615f47/go.mod h1:u7NRAjtYVAKokiI9LouzTv4mhds8P4S1TwdVAfbjKSk= +github.com/openshift/custom-resource-status v1.1.2 h1:C3DL44LEbvlbItfd8mT5jWrqPfHnSOQoQf/sypqA6A4= +github.com/openshift/custom-resource-status v1.1.2/go.mod h1:DB/Mf2oTeiAmVVX1gN+NEqweonAPY0TKUwADizj8+ZA= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -1626,8 +1697,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.12.0 h1:/f3b24xrDhkhddlaobPe2JgBqfdt+gC/NYl0QY9IOuI= -github.com/pkg/sftp v1.12.0/go.mod h1:fUqqXB5vEgVCZ131L+9say31RAri6aF6KDViawhxKK8= +github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -1637,7 +1708,7 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/poy/onpar v0.0.0-20190519213022-ee068f8ea4d1 h1:oL4IBbcqwhhNWh31bjOX8C/OCy0zs9906d/VUru+bqg= github.com/poy/onpar v0.0.0-20190519213022-ee068f8ea4d1/go.mod h1:nSbFQvMj97ZyhFRSJYtut+msi4sOY6zJDGCdSc+/rZU= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 h1:xoIK0ctDddBMnc74udxJYBqlo9Ylnsp1waqjLsnef20= github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus-community/prom-label-proxy v0.1.1-0.20200616110844-0fbfa11fa8f3/go.mod h1:XdjyZg7LCbCC5FADHtpgNp6kQ0W9beXVGfmcvndMj5Y= @@ -1664,36 +1735,39 @@ github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +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.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/node_exporter v1.0.1 h1:xTBtauxuNCMhuF4FKiNo2wDCuCAWgS3PoTlVbXLzNO0= github.com/prometheus/node_exporter v1.0.1/go.mod h1:IC23eAmBHxDOtCRUgP9uqJewluDPwjStnbvWJEYtisQ= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -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.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.0.12-0.20200513160535-c6ff04bafc38/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= @@ -1724,15 +1798,14 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rubenv/sql-migrate v1.1.1 h1:haR5Hn8hbW9/SpAICrXoZqXnywS7Q5WijwkQENPeNWY= github.com/rubenv/sql-migrate v1.1.1/go.mod h1:/7TZymwxN8VWumcIxw1jjHEcR1djpdkMHQPT4FWdnbQ= github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -1807,7 +1880,6 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -1821,11 +1893,11 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1852,7 +1924,6 @@ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoH github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1865,8 +1936,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= github.com/swaggo/gin-swagger v1.2.0/go.mod h1:qlH2+W7zXGZkczuL+r2nEBR2JTT+/lX05Nn6vPhc7OI= @@ -1968,13 +2040,15 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1: github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= 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/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= @@ -1991,6 +2065,7 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +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= @@ -2019,14 +2094,17 @@ go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mI go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= +go.etcd.io/etcd/pkg/v3 v3.5.5/go.mod h1:6ksYFxttiUGzC2uxyqiyOEvhAiD0tuIqSZkX3TyPdaE= +go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI= +go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -2042,39 +2120,54 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0/go.mod h1:h8TWwRAhQpOd0aM5nYsRD8+flnkj+526GEIVlarH7eY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= +go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= +go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1/go.mod h1:xOvWoTOrQjxjW61xtOmD/WKGRYb/P4NzRo3bs65U6Rk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0/go.mod h1:OfUCyyIiDvNXHWpcWgbF+MWvqPZiNa3YDEnivcnYsV0= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI= +go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= +go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= +go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +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/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -2082,8 +2175,9 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20180214000028-650f4a345ab4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -2105,6 +2199,7 @@ golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -2118,15 +2213,19 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2174,10 +2273,13 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180406214816-61147c48b25b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2207,6 +2309,7 @@ golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -2241,19 +2344,29 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220107192237-5cfca573fb4d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc= -golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.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 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2270,9 +2383,11 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2285,9 +2400,10 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2331,6 +2447,7 @@ golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190927073244-c990c680b611/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2347,7 +2464,6 @@ golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2393,7 +2509,9 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2406,9 +2524,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2417,23 +2533,33 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/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.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.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 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +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 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180805044716-cb6730876b98/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2444,8 +2570,11 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +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 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2453,15 +2582,13 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 h1:M73Iuj3xbbb9Uk1DYhzydthsj6oOd6l9bpuFcNoUvTs= -golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2500,6 +2627,7 @@ golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190918214516-5a1a30219888/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2545,6 +2673,7 @@ golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200603131246-cc40288be839/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200612220849-54c614fe050c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -2587,17 +2716,23 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= +golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= 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= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= @@ -2642,9 +2777,11 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.60.0/go.mod h1:d7rl65NZAkEQ90JFzqBjcRq1TVeG5ZoGV3sSpEnnVb4= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -2700,7 +2837,6 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2728,11 +2864,17 @@ google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3 h1:SeX3QUcBj3fciwnfPT9kt5gBhFy/FCZtYZ+I/RB8agc= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -2750,8 +2892,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -2778,6 +2921,7 @@ gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8 gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/httprequest.v1 v1.1.1/go.mod h1:/CkavNL+g3qLOrpFHVrEx4NKepeqR4XTZWNj4sGGjz0= +gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -2844,70 +2988,66 @@ howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCU istio.io/api v0.0.0-20210128181506-0c4b8e54850f/go.mod h1:88HN3o1fSD1jo+Z1WTLlJfMm9biopur6Ct9BFKjiB64= istio.io/client-go v0.0.0-20210128182905-ee2edd059e02/go.mod h1:oXMjFUWhxlReUSbg4i3GjKgOhSX1WgD68ZNlHQEcmQg= istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= -k8s.io/api v0.24.1 h1:BjCMRDcyEYz03joa3K1+rbshwh1Ay6oB53+iUx2H8UY= -k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ= -k8s.io/apiextensions-apiserver v0.24.1 h1:5yBh9+ueTq/kfnHQZa0MAo6uNcPrtxPMpNQgorBaKS0= -k8s.io/apiextensions-apiserver v0.24.1/go.mod h1:A6MHfaLDGfjOc/We2nM7uewD5Oa/FnEbZ6cD7g2ca4Q= -k8s.io/apimachinery v0.24.1 h1:ShD4aDxTQKN5zNf8K1RQ2u98ELLdIW7jEnlO9uAMX/I= -k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apiserver v0.24.1 h1:LAA5UpPOeaREEtFAQRUQOI3eE5So/j5J3zeQJjeLdz4= -k8s.io/apiserver v0.24.1/go.mod h1:dQWNMx15S8NqJMp0gpYfssyvhYnkilc1LpExd/dkLh0= -k8s.io/cli-runtime v0.24.1 h1:IW6L8dRBq+pPTzvXcB+m/hOabzbqXy57Bqo4XxmW7DY= -k8s.io/cli-runtime v0.24.1/go.mod h1:14aVvCTqkA7dNXY51N/6hRY3GUjchyWDOwW84qmR3bs= -k8s.io/client-go v0.24.1 h1:w1hNdI9PFrzu3OlovVeTnf4oHDt+FJLd9Ndluvnb42E= -k8s.io/client-go v0.24.1/go.mod h1:f1kIDqcEYmwXS/vTbbhopMUbhKp2JhOeVTfxgaCIlF8= -k8s.io/cloud-provider v0.24.1/go.mod h1:h5m/KIiwiQ76hpUBsgrwm/rxteIfJG9kJQ/+/w1as2M= -k8s.io/cluster-bootstrap v0.24.1/go.mod h1:uq2PiYfKh8ZLb6DBU/3/2Z1DkMqXkTOHLemalC4tOgE= -k8s.io/code-generator v0.24.1 h1:zS+dvmUNaOcvsQ4faV9hXNjsKG9/pQaLnts1Wma4RM8= -k8s.io/code-generator v0.24.1/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/component-base v0.24.1 h1:APv6W/YmfOWZfo+XJ1mZwep/f7g7Tpwvdbo9CQLDuts= -k8s.io/component-base v0.24.1/go.mod h1:DW5vQGYVCog8WYpNob3PMmmsY8A3L9QZNg4j/dV3s38= -k8s.io/component-helpers v0.24.1/go.mod h1:q5Z1pWV/QfX9ThuNeywxasiwkLw9KsR4Q9TAOdb/Y3s= -k8s.io/controller-manager v0.24.1/go.mod h1:g105ENexD6A2holEq7Bl6ae+69LJHiLnoEEm7wkE6sc= -k8s.io/cri-api v0.24.1 h1:BNdjWY1zrBUmR5Xg8H9mrM7C+q0n/YPg/TyfA93lDxg= -k8s.io/cri-api v0.24.1/go.mod h1:t3tImFtGeStN+ES69bQUX9sFg67ek38BM9YIJhMmuig= -k8s.io/csi-translation-lib v0.24.1/go.mod h1:16nY6xx3XR4+TASMfTtake2ouK1IPz0t/baNmngzR4I= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/api v0.26.4 h1:qSG2PmtcD23BkYiWfoYAcak870eF/hE7NNYBYavTT94= +k8s.io/api v0.26.4/go.mod h1:WwKEXU3R1rgCZ77AYa7DFksd9/BAIKyOmRlbVxgvjCk= +k8s.io/apiextensions-apiserver v0.26.4 h1:9D2RTxYGxrG5uYg6D7QZRcykXvavBvcA59j5kTaedQI= +k8s.io/apiextensions-apiserver v0.26.4/go.mod h1:cd4uGFGIgzEqUghWpRsr9KE8j2KNTjY8Ji8pnMMazyw= +k8s.io/apimachinery v0.26.4 h1:rZccKdBLg9vP6J09JD+z8Yr99Ce8gk3Lbi9TCx05Jzs= +k8s.io/apimachinery v0.26.4/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= +k8s.io/apiserver v0.26.4 h1:3Oq4mnJv0mzVX7BR/Nod+8KjlELf/3Ljvu9ZWDyLUoA= +k8s.io/apiserver v0.26.4/go.mod h1:yAY3O1vBM4/0OIGAGeWcdfzQvgdwJ188VirLcuSAVnw= +k8s.io/cli-runtime v0.26.4 h1:MgSU871KDzBDX7V9GtuqS6Ai9lhQCHgRzkurnXOWtZ0= +k8s.io/cli-runtime v0.26.4/go.mod h1:MjJ2DXMChw2zcG0/agzm17xwKpfVxOfuoCdfY9iOCOE= +k8s.io/client-go v0.26.4 h1:/7P/IbGBuT73A+G97trf44NTPSNqvuBREpOfdLbHvD4= +k8s.io/client-go v0.26.4/go.mod h1:6qOItWm3EwxJdl/8p5t7FWtWUOwyMdA8N9ekbW4idpI= +k8s.io/cloud-provider v0.26.4/go.mod h1:F9xY0PvBuZDuGIHOM28dNiPLHxQnWfsiUuCSUikHevo= +k8s.io/cluster-bootstrap v0.26.4/go.mod h1:zUsNa66NhkekYL7PIyp/bhtjqJq3DVO+tPu6w3Q9MXk= +k8s.io/code-generator v0.26.4 h1:zgDD0qX13p/jtrAoYRRiYeQ5ibnriwmo2cMkMZAtJxc= +k8s.io/code-generator v0.26.4/go.mod h1:ryaiIKwfxEJEaywEzx3dhWOydpVctKYbqLajJf0O8dI= +k8s.io/component-base v0.26.4 h1:Bg2xzyXNKL3eAuiTEu3XE198d6z22ENgFgGQv2GGOUk= +k8s.io/component-base v0.26.4/go.mod h1:lTuWL1Xz/a4e80gmIC3YZG2JCO4xNwtKWHJWeJmsq20= +k8s.io/component-helpers v0.26.4/go.mod h1:2Siz5eWmaKu0khASXMTCfJuASZAbCPX9mtjlCe5IWRs= +k8s.io/controller-manager v0.26.4/go.mod h1:HJPU8OKTI8YhrtnvpuFdllK1QCQfibhJXDToDzCEsnQ= +k8s.io/cri-api v0.26.4 h1:GieryWb+67zzX0zwv6rsiaR//121wW7r7hQGc6E/1A8= +k8s.io/cri-api v0.26.4/go.mod h1:Oo8O7MKFPNDxfDf2LmrF/3Hf30q1C6iliGuv3la3tIA= +k8s.io/csi-translation-lib v0.26.4/go.mod h1:VwJRDRk0oEg8Dyj1BmUJQU75VPGt1YDWv5tMxQMBx/g= +k8s.io/gengo v0.0.0-20190907103519-ebc107f98eab/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/helm v2.17.0+incompatible h1:Bpn6o1wKLYqKM3+Osh8e+1/K2g/GsQJ4F4yNF2+deao= k8s.io/helm v2.17.0+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-aggregator v0.24.1/go.mod h1:vZvRALCO32hrIuREhkYwLq5Crc0zh6SxzJDAKrQM1+k= -k8s.io/kube-controller-manager v0.24.1/go.mod h1:IlXY8FozezzIBNcfA6TV1//fjz9gNy3LGbigDnX7Q3A= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kms v0.26.4/go.mod h1:69qGnf1NsFOQP07fBYqNLZklqEHSJF024JqYCaeVxHg= +k8s.io/kube-aggregator v0.26.4/go.mod h1:eWfg4tU0+l57ebWiS5THOANIJUrKRxudSVDJ+63bqvQ= +k8s.io/kube-controller-manager v0.26.4/go.mod h1:I8MRREZK1h0f02wnBHdIF4R4UdEVGBF2K0tgRyyhhzY= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/kube-proxy v0.24.1/go.mod h1:Q19uL+muS7Q0rxIXlddcanbGcogbDcX5I86GROhrwOM= -k8s.io/kube-scheduler v0.24.1/go.mod h1:mxSsC5sg710qdrN9oY+OSkHRSgYOv6qA2vEEt1t6Ax4= -k8s.io/kubectl v0.24.1 h1:gxcjHrnwntV1c+G/BHWVv4Mtk8CQJ0WTraElLBG+ddk= -k8s.io/kubectl v0.24.1/go.mod h1:NzFqQ50B004fHYWOfhHTrAm4TY6oGF5FAAL13LEaeUI= -k8s.io/kubelet v0.24.1/go.mod h1:LShXfjNO1or7ktsorODSOu8+Kd5dHzWF3DtVLXeP3JE= +k8s.io/kube-proxy v0.26.4/go.mod h1:bjdEH+jLT6w4KDBjIkv0IfZbxnvK94bRidxvJEQ/5ro= +k8s.io/kube-scheduler v0.26.4/go.mod h1:Mzh7sJavoa6+74a0vwv4+OpQXZYAwJA1jEWUkCfuixo= +k8s.io/kubectl v0.26.4 h1:A0Oa0u/po4KxXnXsNCOwLojAe9cQR3TJNJabEIf7U1w= +k8s.io/kubectl v0.26.4/go.mod h1:cWtp/+I4p+h5En3s2zO1zCry9v3/6h37EQ2tF3jNRnM= +k8s.io/kubelet v0.26.4/go.mod h1:ZMPGTCnrQ5UOlC7igXhbW9cgna1LtTRWLaHub4dA2FU= k8s.io/kubernetes v1.24.1 h1:cfRZCNrJN9hR49SBSGLHhn+IdAcfx6OVXadGvWuvYaM= k8s.io/kubernetes v1.24.1/go.mod h1:8e8maMiZzBR2/8Po5Uulx+MXZUYJuN3vtKwD4Ct1Xi0= -k8s.io/legacy-cloud-providers v0.24.1/go.mod h1:OeDg+OJ5uzmJQyh6vpCkwGY8tVegaiokWErGr7YlSaI= -k8s.io/metrics v0.24.1/go.mod h1:vMs5xpcOyY9D+/XVwlaw8oUHYCo6JTGBCZfyXOOkAhE= -k8s.io/mount-utils v0.24.1/go.mod h1:XrSqB3a2e8sq+aU+rlbcBtQ3EgcuDk5RP9ZsGxjoDrI= -k8s.io/pod-security-admission v0.24.1/go.mod h1:ZH6e17BuFFdiYHFxn9X6d7iaPj3JyuqBOw/MRytVWp8= -k8s.io/sample-apiserver v0.24.1/go.mod h1:5L12FaHPjpJzr0s/ClAx61Ig5uBjDCvthtmTIORu7F8= +k8s.io/legacy-cloud-providers v0.26.4/go.mod h1:YN/rRllxJ/uf+J4nrP0OH5hWwURdCXIKaNGJ2miTdd8= +k8s.io/metrics v0.26.4/go.mod h1:0InNj7+/aS5POa0dDHuSleIDr5MHXaQQSpMc0mm17wE= +k8s.io/mount-utils v0.26.4/go.mod h1:95yx9K6N37y8YZ0/lUh9U6ITosMODNaW0/v4wvaa0Xw= +k8s.io/pod-security-admission v0.26.4/go.mod h1:WjQF+oeXfuXz3iqYc/0XaBAoTOwZ5woLXOC1xswWpa0= +k8s.io/sample-apiserver v0.26.4/go.mod h1:5HABLEqy+I6uHBmhNSLKXDdBMujzWCTUhVKv0xn5jss= k8s.io/system-validators v1.7.0/go.mod h1:gP1Ky+R9wtrSiFbrpEPwWMeYz9yqyy1S/KOh0Vci7WI= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= @@ -2915,11 +3055,20 @@ k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= +k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +kubevirt.io/api v1.1.0 h1:G6/32Emr8cout4MUc2Gi3tfp92rq/rMh5LyhKhMxntw= +kubevirt.io/api v1.1.0/go.mod h1:CJ4vZsaWhVN3jNbyc9y3lIZhw8nUHbWjap0xHABQiqc= +kubevirt.io/client-go v1.1.0 h1:d1gYsmA4KKocMZPbNSIPD39WfyhQi+3sFmrMkKlZ0/A= +kubevirt.io/client-go v1.1.0/go.mod h1:rh0dP7lLfpGLP9MUllk5Afo4BhnIcWkDrqMK0guKzGo= +kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 h1:IWo12+ei3jltSN5jQN1xjgakfvRSF3G3Rr4GXVOOy2I= +kubevirt.io/containerized-data-importer-api v1.57.0-alpha1/go.mod h1:Y/8ETgHS1GjO89bl682DPtQOYEU/1ctPFBz6Sjxm4DM= +kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 h1:QMrd0nKP0BGbnxTqakhDZAUhGKxPiPiN5gSDqKUmGGc= +kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= launchpad.net/xmlpath v0.0.0-20130614043138-000000000004/go.mod h1:vqyExLOM3qBx7mvYRkoxjSCF945s0mbe7YynlKYXtsA= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= @@ -2939,27 +3088,25 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.24/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= -sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/controller-runtime v0.14.7 h1:Vrnm2vk9ZFlRkXATHz0W0wXcqNl7kPat8q2JyxVy0Q8= +sigs.k8s.io/controller-runtime v0.14.7/go.mod h1:ErTs3SJCOujNUnTz4AS+uh8hp6DHMo1gj6fFndJT1X8= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= sigs.k8s.io/gateway-api v0.6.1 h1:d/nIkhtbU0zVoFsriKi8lXwBYKNopz3EGeSwDqxeTRs= sigs.k8s.io/gateway-api v0.6.1/go.mod h1:EYJT+jlPWTeNskjV0JTki/03WX1cyAnBhwBJfYHpV/0= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.9.0/go.mod h1:cxKQWwmbtRDzQ+RNKnR6gZG6fjbeTtItp5cGf+ww+1Y= -sigs.k8s.io/kustomize/api v0.11.4 h1:/0Mr3kfBBNcNPOW5Qwk/3eb8zkswCwnqQxxKtmrTkRo= sigs.k8s.io/kustomize/api v0.11.4/go.mod h1:k+8RsqYbgpkIrJ4p9jcdPqe8DprLxFUUO0yNOq8C+xI= -sigs.k8s.io/kustomize/cmd/config v0.10.6/go.mod h1:/S4A4nUANUa4bZJ/Edt7ZQTyKOY9WCER0uBS1SW2Rco= -sigs.k8s.io/kustomize/kustomize/v4 v4.5.4/go.mod h1:Zo/Xc5FKD6sHl0lilbrieeGeZHVYCA4BzxeAaLI05Bg= -sigs.k8s.io/kustomize/kyaml v0.13.6 h1:eF+wsn4J7GOAXlvajv6OknSunxpcOBQQqsnPxObtkGs= +sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= +sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= +sigs.k8s.io/kustomize/cmd/config v0.10.9/go.mod h1:T0s850zPV3wKfBALA0dyeP/K74jlJcoP8Pr9ZWwE3MQ= +sigs.k8s.io/kustomize/kustomize/v4 v4.5.7/go.mod h1:VSNKEH9D9d9bLiWEGbS6Xbg/Ih0tgQalmPvntzRxZ/Q= sigs.k8s.io/kustomize/kyaml v0.13.6/go.mod h1:yHP031rn1QX1lr/Xd934Ri/xdVNG8BE2ECa78Ht/kEg= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= +sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= diff --git a/grctl/cmd/gpushare.go b/grctl/cmd/gpushare.go index 23b210ca5..1bb196215 100644 --- a/grctl/cmd/gpushare.go +++ b/grctl/cmd/gpushare.go @@ -6,7 +6,7 @@ import ( "encoding/json" "fmt" "github.com/goodrain/rainbond/grctl/clients" - "github.com/prometheus/common/log" + "github.com/sirupsen/logrus" "github.com/urfave/cli" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -18,7 +18,7 @@ import ( "time" ) -//DeviceInfo - +// DeviceInfo - type DeviceInfo struct { idx int pods []v1.Pod @@ -27,7 +27,7 @@ type DeviceInfo struct { node v1.Node } -//NodeInfo - +// NodeInfo - type NodeInfo struct { pods []v1.Pod node v1.Node @@ -42,7 +42,7 @@ var ( memoryUnit = "" ) -//NewCmdGPUShare - +// NewCmdGPUShare - func NewCmdGPUShare() cli.Command { c := cli.Command{ Name: "gpushare", @@ -493,7 +493,7 @@ func (n *NodeInfo) hasPendingGPUMemory() bool { return found } -//GetAllocation - +// GetAllocation - func GetAllocation(pod *v1.Pod) map[int]int { podGPUMems := map[int]int{} allocationString := "" @@ -514,7 +514,7 @@ func GetAllocation(pod *v1.Pod) map[int]int { for id, gpuMem := range containerAllocation { gpuIndex, err := strconv.Atoi(id) if err != nil { - log.Errorf("failed to get gpu memory from pod annotation,reason: %v", err) + logrus.Errorf("failed to get gpu memory from pod annotation,reason: %v", err) return map[int]int{} } podGPUMems[gpuIndex] += gpuMem diff --git a/hack/contrib/docker/eventlog/build/Dockerfile b/hack/contrib/docker/eventlog/build/Dockerfile index 2fa4e01fc..9c929673d 100644 --- a/hack/contrib/docker/eventlog/build/Dockerfile +++ b/hack/contrib/docker/eventlog/build/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18-alpine +FROM golang:1.19-alpine RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk --no-cache add pkgconfig gcc musl-dev diff --git a/hack/contrib/docker/eventlog/build/Dockerfile.arm b/hack/contrib/docker/eventlog/build/Dockerfile.arm index 168b64cd3..9cfbf8415 100644 --- a/hack/contrib/docker/eventlog/build/Dockerfile.arm +++ b/hack/contrib/docker/eventlog/build/Dockerfile.arm @@ -1,4 +1,4 @@ -FROM golang:1.18-alpine3.16 +FROM golang:1.19-alpine3.16 #RUN apt update && apt-get install -y libzmq3-dev RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk --no-cache add zeromq-dev gcc libc-dev diff --git a/monitor/monitor.go b/monitor/monitor.go index ac5758bfa..605df3291 100644 --- a/monitor/monitor.go +++ b/monitor/monitor.go @@ -20,9 +20,10 @@ package monitor import ( "context" + v3 "github.com/coreos/etcd/clientv3" "time" - v3 "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/cmd/monitor/option" discoverv1 "github.com/goodrain/rainbond/discover" discoverv2 "github.com/goodrain/rainbond/discover.v2" @@ -36,12 +37,12 @@ import ( "github.com/tidwall/gjson" ) -//Monitor monitor +// Monitor monitor type Monitor struct { config *option.Config ctx context.Context cancel context.CancelFunc - client *v3.Client + client *clientv3.Client timeout time.Duration manager *prometheus.Manager discoverv1 discoverv1.Discover @@ -50,7 +51,7 @@ type Monitor struct { stopCh chan struct{} } -//Start start +// Start start func (d *Monitor) Start() { d.discoverv1.AddProject("prometheus", &callback.Prometheus{Prometheus: d.manager}) d.discoverv1.AddProject("event_log_event_http", &callback.EventLog{Prometheus: d.manager}) diff --git a/mq/api/mq/mq.go b/mq/api/mq/mq.go index 8a813f54a..11e6f8b81 100644 --- a/mq/api/mq/mq.go +++ b/mq/api/mq/mq.go @@ -19,6 +19,7 @@ package mq import ( + "github.com/coreos/etcd/clientv3" "os" "strings" "sync" @@ -31,11 +32,10 @@ import ( etcdutil "github.com/goodrain/rainbond/util/etcd" - "github.com/coreos/etcd/clientv3" "github.com/sirupsen/logrus" ) -//ActionMQ 队列操作 +// ActionMQ 队列操作 type ActionMQ interface { Enqueue(context.Context, string, string) error Dequeue(context.Context, string) (string, error) @@ -52,7 +52,7 @@ var EnqueueNumber float64 = 0 // DequeueNumber dequeue number var DequeueNumber float64 = 0 -//NewActionMQ new etcd mq +// NewActionMQ new etcd mq func NewActionMQ(ctx context.Context, c option.Config) ActionMQ { etcdQueue := etcdQueue{ config: c, @@ -99,7 +99,7 @@ func (e *etcdQueue) Start() error { return nil } -//registerTopic 注册消息队列主题 +// registerTopic 注册消息队列主题 func (e *etcdQueue) registerTopic(topic string) { e.queuesLock.Lock() defer e.queuesLock.Unlock() diff --git a/node/api/manager.go b/node/api/manager.go index d91d33fdf..8fe02098c 100644 --- a/node/api/manager.go +++ b/node/api/manager.go @@ -21,11 +21,11 @@ package api import ( "context" "fmt" + client "github.com/coreos/etcd/clientv3" "net/http" "strconv" "strings" - client "github.com/coreos/etcd/clientv3" "github.com/go-chi/chi" "github.com/goodrain/rainbond/cmd/node/option" "github.com/goodrain/rainbond/discover" @@ -44,7 +44,7 @@ import ( _ "net/http/pprof" ) -//Manager api manager +// Manager api manager type Manager struct { ctx context.Context cancel context.CancelFunc @@ -58,7 +58,7 @@ type Manager struct { etcdClientArgs *etcdutil.ClientArgs } -//NewManager api manager +// NewManager api manager func NewManager(c option.Conf, node *nodeclient.HostNode, ms *masterserver.MasterServer, kubecli kubecache.KubeClient) *Manager { r := router.Routers(c.RunMode) ctx, cancel := context.WithCancel(context.Background()) @@ -84,7 +84,7 @@ func NewManager(c option.Conf, node *nodeclient.HostNode, ms *masterserver.Maste return m } -//Start 启动 +// Start 启动 func (m *Manager) Start(errChan chan error) error { logrus.Infof("api server start listening on %s", m.conf.APIAddr) go func() { @@ -122,7 +122,7 @@ func (m *Manager) Start(errChan chan error) error { return nil } -//Stop 停止 +// Stop 停止 func (m *Manager) Stop() error { logrus.Info("api server is stoping.") m.cancel() @@ -132,12 +132,12 @@ func (m *Manager) Stop() error { return nil } -//GetRouter GetRouter +// GetRouter GetRouter func (m *Manager) GetRouter() *chi.Mux { return m.router } -//HandleClusterScrape prometheus handle +// HandleClusterScrape prometheus handle func (m *Manager) HandleClusterScrape(w http.ResponseWriter, r *http.Request) { gatherers := prometheus.Gatherers{ prometheus.DefaultGatherer, diff --git a/node/api/model/model.go b/node/api/model/model.go index cb7e84b80..f351a7e53 100644 --- a/node/api/model/model.go +++ b/node/api/model/model.go @@ -32,7 +32,7 @@ import ( v1 "k8s.io/api/core/v1" //"github.com/sirupsen/logrus" ) -//Resource 资源 +// Resource 资源 type Resource struct { CPU int `json:"cpu"` MemR int `json:"mem"` @@ -128,7 +128,7 @@ type PrometheusAPI struct { API string } -//Query Get +// Query Get func (s *PrometheusAPI) Query(query string) (*Prome, *utils.APIHandleError) { resp, code, err := DoRequest(s.API, query, "query", "GET", nil) if err != nil { @@ -151,7 +151,7 @@ func (s *PrometheusAPI) Query(query string) (*Prome, *utils.APIHandleError) { return &prome, nil } -//QueryRange Get +// QueryRange Get func (s *PrometheusAPI) QueryRange(query string, start, end, step string) (*Prome, *utils.APIHandleError) { //logrus.Infof("prometheus api is %s",s.API) uri := fmt.Sprintf("%v&start=%v&end=%v&step=%v", query, start, end, step) @@ -204,7 +204,7 @@ func DoRequest(baseAPI, query, queryType, method string, body []byte) ([]byte, i return data, resp.StatusCode, nil } -//ClusterResource 资源 +// ClusterResource 资源 type ClusterResource struct { AllNode int `json:"all_node"` NotReadyNode int `json:"notready_node"` @@ -227,7 +227,7 @@ type ClusterResource struct { MaxAllocatableMemoryNodeResource *NodeResource `json:"max_allocatable_memory_node_resource"` } -//NodeResourceResponse 资源 +// NodeResourceResponse 资源 type NodeResourceResponse struct { CapCPU int `json:"cap_cpu"` CapMem int `json:"cap_mem"` @@ -259,7 +259,7 @@ type Config struct { Value string `json:"value"` } -//ConfigUnit 一个配置单元 +// ConfigUnit 一个配置单元 type ConfigUnit struct { //配置名称 例如:network Name string `json:"name" validate:"name|required"` @@ -279,18 +279,18 @@ func (c ConfigUnit) String() string { return string(res) } -//GlobalConfig 全局配置 +// GlobalConfig 全局配置 type GlobalConfig struct { Configs map[string]*ConfigUnit `json:"configs"` } -//String String +// String String func (g *GlobalConfig) String() string { res, _ := ffjson.Marshal(g) return string(res) } -//Add 添加配置 +// Add 添加配置 func (g *GlobalConfig) Add(c ConfigUnit) { //具有依赖配置 if c.DependConfig != nil || len(c.DependConfig) > 0 { @@ -305,25 +305,25 @@ func (g *GlobalConfig) Add(c ConfigUnit) { g.Configs[c.Name] = &c } -//Get 获取配置 +// Get 获取配置 func (g *GlobalConfig) Get(name string) *ConfigUnit { return g.Configs[name] } -//Delete 删除配置 +// Delete 删除配置 func (g *GlobalConfig) Delete(Name string) { if _, ok := g.Configs[Name]; ok { delete(g.Configs, Name) } } -//Bytes Bytes +// Bytes Bytes func (g GlobalConfig) Bytes() []byte { res, _ := ffjson.Marshal(&g) return res } -//CreateDefaultGlobalConfig 生成默认配置 +// CreateDefaultGlobalConfig 生成默认配置 func CreateDefaultGlobalConfig() *GlobalConfig { gconfig := &GlobalConfig{ Configs: make(map[string]*ConfigUnit), @@ -413,7 +413,7 @@ func CreateDefaultGlobalConfig() *GlobalConfig { return gconfig } -//CreateGlobalConfig 生成配置 +// CreateGlobalConfig 生成配置 func CreateGlobalConfig(kvs []*mvccpb.KeyValue) (*GlobalConfig, error) { dgc := &GlobalConfig{ Configs: make(map[string]*ConfigUnit), @@ -473,7 +473,7 @@ type Pods struct { Status string `json:"status"` } -//NodeDetails NodeDetails +// NodeDetails NodeDetails type NodeDetails struct { Name string `json:"name"` Role []string `json:"role"` @@ -511,7 +511,7 @@ type RulesConfig struct { Annotations map[string]string `yaml:"annotations" json:"annotations"` } -//NotificationEvent NotificationEvent +// NotificationEvent NotificationEvent type NotificationEvent struct { //Kind could be service, tenant, cluster, node Kind string `json:"Kind"` diff --git a/node/core/config/datacenter.go b/node/core/config/datacenter.go index fa073afbe..2d7c2f78d 100644 --- a/node/core/config/datacenter.go +++ b/node/core/config/datacenter.go @@ -34,7 +34,7 @@ import ( "github.com/sirupsen/logrus" ) -//DataCenterConfig 数据中心配置 +// DataCenterConfig 数据中心配置 type DataCenterConfig struct { config *model.GlobalConfig options *option.Conf @@ -46,7 +46,7 @@ type DataCenterConfig struct { var dataCenterConfig *DataCenterConfig -//GetDataCenterConfig 获取 +// GetDataCenterConfig 获取 func GetDataCenterConfig() *DataCenterConfig { if dataCenterConfig == nil { return CreateDataCenterConfig() @@ -54,7 +54,7 @@ func GetDataCenterConfig() *DataCenterConfig { return dataCenterConfig } -//CreateDataCenterConfig 创建 +// CreateDataCenterConfig 创建 func CreateDataCenterConfig() *DataCenterConfig { ctx, cancel := context.WithCancel(context.Background()) dataCenterConfig = &DataCenterConfig{ @@ -85,7 +85,7 @@ func CreateDataCenterConfig() *DataCenterConfig { return dataCenterConfig } -//Start 启动,监听配置变化 +// Start 启动,监听配置变化 func (d *DataCenterConfig) Start() { go util.Exec(d.ctx, func() error { ctx, cancel := context.WithCancel(d.ctx) @@ -106,18 +106,18 @@ func (d *DataCenterConfig) Start() { }, 1) } -//Stop 停止监听 +// Stop 停止监听 func (d *DataCenterConfig) Stop() { d.cancel() logrus.Info("datacenter config listener stop") } -//GetDataCenterConfig 获取配置 +// GetDataCenterConfig 获取配置 func (d *DataCenterConfig) GetDataCenterConfig() (*model.GlobalConfig, error) { return d.config, nil } -//PutDataCenterConfig 更改配置 +// PutDataCenterConfig 更改配置 func (d *DataCenterConfig) PutDataCenterConfig(c *model.GlobalConfig) (err error) { if c == nil { return @@ -129,12 +129,12 @@ func (d *DataCenterConfig) PutDataCenterConfig(c *model.GlobalConfig) (err error return err } -//GetConfig 获取全局配置 +// GetConfig 获取全局配置 func (d *DataCenterConfig) GetConfig(name string) *model.ConfigUnit { return d.config.Get(name) } -//CacheConfig 更新配置缓存 +// CacheConfig 更新配置缓存 func (d *DataCenterConfig) CacheConfig(c *model.ConfigUnit) error { if c.Name == "" { return fmt.Errorf("config name can not be empty") @@ -170,7 +170,7 @@ func (d *DataCenterConfig) CacheConfig(c *model.ConfigUnit) error { return nil } -//PutConfig 增加or更新配置 +// PutConfig 增加or更新配置 func (d *DataCenterConfig) PutConfig(c *model.ConfigUnit) error { if c.Name == "" { return fmt.Errorf("config name can not be empty") @@ -212,7 +212,7 @@ func (d *DataCenterConfig) PutConfig(c *model.ConfigUnit) error { return nil } -//PutConfigKV 更新 +// PutConfigKV 更新 func (d *DataCenterConfig) PutConfigKV(kv *mvccpb.KeyValue) { var cn model.ConfigUnit if err := ffjson.Unmarshal(kv.Value, &cn); err == nil { @@ -222,12 +222,12 @@ func (d *DataCenterConfig) PutConfigKV(kv *mvccpb.KeyValue) { } } -//DeleteConfig 删除配置 +// DeleteConfig 删除配置 func (d *DataCenterConfig) DeleteConfig(name string) { d.config.Delete(name) } -//GetGroupConfig get group config +// GetGroupConfig get group config func (d *DataCenterConfig) GetGroupConfig(groupID string) *GroupContext { if c, ok := d.groupConfigs[groupID]; ok { return c diff --git a/node/core/service/app_service.go b/node/core/service/app_service.go index 557b2589a..35cc06d65 100644 --- a/node/core/service/app_service.go +++ b/node/core/service/app_service.go @@ -20,23 +20,23 @@ package service import ( "fmt" + "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/cmd/node/option" "github.com/goodrain/rainbond/discover/config" "github.com/goodrain/rainbond/node/core/store" "strconv" "strings" - "github.com/coreos/etcd/clientv3" "github.com/sirupsen/logrus" ) -//AppService app service +// AppService app service type AppService struct { Prefix string c *option.Conf } -//CreateAppService create +// CreateAppService create func CreateAppService(c *option.Conf) *AppService { return &AppService{ c: c, @@ -44,7 +44,7 @@ func CreateAppService(c *option.Conf) *AppService { } } -//FindAppEndpoints 获取app endpoint +// FindAppEndpoints 获取app endpoint func (a *AppService) FindAppEndpoints(appName string) []*config.Endpoint { var ends = make(map[string]*config.Endpoint) res, err := store.DefalutClient.Get(fmt.Sprintf("%s/backends/%s/servers", a.Prefix, appName), clientv3.WithPrefix()) diff --git a/node/core/store/client.go b/node/core/store/client.go index b5ed3ba0a..d15159a2b 100644 --- a/node/core/store/client.go +++ b/node/core/store/client.go @@ -39,13 +39,13 @@ var ( DefalutClient *Client ) -//Client etcd client +// Client etcd client type Client struct { *client.Client reqTimeout time.Duration } -//NewClient 创建client +// NewClient 创建client func NewClient(ctx context.Context, cfg *conf.Conf, etcdClientArgs *etcdutil.ClientArgs) (err error) { cli, err := etcdutil.NewClient(ctx, etcdClientArgs) if err != nil { @@ -63,7 +63,7 @@ func NewClient(ctx context.Context, cfg *conf.Conf, etcdClientArgs *etcdutil.Cli return } -//ErrKeyExists key exist error +// ErrKeyExists key exist error var ErrKeyExists = errors.New("key already exists") // Post attempts to create the given key, only succeeding if the key did @@ -83,28 +83,28 @@ func (c *Client) Post(key, val string, opts ...client.OpOption) (*client.PutResp return txnresp.OpResponse().Put(), nil } -//Put etcd v3 Put +// Put etcd v3 Put func (c *Client) Put(key, val string, opts ...client.OpOption) (*client.PutResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) defer cancel() return c.Client.Put(ctx, key, val, opts...) } -//NewRunnable NewRunnable +// NewRunnable NewRunnable func (c *Client) NewRunnable(key, val string, opts ...client.OpOption) (*client.PutResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) defer cancel() return c.Client.Put(ctx, key, val, opts...) } -//DelRunnable DelRunnable +// DelRunnable DelRunnable func (c *Client) DelRunnable(key string, opts ...client.OpOption) (*client.DeleteResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) defer cancel() return c.Client.Delete(ctx, key, opts...) } -//PutWithModRev PutWithModRev +// PutWithModRev PutWithModRev func (c *Client) PutWithModRev(key, val string, rev int64) (*client.PutResponse, error) { if rev == 0 { return c.Put(key, val) @@ -128,7 +128,7 @@ func (c *Client) PutWithModRev(key, val string, rev int64) (*client.PutResponse, return &resp, nil } -//IsRunnable IsRunnable +// IsRunnable IsRunnable func (c *Client) IsRunnable(key string, opts ...client.OpOption) bool { ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) defer cancel() @@ -144,38 +144,38 @@ func (c *Client) IsRunnable(key string, opts ...client.OpOption) bool { return true } -//Get get +// Get get func (c *Client) Get(key string, opts ...client.OpOption) (*client.GetResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) defer cancel() return c.Client.Get(ctx, key, opts...) } -//Delete delete v3 etcd +// Delete delete v3 etcd func (c *Client) Delete(key string, opts ...client.OpOption) (*client.DeleteResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) defer cancel() return c.Client.Delete(ctx, key, opts...) } -//Watch etcd v3 watch +// Watch etcd v3 watch func (c *Client) Watch(key string, opts ...client.OpOption) client.WatchChan { return c.Client.Watch(context.Background(), key, opts...) } -//WatchByCtx watch by ctx +// WatchByCtx watch by ctx func (c *Client) WatchByCtx(ctx context.Context, key string, opts ...client.OpOption) client.WatchChan { return c.Client.Watch(ctx, key, opts...) } -//KeepAliveOnce etcd v3 KeepAliveOnce +// KeepAliveOnce etcd v3 KeepAliveOnce func (c *Client) KeepAliveOnce(id client.LeaseID) (*client.LeaseKeepAliveResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) defer cancel() return c.Client.KeepAliveOnce(ctx, id) } -//GetLock GetLock +// GetLock GetLock func (c *Client) GetLock(key string, id client.LeaseID) (bool, error) { key = conf.Config.LockPath + key ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) @@ -192,20 +192,20 @@ func (c *Client) GetLock(key string, id client.LeaseID) (bool, error) { return resp.Succeeded, nil } -//DelLock DelLock +// DelLock DelLock func (c *Client) DelLock(key string) error { _, err := c.Delete(conf.Config.LockPath + key) return err } -//Grant etcd v3 Grant +// Grant etcd v3 Grant func (c *Client) Grant(ttl int64) (*client.LeaseGrantResponse, error) { ctx, cancel := context.WithTimeout(context.Background(), c.reqTimeout) defer cancel() return c.Client.Grant(ctx, ttl) } -//IsValidAsKeyPath IsValidAsKeyPath +// IsValidAsKeyPath IsValidAsKeyPath func IsValidAsKeyPath(s string) bool { return strings.IndexByte(s, '/') == -1 } diff --git a/node/monitormessage/udpserver.go b/node/monitormessage/udpserver.go index 78a4a8bd2..b8107516a 100644 --- a/node/monitormessage/udpserver.go +++ b/node/monitormessage/udpserver.go @@ -30,8 +30,6 @@ import ( "github.com/goodrain/rainbond/discover/config" etcdutil "github.com/goodrain/rainbond/util/etcd" "github.com/sirupsen/logrus" - - "github.com/prometheus/common/log" ) //UDPServer udp server @@ -111,7 +109,7 @@ func (u *UDPServer) server() error { fmt.Println(err) return err } - log.Infof("UDP Server Listener: %s", listener.LocalAddr().String()) + logrus.Infof("UDP Server Listener: %s", listener.LocalAddr().String()) buf := make([]byte, 65535) go func() { defer listener.Close() diff --git a/node/nodem/client/cluster_client.go b/node/nodem/client/cluster_client.go index 6cc3c51bd..946b062fc 100644 --- a/node/nodem/client/cluster_client.go +++ b/node/nodem/client/cluster_client.go @@ -40,7 +40,7 @@ import ( // RainbondEndpointPrefix is the prefix of the key of the rainbond endpoints in etcd const RainbondEndpointPrefix = "/rainbond/endpoint" -//ClusterClient ClusterClient +// ClusterClient ClusterClient type ClusterClient interface { UpdateStatus(*HostNode, []NodeConditionType) error DownNode(*HostNode) error @@ -54,7 +54,7 @@ type ClusterClient interface { DelEndpoints(key string) } -//NewClusterClient new cluster client +// NewClusterClient new cluster client func NewClusterClient(conf *option.Conf) ClusterClient { return &etcdClusterClient{ conf: conf, @@ -157,7 +157,7 @@ func checkURL(source string) bool { return true } -//SetEndpoints service name and hostip must set +// SetEndpoints service name and hostip must set func (e *etcdClusterClient) SetEndpoints(serviceName, hostIP string, value []string) { if serviceName == "" { return @@ -196,7 +196,7 @@ func (e *etcdClusterClient) DelEndpoints(key string) { logrus.Infof("Delete endpoints: %s", key) } -//ErrorNotFound node not found. +// ErrorNotFound node not found. var ErrorNotFound = fmt.Errorf("node not found") func (e *etcdClusterClient) GetNode(nodeID string) (*HostNode, error) { @@ -225,7 +225,7 @@ func (e *etcdClusterClient) RegistNode(node *HostNode) error { return nil } -//Update update node info +// Update update node info func (e *etcdClusterClient) Update(h *HostNode) error { ctx, cancel := context.WithTimeout(context.Background(), time.Second*3) defer cancel() @@ -235,7 +235,7 @@ func (e *etcdClusterClient) Update(h *HostNode) error { return err } -//Down node set node status is offline +// Down node set node status is offline func (e *etcdClusterClient) DownNode(h *HostNode) error { existNode, err := e.GetNode(h.ID) if err != nil { diff --git a/node/nodem/client/cluster_client_test.go b/node/nodem/client/cluster_client_test.go index 778639fd7..36cb887ff 100644 --- a/node/nodem/client/cluster_client_test.go +++ b/node/nodem/client/cluster_client_test.go @@ -24,7 +24,6 @@ import ( "testing" "time" - "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/cmd/node/option" "github.com/goodrain/rainbond/node/core/store" "github.com/goodrain/rainbond/util" diff --git a/node/nodem/controller/manager_service.go b/node/nodem/controller/manager_service.go index bfe23f7ee..8d09b0f25 100644 --- a/node/nodem/controller/manager_service.go +++ b/node/nodem/controller/manager_service.go @@ -21,12 +21,12 @@ package controller import ( "context" "fmt" + "github.com/coreos/etcd/clientv3" "regexp" "strings" "sync" "time" - "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/builder/parser" "github.com/goodrain/rainbond/cmd/node/option" "github.com/goodrain/rainbond/event" @@ -41,7 +41,7 @@ var ( ArgsReg = regexp.MustCompile(`\$\{(\w+)\|{0,1}(.{0,1})\}`) ) -//ManagerService manager service +// ManagerService manager service type ManagerService struct { node *client.HostNode ctx context.Context @@ -59,12 +59,12 @@ type ManagerService struct { lock sync.Mutex } -//GetAllService get all service +// GetAllService get all service func (m *ManagerService) GetAllService() ([]*service.Service, error) { return m.allservice, nil } -//GetService get service +// GetService get service func (m *ManagerService) GetService(serviceName string) *service.Service { for _, s := range m.allservice { if s.Name == serviceName { @@ -74,7 +74,7 @@ func (m *ManagerService) GetService(serviceName string) *service.Service { return nil } -//Start start and monitor all service +// Start start and monitor all service func (m *ManagerService) Start(node *client.HostNode) error { logrus.Info("Starting node controller manager.") m.loadServiceConfig() @@ -96,13 +96,13 @@ func (m *ManagerService) loadServiceConfig() { m.services = controllerServices } -//Stop stop manager +// Stop stop manager func (m *ManagerService) Stop() error { m.cancel() return nil } -//Online start all service of on the node +// Online start all service of on the node func (m *ManagerService) Online() error { logrus.Info("Doing node online by node controller manager") if ok := m.ctr.CheckBeforeStart(); !ok { @@ -129,7 +129,7 @@ func (m *ManagerService) SetEndpoints(hostIP string) { } } -//StartServices start services +// StartServices start services func (m *ManagerService) StartServices() { for _, service := range m.services { if !service.Disable { @@ -154,7 +154,7 @@ func (m *ManagerService) StartServices() { } } -//Offline stop all service of on the node +// Offline stop all service of on the node func (m *ManagerService) Offline() error { logrus.Info("Doing node offline by node controller manager") services, _ := m.GetAllService() @@ -168,7 +168,7 @@ func (m *ManagerService) Offline() error { return nil } -//DownOneServiceEndpoint down service endpoint +// DownOneServiceEndpoint down service endpoint func (m *ManagerService) DownOneServiceEndpoint(s *service.Service) { hostIP := m.cluster.GetOptions().HostIP for _, end := range s.Endpoints { @@ -188,7 +188,7 @@ func (m *ManagerService) DownOneServiceEndpoint(s *service.Service) { logrus.Infof("node %s down service %s endpoints", hostIP, s.Name) } -//UpOneServiceEndpoint up service endpoint +// UpOneServiceEndpoint up service endpoint func (m *ManagerService) UpOneServiceEndpoint(s *service.Service) { if s.OnlyHealthCheck || s.Disable { return @@ -203,7 +203,7 @@ func (m *ManagerService) UpOneServiceEndpoint(s *service.Service) { } } -//SyncServiceStatusController synchronize all service status to as we expect +// SyncServiceStatusController synchronize all service status to as we expect func (m *ManagerService) SyncServiceStatusController() { m.lock.Lock() defer m.lock.Unlock() @@ -322,7 +322,7 @@ func (m *ManagerService) StopSyncService() { } } -//WaitStart waiting service healty +// WaitStart waiting service healty func (m *ManagerService) WaitStart(name string, duration time.Duration) bool { max := time.Now().Add(duration) t := time.Tick(time.Second * 3) @@ -407,7 +407,7 @@ func (m *ManagerService) ReLoadServices() error { return nil } -//StartService start a service +// StartService start a service func (m *ManagerService) StartService(serviceName string) error { for _, service := range m.services { if service.Name == serviceName { @@ -420,7 +420,7 @@ func (m *ManagerService) StartService(serviceName string) error { return nil } -//StopService start a service +// StopService start a service func (m *ManagerService) StopService(serviceName string) error { for i, service := range m.services { if service.Name == serviceName { @@ -439,7 +439,7 @@ func (m *ManagerService) StopService(serviceName string) error { return nil } -//WriteServices write services +// WriteServices write services func (m *ManagerService) WriteServices() error { for _, s := range m.services { if s.OnlyHealthCheck { @@ -483,7 +483,7 @@ func toEndpoint(reg *service.Endpoint, ip string) string { return fmt.Sprintf("%s://%s:%s", reg.Protocol, ip, reg.Port) } -//InjectConfig inject config +// InjectConfig inject config func (m *ManagerService) InjectConfig(content string) string { for _, parantheses := range ArgsReg.FindAllString(content, -1) { logrus.Debugf("discover inject args template %s", parantheses) @@ -540,7 +540,7 @@ func (m *ManagerService) ListServiceImages() []string { return images } -//NewManagerService new controller manager +// NewManagerService new controller manager func NewManagerService(conf *option.Conf, healthyManager healthy.Manager, cluster client.ClusterClient) *ManagerService { ctx, cancel := context.WithCancel(context.Background()) manager := &ManagerService{ diff --git a/node/nodem/controller/manager_service_test.go b/node/nodem/controller/manager_service_test.go index 138524f0f..409cf7a82 100644 --- a/node/nodem/controller/manager_service_test.go +++ b/node/nodem/controller/manager_service_test.go @@ -24,7 +24,6 @@ import ( "testing" "time" - "github.com/coreos/etcd/clientv3" "github.com/goodrain/rainbond/cmd/node/option" "github.com/goodrain/rainbond/node/nodem/client" "github.com/goodrain/rainbond/node/nodem/service" diff --git a/node/nodem/logger/copier.go b/node/nodem/logger/copier.go index 454ea8e41..52c7f5244 100644 --- a/node/nodem/logger/copier.go +++ b/node/nodem/logger/copier.go @@ -20,7 +20,7 @@ package logger import ( "context" - runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "sync" "time" diff --git a/node/nodem/logger/cri_logger_file.go b/node/nodem/logger/cri_logger_file.go index 6d23b960f..9bfd203d3 100644 --- a/node/nodem/logger/cri_logger_file.go +++ b/node/nodem/logger/cri_logger_file.go @@ -17,7 +17,7 @@ import ( "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" - runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/util/tail" ) diff --git a/node/nodem/logger/manage.go b/node/nodem/logger/manage.go index 04ecdd67d..a47165343 100644 --- a/node/nodem/logger/manage.go +++ b/node/nodem/logger/manage.go @@ -23,7 +23,7 @@ import ( "encoding/json" "fmt" "github.com/goodrain/rainbond/builder/sources" - runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "strings" "sync" "time" diff --git a/node/nodem/logger/streamlog/streamlog.go b/node/nodem/logger/streamlog/streamlog.go index 23af54b4c..63de80370 100644 --- a/node/nodem/logger/streamlog/streamlog.go +++ b/node/nodem/logger/streamlog/streamlog.go @@ -23,7 +23,7 @@ import ( "github.com/sirupsen/logrus" ) -//STREAMLOGNAME driver name +// STREAMLOGNAME driver name const name = "streamlog" const defaultClusterAddress = "http://rbd-eventlog:6363/docker-instance" const defaultAddress = "rbd-eventlog:6362" @@ -31,7 +31,7 @@ const defaultAddress = "rbd-eventlog:6362" var etcdV3Endpoints = []string{"rbd-etcd:2379"} var clusterAddress = []string{defaultClusterAddress} -//Dis dis manage +// Dis dis manage type Dis struct { discoverAddress string } @@ -67,7 +67,7 @@ func (c *Dis) discoverEventServer() { } } -//ResponseBody api返回数据格式 +// ResponseBody api返回数据格式 type ResponseBody struct { ValidationError url.Values `json:"validation_error,omitempty"` Msg string `json:"msg,omitempty"` @@ -79,7 +79,7 @@ type ResponseBody struct { Page int `json:"page,omitempty"` } -//Endpoint endpoint +// Endpoint endpoint type Endpoint struct { Name string `json:"name"` URL string `json:"url"` @@ -87,7 +87,7 @@ type Endpoint struct { Mode int `json:"-"` //0 表示URL变化,1表示Weight变化 ,2表示全变化 } -//ParseResponseBody 解析成ResponseBody +// ParseResponseBody 解析成ResponseBody func ParseResponseBody(red io.ReadCloser) (re ResponseBody, err error) { if red == nil { err = errors.New("readcloser can not be nil") @@ -109,7 +109,7 @@ func init() { go dis.discoverEventServer() } -//StreamLog 消息流log +// StreamLog 消息流log type StreamLog struct { writer *Client serviceID string @@ -130,7 +130,7 @@ type StreamLog struct { once sync.Once } -//New new logger +// New new logger func New(ctx logger.Info) (logger.Logger, error) { var ( env = make(map[string]string) @@ -202,7 +202,7 @@ func getTCPConnConfig(serviceID, address string) string { return address } -//ValidateLogOpt 验证参数 +// ValidateLogOpt 验证参数 func ValidateLogOpt(cfg map[string]string) error { for key, value := range cfg { switch key { @@ -278,7 +278,7 @@ func (s *StreamLog) ping() { s.sendMsg(pingMsg) } -//Log log +// Log log func (s *StreamLog) Log(msg *logger.Message) error { defer func() { if err := recover(); err != nil { @@ -351,7 +351,7 @@ func (s *StreamLog) reConect() { } } -//Close 关闭 +// Close 关闭 func (s *StreamLog) Close() error { s.cancel() <-s.closedChan @@ -362,7 +362,7 @@ func (s *StreamLog) Close() error { return nil } -//Name 返回logger name +// Name 返回logger name func (s *StreamLog) Name() string { return name } diff --git a/node/statsd/exporter/exporter.go b/node/statsd/exporter/exporter.go index 8ee66fe83..d0c112a6b 100644 --- a/node/statsd/exporter/exporter.go +++ b/node/statsd/exporter/exporter.go @@ -23,6 +23,7 @@ import ( "bytes" "encoding/binary" "fmt" + "github.com/sirupsen/logrus" "hash/fnv" "io" "net" @@ -33,9 +34,7 @@ import ( "unicode/utf8" "github.com/goodrain/rainbond/node/statsd/prometheus" - "github.com/prometheus/common/log" "github.com/prometheus/common/model" - "github.com/sirupsen/logrus" ) const ( @@ -256,7 +255,7 @@ func (b *Exporter) Listen(e <-chan Events) { for { events, ok := <-e if !ok { - log.Debug("Channel is closed. Break out of Exporter.Listener.") + logrus.Debug("Channel is closed. Break out of Exporter.Listener.") return } for _, event := range events { @@ -289,7 +288,7 @@ func (b *Exporter) Listen(e <-chan Events) { // We don't accept negative values for counters. Incrementing the counter with a negative number // will cause the exporter to panic. Instead we will warn and continue to the next event. if event.Value() < 0.0 { - log.Debugf("Counter %q is: '%f' (counter must be non-negative value)", metricName, event.Value()) + logrus.Debugf("Counter %q is: '%f' (counter must be non-negative value)", metricName, event.Value()) eventStats.WithLabelValues("illegal_negative_counter").Inc() continue } @@ -304,7 +303,7 @@ func (b *Exporter) Listen(e <-chan Events) { counter.SetTimestamp(timestamp) eventStats.WithLabelValues("counter").Inc() } else { - log.Debugf(regErrF, metricName, err) + logrus.Debugf(regErrF, metricName, err) conflictingEventStats.WithLabelValues("counter").Inc() } @@ -325,7 +324,7 @@ func (b *Exporter) Listen(e <-chan Events) { gauge.SetTimestamp(timestamp) eventStats.WithLabelValues("gauge").Inc() } else { - log.Debugf(regErrF, metricName, err) + logrus.Debugf(regErrF, metricName, err) conflictingEventStats.WithLabelValues("gauge").Inc() } @@ -351,7 +350,7 @@ func (b *Exporter) Listen(e <-chan Events) { histogram.SetTimestamp(timestamp) eventStats.WithLabelValues("timer").Inc() } else { - log.Debugf(regErrF, metricName, err) + logrus.Debugf(regErrF, metricName, err) conflictingEventStats.WithLabelValues("timer").Inc() } @@ -366,7 +365,7 @@ func (b *Exporter) Listen(e <-chan Events) { summary.SetTimestamp(timestamp) eventStats.WithLabelValues("timer").Inc() } else { - log.Debugf(regErrF, metricName, err) + logrus.Debugf(regErrF, metricName, err) conflictingEventStats.WithLabelValues("timer").Inc() } @@ -375,14 +374,14 @@ func (b *Exporter) Listen(e <-chan Events) { } default: - log.Debugln("Unsupported event type") + logrus.Debugln("Unsupported event type") eventStats.WithLabelValues("illegal").Inc() } } } } -//GCollector 循环检查Exporter对象中的性能指标数据是否有过期,有则清除 +// GCollector 循环检查Exporter对象中的性能指标数据是否有过期,有则清除 func (b *Exporter) GCollector() { var HP = b.vitality timer := time.NewTicker(time.Second * 10) @@ -431,7 +430,7 @@ func (b *Exporter) GCollector() { } } -//NewExporter new exporter +// NewExporter new exporter func NewExporter(mapper *MetricMapper, Register prometheus.Registerer) *Exporter { return &Exporter{ Counters: NewCounterContainer(Register), @@ -481,7 +480,7 @@ func parseDogStatsDTagsToLabels(component string) map[string]string { if len(kv) < 2 || len(kv[1]) == 0 { tagErrors.Inc() - log.Debugf("Malformed or empty DogStatsD tag %s in component %s", t, component) + logrus.Debugf("Malformed or empty DogStatsD tag %s in component %s", t, component) continue } @@ -499,7 +498,7 @@ func lineToEvents(line string) Events { elements := strings.SplitN(line, ":", 2) if len(elements) < 2 || len(elements[0]) == 0 || !utf8.ValidString(line) { sampleErrors.WithLabelValues("malformed_line").Inc() - log.Debugln("Bad line from StatsD:", line) + logrus.Debugln("Bad line from StatsD:", line) return events } metric := elements[0] @@ -517,7 +516,7 @@ samples: samplingFactor := 1.0 if len(components) < 2 || len(components) > 4 { sampleErrors.WithLabelValues("malformed_component").Inc() - log.Debugln("Bad component on line:", line) + logrus.Debugln("Bad component on line:", line) continue } valueStr, statType := components[0], components[1] @@ -529,7 +528,7 @@ samples: value, err := strconv.ParseFloat(valueStr, 64) if err != nil { - log.Debugf("Bad value %s on line: %s", valueStr, line) + logrus.Debugf("Bad value %s on line: %s", valueStr, line) sampleErrors.WithLabelValues("malformed_value").Inc() continue } @@ -539,7 +538,7 @@ samples: if len(components) >= 3 { for _, component := range components[2:] { if len(component) == 0 { - log.Debugln("Empty component on line: ", line) + logrus.Debugln("Empty component on line: ", line) sampleErrors.WithLabelValues("malformed_component").Inc() continue samples } @@ -549,13 +548,13 @@ samples: switch component[0] { case '@': if statType != "c" && statType != "ms" { - log.Debugln("Illegal sampling factor for non-counter metric on line", line) + logrus.Debugln("Illegal sampling factor for non-counter metric on line", line) sampleErrors.WithLabelValues("illegal_sample_factor").Inc() continue } samplingFactor, err = strconv.ParseFloat(component[1:], 64) if err != nil { - log.Debugf("Invalid sampling factor %s on line %s", component[1:], line) + logrus.Debugf("Invalid sampling factor %s on line %s", component[1:], line) sampleErrors.WithLabelValues("invalid_sample_factor").Inc() } if samplingFactor == 0 { @@ -570,7 +569,7 @@ samples: case '#': labels = parseDogStatsDTagsToLabels(component) default: - log.Debugf("Invalid sampling factor or tag section %s on line %s", components[2], line) + logrus.Debugf("Invalid sampling factor or tag section %s on line %s", components[2], line) sampleErrors.WithLabelValues("invalid_sample_factor").Inc() continue } @@ -580,7 +579,7 @@ samples: for i := 0; i < multiplyEvents; i++ { event, err := buildEvent(statType, metric, value, relative, labels) if err != nil { - log.Debugf("Error building event on line %s: %s", line, err) + logrus.Debugf("Error building event on line %s: %s", line, err) sampleErrors.WithLabelValues("illegal_event").Inc() continue } @@ -599,7 +598,7 @@ func (l *StatsDUDPListener) Listen(e chan<- Events) { for { n, _, err := l.Conn.ReadFromUDP(buf) if err != nil { - log.Fatal(err) + logrus.Fatal(err) } l.handlePacket(buf[0:n], e) } @@ -625,7 +624,7 @@ func (l *StatsDTCPListener) Listen(e chan<- Events) { for { c, err := l.Conn.AcceptTCP() if err != nil { - log.Fatalf("AcceptTCP failed: %v", err) + logrus.Fatalf("AcceptTCP failed: %v", err) } go l.handleConn(c, e) } @@ -642,13 +641,13 @@ func (l *StatsDTCPListener) handleConn(c *net.TCPConn, e chan<- Events) { if err != nil { if err != io.EOF { tcpErrors.Inc() - log.Debugf("Read %s failed: %v", c.RemoteAddr(), err) + logrus.Debugf("Read %s failed: %v", c.RemoteAddr(), err) } break } if isPrefix { tcpLineTooLong.Inc() - log.Debugf("Read %s failed: line too long", c.RemoteAddr()) + logrus.Debugf("Read %s failed: line too long", c.RemoteAddr()) break } linesReceived.Inc() diff --git a/release.sh b/release.sh index 25c737d86..bac4b58be 100755 --- a/release.sh +++ b/release.sh @@ -15,7 +15,7 @@ elif [ $(arch) = "x86_64" ]; then GOARCH=amd64 fi -GO_VERSION=1.18-alpine3.16 +GO_VERSION=1.19-alpine3.16 GOPROXY=${GOPROXY:-'https://goproxy.cn'} diff --git a/util/criutil/criutil.go b/util/criutil/criutil.go index a492ab992..ca435f9fe 100644 --- a/util/criutil/criutil.go +++ b/util/criutil/criutil.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/grpc" - "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/cri-api/pkg/apis/runtime/v1" "k8s.io/kubernetes/pkg/kubelet/util" "time" ) @@ -51,13 +51,13 @@ func getConnection(endPoints []string, timeout time.Duration) (*grpc.ClientConn, return conn, nil } -func GetRuntimeClient(ctx context.Context, endpoint string, timeout time.Duration) (v1alpha2.RuntimeServiceClient, *grpc.ClientConn, error) { +func GetRuntimeClient(ctx context.Context, endpoint string, timeout time.Duration) (v1.RuntimeServiceClient, *grpc.ClientConn, error) { // Set up a connection to the server. conn, err := getRuntimeClientConnection(ctx, endpoint, timeout) if err != nil { return nil, nil, errors.Wrap(err, "connect") } - runtimeClient := v1alpha2.NewRuntimeServiceClient(conn) + runtimeClient := v1.NewRuntimeServiceClient(conn) return runtimeClient, conn, nil } @@ -65,12 +65,12 @@ func getRuntimeClientConnection(ctx context.Context, endpoint string, timeout ti return getConnection([]string{endpoint}, timeout) } -func GetImageClient(ctx context.Context, endpoint string, timeout time.Duration) (v1alpha2.ImageServiceClient, *grpc.ClientConn, error) { +func GetImageClient(ctx context.Context, endpoint string, timeout time.Duration) (v1.ImageServiceClient, *grpc.ClientConn, error) { // Set up a connection to the server. conn, err := getRuntimeClientConnection(ctx, endpoint, timeout) if err != nil { return nil, nil, errors.Wrap(err, "connect") } - runtimeClient := v1alpha2.NewImageServiceClient(conn) + runtimeClient := v1.NewImageServiceClient(conn) return runtimeClient, conn, nil } diff --git a/worker/appm/controller/controller.go b/worker/appm/controller/controller.go index f7febba02..00aa40d9f 100644 --- a/worker/appm/controller/controller.go +++ b/worker/appm/controller/controller.go @@ -22,6 +22,7 @@ import ( "context" "fmt" "github.com/goodrain/rainbond/cmd/worker/option" + "kubevirt.io/client-go/kubecli" "sync" "github.com/goodrain/rainbond/util" @@ -32,28 +33,28 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) -//Controller service operating controller interface +// Controller service operating controller interface type Controller interface { Begin() Stop() error } -//TypeController controller type +// TypeController controller type type TypeController string -//TypeStartController start service type +// TypeStartController start service type var TypeStartController TypeController = "start" -//TypeStopController start service type +// TypeStopController start service type var TypeStopController TypeController = "stop" -//TypeRestartController restart service type +// TypeRestartController restart service type var TypeRestartController TypeController = "restart" -//TypeUpgradeController start service type +// TypeUpgradeController start service type var TypeUpgradeController TypeController = "upgrade" -//TypeScalingController start service type +// TypeScalingController start service type var TypeScalingController TypeController = "scaling" // TypeApplyRuleController - @@ -65,7 +66,7 @@ var TypeApplyConfigController TypeController = "apply_config" // TypeControllerRefreshHPA - var TypeControllerRefreshHPA TypeController = "refreshhpa" -//Manager controller manager +// Manager controller manager type Manager struct { ctx context.Context cancel context.CancelFunc @@ -76,10 +77,11 @@ type Manager struct { store store.Storer lock sync.Mutex config option.Config + kubevirtCli kubecli.KubevirtClient } -//NewManager new manager -func NewManager(config option.Config, store store.Storer, client kubernetes.Interface, runtimeClient client.Client) *Manager { +// NewManager new manager +func NewManager(config option.Config, store store.Storer, client kubernetes.Interface, runtimeClient client.Client, kubevirtCli kubecli.KubevirtClient) *Manager { ctx, cancel := context.WithCancel(context.Background()) return &Manager{ ctx: ctx, @@ -90,23 +92,24 @@ func NewManager(config option.Config, store store.Storer, client kubernetes.Inte controllers: make(map[string]Controller), store: store, config: config, + kubevirtCli: kubevirtCli, } } -//Stop stop all controller +// Stop stop all controller func (m *Manager) Stop() error { m.cancel() return nil } -//GetControllerSize get running controller number +// GetControllerSize get running controller number func (m *Manager) GetControllerSize() int { m.lock.Lock() defer m.lock.Unlock() return len(m.controllers) } -//ExportController - +// ExportController - func (m *Manager) ExportController(AppName, AppVersion string, EventIDs []string, end bool, apps ...v1.AppService) error { controllerID := util.NewUUID() controller := &exportController{ @@ -125,7 +128,7 @@ func (m *Manager) ExportController(AppName, AppVersion string, EventIDs []string return nil } -//StartController create and start service controller +// StartController create and start service controller func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppService) error { var controller Controller controllerID := util.NewUUID() diff --git a/worker/appm/controller/start.go b/worker/appm/controller/start.go index 0f9e71a14..00e573386 100644 --- a/worker/appm/controller/start.go +++ b/worker/appm/controller/start.go @@ -143,6 +143,12 @@ func (s *startController) startOne(app v1.AppService) error { return fmt.Errorf("create deployment failure:%s;", err.Error()) } } + if vm := app.GetVirtualMachine(); vm != nil { + _, err = s.manager.kubevirtCli.VirtualMachine(app.GetNamespace()).Create(s.ctx, vm) + if err != nil { + return fmt.Errorf("create vm failure:%s;", err.Error()) + } + } if job := app.GetJob(); job != nil { _, err = s.manager.client.BatchV1().Jobs(app.GetNamespace()).Create(s.ctx, job, metav1.CreateOptions{}) if err != nil { @@ -245,7 +251,7 @@ func (s *startController) startOne(app v1.AppService) error { return s.WaitingReady(app) } -//WaitingReady wait app start or upgrade ready +// WaitingReady wait app start or upgrade ready func (s *startController) WaitingReady(app v1.AppService) error { storeAppService := s.manager.store.GetAppService(app.ServiceID) var initTime int32 diff --git a/worker/appm/controller/stop.go b/worker/appm/controller/stop.go index 40891b894..59550e6fc 100644 --- a/worker/appm/controller/stop.go +++ b/worker/appm/controller/stop.go @@ -153,6 +153,13 @@ func (s *stopController) stopOne(app v1.AppService) error { logrus.Errorf("delete custom component manifest %s/%s failure %s", kind, name, err.Error()) } } + if vm := app.GetVirtualMachine(); vm != nil { + err := s.manager.kubevirtCli.VirtualMachine(app.GetNamespace()).Delete(s.ctx, vm.Name, &metav1.DeleteOptions{}) + if err != nil && !errors.IsNotFound(err) { + return fmt.Errorf("delete vm failure:%s", err.Error()) + } + s.manager.store.OnDeletes(vm) + } //step 5: delete statefulset or deployment if statefulset := app.GetStatefulSet(); statefulset != nil { err := s.manager.client.AppsV1().StatefulSets(app.GetNamespace()).Delete(s.ctx, statefulset.Name, metav1.DeleteOptions{}) @@ -249,7 +256,7 @@ func (s *stopController) Stop() error { return nil } -//WaitingReady wait app start or upgrade ready +// WaitingReady wait app start or upgrade ready func (s *stopController) WaitingReady(app v1.AppService) error { storeAppService := s.manager.store.GetAppService(app.ServiceID) //at least waiting time is 40 second diff --git a/worker/appm/controller/upgrade.go b/worker/appm/controller/upgrade.go index 85879a4e6..a294836aa 100644 --- a/worker/appm/controller/upgrade.go +++ b/worker/appm/controller/upgrade.go @@ -223,7 +223,7 @@ func (s *upgradeController) upgradeOne(app v1.AppService) error { return s.WaitingReady(app) } -//WaitingReady wait app start or upgrade ready +// WaitingReady wait app start or upgrade ready func (s *upgradeController) WaitingReady(app v1.AppService) error { storeAppService := s.manager.store.GetAppService(app.ServiceID) var initTime int32 diff --git a/worker/appm/conversion/plugin.go b/worker/appm/conversion/plugin.go index db2d34248..b0c3e7a7a 100644 --- a/worker/appm/conversion/plugin.go +++ b/worker/appm/conversion/plugin.go @@ -40,8 +40,11 @@ import ( typesv1 "github.com/goodrain/rainbond/worker/appm/types/v1" ) -//TenantServicePlugin conv service all plugin +// TenantServicePlugin conv service all plugin func TenantServicePlugin(as *typesv1.AppService, dbmanager db.Manager) error { + if as.GetVirtualMachine() != nil { + return nil + } initContainers, preContainers, postContainers, err := conversionServicePlugin(as, dbmanager) if err != nil { logrus.Errorf("create plugin containers for component %s failure: %s", as.ServiceID, err.Error()) @@ -327,7 +330,7 @@ func createProbeMeshInitContainer(as *typesv1.AppService, pluginID, serviceAlias } } -//ApplyPluginConfig applyPluginConfig +// ApplyPluginConfig applyPluginConfig func ApplyPluginConfig(as *typesv1.AppService, servicePluginRelation *model.TenantServicePluginRelation, dbmanager db.Manager, inboundPluginConfig *api_model.ResourceSpec) { config, err := dbmanager.TenantPluginVersionConfigDao().GetPluginConfig(servicePluginRelation.ServiceID, @@ -369,7 +372,7 @@ func ApplyPluginConfig(as *typesv1.AppService, servicePluginRelation *model.Tena } } -//applyDefaultMeshPluginConfig applyDefaultMeshPluginConfig +// applyDefaultMeshPluginConfig applyDefaultMeshPluginConfig func applyDefaultMeshPluginConfig(as *typesv1.AppService, dbmanager db.Manager) (string, *api_model.ResourceSpec, error) { var baseServices []*api_model.BaseService deps, err := dbmanager.TenantServiceRelationDao().GetTenantServiceRelations(as.ServiceID) @@ -448,7 +451,7 @@ func getXDSHostIPAndPort() (string, string, string) { return xdsHost, xdsHostPort, apiHostPort } -//container envs +// container envs func createPluginEnvs(pluginID, tenantID, serviceAlias string, mainEnvs []v1.EnvVar, versionID, serviceID string, dbmanager db.Manager) (*[]v1.EnvVar, error) { versionEnvs, err := dbmanager.TenantPluginVersionENVDao().GetVersionEnvByServiceID(serviceID, pluginID) if err != nil && err.Error() != gorm.ErrRecordNotFound.Error() { @@ -490,7 +493,8 @@ func createPluginEnvs(pluginID, tenantID, serviceAlias string, mainEnvs []v1.Env } func createPluginResources(memory int, cpu int) v1.ResourceRequirements { - return createResourcesBySetting(memory, int64(cpu), int64(cpu), 0) + res, _ := createResourcesBySetting(memory, int64(cpu), int64(cpu), 0, false) + return *res } func createTCPUDPMeshRecources(as *typesv1.AppService) v1.ResourceRequirements { @@ -508,12 +512,13 @@ func createTCPUDPMeshRecources(as *typesv1.AppService) v1.ResourceRequirements { memory = requestint } } - return createResourcesBySetting(memory, cpu, func() int64 { + res, _ := createResourcesBySetting(memory, cpu, func() int64 { if 0 < cpu && cpu < 120 { return 120 } return cpu - }(), 0) + }(), 0, false) + return *res } func xdsHostIPEnv(xdsHost string) corev1.EnvVar { @@ -527,7 +532,7 @@ func xdsHostIPEnv(xdsHost string) corev1.EnvVar { return v1.EnvVar{Name: "XDS_HOST_IP", Value: xdsHost} } -//IsContainMount 判断存储路径是否冲突,以及进一步实现创建存储或配置文件 +// IsContainMount 判断存储路径是否冲突,以及进一步实现创建存储或配置文件 func IsContainMount(volumeMounts *[]v1.VolumeMount, as *typesv1.AppService, plugin api_model.PluginStorage, pluginID string) bool { for _, mountValue := range *volumeMounts { diff --git a/worker/appm/conversion/resource.go b/worker/appm/conversion/resource.go index aee80334b..3f0b68ec8 100644 --- a/worker/appm/conversion/resource.go +++ b/worker/appm/conversion/resource.go @@ -23,12 +23,12 @@ import ( "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" + kubevirtv1 "kubevirt.io/api/core/v1" ) -func createResourcesBySetting(memory int, setCPURequest, setCPULimit, setGPULimit int64) corev1.ResourceRequirements { +func createResourcesBySetting(memory int, setCPURequest, setCPULimit, setGPULimit int64, vmResource bool) (*corev1.ResourceRequirements, *kubevirtv1.ResourceRequirements) { limits := corev1.ResourceList{} request := corev1.ResourceList{} - if memory > 0 { limits[corev1.ResourceMemory] = *resource.NewQuantity(int64(memory*1024*1024), resource.BinarySI) } @@ -47,8 +47,14 @@ func createResourcesBySetting(memory int, setCPURequest, setCPULimit, setGPULimi if setCPURequest > 0 { request[corev1.ResourceCPU] = *resource.NewMilliQuantity(setCPURequest, resource.DecimalSI) } - return corev1.ResourceRequirements{ + if vmResource { + return nil, &kubevirtv1.ResourceRequirements{ + Limits: limits, + Requests: request, + } + } + return &corev1.ResourceRequirements{ Limits: limits, Requests: request, - } + }, nil } diff --git a/worker/appm/conversion/service.go b/worker/appm/conversion/service.go index 55a63dbdf..4a579caf4 100644 --- a/worker/appm/conversion/service.go +++ b/worker/appm/conversion/service.go @@ -24,6 +24,7 @@ import ( k8sutil "github.com/goodrain/rainbond/util/k8s" batchv1beta1 "k8s.io/api/batch/v1beta1" utilversion "k8s.io/apimachinery/pkg/util/version" + kubevirtv1 "kubevirt.io/api/core/v1" "strconv" "strings" @@ -43,7 +44,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -//ServiceSource conv ServiceSource +// ServiceSource conv ServiceSource func ServiceSource(as *v1.AppService, dbmanager db.Manager) error { sscs, err := dbmanager.ServiceSourceDao().GetServiceSource(as.ServiceID) if err != nil { @@ -87,7 +88,7 @@ func int32Ptr(i int) *int32 { return &j } -//TenantServiceBase conv tenant service base info +// TenantServiceBase conv tenant service base info func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error { tenantService, err := dbmanager.TenantServiceDao().GetServiceByID(as.ServiceID) if err != nil { @@ -146,6 +147,10 @@ func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error { initBaseCronJob(as, tenantService) return nil } + if tenantService.IsVM() { + initBaseVirtualMachine(as, tenantService) + return nil + } if !tenantService.IsState() { initBaseDeployment(as, tenantService) return nil @@ -206,6 +211,29 @@ func initBaseStatefulSet(as *v1.AppService, service *dbmodel.TenantServices) { as.SetStatefulSet(stateful) } +func initBaseVirtualMachine(as *v1.AppService, service *dbmodel.TenantServices) { + as.ServiceType = v1.TypeVirtualMachine + vm := as.GetVirtualMachine() + if vm == nil { + vm = &kubevirtv1.VirtualMachine{} + } + vm.Namespace = as.GetNamespace() + vm.Name = as.GetK8sWorkloadName() + vmTem := kubevirtv1.VirtualMachineInstanceTemplateSpec{ObjectMeta: metav1.ObjectMeta{}} + vm.Spec.Template = &vmTem + vm.GenerateName = strings.Replace(service.ServiceAlias, "_", "-", -1) + injectLabels := getInjectLabels(as) + vm.Labels = as.GetCommonLabels(vm.Labels, map[string]string{ + "name": service.ServiceAlias, + "version": service.DeployVersion, + "kubevirt.io/domain": as.GetK8sWorkloadName(), + }, injectLabels) + r := kubevirtv1.RunStrategyAlways + vm.Spec.RunStrategy = &r + + as.SetVirtualMachine(vm) +} + func initBaseDeployment(as *v1.AppService, service *dbmodel.TenantServices) { as.ServiceType = v1.TypeDeployment deployment := as.GetDeployment() diff --git a/worker/appm/conversion/version.go b/worker/appm/conversion/version.go index c22f584cb..9e5627833 100644 --- a/worker/appm/conversion/version.go +++ b/worker/appm/conversion/version.go @@ -21,6 +21,7 @@ package conversion import ( "encoding/json" "fmt" + kubevirtv1 "kubevirt.io/api/core/v1" "net" "os" "sort" @@ -46,7 +47,7 @@ import ( "sigs.k8s.io/yaml" ) -//TenantServiceVersion service deploy version conv. define pod spec +// TenantServiceVersion service deploy version conv. define pod spec func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error { version, err := dbmanager.VersionInfoDao().GetVersionByDeployVersion(as.DeployVersion, as.ServiceID) if err != nil { @@ -64,10 +65,6 @@ func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error { if err != nil { return fmt.Errorf("create volume in pod template error :%s", err.Error()) } - container, err := getMainContainer(as, version, dv, envs, envVarSecrets, dbmanager) - if err != nil { - return fmt.Errorf("conv service main container failure %s", err.Error()) - } //need service mesh sidecar, volume kubeconfig if as.NeedProxy { dv.SetVolume(dbmodel.ShareFileVolumeType, "kube-config", "/etc/kubernetes", "/grdata/kubernetes", corev1.HostPathDirectoryOrCreate, true) @@ -84,10 +81,6 @@ func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error { if err != nil { return fmt.Errorf("create toleration %v", err) } - volumes, err := getVolumes(dv, as, dbmanager) - if err != nil { - return fmt.Errorf("get volume failure: %v", err) - } dnsPolicy, err := createDNSPolicy(as, dbmanager) if err != nil { return fmt.Errorf("create dns policy failure: %v", err) @@ -111,50 +104,153 @@ func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error { if err != nil { return fmt.Errorf("craete service account name failure: %v", err) } - podtmpSpec := corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: annotations, - Name: as.GetK8sWorkloadName() + "-pod-spec", - }, - Spec: corev1.PodSpec{ - ImagePullSecrets: setImagePullSecrets(), - Volumes: volumes, - Containers: []corev1.Container{*container}, - NodeSelector: nodeSelector, - Tolerations: tolerations, - Affinity: affinity, - HostAliases: createHostAliases(as), - Hostname: func() string { - if nodeID, ok := as.ExtensionSet["hostname"]; ok { - return nodeID - } - return "" - }(), - NodeName: func() string { - if nodeID, ok := as.ExtensionSet["selectnode"]; ok { - return nodeID - } - return "" - }(), - HostNetwork: func() bool { - if _, ok := as.ExtensionSet["hostnetwork"]; ok { - return true - } - return false - }(), - SchedulerName: func() string { - if name, ok := as.ExtensionSet["shcedulername"]; ok { - return name - } - return "" - }(), - ServiceAccountName: san, - ShareProcessNamespace: util.Bool(createShareProcessNamespace(as, dbmanager)), - DNSPolicy: corev1.DNSPolicy(dnsPolicy), - HostIPC: createHostIPC(as, dbmanager), - }, + var terminationGracePeriodSeconds int64 = 10 + vmt := kubevirtv1.VirtualMachineInstanceTemplateSpec{} + podtmpSpec := corev1.PodTemplateSpec{} + if as.GetVirtualMachine() != nil { + labels["kubevirt.io/domain"] = as.GetK8sWorkloadName() + network := []kubevirtv1.Network{ + { + Name: "default", + NetworkSource: kubevirtv1.NetworkSource{ + Pod: &kubevirtv1.PodNetwork{}, + }, + }, + } + volumes := dv.GetVMVolume() + volumes = append([]kubevirtv1.Volume{ + { + Name: "vmimage", + VolumeSource: kubevirtv1.VolumeSource{ + ContainerDisk: &kubevirtv1.ContainerDiskSource{ + Image: fmt.Sprintf("%v/%v", builder.REGISTRYDOMAIN, version.ImageName), + ImagePullSecret: os.Getenv("IMAGE_PULL_SECRET"), + }, + }, + }, + }, volumes...) + disks := dv.GetVMDisk() + bootOrder := uint(len(disks) + 1) + disks = append(disks, []kubevirtv1.Disk{{ + BootOrder: &bootOrder, + DiskDevice: kubevirtv1.DiskDevice{CDRom: &kubevirtv1.CDRomTarget{ + Bus: kubevirtv1.DiskBusSATA, + }}, + Name: "vmimage", + }}...) + + reource := createVMResources(as) + vmt = kubevirtv1.VirtualMachineInstanceTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Name: as.GetK8sWorkloadName() + "-vmi-spec", + Labels: labels, + Annotations: annotations, + }, + Spec: kubevirtv1.VirtualMachineInstanceSpec{ + Domain: kubevirtv1.DomainSpec{ + Resources: reource, + CPU: &kubevirtv1.CPU{ + Cores: 2, + }, + Machine: &kubevirtv1.Machine{Type: "q35"}, + Devices: kubevirtv1.Devices{ + Disks: disks, + Interfaces: []kubevirtv1.Interface{ + { + Name: "default", + Model: "e1000", + InterfaceBindingMethod: kubevirtv1.InterfaceBindingMethod{ + Masquerade: &kubevirtv1.InterfaceMasquerade{}, + }, + }, + }, + }, + }, + NodeSelector: nodeSelector, + ReadinessProbe: createVMProbe(as, dbmanager, "liveness"), + LivenessProbe: createVMProbe(as, dbmanager, "readiness"), + Affinity: affinity, + SchedulerName: func() string { + if name, ok := as.ExtensionSet["shcedulername"]; ok { + return name + } + return "" + }(), + Tolerations: tolerations, + TerminationGracePeriodSeconds: &terminationGracePeriodSeconds, + Volumes: volumes, + Hostname: func() string { + if nodeID, ok := as.ExtensionSet["hostname"]; ok { + return nodeID + } + return "" + }(), + Networks: network, + DNSPolicy: corev1.DNSPolicy(dnsPolicy), + }, + } + if dnsPolicy == "None" { + dnsConfig, err := createDNSConfig(as, dbmanager) + if err != nil { + return fmt.Errorf("create dns config %v", err) + } + vmt.Spec.DNSConfig = dnsConfig + } + } else { + volumes, err := getVolumes(dv, as, dbmanager) + if err != nil { + return fmt.Errorf("get volume failure: %v", err) + } + container, err := getMainContainer(as, version, dv, envs, envVarSecrets, dbmanager) + if err != nil { + return fmt.Errorf("conv service main container failure %s", err.Error()) + } + podtmpSpec = corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: annotations, + Name: as.GetK8sWorkloadName() + "-pod-spec", + }, + Spec: corev1.PodSpec{ + ImagePullSecrets: setImagePullSecrets(), + Volumes: volumes, + Containers: []corev1.Container{*container}, + NodeSelector: nodeSelector, + Tolerations: tolerations, + Affinity: affinity, + HostAliases: createHostAliases(as), + Hostname: func() string { + if nodeID, ok := as.ExtensionSet["hostname"]; ok { + return nodeID + } + return "" + }(), + NodeName: func() string { + if nodeID, ok := as.ExtensionSet["selectnode"]; ok { + return nodeID + } + return "" + }(), + HostNetwork: func() bool { + if _, ok := as.ExtensionSet["hostnetwork"]; ok { + return true + } + return false + }(), + SchedulerName: func() string { + if name, ok := as.ExtensionSet["shcedulername"]; ok { + return name + } + return "" + }(), + ServiceAccountName: san, + ShareProcessNamespace: util.Bool(createShareProcessNamespace(as, dbmanager)), + DNSPolicy: corev1.DNSPolicy(dnsPolicy), + HostIPC: createHostIPC(as, dbmanager), + }, + } } + if dnsPolicy == "None" { dnsConfig, err := createDNSConfig(as, dbmanager) if err != nil { @@ -162,7 +258,6 @@ func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error { } podtmpSpec.Spec.DNSConfig = dnsConfig } - var terminationGracePeriodSeconds int64 = 10 if as.GetDeployment() != nil { podtmpSpec.Spec.TerminationGracePeriodSeconds = &terminationGracePeriodSeconds } @@ -173,7 +268,7 @@ func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error { podtmpSpec.Spec.RestartPolicy = "OnFailure" } //set to deployment or statefulset job or cronjob - as.SetPodTemplate(podtmpSpec, vct) + as.SetPodAndVMTemplate(podtmpSpec, vmt, vct) return nil } @@ -204,7 +299,7 @@ func getMainContainer(as *v1.AppService, version *dbmodel.VersionInfo, dv *volum if imagename == "" { if version.DeliveredType == "slug" { imagename = builder.RUNNERIMAGENAME - if err := sources.ImagesPullAndPush(builder.RUNNERIMAGENAME, builder.ONLINERUNNERIMAGENAME, "", "", nil); err != nil { + if err := sources.ImagesPullAndPush(builder.RUNNERIMAGENAME, builder.GetRunnerImage(""), "", "", nil); err != nil { logrus.Errorf("[getMainContainer] get runner image failed: %v", err) } } else { @@ -275,7 +370,7 @@ func createArgs(version *dbmodel.VersionInfo, envs []corev1.EnvVar) (args []stri return args } -//createEnv create service container env +// createEnv create service container env func createEnv(as *v1.AppService, dbmanager db.Manager, envVarSecrets []*corev1.Secret) ([]corev1.EnvVar, error) { var envs []corev1.EnvVar var envsAll []*dbmodel.TenantServiceEnvVar @@ -655,6 +750,28 @@ func getVolumes(dv *volume.Define, as *v1.AppService, dbmanager db.Manager) ([]c return volumes, nil } +func createVMResources(as *v1.AppService) kubevirtv1.ResourceRequirements { + var cpuRequest, cpuLimit int64 + if limit, ok := as.ExtensionSet["cpulimit"]; ok { + limitint, _ := strconv.Atoi(limit) + if limitint > 0 { + cpuLimit = int64(limitint) + } + } + if request, ok := as.ExtensionSet["cpurequest"]; ok { + requestint, _ := strconv.Atoi(request) + if requestint > 0 { + cpuRequest = int64(requestint) + } + } + if as.ContainerCPU > 0 && cpuRequest == 0 && cpuLimit == 0 { + cpuLimit = int64(as.ContainerCPU) + cpuRequest = int64(as.ContainerCPU) + } + _, res := createResourcesBySetting(as.ContainerMemory, cpuRequest, cpuLimit, int64(as.ContainerGPU), true) + return *res +} + func createResources(as *v1.AppService) corev1.ResourceRequirements { var cpuRequest, cpuLimit int64 if limit, ok := as.ExtensionSet["cpulimit"]; ok { @@ -673,8 +790,8 @@ func createResources(as *v1.AppService) corev1.ResourceRequirements { cpuLimit = int64(as.ContainerCPU) cpuRequest = int64(as.ContainerCPU) } - rr := createResourcesBySetting(as.ContainerMemory, cpuRequest, cpuLimit, int64(as.ContainerGPU)) - return rr + res, _ := createResourcesBySetting(as.ContainerMemory, cpuRequest, cpuLimit, int64(as.ContainerGPU), false) + return *res } func getGPULableKey() corev1.ResourceName { @@ -747,6 +864,29 @@ func createPorts(as *v1.AppService, dbmanager db.Manager) (ports []corev1.Contai } func createProbe(as *v1.AppService, dbmanager db.Manager, mode string) *corev1.Probe { + if mode == "liveness" { + var probe *corev1.Probe + probeAttribute, err := dbmanager.ComponentK8sAttributeDao().GetByComponentIDAndName(as.ServiceID, model.K8sAttributeNameLiveNessProbe) + if probeAttribute != nil && probeAttribute.AttributeValue != "" { + err = yaml.Unmarshal([]byte(probeAttribute.AttributeValue), probe) + if err != nil { + logrus.Errorf("create vm probe failure: %v", err) + return nil + } + return probe + } + } else { + var probe *corev1.Probe + probeAttribute, err := dbmanager.ComponentK8sAttributeDao().GetByComponentIDAndName(as.ServiceID, model.K8sAttributeNameReadinessProbe) + if probeAttribute != nil && probeAttribute.AttributeValue != "" { + err = yaml.Unmarshal([]byte(probeAttribute.AttributeValue), probe) + if err != nil { + logrus.Errorf("create vm probe failure: %v", err) + return nil + } + return probe + } + } probe, err := dbmanager.ServiceProbeDao().GetServiceUsedProbe(as.ServiceID, mode) if err == nil && probe != nil { if mode == "liveness" { @@ -806,6 +946,90 @@ func createProbe(as *v1.AppService, dbmanager db.Manager, mode string) *corev1.P return nil } +func createVMProbe(as *v1.AppService, dbmanager db.Manager, mode string) *kubevirtv1.Probe { + if mode == "liveness" { + var probe *kubevirtv1.Probe + probeAttribute, err := dbmanager.ComponentK8sAttributeDao().GetByComponentIDAndName(as.ServiceID, model.K8sAttributeNameLiveNessProbe) + if probeAttribute != nil && probeAttribute.AttributeValue != "" { + err = yaml.Unmarshal([]byte(probeAttribute.AttributeValue), probe) + if err != nil { + logrus.Errorf("create vm probe failure: %v", err) + return nil + } + return probe + } + } else { + var probe *kubevirtv1.Probe + probeAttribute, err := dbmanager.ComponentK8sAttributeDao().GetByComponentIDAndName(as.ServiceID, model.K8sAttributeNameReadinessProbe) + if probeAttribute != nil && probeAttribute.AttributeValue != "" { + err = yaml.Unmarshal([]byte(probeAttribute.AttributeValue), probe) + if err != nil { + logrus.Errorf("create vm probe failure: %v", err) + return nil + } + return probe + } + } + + probe, err := dbmanager.ServiceProbeDao().GetServiceUsedProbe(as.ServiceID, mode) + if err == nil && probe != nil { + if mode == "liveness" { + probe.SuccessThreshold = 1 + } + if mode == "readiness" && probe.FailureThreshold < 1 { + probe.FailureThreshold = 3 + } + p := &kubevirtv1.Probe{ + FailureThreshold: int32(probe.FailureThreshold), + SuccessThreshold: int32(probe.SuccessThreshold), + InitialDelaySeconds: int32(probe.InitialDelaySecond), + TimeoutSeconds: int32(probe.TimeoutSecond), + PeriodSeconds: int32(probe.PeriodSecond), + } + if probe.Scheme == "tcp" { + tcp := &corev1.TCPSocketAction{ + Port: intstr.FromInt(probe.Port), + } + p.TCPSocket = tcp + return p + } else if probe.Scheme == "http" { + action := corev1.HTTPGetAction{Path: probe.Path, Port: intstr.FromInt(probe.Port)} + if probe.HTTPHeader != "" { + hds := strings.Split(probe.HTTPHeader, ",") + var headers []corev1.HTTPHeader + for _, hd := range hds { + kv := strings.Split(hd, "=") + if len(kv) == 1 { + header := corev1.HTTPHeader{ + Name: kv[0], + Value: "", + } + headers = append(headers, header) + } else if len(kv) == 2 { + header := corev1.HTTPHeader{ + Name: kv[0], + Value: kv[1], + } + headers = append(headers, header) + } + } + action.HTTPHeaders = headers + } + p.HTTPGet = &action + return p + } else if probe.Scheme == "cmd" { + p.Exec = &corev1.ExecAction{Command: strings.Split(probe.Cmd, " ")} + return p + } + return nil + } + if err != nil { + logrus.Error("query probe error:", err.Error()) + } + //TODO:create default probe + return nil +} + func createNodeSelector(as *v1.AppService, dbmanager db.Manager) (map[string]string, error) { selector := make(map[string]string) labels, err := dbmanager.TenantServiceLabelDao().GetTenantServiceNodeSelectorLabel(as.ServiceID) diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index 43666b5cd..ad4fcac19 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -26,6 +26,7 @@ import ( batchv1beta1 "k8s.io/api/batch/v1beta1" betav1 "k8s.io/api/networking/v1beta1" utilversion "k8s.io/apimachinery/pkg/util/version" + "kubevirt.io/client-go/kubecli" "os" "strconv" "strings" @@ -77,7 +78,7 @@ var rc2RecordType = map[string]string{ "HorizontalPodAutoscaler": "hpa", } -//Storer app runtime store interface +// Storer app runtime store interface type Storer interface { Start() error Ready() bool @@ -135,8 +136,8 @@ type Event struct { Obj interface{} } -//appRuntimeStore app runtime store -//cache all kubernetes object and appservice +// appRuntimeStore app runtime store +// cache all kubernetes object and appservice type appRuntimeStore struct { kubeconfig *rest.Config clientset kubernetes.Interface @@ -160,16 +161,18 @@ type appRuntimeStore struct { volumeTypeListenerLock sync.Mutex resourceCache *ResourceCache k8sVersion *utilversion.Version + kubevirtCli kubecli.KubevirtClient } -//NewStore new app runtime store +// NewStore new app runtime store func NewStore( kubeconfig *rest.Config, clientset kubernetes.Interface, rainbondClient rainbondversioned.Interface, dbmanager db.Manager, conf option.Config, - k8sVersion *utilversion.Version) Storer { + k8sVersion *utilversion.Version, + kubevirtCli kubecli.KubevirtClient) Storer { ctx, cancel := context.WithCancel(context.Background()) store := &appRuntimeStore{ kubeconfig: kubeconfig, @@ -187,6 +190,7 @@ func NewStore( podUpdateListeners: make(map[string]chan<- *corev1.Pod, 1), volumeTypeListeners: make(map[string]chan<- *model.TenantServiceVolumeType, 1), k8sVersion: k8sVersion, + kubevirtCli: kubevirtCli, } crdClient, err := internalclientset.NewForConfig(kubeconfig) if err != nil { @@ -394,12 +398,12 @@ func (a *appRuntimeStore) Start() error { return nil } -//Ready if all kube informers is syncd, store is ready +// Ready if all kube informers is syncd, store is ready func (a *appRuntimeStore) Ready() bool { return a.informers.Ready() } -//checkReplicasetWhetherDelete if rs is old version,if it is old version and it always delete all pod. +// checkReplicasetWhetherDelete if rs is old version,if it is old version and it always delete all pod. // will delete it func (a *appRuntimeStore) checkReplicasetWhetherDelete(app *v1.AppService, rs *appsv1.ReplicaSet) { current := app.GetCurrentReplicaSet() @@ -761,7 +765,7 @@ func (a *appRuntimeStore) OnAdd(obj interface{}) { } } -//getAppService if creator is true, will create new app service where not found in store +// getAppService if creator is true, will create new app service where not found in store func (a *appRuntimeStore) getAppService(serviceID, version, createrID string, creator bool) (*v1.AppService, error) { var appservice *v1.AppService appservice = a.GetAppService(serviceID) @@ -837,6 +841,31 @@ func (a *appRuntimeStore) OnDeletes(objs ...interface{}) { } } } + if pod, ok := obj.(*corev1.Pod); ok { + if vmName, t := pod.Labels["kubevirt.io/domain"]; t { + serviceID := pod.Labels["service_id"] + version := pod.Labels["version"] + createrID := pod.Labels["creater_id"] + if serviceID != "" && version != "" && createrID != "" { + appservice, _ := a.getAppService(serviceID, version, createrID, false) + if appservice != nil { + vm, err := a.kubevirtCli.VirtualMachine(pod.Namespace).Get(context.Background(), vmName, &metav1.GetOptions{}) + if err != nil && !k8sErrors.IsNotFound(err) { + logrus.Errorf("get vm failure: %v", err) + return + } + if !k8sErrors.IsNotFound(err) { + appservice.DeleteVirtualMachine(vm) + if appservice.IsClosed() { + a.DeleteAppService(appservice) + } + return + } + return + } + } + } + } if deployment, ok := obj.(*appsv1.Deployment); ok { serviceID := deployment.Labels["service_id"] version := deployment.Labels["version"] @@ -1029,7 +1058,7 @@ func (a *appRuntimeStore) OnDeletes(objs ...interface{}) { } } -//RegistAppService regist a app model to store. +// RegistAppService regist a app model to store. func (a *appRuntimeStore) RegistAppService(app *v1.AppService) { a.appServices.Store(v1.GetCacheKeyOnlyServiceID(app.ServiceID), app) a.appCount++ @@ -1044,14 +1073,14 @@ func (a *appRuntimeStore) GetPod(namespace, name string) (*corev1.Pod, error) { return a.listers.Pod.Pods(namespace).Get(name) } -//DeleteAppService delete cache app service +// DeleteAppService delete cache app service func (a *appRuntimeStore) DeleteAppService(app *v1.AppService) { //a.appServices.Delete(v1.GetCacheKeyOnlyServiceID(app.ServiceID)) //a.appCount-- //logrus.Debugf("current have %d app after delete \n", a.appCount) } -//DeleteAppServiceByKey delete cache app service +// DeleteAppServiceByKey delete cache app service func (a *appRuntimeStore) DeleteAppServiceByKey(key v1.CacheKey) { a.appServices.Delete(key) a.appCount-- @@ -1092,6 +1121,15 @@ func (a *appRuntimeStore) UpdateGetAppService(serviceID string) *v1.AppService { appService.SetStatefulSet(stateful) } } + if vm := appService.GetVirtualMachine(); vm != nil { + vm, err := a.kubevirtCli.VirtualMachine(vm.Namespace).Get(context.Background(), vm.Name, &metav1.GetOptions{}) + if err != nil && k8sErrors.IsNotFound(err) { + appService.DeleteVirtualMachine(vm) + } + if vm != nil { + appService.SetVirtualMachine(vm) + } + } if deployment := appService.GetDeployment(); deployment != nil { deploy, err := a.listers.Deployment.Deployments(deployment.Namespace).Get(deployment.Name) if err != nil && k8sErrors.IsNotFound(err) { @@ -1384,7 +1422,7 @@ func (a *appRuntimeStore) HandleOperatorManagedStatefulSet(app *v1.OperatorManag return stsList } -//ExtractPodData processing pod data +// ExtractPodData processing pod data func ExtractPodData(pods []corev1.Pod, deployName string) (podList []*pb.ManagedPod, images []string) { for index, pod := range pods { if value, ok := pod.Labels["creator"]; ok && value == "rainbond" { @@ -1596,17 +1634,17 @@ func (a *appRuntimeStore) addAbnormalInfo(ai *v1.AbnormalInfo) { } } -//GetTenantResource get tenant resource +// GetTenantResource get tenant resource func (a *appRuntimeStore) GetTenantResource(tenantID string) TenantResource { return a.resourceCache.GetTenantResource(tenantID) } -//GetTenantResource get tenant resource +// GetTenantResource get tenant resource func (a *appRuntimeStore) GetTenantResourceList() []TenantResource { return a.resourceCache.GetAllTenantResource() } -//GetTenantRunningApp get running app by tenant +// GetTenantRunningApp get running app by tenant func (a *appRuntimeStore) GetTenantRunningApp(tenantID string) (list []*v1.AppService) { a.appServices.Range(func(k, v interface{}) bool { appService, _ := v.(*v1.AppService) @@ -1630,6 +1668,14 @@ func (a *appRuntimeStore) podEventHandler() cache.ResourceEventHandlerFuncs { a.conf.KubeClient.CoreV1().Pods(pod.Namespace).Delete(context.Background(), pod.Name, metav1.DeleteOptions{}) } if appservice != nil { + if vmName, t := pod.Labels["kubevirt.io/domain"]; t { + vm, err := a.kubevirtCli.VirtualMachine(pod.Namespace).Get(context.Background(), vmName, &metav1.GetOptions{}) + if err != nil { + logrus.Errorf("get vm failure: %v", err) + } + appservice.SetVirtualMachine(vm) + } + appservice.SetPods(pod) } } @@ -1658,6 +1704,13 @@ func (a *appRuntimeStore) podEventHandler() cache.ResourceEventHandlerFuncs { a.conf.KubeClient.CoreV1().Pods(pod.Namespace).Delete(context.Background(), pod.Name, metav1.DeleteOptions{}) } if appservice != nil { + if vmName, t := pod.Labels["kubevirt.io/domain"]; t { + vm, err := a.kubevirtCli.VirtualMachine(pod.Namespace).Get(context.Background(), vmName, &metav1.GetOptions{}) + if err != nil { + logrus.Errorf("get vm failure: %v", err) + } + appservice.SetVirtualMachine(vm) + } appservice.SetPods(pod) } } diff --git a/worker/appm/types/v1/status.go b/worker/appm/types/v1/status.go index 82124b5be..623fc5271 100644 --- a/worker/appm/types/v1/status.go +++ b/worker/appm/types/v1/status.go @@ -22,6 +22,7 @@ import ( "crypto/sha256" "encoding/json" "fmt" + v1 "kubevirt.io/api/core/v1" "time" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" @@ -32,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -//IsEmpty is empty +// IsEmpty is empty func (a *AppService) IsEmpty() bool { empty := len(a.pods) == 0 if !empty { @@ -47,7 +48,7 @@ func (a *AppService) IsEmpty() bool { return empty } -//IsClosed is closed +// IsClosed is closed func (a *AppService) IsClosed() bool { if a.IsCustomComponent() { return a.workload == nil @@ -66,6 +67,9 @@ func (a *AppService) IsClosed() bool { if a.IsEmpty() && a.deployment != nil && a.deployment.ResourceVersion == "" { return true } + if a.IsEmpty() && a.virtualmachine != nil && a.virtualmachine.ResourceVersion == "" { + return true + } } return false } @@ -95,6 +99,8 @@ var ( UNDEPLOY = "undeploy" //SUCCEEDED if job and cronjob is succeeded SUCCEEDED = "succeeded" + //PAUSED - + PAUSED = "paused" ) func conversionThirdComponent(obj runtime.Object) *v1alpha1.ThirdComponent { @@ -113,7 +119,7 @@ func conversionThirdComponent(obj runtime.Object) *v1alpha1.ThirdComponent { return nil } -//GetServiceStatus get service status +// GetServiceStatus get service status func (a *AppService) GetServiceStatus() string { if a.IsThirdComponent() { endpoints := a.GetEndpoints(false) @@ -160,6 +166,31 @@ func (a *AppService) GetServiceStatus() string { if a.IsClosed() { return CLOSED } + if a.virtualmachine != nil { + if a.virtualmachine.Status.PrintableStatus == v1.VirtualMachineStatusPaused { + return PAUSED + } + succeed := 0 + failed := 0 + for _, po := range a.pods { + if po.Status.Phase == "Succeeded" { + succeed++ + } + if po.Status.Phase == "Failed" { + failed++ + } + if po.Status.Phase == "Pending" { + failed++ + } + } + if len(a.pods) == succeed { + return SUCCEEDED + } + if failed > 0 { + return ABNORMAL + } + return RUNNING + } if a.job != nil { succeed := 0 failed := 0 @@ -282,7 +313,7 @@ func isHaveNormalTerminatedContainer(pods []*corev1.Pod) bool { return false } -//Ready Whether ready +// Ready Whether ready func (a *AppService) Ready() bool { if a.statefulset != nil { if a.statefulset.Status.ReadyReplicas >= int32(a.Replicas) { @@ -294,11 +325,16 @@ func (a *AppService) Ready() bool { return true } } + if a.virtualmachine != nil { + if a.virtualmachine.Status.Ready { + return true + } + } return false } -//IsWaitting service status is waitting -//init container init-probe is running +// IsWaitting service status is waitting +// init container init-probe is running func (a *AppService) IsWaitting() bool { var initcontainer []corev1.Container if a.statefulset != nil { @@ -336,7 +372,7 @@ func (a *AppService) IsWaitting() bool { return false } -//GetReadyReplicas get already ready pod number +// GetReadyReplicas get already ready pod number func (a *AppService) GetReadyReplicas() int32 { if a.statefulset != nil { return a.statefulset.Status.ReadyReplicas @@ -347,7 +383,7 @@ func (a *AppService) GetReadyReplicas() int32 { return 0 } -//GetRunningVersion get running version +// GetRunningVersion get running version func (a *AppService) GetRunningVersion() string { if a.statefulset != nil { return a.statefulset.Labels["version"] @@ -358,7 +394,7 @@ func (a *AppService) GetRunningVersion() string { return "" } -//UpgradeComlete upgrade comlete +// UpgradeComlete upgrade comlete func (a *AppService) UpgradeComlete() bool { for _, pod := range a.pods { if pod.Labels["version"] != a.DeployVersion { @@ -368,8 +404,8 @@ func (a *AppService) UpgradeComlete() bool { return a.Ready() } -//AbnormalInfo pod Abnormal info -//Record the container exception exit information in pod. +// AbnormalInfo pod Abnormal info +// Record the container exception exit information in pod. type AbnormalInfo struct { ServiceID string `json:"service_id"` TenantID string `json:"tenant_id"` @@ -382,7 +418,7 @@ type AbnormalInfo struct { Count int `json:"count"` } -//Hash get AbnormalInfo hash +// Hash get AbnormalInfo hash func (a AbnormalInfo) Hash() string { hash := sha256.New() hash.Write([]byte(a.ServiceID + a.ServiceAlias)) diff --git a/worker/appm/types/v1/v1.go b/worker/appm/types/v1/v1.go index 243760cf5..cfc7e35a6 100644 --- a/worker/appm/types/v1/v1.go +++ b/worker/appm/types/v1/v1.go @@ -20,6 +20,8 @@ package v1 import ( "fmt" + "github.com/goodrain/rainbond/event" + kubevirtv1 "kubevirt.io/api/core/v1" "os" "sigs.k8s.io/controller-runtime/pkg/client" "strconv" @@ -31,7 +33,6 @@ import ( "github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model" - "github.com/goodrain/rainbond/event" monitorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/sirupsen/logrus" v1 "k8s.io/api/apps/v1" @@ -64,37 +65,40 @@ type Event struct { IsInner bool } -//AppServiceStatus the status of service, calculate in real time from kubernetes +// AppServiceStatus the status of service, calculate in real time from kubernetes type AppServiceStatus string -//AppServiceType the deploy type of service. +// AppServiceType the deploy type of service. type AppServiceType string -//TypeStatefulSet statefulset +// TypeStatefulSet statefulset var TypeStatefulSet AppServiceType = "statefulset" -//TypeDeployment deployment +// TypeDeployment deployment var TypeDeployment AppServiceType = "deployment" -//TypeJob deployment +// TypeJob deployment var TypeJob AppServiceType = "job" -//TypeCronJob deployment +// TypeVirtualMachine vm +var TypeVirtualMachine AppServiceType = "virtualmachine" + +// TypeCronJob deployment var TypeCronJob AppServiceType = "cronjob" -//TypeReplicationController rc +// TypeReplicationController rc var TypeReplicationController AppServiceType = "replicationcontroller" -//TypeUpgradeMethod upgrade service method type +// TypeUpgradeMethod upgrade service method type type TypeUpgradeMethod string -//Rolling Start the new version before stoping the old version the rolling upgrade +// Rolling Start the new version before stoping the old version the rolling upgrade var Rolling TypeUpgradeMethod = "Rolling" -//OnDelete Stop the old version before starting the new version the upgrade +// OnDelete Stop the old version before starting the new version the upgrade var OnDelete TypeUpgradeMethod = "OnDelete" -//AppServiceBase app service base info +// AppServiceBase app service base info type AppServiceBase struct { TenantID string TenantName string @@ -123,7 +127,7 @@ type AppServiceBase struct { SharedStorageClass string } -//GetComponentDefinitionName get component definition name by component kind +// GetComponentDefinitionName get component definition name by component kind func (a AppServiceBase) GetComponentDefinitionName() string { if strings.HasPrefix(a.ServiceKind.String(), dbmodel.ServiceKindCustom.String()) { return strings.Replace(a.ServiceKind.String(), dbmodel.ServiceKindCustom.String(), "", 1) @@ -150,6 +154,10 @@ func (a AppServiceBase) IsThirdComponent() bool { return a.ServiceKind.String() == dbmodel.ServiceKindThirdParty.String() } +func (a AppServiceBase) ISVM() bool { + return string(a.ServiceType) == dbmodel.ServiceKindVirtualMachine.String() +} + // SetDiscoveryCfg - func (a *AppServiceBase) SetDiscoveryCfg(discoveryCfg *dbmodel.ThirdPartySvcDiscoveryCfg) { a.discoveryCfg = discoveryCfg @@ -160,7 +168,7 @@ func (a *AppServiceBase) GetK8sWorkloadName() string { return fmt.Sprintf("%s-%s", a.K8sApp, a.K8sComponentName) } -//OperatorManaged - +// OperatorManaged - type OperatorManaged struct { AppID string services []*corev1.Service @@ -168,12 +176,13 @@ type OperatorManaged struct { deployment []*v1.Deployment } -//AppService a service of rainbond app state in kubernetes +// AppService a service of rainbond app state in kubernetes type AppService struct { AppServiceBase tenant *corev1.Namespace statefulset *v1.StatefulSet deployment *v1.Deployment + virtualmachine *kubevirtv1.VirtualMachine job *batchv1.Job cronjob *batchv1.CronJob betaCronJob *batchv1beta1.CronJob @@ -210,30 +219,50 @@ type AppService struct { manifests []*unstructured.Unstructured } -//CacheKey app cache key +// CacheKey app cache key type CacheKey string -//Equal cache key serviceid and version and createID Equal +// Equal cache key serviceid and version and createID Equal func (c CacheKey) Equal(end CacheKey) bool { return string(c) == string(end) } -//GetCacheKeyOnlyServiceID get cache key only service id +// GetCacheKeyOnlyServiceID get cache key only service id func GetCacheKeyOnlyServiceID(serviceID string) CacheKey { return CacheKey(serviceID) } -//GetCacheKeyOnlyAppID get cache key only app id +// GetCacheKeyOnlyAppID get cache key only app id func GetCacheKeyOnlyAppID(appID string) CacheKey { return CacheKey(appID) } -//GetDeployment get kubernetes deployment model +func (a AppService) GetVirtualMachine() *kubevirtv1.VirtualMachine { + return a.virtualmachine +} + +// SetVirtualMachine set kubernetes vm model +func (a *AppService) SetVirtualMachine(vm *kubevirtv1.VirtualMachine) { + a.virtualmachine = vm + a.workload = vm + if v, ok := vm.Spec.Template.ObjectMeta.Labels["version"]; ok && v != "" { + a.DeployVersion = v + } + a.Replicas = 1 + a.calculateComponentMemoryRequest() +} + +// DeleteVirtualMachine delete kubernetes vm model +func (a *AppService) DeleteVirtualMachine(vm *kubevirtv1.VirtualMachine) { + a.virtualmachine = nil +} + +// GetDeployment get kubernetes deployment model func (a AppService) GetDeployment() *v1.Deployment { return a.deployment } -//SetDeployment set kubernetes deployment model +// SetDeployment set kubernetes deployment model func (a *AppService) SetDeployment(d *v1.Deployment) { a.deployment = d a.workload = d @@ -244,32 +273,32 @@ func (a *AppService) SetDeployment(d *v1.Deployment) { a.calculateComponentMemoryRequest() } -//DeleteDeployment delete kubernetes deployment model +// DeleteDeployment delete kubernetes deployment model func (a *AppService) DeleteDeployment(d *v1.Deployment) { a.deployment = nil } -//DeleteJob delete kubernetes job model +// DeleteJob delete kubernetes job model func (a *AppService) DeleteJob(d *batchv1.Job) { a.job = nil } -//DeleteCronJob delete kubernetes cronjob model +// DeleteCronJob delete kubernetes cronjob model func (a *AppService) DeleteCronJob(d *batchv1.CronJob) { a.cronjob = nil } -//DeleteBetaCronJob delete kubernetes cronjob model +// DeleteBetaCronJob delete kubernetes cronjob model func (a *AppService) DeleteBetaCronJob(d *batchv1beta1.CronJob) { a.betaCronJob = nil } -//GetStatefulSet get kubernetes statefulset model +// GetStatefulSet get kubernetes statefulset model func (a AppService) GetStatefulSet() *v1.StatefulSet { return a.statefulset } -//SetStatefulSet set kubernetes statefulset model +// SetStatefulSet set kubernetes statefulset model func (a *AppService) SetStatefulSet(d *v1.StatefulSet) { a.statefulset = d a.workload = d @@ -280,12 +309,12 @@ func (a *AppService) SetStatefulSet(d *v1.StatefulSet) { a.calculateComponentMemoryRequest() } -//GetJob get kubernetes job model +// GetJob get kubernetes job model func (a AppService) GetJob() *batchv1.Job { return a.job } -//SetJob set kubernetes job model +// SetJob set kubernetes job model func (a *AppService) SetJob(d *batchv1.Job) { a.job = d a.workload = d @@ -295,17 +324,17 @@ func (a *AppService) SetJob(d *batchv1.Job) { a.calculateComponentMemoryRequest() } -//GetCronJob get kubernetes cronjob model +// GetCronJob get kubernetes cronjob model func (a AppService) GetCronJob() *batchv1.CronJob { return a.cronjob } -//GetBetaCronJob get kubernetes cronjob model +// GetBetaCronJob get kubernetes cronjob model func (a AppService) GetBetaCronJob() *batchv1beta1.CronJob { return a.betaCronJob } -//SetCronJob set kubernetes cronjob model +// SetCronJob set kubernetes cronjob model func (a *AppService) SetCronJob(d *batchv1.CronJob) { a.cronjob = d a.workload = d @@ -325,7 +354,7 @@ func (a *AppService) SetBetaCronJob(d *batchv1beta1.CronJob) { a.calculateComponentMemoryRequest() } -//SetReplicaSets set kubernetes replicaset +// SetReplicaSets set kubernetes replicaset func (a *AppService) SetReplicaSets(d *v1.ReplicaSet) { if len(a.replicasets) > 0 { for i, replicaset := range a.replicasets { @@ -338,7 +367,7 @@ func (a *AppService) SetReplicaSets(d *v1.ReplicaSet) { a.replicasets = append(a.replicasets, d) } -//DeleteReplicaSet delete replicaset +// DeleteReplicaSet delete replicaset func (a *AppService) DeleteReplicaSet(d *v1.ReplicaSet) { for i, c := range a.replicasets { if c.GetName() == d.GetName() { @@ -348,7 +377,7 @@ func (a *AppService) DeleteReplicaSet(d *v1.ReplicaSet) { } } -//GetReplicaSets get replicaset +// GetReplicaSets get replicaset func (a *AppService) GetReplicaSets() []*v1.ReplicaSet { return a.replicasets } @@ -367,7 +396,7 @@ func (a *AppService) GetNewestReplicaSet() (newest *v1.ReplicaSet) { return } -//GetReplicaSetVersion get rs version +// GetReplicaSetVersion get rs version func GetReplicaSetVersion(rs *v1.ReplicaSet) int { if version, ok := rs.Annotations["deployment.kubernetes.io/revision"]; ok { v, _ := strconv.Atoi(version) @@ -376,7 +405,7 @@ func GetReplicaSetVersion(rs *v1.ReplicaSet) int { return 0 } -//GetCurrentReplicaSet get current replicaset +// GetCurrentReplicaSet get current replicaset func (a *AppService) GetCurrentReplicaSet() *v1.ReplicaSet { if a.deployment != nil { revision, ok := a.deployment.Annotations["deployment.kubernetes.io/revision"] @@ -391,12 +420,12 @@ func (a *AppService) GetCurrentReplicaSet() *v1.ReplicaSet { return nil } -//DeleteStatefulSet set kubernetes statefulset model +// DeleteStatefulSet set kubernetes statefulset model func (a *AppService) DeleteStatefulSet(d *v1.StatefulSet) { a.statefulset = nil } -//SetConfigMap set kubernetes configmap model +// SetConfigMap set kubernetes configmap model func (a *AppService) SetConfigMap(d *corev1.ConfigMap) { if len(a.configMaps) > 0 { for i, configMap := range a.configMaps { @@ -409,7 +438,7 @@ func (a *AppService) SetConfigMap(d *corev1.ConfigMap) { a.configMaps = append(a.configMaps, d) } -//GetConfigMaps get configmaps +// GetConfigMaps get configmaps func (a *AppService) GetConfigMaps() []*corev1.ConfigMap { if len(a.configMaps) > 0 { return a.configMaps @@ -417,7 +446,7 @@ func (a *AppService) GetConfigMaps() []*corev1.ConfigMap { return nil } -//DeleteConfigMaps delete configmaps +// DeleteConfigMaps delete configmaps func (a *AppService) DeleteConfigMaps(config *corev1.ConfigMap) { for i, c := range a.configMaps { if c.GetName() == config.GetName() { @@ -427,7 +456,7 @@ func (a *AppService) DeleteConfigMaps(config *corev1.ConfigMap) { } } -//SetService set kubernetes service model +// SetService set kubernetes service model func (a *AppService) SetService(d *corev1.Service) { if len(a.services) > 0 { for i, service := range a.services { @@ -445,7 +474,7 @@ func (a *AppService) SetServices(svcs []*corev1.Service) { a.services = svcs } -//GetServices get services +// GetServices get services func (a *AppService) GetServices(canCopy bool) []*corev1.Service { if canCopy { return append(a.services[:0:0], a.services...) @@ -453,12 +482,12 @@ func (a *AppService) GetServices(canCopy bool) []*corev1.Service { return a.services } -//GetDelServices returns services that need to be deleted. +// GetDelServices returns services that need to be deleted. func (a *AppService) GetDelServices() []*corev1.Service { return a.delServices } -//DeleteServices delete service +// DeleteServices delete service func (a *AppService) DeleteServices(service *corev1.Service) { for i, c := range a.services { if c.GetName() == service.GetName() { @@ -499,7 +528,7 @@ func (a *AppService) GetEndpointsByName(name string) *corev1.Endpoints { return nil } -//DelEndpoints deletes *corev1.Endpoints +// DelEndpoints deletes *corev1.Endpoints func (a *AppService) DelEndpoints(ep *corev1.Endpoints) { for i, c := range a.endpoints { if c.GetName() == ep.GetName() { @@ -509,7 +538,7 @@ func (a *AppService) DelEndpoints(ep *corev1.Endpoints) { } } -//GetIngress get ingress +// GetIngress get ingress func (a *AppService) GetIngress(canCopy bool) ([]*networkingv1.Ingress, []*betav1.Ingress) { if k8s.IsHighVersion() { if canCopy { @@ -528,12 +557,12 @@ func (a *AppService) GetIngress(canCopy bool) ([]*networkingv1.Ingress, []*betav } -//GetDelIngs gets delIngs which need to be deleted +// GetDelIngs gets delIngs which need to be deleted func (a *AppService) GetDelIngs() ([]*networkingv1.Ingress, []*betav1.Ingress) { return a.delIngs, a.delBetaIngresses } -//SetIngress set kubernetes ingress model +// SetIngress set kubernetes ingress model func (a *AppService) SetIngress(d interface{}) { nwkIngress, ok := d.(*networkingv1.Ingress) if ok { @@ -566,7 +595,7 @@ func (a *AppService) SetIngresses(i []*networkingv1.Ingress) { a.ingresses = i } -//DeleteIngress delete kubernetes ingress model +// DeleteIngress delete kubernetes ingress model func (a *AppService) DeleteIngress(d *networkingv1.Ingress) { for i, c := range a.ingresses { if c.GetName() == d.GetName() { @@ -576,7 +605,7 @@ func (a *AppService) DeleteIngress(d *networkingv1.Ingress) { } } -//DeleteBetaIngress delete kubernetes networking v1beta1 ingress model +// DeleteBetaIngress delete kubernetes networking v1beta1 ingress model func (a *AppService) DeleteBetaIngress(d *betav1.Ingress) { for i, c := range a.betaIngresses { if c.GetName() == d.GetName() { @@ -605,8 +634,8 @@ func (a *AppService) calculateComponentMemoryRequest() { a.podCPURequest = cpuRequest } -//SetPodTemplate set pod template spec -func (a *AppService) SetPodTemplate(d corev1.PodTemplateSpec, vct []corev1.PersistentVolumeClaim) { +// SetPodAndVMTemplate set pod and template spec +func (a *AppService) SetPodAndVMTemplate(d corev1.PodTemplateSpec, vmt kubevirtv1.VirtualMachineInstanceTemplateSpec, vct []corev1.PersistentVolumeClaim) { if a.statefulset != nil { a.statefulset.Spec.Template = d a.statefulset.Spec.VolumeClaimTemplates = append(a.statefulset.Spec.VolumeClaimTemplates, vct...) @@ -620,10 +649,13 @@ func (a *AppService) SetPodTemplate(d corev1.PodTemplateSpec, vct []corev1.Persi if a.cronjob != nil { a.cronjob.Spec.JobTemplate.Spec.Template = d } + if a.virtualmachine != nil { + a.virtualmachine.Spec.Template = &vmt + } a.calculateComponentMemoryRequest() } -//GetPodTemplate get pod template +// GetPodTemplate get pod template func (a *AppService) GetPodTemplate() *corev1.PodTemplateSpec { if a.statefulset != nil { return &a.statefulset.Spec.Template @@ -640,7 +672,7 @@ func (a *AppService) GetPodTemplate() *corev1.PodTemplateSpec { return nil } -//SetSecret set srcrets +// SetSecret set srcrets func (a *AppService) SetSecret(d *corev1.Secret) { if d == nil { return @@ -661,12 +693,12 @@ func (a *AppService) SetSecrets(s []*corev1.Secret) { a.secrets = s } -//SetAllSecrets sets secrets +// SetAllSecrets sets secrets func (a *AppService) SetAllSecrets(secrets []*corev1.Secret) { a.secrets = secrets } -//DeleteSecrets set secrets +// DeleteSecrets set secrets func (a *AppService) DeleteSecrets(d *corev1.Secret) { for i, c := range a.secrets { if c.GetName() == d.GetName() { @@ -676,7 +708,7 @@ func (a *AppService) DeleteSecrets(d *corev1.Secret) { } } -//GetSecrets get secrets +// GetSecrets get secrets func (a *AppService) GetSecrets(canCopy bool) []*corev1.Secret { if canCopy { return append(a.secrets[:0:0], a.secrets...) @@ -684,7 +716,7 @@ func (a *AppService) GetSecrets(canCopy bool) []*corev1.Secret { return a.secrets } -//GetDelSecrets get delSecrets which need to be deleted +// GetDelSecrets get delSecrets which need to be deleted func (a *AppService) GetDelSecrets() []*corev1.Secret { return a.delSecrets } @@ -702,7 +734,7 @@ func (a *AppService) GetEnvVarSecrets(canCopy bool) []*corev1.Secret { return a.envVarSecrets } -//SetPods set pod +// SetPods set pod func (a *AppService) SetPods(d *corev1.Pod) { if len(a.pods) > 0 { for i, pod := range a.pods { @@ -715,7 +747,7 @@ func (a *AppService) SetPods(d *corev1.Pod) { a.pods = append(a.pods, d) } -//DeletePods delete pod +// DeletePods delete pod func (a *AppService) DeletePods(d *corev1.Pod) { for i, c := range a.pods { if c.GetName() == d.GetName() { @@ -725,7 +757,7 @@ func (a *AppService) DeletePods(d *corev1.Pod) { } } -//GetPods get pods +// GetPods get pods func (a *AppService) GetPods(canCopy bool) []*corev1.Pod { if canCopy { return append(a.pods[:0:0], a.pods...) @@ -743,17 +775,17 @@ func (a *AppService) GetPodsByName(podname string) *corev1.Pod { return nil } -//SetTenant set tenant +// SetTenant set tenant func (a *AppService) SetTenant(d *corev1.Namespace) { a.tenant = d } -//GetTenant get tenant namespace +// GetTenant get tenant namespace func (a *AppService) GetTenant() *corev1.Namespace { return a.tenant } -//GetNamespace get tenant namespace name +// GetNamespace get tenant namespace name func (a *AppService) GetNamespace() string { return a.tenant.Name } @@ -968,7 +1000,7 @@ func (a *AppService) SetServiceMonitor(sm *monitorv1.ServiceMonitor) { a.serviceMonitor = append(a.serviceMonitor, sm) } -//DeleteServiceMonitor delete service monitor +// DeleteServiceMonitor delete service monitor func (a *AppService) DeleteServiceMonitor(sm *monitorv1.ServiceMonitor) { if len(a.serviceMonitor) == 0 { return @@ -1060,7 +1092,7 @@ func (a *AppService) DeleteStorageClass(sc *storagev1.StorageClass) { } } -//GetMemoryRequest get component memory request +// GetMemoryRequest get component memory request func (a *AppService) GetMemoryRequest() (res int64) { for _, pod := range a.pods { res += CalculatePodResource(pod).MemoryRequest / 1024 / 1024 @@ -1068,7 +1100,7 @@ func (a *AppService) GetMemoryRequest() (res int64) { return } -//GetCPURequest get component cpu request +// GetCPURequest get component cpu request func (a *AppService) GetCPURequest() (res int64) { for _, pod := range a.pods { res += CalculatePodResource(pod).CPURequest @@ -1076,27 +1108,27 @@ func (a *AppService) GetCPURequest() (res int64) { return } -//GetManifests get component custom manifest +// GetManifests get component custom manifest func (a *AppService) GetManifests() []*unstructured.Unstructured { return a.manifests } -//SetManifests get component custom manifest +// SetManifests get component custom manifest func (a *AppService) SetManifests(manifests []*unstructured.Unstructured) { a.manifests = manifests } -//SetWorkload set component workload +// SetWorkload set component workload func (a *AppService) SetWorkload(workload client.Object) { a.workload = workload } -//GetWorkload get component workload +// GetWorkload get component workload func (a *AppService) GetWorkload() client.Object { return a.workload } -//DeleteWorkload delete component workload +// DeleteWorkload delete component workload func (a *AppService) DeleteWorkload(workload runtime.Object) { a.workload = nil } @@ -1138,7 +1170,7 @@ func (a *AppService) String() string { ) } -//GetService - +// GetService - func (o *OperatorManaged) GetService() []*corev1.Service { if o.services != nil { return o.services @@ -1146,7 +1178,7 @@ func (o *OperatorManaged) GetService() []*corev1.Service { return []*corev1.Service{} } -//GetDeployment - +// GetDeployment - func (o *OperatorManaged) GetDeployment() []*v1.Deployment { if o.deployment != nil { return o.deployment @@ -1154,7 +1186,7 @@ func (o *OperatorManaged) GetDeployment() []*v1.Deployment { return []*v1.Deployment{} } -//GetStatefulSet - +// GetStatefulSet - func (o *OperatorManaged) GetStatefulSet() []*v1.StatefulSet { if o.statefulSet != nil { return o.statefulSet @@ -1162,7 +1194,7 @@ func (o *OperatorManaged) GetStatefulSet() []*v1.StatefulSet { return []*v1.StatefulSet{} } -//SetService - +// SetService - func (o *OperatorManaged) SetService(d *corev1.Service) { if len(o.services) > 0 { for i, service := range o.services { @@ -1176,7 +1208,7 @@ func (o *OperatorManaged) SetService(d *corev1.Service) { o.services = append(o.services, d) } -//SetStatefulSet - +// SetStatefulSet - func (o *OperatorManaged) SetStatefulSet(d *v1.StatefulSet) { if len(o.statefulSet) > 0 { for i, sts := range o.statefulSet { @@ -1190,7 +1222,7 @@ func (o *OperatorManaged) SetStatefulSet(d *v1.StatefulSet) { o.statefulSet = append(o.statefulSet, d) } -//SetDeployment - +// SetDeployment - func (o *OperatorManaged) SetDeployment(d *v1.Deployment) { if len(o.deployment) > 0 { for i, deploy := range o.deployment { @@ -1204,7 +1236,7 @@ func (o *OperatorManaged) SetDeployment(d *v1.Deployment) { o.deployment = append(o.deployment, d) } -//DeleteDeployment - +// DeleteDeployment - func (o *OperatorManaged) DeleteDeployment(d *v1.Deployment) { for i, old := range o.deployment { if old.GetName() == d.GetName() { @@ -1214,7 +1246,7 @@ func (o *OperatorManaged) DeleteDeployment(d *v1.Deployment) { } } -//DeleteService - +// DeleteService - func (o *OperatorManaged) DeleteService(d *corev1.Service) { for i, old := range o.services { if old.GetName() == d.GetName() { @@ -1224,7 +1256,7 @@ func (o *OperatorManaged) DeleteService(d *corev1.Service) { } } -//DeleteStatefulSet - +// DeleteStatefulSet - func (o *OperatorManaged) DeleteStatefulSet(d *v1.StatefulSet) { for i, old := range o.statefulSet { if old.GetName() == d.GetName() { @@ -1234,7 +1266,7 @@ func (o *OperatorManaged) DeleteStatefulSet(d *v1.StatefulSet) { } } -//TenantResource tenant resource statistical models +// TenantResource tenant resource statistical models type TenantResource struct { TenantID string `json:"tenant_id,omitempty"` CPURequest int64 `json:"cpu_request,omitempty"` @@ -1254,7 +1286,7 @@ type K8sResources struct { Ingresses []interface{} } -//GetTCPMeshImageName get tcp mesh image name +// GetTCPMeshImageName get tcp mesh image name func GetTCPMeshImageName() string { if d := os.Getenv("TCPMESH_DEFAULT_IMAGE_NAME"); d != "" { return d @@ -1262,7 +1294,7 @@ func GetTCPMeshImageName() string { return builder.REGISTRYDOMAIN + "/rbd-mesh-data-panel" } -//GetOnlineTCPMeshImageName get online tcp mesh image name +// GetOnlineTCPMeshImageName get online tcp mesh image name func GetOnlineTCPMeshImageName() string { if d := os.Getenv("TCPMESH_DEFAULT_IMAGE_NAME"); d != "" { return d @@ -1270,7 +1302,7 @@ func GetOnlineTCPMeshImageName() string { return builder.ONLINEREGISTRYDOMAIN + "/rbd-mesh-data-panel:" + builder.CIVERSION } -//GetProbeMeshImageName get probe init mesh image name +// GetProbeMeshImageName get probe init mesh image name func GetProbeMeshImageName() string { if d := os.Getenv("PROBE_MESH_IMAGE_NAME"); d != "" { return d @@ -1278,7 +1310,7 @@ func GetProbeMeshImageName() string { return builder.REGISTRYDOMAIN + "/rbd-init-probe" } -//GetOnlineProbeMeshImageName get online probe init mesh image name +// GetOnlineProbeMeshImageName get online probe init mesh image name func GetOnlineProbeMeshImageName() string { if d := os.Getenv("PROBE_MESH_IMAGE_NAME"); d != "" { return d @@ -1286,7 +1318,7 @@ func GetOnlineProbeMeshImageName() string { return builder.ONLINEREGISTRYDOMAIN + "/rbd-init-probe:" + builder.CIVERSION } -//CalculatePodResource calculate pod resource +// CalculatePodResource calculate pod resource func CalculatePodResource(pod *corev1.Pod) *PodResource { for _, con := range pod.Status.Conditions { if con.Type == corev1.PodScheduled && con.Status == corev1.ConditionFalse { @@ -1304,7 +1336,7 @@ func CalculatePodResource(pod *corev1.Pod) *PodResource { return &pr } -//PodResource resource struct +// PodResource resource struct type PodResource struct { MemoryRequest int64 MemoryLimit int64 diff --git a/worker/appm/volume/share-file.go b/worker/appm/volume/share-file.go index 2f6eed995..f49a45c14 100644 --- a/worker/appm/volume/share-file.go +++ b/worker/appm/volume/share-file.go @@ -23,6 +23,7 @@ import ( v1 "github.com/goodrain/rainbond/worker/appm/types/v1" "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" + kubevirtv1 "kubevirt.io/api/core/v1" "os" "path" "strings" @@ -57,6 +58,56 @@ func (v *ShareFileVolume) CreateVolume(define *Define) error { vo.PersistentVolumeClaim = &corev1.PersistentVolumeClaimVolumeSource{ClaimName: claim.GetName(), ReadOnly: volumeReadOnly} define.volumes = append(define.volumes, vo) v.generateVolumeSubPath(define, vm) + define.volumeMounts = append(define.volumeMounts, *vm) + } else if v.as.GetVirtualMachine() != nil { + labels := v.as.GetCommonLabels(map[string]string{ + "volume_name": volumeMountName, + "stateless": "", + }) + annotations := map[string]string{"volume_name": v.svm.VolumeName} + claim := newVolumeClaim(volumeMountName, path.Join(volumeMountPath, volumeMountName), v.svm.AccessMode, v1.RainbondStatefuleShareStorageClass, v.svm.VolumeCapacity, labels, annotations) + v.as.SetClaim(claim) + v.as.SetClaimManually(claim) + vo := kubevirtv1.Volume{ + Name: volumeMountName, + VolumeSource: kubevirtv1.VolumeSource{ + PersistentVolumeClaim: &kubevirtv1.PersistentVolumeClaimVolumeSource{ + PersistentVolumeClaimVolumeSource: corev1.PersistentVolumeClaimVolumeSource{ + ClaimName: claim.Name, + }, + Hotpluggable: false, + }, + }, + } + var dd kubevirtv1.DiskDevice + switch volumeMountPath { + case "/disk": + dd = kubevirtv1.DiskDevice{ + Disk: &kubevirtv1.DiskTarget{ + Bus: kubevirtv1.DiskBusSATA, + }, + } + case "/lun": + dd = kubevirtv1.DiskDevice{ + LUN: &kubevirtv1.LunTarget{ + Bus: kubevirtv1.DiskBusSATA, + }, + } + case "/cdrom": + dd = kubevirtv1.DiskDevice{ + CDRom: &kubevirtv1.CDRomTarget{ + Bus: kubevirtv1.DiskBusSATA, + }, + } + } + bootOrder := uint(len(define.vmDisk) + 1) + dk := kubevirtv1.Disk{ + BootOrder: &bootOrder, + DiskDevice: dd, + Name: volumeMountName, + } + define.vmDisk = append(define.vmDisk, dk) + define.vmVolume = append(define.vmVolume, vo) } else { for _, m := range define.volumeMounts { if m.MountPath == volumeMountPath { // TODO move to prepare @@ -82,8 +133,8 @@ func (v *ShareFileVolume) CreateVolume(define *Define) error { vo.PersistentVolumeClaim = &corev1.PersistentVolumeClaimVolumeSource{ClaimName: claim.GetName(), ReadOnly: volumeReadOnly} define.volumes = append(define.volumes, vo) v.generateVolumeSubPath(define, vm) + define.volumeMounts = append(define.volumeMounts, *vm) } - define.volumeMounts = append(define.volumeMounts, *vm) return nil } diff --git a/worker/appm/volume/volume.go b/worker/appm/volume/volume.go index 97490ada3..ac95fe4c2 100644 --- a/worker/appm/volume/volume.go +++ b/worker/appm/volume/volume.go @@ -20,6 +20,7 @@ package volume import ( "fmt" + kubevirtv1 "kubevirt.io/api/core/v1" "os" "path" "sort" @@ -73,6 +74,8 @@ func NewVolumeManager(as *v1.AppService, } case dbmodel.ConfigFileVolumeType.String(): v = &ConfigFileVolume{envs: envs, envVarSecrets: envVarSecrets} + case dbmodel.VMVolumeType.String(): + v = new(ShareFileVolume) case dbmodel.MemoryFSVolumeType.String(): v = new(MemoryFSVolume) case dbmodel.LocalVolumeType.String(): @@ -135,9 +138,9 @@ func newVolumeClaim(name, volumePath, accessMode, storageClassName string, capac } /* - RWO - ReadWriteOnce - ROX - ReadOnlyMany - RWX - ReadWriteMany +RWO - ReadWriteOnce +ROX - ReadOnlyMany +RWX - ReadWriteMany */ func parseAccessMode(accessMode string) corev1.PersistentVolumeAccessMode { accessMode = strings.ToUpper(accessMode) @@ -158,6 +161,8 @@ type Define struct { as *v1.AppService volumeMounts []corev1.VolumeMount volumes []corev1.Volume + vmVolume []kubevirtv1.Volume + vmDisk []kubevirtv1.Disk } // GetVolumes get define volumes @@ -165,6 +170,16 @@ func (v *Define) GetVolumes() []corev1.Volume { return v.volumes } +// GetVMVolume get define vm volumes +func (v *Define) GetVMVolume() []kubevirtv1.Volume { + return v.vmVolume +} + +// GetVMDisk get define vm devices +func (v *Define) GetVMDisk() []kubevirtv1.Disk { + return v.vmDisk +} + // GetVolumeMounts get define volume mounts func (v *Define) GetVolumeMounts() []corev1.VolumeMount { return v.volumeMounts @@ -335,7 +350,7 @@ func convertRulesToEnvs(as *v1.AppService, dbmanager db.Manager, ports []*dbmode return } -//RewriteHostPathInWindows rewrite host path +// RewriteHostPathInWindows rewrite host path func RewriteHostPathInWindows(hostPath string) string { localPath := os.Getenv("LOCAL_DATA_PATH") sharePath := os.Getenv("SHARE_DATA_PATH") @@ -350,7 +365,7 @@ func RewriteHostPathInWindows(hostPath string) string { return hostPath } -//RewriteContainerPathInWindows mount path in windows +// RewriteContainerPathInWindows mount path in windows func RewriteContainerPathInWindows(mountPath string) string { if mountPath == "" { return "" diff --git a/worker/master/controller/helmapp/suite_test.go b/worker/master/controller/helmapp/suite_test.go index 8f3479e3a..866665116 100644 --- a/worker/master/controller/helmapp/suite_test.go +++ b/worker/master/controller/helmapp/suite_test.go @@ -22,7 +22,6 @@ import ( "context" "os" "path/filepath" - "testing" "time" "github.com/goodrain/rainbond/util" @@ -35,7 +34,6 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" ) @@ -46,14 +44,6 @@ var rainbondClient versioned.Interface var testEnv *envtest.Environment var stopCh = make(chan struct{}) -func TestAPIs(t *testing.T) { - RegisterFailHandler(Fail) - - RunSpecsWithDefaultAndCustomReporters(t, - "HelmApp Controller Suite", - []Reporter{printer.NewlineReporter{}}) -} - var _ = BeforeSuite(func() { logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) diff --git a/worker/master/controller/thirdcomponent/controller.go b/worker/master/controller/thirdcomponent/controller.go index c8be10bff..1dac116fd 100644 --- a/worker/master/controller/thirdcomponent/controller.go +++ b/worker/master/controller/thirdcomponent/controller.go @@ -378,7 +378,7 @@ func createEndpoint(component *v1alpha1.ThirdComponent, service *corev1.Service, } // UpdateStatus updates ThirdComponent's Status with retry.RetryOnConflict -func (r *Reconciler) updateStatus(ctx context.Context, appd *v1alpha1.ThirdComponent, opts ...client.UpdateOption) error { +func (r *Reconciler) updateStatus(ctx context.Context, appd *v1alpha1.ThirdComponent, opts ...client.SubResourceUpdateOption) error { status := appd.DeepCopy().Status return retry.RetryOnConflict(retry.DefaultBackoff, func() (err error) { if err = r.Client.Get(ctx, client.ObjectKey{Namespace: appd.Namespace, Name: appd.Name}, appd); err != nil { diff --git a/worker/monitor/exporter.go b/worker/monitor/exporter.go index 492046036..97523ca27 100644 --- a/worker/monitor/exporter.go +++ b/worker/monitor/exporter.go @@ -31,11 +31,10 @@ import ( "github.com/goodrain/rainbond/worker/monitor/collector" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/prometheus/common/log" "github.com/sirupsen/logrus" ) -//ExporterManager app resource exporter +// ExporterManager app resource exporter type ExporterManager struct { ctx context.Context cancel context.CancelFunc @@ -45,7 +44,7 @@ type ExporterManager struct { controllermanager *controller.Manager } -//NewManager return *NewManager +// NewManager return *NewManager func NewManager(c option.Config, masterController *master.Controller, controllermanager *controller.Manager) *ExporterManager { ctx, cancel := context.WithCancel(context.Background()) return &ExporterManager{ @@ -70,7 +69,7 @@ func (t *ExporterManager) handler(w http.ResponseWriter, r *http.Request) { h.ServeHTTP(w, r) } -//Start 启动 +// Start 启动 func (t *ExporterManager) Start() error { http.HandleFunc(t.config.PrometheusMetricPath, t.handler) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { @@ -90,15 +89,15 @@ func (t *ExporterManager) Start() error { } httputil.ReturnSuccess(r, w, healthStatus) }) - log.Infoln("Listening on", t.config.Listen) + logrus.Infoln("Listening on", t.config.Listen) go func() { - log.Fatal(http.ListenAndServe(t.config.Listen, nil)) + logrus.Fatal(http.ListenAndServe(t.config.Listen, nil)) }() logrus.Info("start app resource exporter success.") return nil } -//Stop 停止 +// Stop 停止 func (t *ExporterManager) Stop() { t.cancel() } diff --git a/worker/util/pod.go b/worker/util/pod.go index 6e7c39db8..6d961c57f 100644 --- a/worker/util/pod.go +++ b/worker/util/pod.go @@ -2,6 +2,7 @@ package util import ( "fmt" + virtv1 "kubevirt.io/api/core/v1" "sort" "strings" @@ -29,15 +30,16 @@ var PodStatusAdviceUnhealthy PodStatusAdvice = "Unhealthy" var PodStatusAdviceInitiating PodStatusAdvice = "Initiating" var podStatusTbl = map[string]pb.PodStatus_Type{ - string(corev1.PodPending): pb.PodStatus_INITIATING, - string(corev1.PodRunning): pb.PodStatus_RUNNING, - string(corev1.PodSucceeded): pb.PodStatus_ABNORMAL, - string(corev1.PodFailed): pb.PodStatus_ABNORMAL, - string(corev1.PodUnknown): pb.PodStatus_UNKNOWN, - string(corev1.PodReady): pb.PodStatus_NOTREADY, - string(corev1.PodInitialized): pb.PodStatus_INITIATING, - string(corev1.PodScheduled): pb.PodStatus_SCHEDULING, - string(corev1.ContainersReady): pb.PodStatus_NOTREADY, + string(corev1.PodPending): pb.PodStatus_INITIATING, + string(corev1.PodRunning): pb.PodStatus_RUNNING, + string(corev1.PodSucceeded): pb.PodStatus_ABNORMAL, + string(corev1.PodFailed): pb.PodStatus_ABNORMAL, + string(corev1.PodUnknown): pb.PodStatus_UNKNOWN, + string(corev1.PodReady): pb.PodStatus_NOTREADY, + string(corev1.PodInitialized): pb.PodStatus_INITIATING, + string(corev1.PodScheduled): pb.PodStatus_SCHEDULING, + string(corev1.ContainersReady): pb.PodStatus_NOTREADY, + string(virtv1.VirtualMachineUnpaused): pb.PodStatus_RUNNING, } // DescribePodStatus - @@ -94,8 +96,8 @@ func DescribePodStatus(clientset kubernetes.Interface, pod *corev1.Pod, podStatu if cstatus.State.Terminated.Reason == "OOMKilled" { podStatus.Advice = PodStatusAdviceOOM.String() } - for _, OwnerReference := range pod.OwnerReferences{ - if OwnerReference.Kind == "Job"{ + for _, OwnerReference := range pod.OwnerReferences { + if OwnerReference.Kind == "Job" { if cstatus.State.Terminated.Reason == "Completed" { podStatus.Type = pb.PodStatus_SUCCEEDED }