From 50661123f1308c1fc3ad84032c1be1fc527fefec Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 14 Apr 2021 20:17:40 +0800 Subject: [PATCH 01/65] define helmapp.rainbond.goodrain.io --- Makefile | 30 +++- api/controller/application.go | 15 ++ api/handler/application_handler.go | 44 +++-- api/model/model.go | 11 ++ .../crd/rainbond.goodrdain.io_helmapps.yaml | 117 ++++++++++++ db/db.go | 1 + db/model/application.go | 7 +- db/mysql/dao_impl.go | 7 + go.mod | 1 + hack/k8s/codegen/README.md | 14 ++ hack/k8s/codegen/boilerplate.go.txt | 17 ++ hack/k8s/codegen/update-generated.sh | 13 ++ hack/k8s/codegen/verify-generated.sh | 14 ++ worker/api/v1alpha1/groupversion_info.go | 36 ++++ worker/api/v1alpha1/helmapp_types.go | 170 ++++++++++++++++++ worker/api/v1alpha1/zz_generated.deepcopy.go | 157 ++++++++++++++++ 16 files changed, 629 insertions(+), 25 deletions(-) create mode 100644 config/crd/rainbond.goodrdain.io_helmapps.yaml create mode 100644 hack/k8s/codegen/README.md create mode 100644 hack/k8s/codegen/boilerplate.go.txt create mode 100755 hack/k8s/codegen/update-generated.sh create mode 100755 hack/k8s/codegen/verify-generated.sh create mode 100644 worker/api/v1alpha1/groupversion_info.go create mode 100644 worker/api/v1alpha1/helmapp_types.go create mode 100644 worker/api/v1alpha1/zz_generated.deepcopy.go diff --git a/Makefile b/Makefile index 4de07ddb5..9788b551f 100644 --- a/Makefile +++ b/Makefile @@ -47,4 +47,32 @@ mock: help: ## this help @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) precommit: - ./precheck.sh \ No newline at end of file + ./precheck.sh + + +# Produce CRDs that work back to Kubernetes 1.11 (no version conversion) +CRD_OPTIONS ?= "crd:trivialVersions=true" +# Generate manifests e.g. CRD, RBAC etc. +manifests: controller-gen + $(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./worker/..." output:crd:artifacts:config=config/crd + +# Generate code +generate: controller-gen + $(CONTROLLER_GEN) object:headerFile="hack/k8s/codegen/boilerplate.go.txt" paths="./worker/api/..." + +# find or download controller-gen +# download controller-gen if necessary +controller-gen: +ifeq (, $(shell which controller-gen)) + @{ \ + set -e ;\ + CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ + cd $$CONTROLLER_GEN_TMP_DIR ;\ + go mod init tmp ;\ + go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5 ;\ + rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ + } +CONTROLLER_GEN=$(GOBIN)/controller-gen +else +CONTROLLER_GEN=$(shell which controller-gen) +endif \ No newline at end of file diff --git a/api/controller/application.go b/api/controller/application.go index 1f439855a..087da1adb 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -8,6 +8,7 @@ import ( "github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/middleware" "github.com/goodrain/rainbond/api/model" + "github.com/goodrain/rainbond/api/util/bcode" dbmodel "github.com/goodrain/rainbond/db/model" httputil "github.com/goodrain/rainbond/util/http" ) @@ -21,6 +22,20 @@ func (a *ApplicationController) CreateApp(w http.ResponseWriter, r *http.Request if !httputil.ValidatorRequestStructAndErrorResponse(r, w, &tenantReq, nil) { return } + if tenantReq.AppType == model.AppTypeHelm { + if tenantReq.AppStoreName == "" { + httputil.ReturnBcodeError(r, w, bcode.NewBadRequest("the field 'app_tore_name' is required")) + return + } + if tenantReq.HelmAppName == "" { + httputil.ReturnBcodeError(r, w, bcode.NewBadRequest("the field 'helm_app_name' is required")) + return + } + if tenantReq.Version == "" { + httputil.ReturnBcodeError(r, w, bcode.NewBadRequest("the field 'version' is required")) + return + } + } // get current tenant tenant := r.Context().Value(middleware.ContextKey("tenant")).(*dbmodel.Tenants) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 5fa1100f3..7b1d0ad28 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -14,6 +14,7 @@ import ( "github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/server/pb" + "github.com/jinzhu/gorm" "github.com/sirupsen/logrus" ) @@ -54,36 +55,33 @@ func NewApplicationHandler(statusCli *client.AppRuntimeSyncClient, promClient pr // CreateApp - func (a *ApplicationAction) CreateApp(req *model.Application) (*model.Application, error) { appReq := &dbmodel.Application{ - AppName: req.AppName, - AppID: util.NewUUID(), - TenantID: req.TenantID, + EID: req.EID, + TenantID: req.TenantID, + AppID: util.NewUUID(), + AppName: req.AppName, + AppType: req.AppType, + AppStoreName: req.AppStoreName, + HelmAppName: req.HelmAppName, + Version: req.Version, } req.AppID = appReq.AppID tx := db.GetManager().Begin() - defer func() { - if r := recover(); r != nil { - logrus.Errorf("Unexpected panic occurred, rollback transaction: %v", r) - tx.Rollback() + err := tx.Transaction(func(tx *gorm.DB) error { + if err := db.GetManager().ApplicationDaoTransactions(tx).AddModel(appReq); err != nil { + return err } - }() - - if err := db.GetManager().ApplicationDao().AddModel(appReq); err != nil { - tx.Rollback() - return nil, err - } - if len(req.ServiceIDs) != 0 { - if err := db.GetManager().TenantServiceDao().BindAppByServiceIDs(appReq.AppID, req.ServiceIDs); err != nil { - tx.Rollback() - return nil, err + if len(req.ServiceIDs) != 0 { + if err := db.GetManager().TenantServiceDaoTransactions(tx).BindAppByServiceIDs(appReq.AppID, req.ServiceIDs); err != nil { + return err + } } - } - if err := tx.Commit().Error; err != nil { - tx.Rollback() - return nil, err - } - return req, nil + // create app.rainbond.io + return nil + }) + + return req, err } // BatchCreateApp - diff --git a/api/model/model.go b/api/model/model.go index a46e5086b..9555e6aef 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -25,6 +25,12 @@ import ( dbmodel "github.com/goodrain/rainbond/db/model" ) +// AppType +const ( + AppTypeRainbond = "rainbond" + AppTypeHelm = "helm" +) + //ServiceGetCommon path参数 //swagger:parameters getVolumes getDepVolumes type ServiceGetCommon struct { @@ -1643,11 +1649,16 @@ func NewAppStatusFromImport(app *ImportAppStruct) *dbmodel.AppStatus { // Application - type Application struct { + EID string `json:"eid" validate:"required"` AppName string `json:"app_name" validate:"required"` + AppType string `json:"app_type" validate:"required,oneof=rainbond helm"` ConsoleAppID int64 `json:"console_app_id"` AppID string `json:"app_id"` TenantID string `json:"tenant_id"` ServiceIDs []string `json:"service_ids"` + AppStoreName string `json:"app_store_name"` + HelmAppName string `json:"helm_app_name"` + Version string `json:"version"` } // CreateAppRequest - diff --git a/config/crd/rainbond.goodrdain.io_helmapps.yaml b/config/crd/rainbond.goodrdain.io_helmapps.yaml new file mode 100644 index 000000000..72c8d5b32 --- /dev/null +++ b/config/crd/rainbond.goodrdain.io_helmapps.yaml @@ -0,0 +1,117 @@ + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.5 + creationTimestamp: null + name: helmapps.rainbond.goodrdain.io +spec: + group: rainbond.goodrdain.io + names: + kind: HelmApp + listKind: HelmAppList + plural: helmapps + singular: helmapp + scope: Namespaced + validation: + openAPIV3Schema: + description: HelmApp is the Schema for the helmapps API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: HelmAppSpec defines the desired state of HelmApp + properties: + appName: + description: 'The application name. TODO: validation' + type: string + preStatus: + description: The prerequisite status. + enum: + - NotConfigured + - Configured + type: string + revision: + description: The application revision. + format: int32 + type: integer + values: + description: The values.yaml of the helm app, encoded by base64. + type: string + version: + description: 'The application version. TODO: validation' + type: string + required: + - appName + - revision + - values + - version + type: object + status: + description: HelmAppStatus defines the observed state of HelmApp + properties: + conditions: + description: Current state of helm app. + items: + description: HelmAppCondition contains details for the current condition + of this helm application. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last + transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + status: + description: 'Status is the status of the condition. Can be True, + False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions' + type: string + type: + description: Type is the type of the condition. + type: string + required: + - status + - type + type: object + type: array + currentRevision: + type: string + currentValues: + type: string + status: + description: The status of helm app. + type: string + required: + - status + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/db/db.go b/db/db.go index 868992587..0bebed210 100644 --- a/db/db.go +++ b/db/db.go @@ -39,6 +39,7 @@ type Manager interface { LicenseDao() dao.LicenseDao AppDao() dao.AppDao ApplicationDao() dao.ApplicationDao + ApplicationDaoTransactions(db *gorm.DB) dao.ApplicationDao AppConfigGroupDao() dao.AppConfigGroupDao AppConfigGroupDaoTransactions(db *gorm.DB) dao.AppConfigGroupDao AppConfigGroupServiceDao() dao.AppConfigGroupServiceDao diff --git a/db/model/application.go b/db/model/application.go index d07b23d3c..7fbad2991 100644 --- a/db/model/application.go +++ b/db/model/application.go @@ -15,9 +15,14 @@ func IsGovernanceModeValid(governanceMode string) bool { // Application - type Application struct { Model + EID string `gorm:"column:eid" json:"eid"` + TenantID string `gorm:"column:tenant_id" json:"tenant_id"` AppName string `gorm:"column:app_name" json:"app_name"` AppID string `gorm:"column:app_id" json:"app_id"` - TenantID string `gorm:"column:tenant_id" json:"tenant_id"` + AppType string `gorm:"column:app_type;default:rainbond" json:"app_type"` + AppStoreName string `gorm:"column:app_store_name" json:"app_store_name"` + HelmAppName string `gorm:"column:helm_app_name" json:"helm_app_name"` + Version string `gorm:"column:Version" json:"Version"` GovernanceMode string `gorm:"column:governance_mode;default:'BUILD_IN_SERVICE_MESH'" json:"governance_mode"` } diff --git a/db/mysql/dao_impl.go b/db/mysql/dao_impl.go index 74bfc8c28..553ed406b 100644 --- a/db/mysql/dao_impl.go +++ b/db/mysql/dao_impl.go @@ -424,6 +424,13 @@ func (m *Manager) ApplicationDao() dao.ApplicationDao { } } +//ApplicationDaoTransactions - +func (m *Manager) ApplicationDaoTransactions(db *gorm.DB) dao.ApplicationDao { + return &mysqldao.ApplicationDaoImpl{ + DB: db, + } +} + // AppConfigGroupDao - func (m *Manager) AppConfigGroupDao() dao.AppConfigGroupDao { return &mysqldao.AppConfigGroupDaoImpl{ diff --git a/go.mod b/go.mod index d73f53841..ee83927d7 100644 --- a/go.mod +++ b/go.mod @@ -92,6 +92,7 @@ require ( k8s.io/client-go v12.0.0+incompatible k8s.io/ingress-nginx v0.0.0-20200903213136-333288e755c1 k8s.io/kubernetes v1.19.0 + sigs.k8s.io/controller-runtime v0.6.1-0.20200831170621-ab55aa710b06 ) // Pinned to kubernetes-1.16.2 diff --git a/hack/k8s/codegen/README.md b/hack/k8s/codegen/README.md new file mode 100644 index 000000000..170394123 --- /dev/null +++ b/hack/k8s/codegen/README.md @@ -0,0 +1,14 @@ +## How to use codegen + +```sh +./hack/k8s/codegen/update-generated.sh +``` + +It should print: + +``` +Generating deepcopy funcs +Generating clientset for etcd:v1beta2 at github.com/coreos/etcd-operator/pkg/generated/clientset +Generating listers for etcd:v1beta2 at github.com/coreos/etcd-operator/pkg/generated/listers +Generating informers for etcd:v1beta2 at github.com/coreos/etcd-operator/pkg/generated/informers +``` diff --git a/hack/k8s/codegen/boilerplate.go.txt b/hack/k8s/codegen/boilerplate.go.txt new file mode 100644 index 000000000..8749e10bf --- /dev/null +++ b/hack/k8s/codegen/boilerplate.go.txt @@ -0,0 +1,17 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . diff --git a/hack/k8s/codegen/update-generated.sh b/hack/k8s/codegen/update-generated.sh new file mode 100755 index 000000000..128e6edc0 --- /dev/null +++ b/hack/k8s/codegen/update-generated.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +vendor/k8s.io/code-generator/generate-groups.sh \ + "all" \ + "github.com/goodrain/rainbond-operator/pkg/generated" \ + "github.com/goodrain/rainbond-operator/pkg/apis" \ + "rainbond:v1alpha1" \ + --go-header-file "./hack/k8s/codegen/boilerplate.go.txt" \ + $@ diff --git a/hack/k8s/codegen/verify-generated.sh b/hack/k8s/codegen/verify-generated.sh new file mode 100755 index 000000000..2ae559f58 --- /dev/null +++ b/hack/k8s/codegen/verify-generated.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + + +if ! output=$(./hack/k8s/codegen/update-generated.sh --verify-only 2>&1); then + echo "FAILURE: verification of codegen failed:" + echo "${output}" + exit 1 +fi + +echo "Verified generated code ===" diff --git a/worker/api/v1alpha1/groupversion_info.go b/worker/api/v1alpha1/groupversion_info.go new file mode 100644 index 000000000..298c30113 --- /dev/null +++ b/worker/api/v1alpha1/groupversion_info.go @@ -0,0 +1,36 @@ +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1alpha1 contains API Schema definitions for the rainbond v1alpha1 API group +// +kubebuilder:object:generate=true +// +groupName=rainbond.goodrdain.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "rainbond.goodrdain.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/worker/api/v1alpha1/helmapp_types.go b/worker/api/v1alpha1/helmapp_types.go new file mode 100644 index 000000000..8ab1e2559 --- /dev/null +++ b/worker/api/v1alpha1/helmapp_types.go @@ -0,0 +1,170 @@ +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// The status of helm app +// Except for `not-configured`, the other statues are the native statues of helm. +type HelmAppStatusStatus string + +// The status of helm app +const ( + HelmAppStatusNotConfigured HelmAppStatusStatus = "not-configured" + + // HelmAppStatusunknown indicates that a release is in an uncertain state. + HelmAppStatusunknown HelmAppStatusStatus = "unknown" + + // HelmAppStatusDeployed indicates that the release has been pushed to Kubernetes. + HelmAppStatusDeployed HelmAppStatusStatus = "deployed" + + // HelmAppStatusUninstalled indicates that a release has been uninstalled from Kubernetes. + HelmAppStatusUninstalled HelmAppStatusStatus = "uninstalled" + + // HelmAppStatusSuperseded indicates that this release object is outdated and a newer one exists. + HelmAppStatusSuperseded HelmAppStatusStatus = "superseded" + + // HelmAppStatusFailed indicates that the release was not successfully deployed. + HelmAppStatusFailed HelmAppStatusStatus = "failed" + + // HelmAppStatusUninstalling indicates that a uninstall operation is underway. + HelmAppStatusUninstalling HelmAppStatusStatus = "uninstalling" + + // HelmAppStatusPendingInstall indicates that an install operation is underway. + HelmAppStatusPendingInstall HelmAppStatusStatus = "pending-install" + + // HelmAppStatusPendingUpgrade indicates that an upgrade operation is underway. + HelmAppStatusPendingUpgrade HelmAppStatusStatus = "pending-upgrade" + + // HelmAppStatusPendingRollback indicates that an rollback operation is underway. + HelmAppStatusPendingRollback HelmAppStatusStatus = "pending-rollback" +) + +// RbdComponentConditionType is a valid value for RbdComponentCondition.Type +type HelmAppConditionType string + +// These are valid conditions of helm app. +const ( + // HelmAppDetected indicates whether the helm app has been detected. + HelmAppDetected HelmAppConditionType = "Detected" + // HelmAppDetected indicates whether the helm app has been installed. + HelmAppInstalled HelmAppConditionType = "Installed" +) + +// HelmAppCondition contains details for the current condition of this helm application. +type HelmAppCondition struct { + // Type is the type of the condition. + Type HelmAppConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"` + // Status is the status of the condition. + // Can be True, False, Unknown. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` + // Last time the condition transitioned from one status to another. + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` + // Unique, one-word, CamelCase reason for the condition's last transition. + // +optional + Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` + // Human-readable message indicating details about last transition. + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` +} + +// HelmAppSpec defines the desired state of HelmApp +type HelmAppSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // The prerequisite status. + // +kubebuilder:validation:Enum=NotConfigured;Configured + PreStatus string `json:"preStatus,omitempty"` + + // The application name. + // TODO: validation + AppName string `json:"appName"` + + // The application version. + // TODO: validation + Version string `json:"version"` + + // The application revision. + Revision *int32 `json:"revision"` + + // The values.yaml of the helm app, encoded by base64. + Values string `json:"values"` +} + +// HelmAppStore represents a helm repo. +type HelmAppStore struct { + // The verision of the helm app store. + Version string `json:"version"` + + Name string `json:"name"` + + // The url of helm repo, sholud be a helm native repo url or a git url. + URL string `json:"url"` + + // The branch of a git repo. + Branch string `json:"branch,omitempty"` + + Username string `json:"username,omitempty"` + + Password string `json:"password,omitempty"` +} + +// HelmAppStatus defines the observed state of HelmApp +type HelmAppStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // The status of helm app. + Status HelmAppStatusStatus `json:"status"` + + // Current state of helm app. + Contidions []HelmAppCondition `json:"conditions,omitempty"` + + CurrentValues string `json:"currentValues,omitempty"` + + CurrentRevision string `json:"currentRevision,omitempty"` +} + +// +kubebuilder:object:root=true + +// HelmApp is the Schema for the helmapps API +type HelmApp struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec HelmAppSpec `json:"spec,omitempty"` + Status HelmAppStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// HelmAppList contains a list of HelmApp +type HelmAppList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []HelmApp `json:"items"` +} + +func init() { + SchemeBuilder.Register(&HelmApp{}, &HelmAppList{}) +} diff --git a/worker/api/v1alpha1/zz_generated.deepcopy.go b/worker/api/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..36b8d1a4c --- /dev/null +++ b/worker/api/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,157 @@ +// +build !ignore_autogenerated + +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmApp) DeepCopyInto(out *HelmApp) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmApp. +func (in *HelmApp) DeepCopy() *HelmApp { + if in == nil { + return nil + } + out := new(HelmApp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmApp) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmAppCondition) DeepCopyInto(out *HelmAppCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmAppCondition. +func (in *HelmAppCondition) DeepCopy() *HelmAppCondition { + if in == nil { + return nil + } + out := new(HelmAppCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmAppList) DeepCopyInto(out *HelmAppList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HelmApp, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmAppList. +func (in *HelmAppList) DeepCopy() *HelmAppList { + if in == nil { + return nil + } + out := new(HelmAppList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HelmAppList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmAppSpec) DeepCopyInto(out *HelmAppSpec) { + *out = *in + if in.Revision != nil { + in, out := &in.Revision, &out.Revision + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmAppSpec. +func (in *HelmAppSpec) DeepCopy() *HelmAppSpec { + if in == nil { + return nil + } + out := new(HelmAppSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmAppStatus) DeepCopyInto(out *HelmAppStatus) { + *out = *in + if in.Contidions != nil { + in, out := &in.Contidions, &out.Contidions + *out = make([]HelmAppCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmAppStatus. +func (in *HelmAppStatus) DeepCopy() *HelmAppStatus { + if in == nil { + return nil + } + out := new(HelmAppStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HelmAppStore) DeepCopyInto(out *HelmAppStore) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmAppStore. +func (in *HelmAppStore) DeepCopy() *HelmAppStore { + if in == nil { + return nil + } + out := new(HelmAppStore) + in.DeepCopyInto(out) + return out +} From 37f1f05aef7ef7791ed022f4fabf9bef17cb8f4e Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 15 Apr 2021 13:45:07 +0800 Subject: [PATCH 02/65] gen clientset, informers and listers --- Makefile | 2 +- go.mod | 1 + go.sum | 1 + hack/k8s/codegen/tools.go | 4 + hack/k8s/codegen/update-generated.sh | 4 +- pkg/apis/rainbond/group.go | 6 + pkg/apis/rainbond/v1alpha1/doc.go | 4 + .../apis/rainbond}/v1alpha1/helmapp_types.go | 5 +- pkg/apis/rainbond/v1alpha1/register.go | 26 +++ .../v1alpha1/zz_generated.deepcopy.go | 26 +-- .../clientset/versioned/clientset.go | 99 +++++++++ pkg/generated/clientset/versioned/doc.go | 22 ++ .../versioned/fake/clientset_generated.go | 84 ++++++++ pkg/generated/clientset/versioned/fake/doc.go | 22 ++ .../clientset/versioned/fake/register.go | 58 ++++++ .../clientset/versioned/scheme/doc.go | 22 ++ .../clientset/versioned/scheme/register.go | 58 ++++++ .../versioned/typed/rainbond/v1alpha1/doc.go | 22 ++ .../typed/rainbond/v1alpha1/fake/doc.go | 22 ++ .../rainbond/v1alpha1/fake/fake_helmapp.go | 142 +++++++++++++ .../v1alpha1/fake/fake_rainbond_client.go | 42 ++++ .../rainbond/v1alpha1/generated_expansion.go | 23 +++ .../typed/rainbond/v1alpha1/helmapp.go | 193 ++++++++++++++++++ .../rainbond/v1alpha1/rainbond_client.go | 91 +++++++++ .../informers/externalversions/factory.go | 182 +++++++++++++++++ .../informers/externalversions/generic.go | 64 ++++++ .../internalinterfaces/factory_interfaces.go | 42 ++++ .../externalversions/rainbond/interface.go | 48 +++++ .../rainbond/v1alpha1/helmapp.go | 91 +++++++++ .../rainbond/v1alpha1/interface.go | 47 +++++ .../rainbond/v1alpha1/expansion_generated.go | 29 +++ .../listers/rainbond/v1alpha1/helmapp.go | 96 +++++++++ worker/api/v1alpha1/groupversion_info.go | 36 ---- worker/controllers/helmapp/controller.go | 5 + 34 files changed, 1567 insertions(+), 52 deletions(-) create mode 100644 hack/k8s/codegen/tools.go create mode 100644 pkg/apis/rainbond/group.go create mode 100644 pkg/apis/rainbond/v1alpha1/doc.go rename {worker/api => pkg/apis/rainbond}/v1alpha1/helmapp_types.go (98%) create mode 100644 pkg/apis/rainbond/v1alpha1/register.go rename {worker/api => pkg/apis/rainbond}/v1alpha1/zz_generated.deepcopy.go (82%) create mode 100644 pkg/generated/clientset/versioned/clientset.go create mode 100644 pkg/generated/clientset/versioned/doc.go create mode 100644 pkg/generated/clientset/versioned/fake/clientset_generated.go create mode 100644 pkg/generated/clientset/versioned/fake/doc.go create mode 100644 pkg/generated/clientset/versioned/fake/register.go create mode 100644 pkg/generated/clientset/versioned/scheme/doc.go create mode 100644 pkg/generated/clientset/versioned/scheme/register.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/doc.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/doc.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go create mode 100644 pkg/generated/informers/externalversions/factory.go create mode 100644 pkg/generated/informers/externalversions/generic.go create mode 100644 pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go create mode 100644 pkg/generated/informers/externalversions/rainbond/interface.go create mode 100644 pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go create mode 100644 pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go create mode 100644 pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go create mode 100644 pkg/generated/listers/rainbond/v1alpha1/helmapp.go delete mode 100644 worker/api/v1alpha1/groupversion_info.go create mode 100644 worker/controllers/helmapp/controller.go diff --git a/Makefile b/Makefile index 9788b551f..191f36177 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ manifests: controller-gen # Generate code generate: controller-gen - $(CONTROLLER_GEN) object:headerFile="hack/k8s/codegen/boilerplate.go.txt" paths="./worker/api/..." + $(CONTROLLER_GEN) object:headerFile="hack/k8s/codegen/boilerplate.go.txt" paths="./pkg/apis/..." # find or download controller-gen # download controller-gen if necessary diff --git a/go.mod b/go.mod index ee83927d7..b9db4b753 100644 --- a/go.mod +++ b/go.mod @@ -90,6 +90,7 @@ require ( k8s.io/apimachinery v0.19.0 k8s.io/apiserver v0.19.0 k8s.io/client-go v12.0.0+incompatible + k8s.io/code-generator v0.19.0 k8s.io/ingress-nginx v0.0.0-20200903213136-333288e755c1 k8s.io/kubernetes v1.19.0 sigs.k8s.io/controller-runtime v0.6.1-0.20200831170621-ab55aa710b06 diff --git a/go.sum b/go.sum index dd3763071..40a0f35ac 100644 --- a/go.sum +++ b/go.sum @@ -2049,6 +2049,7 @@ k8s.io/client-go v0.17.0/go.mod h1:TYgR6EUHs6k45hb6KWjVD6jFZvJV4gHDikv/It0xz+k= k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458 h1:rP/89rnWN2l+2b7Jckg4VXi2dhgu7xs3S+1bKWKrqGE= k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458/go.mod h1:O5SO5xcgxrjJV9EC9R/47RuBpbk5YX9URDBlg++FA5o= k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42/go.mod h1:MzCL6kLExQuHruGaqibd8cugC8nw8QRxm3+lzR5l8SI= +k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 h1:NMYlxaF7rYQJk2E2IyrUhaX81zX24+dmoZdkPw0gJqI= k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY= k8s.io/component-base v0.0.0-20191016111319-039242c015a9 h1:2D+G/CCNVdYc0h9D+tX+0SmtcyQmby6uzNityrps1s0= k8s.io/component-base v0.0.0-20191016111319-039242c015a9/go.mod h1:SuWowIgd/dtU/m/iv8OD9eOxp3QZBBhTIiWMsBQvKjI= diff --git a/hack/k8s/codegen/tools.go b/hack/k8s/codegen/tools.go new file mode 100644 index 000000000..0321d220d --- /dev/null +++ b/hack/k8s/codegen/tools.go @@ -0,0 +1,4 @@ +// +build tools +package tools + +import _ "k8s.io/code-generator" \ No newline at end of file diff --git a/hack/k8s/codegen/update-generated.sh b/hack/k8s/codegen/update-generated.sh index 128e6edc0..8293b0928 100755 --- a/hack/k8s/codegen/update-generated.sh +++ b/hack/k8s/codegen/update-generated.sh @@ -6,8 +6,8 @@ set -o pipefail vendor/k8s.io/code-generator/generate-groups.sh \ "all" \ - "github.com/goodrain/rainbond-operator/pkg/generated" \ - "github.com/goodrain/rainbond-operator/pkg/apis" \ + "github.com/goodrain/rainbond/pkg/generated" \ + "github.com/goodrain/rainbond/pkg/apis" \ "rainbond:v1alpha1" \ --go-header-file "./hack/k8s/codegen/boilerplate.go.txt" \ $@ diff --git a/pkg/apis/rainbond/group.go b/pkg/apis/rainbond/group.go new file mode 100644 index 000000000..741c2ce37 --- /dev/null +++ b/pkg/apis/rainbond/group.go @@ -0,0 +1,6 @@ +// Package rainbond contains rainbond API versions. +// +// This file ensures Go source parsers acknowledge the rainbond package +// and any child packages. It can be removed if any other Go source files are +// added to this package. +package rainbond diff --git a/pkg/apis/rainbond/v1alpha1/doc.go b/pkg/apis/rainbond/v1alpha1/doc.go new file mode 100644 index 000000000..3381a25fe --- /dev/null +++ b/pkg/apis/rainbond/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Package v1alpha1 contains API Schema definitions for the rainbond v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=rainbond.goodrain.io +package v1alpha1 diff --git a/worker/api/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go similarity index 98% rename from worker/api/v1alpha1/helmapp_types.go rename to pkg/apis/rainbond/v1alpha1/helmapp_types.go index 8ab1e2559..0884216e5 100644 --- a/worker/api/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -145,9 +145,12 @@ type HelmAppStatus struct { CurrentRevision string `json:"currentRevision,omitempty"` } +// +genclient // +kubebuilder:object:root=true -// HelmApp is the Schema for the helmapps API +// HelmApp - +// +kubebuilder:subresource:status +// +kubebuilder:resource:path=helmapps,scope=Namespaced type HelmApp struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/pkg/apis/rainbond/v1alpha1/register.go b/pkg/apis/rainbond/v1alpha1/register.go new file mode 100644 index 000000000..c49dd3bcd --- /dev/null +++ b/pkg/apis/rainbond/v1alpha1/register.go @@ -0,0 +1,26 @@ +// NOTE: Boilerplate only. Ignore this file. + +// Package v1alpha1 contains API Schema definitions for the rainbond v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=rainbond.goodrain.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: "rainbond.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + // AddToScheme adds all registered types to s. + AddToScheme = SchemeBuilder.AddToScheme +) + +// Resource gets an EtcdCluster GroupResource for a specified resource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/worker/api/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go similarity index 82% rename from worker/api/v1alpha1/zz_generated.deepcopy.go rename to pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index 36b8d1a4c..21c1df628 100644 --- a/worker/api/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -1,20 +1,22 @@ // +build !ignore_autogenerated -/* +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// 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. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +// 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. - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Code generated by controller-gen. DO NOT EDIT. diff --git a/pkg/generated/clientset/versioned/clientset.go b/pkg/generated/clientset/versioned/clientset.go new file mode 100644 index 000000000..57eafd5a6 --- /dev/null +++ b/pkg/generated/clientset/versioned/clientset.go @@ -0,0 +1,99 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + RainbondV1alpha1() rainbondv1alpha1.RainbondV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + rainbondV1alpha1 *rainbondv1alpha1.RainbondV1alpha1Client +} + +// RainbondV1alpha1 retrieves the RainbondV1alpha1Client +func (c *Clientset) RainbondV1alpha1() rainbondv1alpha1.RainbondV1alpha1Interface { + return c.rainbondV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.rainbondV1alpha1, err = rainbondv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.rainbondV1alpha1 = rainbondv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.rainbondV1alpha1 = rainbondv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/pkg/generated/clientset/versioned/doc.go b/pkg/generated/clientset/versioned/doc.go new file mode 100644 index 000000000..334d68972 --- /dev/null +++ b/pkg/generated/clientset/versioned/doc.go @@ -0,0 +1,22 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/pkg/generated/clientset/versioned/fake/clientset_generated.go b/pkg/generated/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 000000000..9d8b81848 --- /dev/null +++ b/pkg/generated/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,84 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1" + fakerainbondv1alpha1 "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// RainbondV1alpha1 retrieves the RainbondV1alpha1Client +func (c *Clientset) RainbondV1alpha1() rainbondv1alpha1.RainbondV1alpha1Interface { + return &fakerainbondv1alpha1.FakeRainbondV1alpha1{Fake: &c.Fake} +} diff --git a/pkg/generated/clientset/versioned/fake/doc.go b/pkg/generated/clientset/versioned/fake/doc.go new file mode 100644 index 000000000..907759f32 --- /dev/null +++ b/pkg/generated/clientset/versioned/fake/doc.go @@ -0,0 +1,22 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/pkg/generated/clientset/versioned/fake/register.go b/pkg/generated/clientset/versioned/fake/register.go new file mode 100644 index 000000000..25ad0faa9 --- /dev/null +++ b/pkg/generated/clientset/versioned/fake/register.go @@ -0,0 +1,58 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) +var parameterCodec = runtime.NewParameterCodec(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + rainbondv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/pkg/generated/clientset/versioned/scheme/doc.go b/pkg/generated/clientset/versioned/scheme/doc.go new file mode 100644 index 000000000..0392755e2 --- /dev/null +++ b/pkg/generated/clientset/versioned/scheme/doc.go @@ -0,0 +1,22 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/pkg/generated/clientset/versioned/scheme/register.go b/pkg/generated/clientset/versioned/scheme/register.go new file mode 100644 index 000000000..79697de30 --- /dev/null +++ b/pkg/generated/clientset/versioned/scheme/register.go @@ -0,0 +1,58 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + rainbondv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/doc.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/doc.go new file mode 100644 index 000000000..a9692d234 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/doc.go @@ -0,0 +1,22 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/doc.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/doc.go new file mode 100644 index 000000000..07a9864cb --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/doc.go @@ -0,0 +1,22 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go new file mode 100644 index 000000000..2bfdb1bd0 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go @@ -0,0 +1,142 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeHelmApps implements HelmAppInterface +type FakeHelmApps struct { + Fake *FakeRainbondV1alpha1 + ns string +} + +var helmappsResource = schema.GroupVersionResource{Group: "rainbond.goodrain.io", Version: "v1alpha1", Resource: "helmapps"} + +var helmappsKind = schema.GroupVersionKind{Group: "rainbond.goodrain.io", Version: "v1alpha1", Kind: "HelmApp"} + +// Get takes name of the helmApp, and returns the corresponding helmApp object, and an error if there is any. +func (c *FakeHelmApps) Get(name string, options v1.GetOptions) (result *v1alpha1.HelmApp, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(helmappsResource, c.ns, name), &v1alpha1.HelmApp{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.HelmApp), err +} + +// List takes label and field selectors, and returns the list of HelmApps that match those selectors. +func (c *FakeHelmApps) List(opts v1.ListOptions) (result *v1alpha1.HelmAppList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(helmappsResource, helmappsKind, c.ns, opts), &v1alpha1.HelmAppList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.HelmAppList{ListMeta: obj.(*v1alpha1.HelmAppList).ListMeta} + for _, item := range obj.(*v1alpha1.HelmAppList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested helmApps. +func (c *FakeHelmApps) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(helmappsResource, c.ns, opts)) + +} + +// Create takes the representation of a helmApp and creates it. Returns the server's representation of the helmApp, and an error, if there is any. +func (c *FakeHelmApps) Create(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(helmappsResource, c.ns, helmApp), &v1alpha1.HelmApp{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.HelmApp), err +} + +// Update takes the representation of a helmApp and updates it. Returns the server's representation of the helmApp, and an error, if there is any. +func (c *FakeHelmApps) Update(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(helmappsResource, c.ns, helmApp), &v1alpha1.HelmApp{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.HelmApp), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeHelmApps) UpdateStatus(helmApp *v1alpha1.HelmApp) (*v1alpha1.HelmApp, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(helmappsResource, "status", c.ns, helmApp), &v1alpha1.HelmApp{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.HelmApp), err +} + +// Delete takes name of the helmApp and deletes it. Returns an error if one occurs. +func (c *FakeHelmApps) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(helmappsResource, c.ns, name), &v1alpha1.HelmApp{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeHelmApps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(helmappsResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.HelmAppList{}) + return err +} + +// Patch applies the patch and returns the patched helmApp. +func (c *FakeHelmApps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.HelmApp, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(helmappsResource, c.ns, name, pt, data, subresources...), &v1alpha1.HelmApp{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.HelmApp), err +} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go new file mode 100644 index 000000000..7d3ea3d11 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go @@ -0,0 +1,42 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeRainbondV1alpha1 struct { + *testing.Fake +} + +func (c *FakeRainbondV1alpha1) HelmApps(namespace string) v1alpha1.HelmAppInterface { + return &FakeHelmApps{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeRainbondV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go new file mode 100644 index 000000000..88c8434e4 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go @@ -0,0 +1,23 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type HelmAppExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go new file mode 100644 index 000000000..17b5ab5ee --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go @@ -0,0 +1,193 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "time" + + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + scheme "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// HelmAppsGetter has a method to return a HelmAppInterface. +// A group's client should implement this interface. +type HelmAppsGetter interface { + HelmApps(namespace string) HelmAppInterface +} + +// HelmAppInterface has methods to work with HelmApp resources. +type HelmAppInterface interface { + Create(*v1alpha1.HelmApp) (*v1alpha1.HelmApp, error) + Update(*v1alpha1.HelmApp) (*v1alpha1.HelmApp, error) + UpdateStatus(*v1alpha1.HelmApp) (*v1alpha1.HelmApp, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.HelmApp, error) + List(opts v1.ListOptions) (*v1alpha1.HelmAppList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.HelmApp, err error) + HelmAppExpansion +} + +// helmApps implements HelmAppInterface +type helmApps struct { + client rest.Interface + ns string +} + +// newHelmApps returns a HelmApps +func newHelmApps(c *RainbondV1alpha1Client, namespace string) *helmApps { + return &helmApps{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the helmApp, and returns the corresponding helmApp object, and an error if there is any. +func (c *helmApps) Get(name string, options v1.GetOptions) (result *v1alpha1.HelmApp, err error) { + result = &v1alpha1.HelmApp{} + err = c.client.Get(). + Namespace(c.ns). + Resource("helmapps"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of HelmApps that match those selectors. +func (c *helmApps) List(opts v1.ListOptions) (result *v1alpha1.HelmAppList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.HelmAppList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("helmapps"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested helmApps. +func (c *helmApps) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("helmapps"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a helmApp and creates it. Returns the server's representation of the helmApp, and an error, if there is any. +func (c *helmApps) Create(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { + result = &v1alpha1.HelmApp{} + err = c.client.Post(). + Namespace(c.ns). + Resource("helmapps"). + Body(helmApp). + Do(). + Into(result) + return +} + +// Update takes the representation of a helmApp and updates it. Returns the server's representation of the helmApp, and an error, if there is any. +func (c *helmApps) Update(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { + result = &v1alpha1.HelmApp{} + err = c.client.Put(). + Namespace(c.ns). + Resource("helmapps"). + Name(helmApp.Name). + Body(helmApp). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *helmApps) UpdateStatus(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { + result = &v1alpha1.HelmApp{} + err = c.client.Put(). + Namespace(c.ns). + Resource("helmapps"). + Name(helmApp.Name). + SubResource("status"). + Body(helmApp). + Do(). + Into(result) + return +} + +// Delete takes name of the helmApp and deletes it. Returns an error if one occurs. +func (c *helmApps) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("helmapps"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *helmApps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("helmapps"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched helmApp. +func (c *helmApps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.HelmApp, err error) { + result = &v1alpha1.HelmApp{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("helmapps"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go new file mode 100644 index 000000000..329afb473 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go @@ -0,0 +1,91 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type RainbondV1alpha1Interface interface { + RESTClient() rest.Interface + HelmAppsGetter +} + +// RainbondV1alpha1Client is used to interact with features provided by the rainbond.goodrain.io group. +type RainbondV1alpha1Client struct { + restClient rest.Interface +} + +func (c *RainbondV1alpha1Client) HelmApps(namespace string) HelmAppInterface { + return newHelmApps(c, namespace) +} + +// NewForConfig creates a new RainbondV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*RainbondV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &RainbondV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new RainbondV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *RainbondV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new RainbondV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *RainbondV1alpha1Client { + return &RainbondV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *RainbondV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/generated/informers/externalversions/factory.go b/pkg/generated/informers/externalversions/factory.go new file mode 100644 index 000000000..0d3893afa --- /dev/null +++ b/pkg/generated/informers/externalversions/factory.go @@ -0,0 +1,182 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + reflect "reflect" + sync "sync" + time "time" + + versioned "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + internalinterfaces "github.com/goodrain/rainbond/pkg/generated/informers/externalversions/internalinterfaces" + rainbond "github.com/goodrain/rainbond/pkg/generated/informers/externalversions/rainbond" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + +type sharedInformerFactory struct { + client versioned.Interface + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc + lock sync.Mutex + defaultResync time.Duration + customResync map[reflect.Type]time.Duration + + informers map[reflect.Type]cache.SharedIndexInformer + // startedInformers is used for tracking which informers have been started. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. +func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync) +} + +// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. +// Listers obtained via this SharedInformerFactory will be subject to the same filters +// as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead +func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ + client: client, + namespace: v1.NamespaceAll, + defaultResync: defaultResync, + informers: make(map[reflect.Type]cache.SharedIndexInformer), + startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) + } + + return factory +} + +// Start initializes all requested informers. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + Rainbond() rainbond.Interface +} + +func (f *sharedInformerFactory) Rainbond() rainbond.Interface { + return rainbond.New(f, f.namespace, f.tweakListOptions) +} diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go new file mode 100644 index 000000000..0891b2693 --- /dev/null +++ b/pkg/generated/informers/externalversions/generic.go @@ -0,0 +1,64 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + "fmt" + + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=rainbond.goodrain.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("helmapps"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rainbond().V1alpha1().HelmApps().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go new file mode 100644 index 000000000..681652c8e --- /dev/null +++ b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -0,0 +1,42 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by informer-gen. DO NOT EDIT. + +package internalinterfaces + +import ( + time "time" + + versioned "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" +) + +// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. +type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +// TweakListOptionsFunc is a function that transforms a v1.ListOptions. +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/pkg/generated/informers/externalversions/rainbond/interface.go b/pkg/generated/informers/externalversions/rainbond/interface.go new file mode 100644 index 000000000..6c11b25e9 --- /dev/null +++ b/pkg/generated/informers/externalversions/rainbond/interface.go @@ -0,0 +1,48 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by informer-gen. DO NOT EDIT. + +package rainbond + +import ( + internalinterfaces "github.com/goodrain/rainbond/pkg/generated/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/goodrain/rainbond/pkg/generated/informers/externalversions/rainbond/v1alpha1" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go b/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go new file mode 100644 index 000000000..2431e9972 --- /dev/null +++ b/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go @@ -0,0 +1,91 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + time "time" + + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + versioned "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + internalinterfaces "github.com/goodrain/rainbond/pkg/generated/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/goodrain/rainbond/pkg/generated/listers/rainbond/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// HelmAppInformer provides access to a shared informer and lister for +// HelmApps. +type HelmAppInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.HelmAppLister +} + +type helmAppInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewHelmAppInformer constructs a new informer for HelmApp type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewHelmAppInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredHelmAppInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredHelmAppInformer constructs a new informer for HelmApp type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredHelmAppInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.RainbondV1alpha1().HelmApps(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.RainbondV1alpha1().HelmApps(namespace).Watch(options) + }, + }, + &rainbondv1alpha1.HelmApp{}, + resyncPeriod, + indexers, + ) +} + +func (f *helmAppInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredHelmAppInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *helmAppInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rainbondv1alpha1.HelmApp{}, f.defaultInformer) +} + +func (f *helmAppInformer) Lister() v1alpha1.HelmAppLister { + return v1alpha1.NewHelmAppLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go b/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go new file mode 100644 index 000000000..03525a051 --- /dev/null +++ b/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go @@ -0,0 +1,47 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/goodrain/rainbond/pkg/generated/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // HelmApps returns a HelmAppInformer. + HelmApps() HelmAppInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// HelmApps returns a HelmAppInformer. +func (v *version) HelmApps() HelmAppInformer { + return &helmAppInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go b/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go new file mode 100644 index 000000000..2fc93d2b9 --- /dev/null +++ b/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go @@ -0,0 +1,29 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// HelmAppListerExpansion allows custom methods to be added to +// HelmAppLister. +type HelmAppListerExpansion interface{} + +// HelmAppNamespaceListerExpansion allows custom methods to be added to +// HelmAppNamespaceLister. +type HelmAppNamespaceListerExpansion interface{} diff --git a/pkg/generated/listers/rainbond/v1alpha1/helmapp.go b/pkg/generated/listers/rainbond/v1alpha1/helmapp.go new file mode 100644 index 000000000..eeafa56bd --- /dev/null +++ b/pkg/generated/listers/rainbond/v1alpha1/helmapp.go @@ -0,0 +1,96 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2020 Goodrain Co., Ltd. + +// 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 . + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// HelmAppLister helps list HelmApps. +type HelmAppLister interface { + // List lists all HelmApps in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.HelmApp, err error) + // HelmApps returns an object that can list and get HelmApps. + HelmApps(namespace string) HelmAppNamespaceLister + HelmAppListerExpansion +} + +// helmAppLister implements the HelmAppLister interface. +type helmAppLister struct { + indexer cache.Indexer +} + +// NewHelmAppLister returns a new HelmAppLister. +func NewHelmAppLister(indexer cache.Indexer) HelmAppLister { + return &helmAppLister{indexer: indexer} +} + +// List lists all HelmApps in the indexer. +func (s *helmAppLister) List(selector labels.Selector) (ret []*v1alpha1.HelmApp, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.HelmApp)) + }) + return ret, err +} + +// HelmApps returns an object that can list and get HelmApps. +func (s *helmAppLister) HelmApps(namespace string) HelmAppNamespaceLister { + return helmAppNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// HelmAppNamespaceLister helps list and get HelmApps. +type HelmAppNamespaceLister interface { + // List lists all HelmApps in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.HelmApp, err error) + // Get retrieves the HelmApp from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.HelmApp, error) + HelmAppNamespaceListerExpansion +} + +// helmAppNamespaceLister implements the HelmAppNamespaceLister +// interface. +type helmAppNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all HelmApps in the indexer for a given namespace. +func (s helmAppNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.HelmApp, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.HelmApp)) + }) + return ret, err +} + +// Get retrieves the HelmApp from the indexer for a given namespace and name. +func (s helmAppNamespaceLister) Get(name string) (*v1alpha1.HelmApp, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("helmapp"), name) + } + return obj.(*v1alpha1.HelmApp), nil +} diff --git a/worker/api/v1alpha1/groupversion_info.go b/worker/api/v1alpha1/groupversion_info.go deleted file mode 100644 index 298c30113..000000000 --- a/worker/api/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,36 +0,0 @@ -/* - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha1 contains API Schema definitions for the rainbond v1alpha1 API group -// +kubebuilder:object:generate=true -// +groupName=rainbond.goodrdain.io -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "rainbond.goodrdain.io", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go new file mode 100644 index 000000000..6349fda8d --- /dev/null +++ b/worker/controllers/helmapp/controller.go @@ -0,0 +1,5 @@ +package helmapp + +// Controller - +type Controller struct { +} From a303e86dffa1d6481489c8ed1861be190fb2354c Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 15 Apr 2021 15:58:50 +0800 Subject: [PATCH 03/65] make control loop work --- Makefile | 3 +- ...aml => rainbond.goodrain.io_helmapps.yaml} | 8 +- pkg/apis/rainbond/v1alpha1/register.go | 2 +- util/k8s/k8s.go | 16 ++-- worker/controllers/helmapp/controller.go | 34 ++++++++ worker/controllers/helmapp/controlloop.go | 68 ++++++++++++++++ worker/controllers/helmapp/informer.go | 79 +++++++++++++++++++ 7 files changed, 194 insertions(+), 16 deletions(-) rename config/crd/{rainbond.goodrdain.io_helmapps.yaml => rainbond.goodrain.io_helmapps.yaml} (96%) create mode 100644 worker/controllers/helmapp/controlloop.go create mode 100644 worker/controllers/helmapp/informer.go diff --git a/Makefile b/Makefile index 191f36177..c36bff769 100644 --- a/Makefile +++ b/Makefile @@ -54,10 +54,11 @@ precommit: CRD_OPTIONS ?= "crd:trivialVersions=true" # Generate manifests e.g. CRD, RBAC etc. manifests: controller-gen - $(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./worker/..." output:crd:artifacts:config=config/crd + $(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./pkg/apis/..." output:crd:artifacts:config=config/crd # Generate code generate: controller-gen + ./hack/k8s/codegen/update-generated.sh $(CONTROLLER_GEN) object:headerFile="hack/k8s/codegen/boilerplate.go.txt" paths="./pkg/apis/..." # find or download controller-gen diff --git a/config/crd/rainbond.goodrdain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml similarity index 96% rename from config/crd/rainbond.goodrdain.io_helmapps.yaml rename to config/crd/rainbond.goodrain.io_helmapps.yaml index 72c8d5b32..bc1459ee4 100644 --- a/config/crd/rainbond.goodrdain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -6,18 +6,20 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.2.5 creationTimestamp: null - name: helmapps.rainbond.goodrdain.io + name: helmapps.rainbond.goodrain.io spec: - group: rainbond.goodrdain.io + group: rainbond.goodrain.io names: kind: HelmApp listKind: HelmAppList plural: helmapps singular: helmapp scope: Namespaced + subresources: + status: {} validation: openAPIV3Schema: - description: HelmApp is the Schema for the helmapps API + description: HelmApp - properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation diff --git a/pkg/apis/rainbond/v1alpha1/register.go b/pkg/apis/rainbond/v1alpha1/register.go index c49dd3bcd..4a4593c09 100644 --- a/pkg/apis/rainbond/v1alpha1/register.go +++ b/pkg/apis/rainbond/v1alpha1/register.go @@ -12,7 +12,7 @@ import ( var ( // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: "rainbond.io", Version: "v1alpha1"} + SchemeGroupVersion = schema.GroupVersion{Group: "rainbond.goodrain.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} diff --git a/util/k8s/k8s.go b/util/k8s/k8s.go index e804d1efb..4b509ba72 100644 --- a/util/k8s/k8s.go +++ b/util/k8s/k8s.go @@ -3,7 +3,6 @@ package k8s import ( "net" "os" - "time" rainbondv1alpha1 "github.com/goodrain/rainbond-operator/pkg/apis/rainbond/v1alpha1" "github.com/sirupsen/logrus" @@ -11,7 +10,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" @@ -82,15 +80,6 @@ func InClusterConfig() (*rest.Config, error) { return cfg, nil } -// NewRainbondFilteredSharedInformerFactory - -func NewRainbondFilteredSharedInformerFactory(clientset kubernetes.Interface) informers.SharedInformerFactory { - return informers.NewFilteredSharedInformerFactory( - clientset, 30*time.Second, corev1.NamespaceAll, func(options *metav1.ListOptions) { - options.LabelSelector = "creator=Rainbond" - }, - ) -} - // ExtractLabels extracts the service information from the labels func ExtractLabels(labels map[string]string) (string, string, string, string) { if labels == nil { @@ -116,3 +105,8 @@ func DefListEventsByPod(clientset kubernetes.Interface, pod *corev1.Pod) *corev1 events, _ := clientset.CoreV1().Events(pod.GetNamespace()).Search(scheme.Scheme, ref) return events } + +// ObjKey returns the key of the given object. +func ObjKey(obj metav1.Object) string { + return obj.GetName() + "/" + obj.GetNamespace() +} diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index 6349fda8d..3f2865736 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -1,5 +1,39 @@ package helmapp +import ( + "time" + + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "k8s.io/client-go/rest" + "k8s.io/client-go/util/workqueue" +) + // Controller - type Controller struct { + clientset versioned.Interface + storer Storer + stopCh chan struct{} + controlLoop *ControlLoop +} + +func NewController(stopCh chan struct{}, restcfg *rest.Config, resyncPeriod time.Duration) *Controller { + queue := workqueue.New() + clientset := versioned.NewForConfigOrDie(restcfg) + storer := NewStorer(clientset, resyncPeriod, queue) + + controlLoop := NewControlLoop(storer, queue) + + return &Controller{ + storer: storer, + stopCh: stopCh, + controlLoop: controlLoop, + } +} + +func (c *Controller) Start() error { + go c.storer.Run(c.stopCh) + + c.controlLoop.Run() + + return nil } diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go new file mode 100644 index 000000000..181edaa4f --- /dev/null +++ b/worker/controllers/helmapp/controlloop.go @@ -0,0 +1,68 @@ +package helmapp + +import ( + "strings" + + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + k8sutil "github.com/goodrain/rainbond/util/k8s" + "github.com/sirupsen/logrus" + "k8s.io/client-go/util/workqueue" +) + +type ControlLoop struct { + storer Storer + workqueue workqueue.Interface +} + +// NewControlLoop - +func NewControlLoop(storer Storer, + workqueue workqueue.Interface, +) *ControlLoop { + return &ControlLoop{ + storer: storer, + workqueue: workqueue, + } +} + +func (c *ControlLoop) Run() { + for { + obj, shutdown := c.workqueue.Get() + if shutdown { + return + } + + c.run(obj) + } +} + +func (c *ControlLoop) run(obj interface{}) { + key, ok := obj.(string) + if !ok { + return + } + defer c.workqueue.Done(obj) + name, ns := nameNamespace(key) + + helmApp, err := c.storer.GetHelmApp(ns, name) + if err != nil { + logrus.Warningf("[HelmAppController] [ControlLoop] get helm app(%s): %v", key, err) + return + } + + if err := c.Reconcile(helmApp); err != nil { + // ignore the error, informer will push the same time into workqueue later. + logrus.Warningf("[HelmAppController] [ControlLoop] [Reconcile]: %v", err) + return + } +} + +func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { + logrus.Debugf("HelmApp Received: %s", k8sutil.ObjKey(helmApp)) + return nil +} + +// nameNamespace - +func nameNamespace(key string) (string, string) { + strs := strings.Split(key, "/") + return strs[0], strs[1] +} diff --git a/worker/controllers/helmapp/informer.go b/worker/controllers/helmapp/informer.go new file mode 100644 index 000000000..d48c7529c --- /dev/null +++ b/worker/controllers/helmapp/informer.go @@ -0,0 +1,79 @@ +package helmapp + +import ( + "fmt" + "time" + + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/goodrain/rainbond/pkg/generated/informers/externalversions" + "github.com/goodrain/rainbond/pkg/generated/listers/rainbond/v1alpha1" + k8sutil "github.com/goodrain/rainbond/util/k8s" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" +) + +// Storer - +type Storer interface { + Run(stopCh <-chan struct{}) error + GetHelmApp(ns, name string) (*rainbondv1alpha1.HelmApp, error) +} + +type store struct { + informer cache.SharedIndexInformer + lister v1alpha1.HelmAppLister +} + +func NewStorer(clientset versioned.Interface, + resyncPeriod time.Duration, + workqueue workqueue.Interface) Storer { + // create informers factory, enable and assign required informers + sharedInformer := externalversions.NewSharedInformerFactoryWithOptions(clientset, resyncPeriod, + externalversions.WithNamespace(corev1.NamespaceAll)) + + lister := sharedInformer.Rainbond().V1alpha1().HelmApps().Lister() + + informer := sharedInformer.Rainbond().V1alpha1().HelmApps().Informer() + informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + helmApp := obj.(*rainbondv1alpha1.HelmApp) + workqueue.Add(k8sutil.ObjKey(helmApp)) + }, + UpdateFunc: func(oldObj, newObj interface{}) { + helmApp := newObj.(*rainbondv1alpha1.HelmApp) + workqueue.Add(k8sutil.ObjKey(helmApp)) + }, + DeleteFunc: func(obj interface{}) { + + }, + }) + + return &store{ + informer: informer, + lister: lister, + } +} + +func (i *store) Run(stopCh <-chan struct{}) error { + go i.informer.Run(stopCh) + + // wait for all involved caches to be synced before processing items + // from the queue + if !cache.WaitForCacheSync(stopCh, + i.informer.HasSynced, + ) { + runtime.HandleError(fmt.Errorf("timed out waiting for caches to sync")) + } + + // in big clusters, deltas can keep arriving even after HasSynced + // functions have returned 'true' + time.Sleep(1 * time.Second) + + return nil +} + +func (i *store) GetHelmApp(ns, name string) (*rainbondv1alpha1.HelmApp, error) { + return i.lister.HelmApps(ns).Get(name) +} From cf871ea2703411f77c98009caa485f7d90a90492 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 15 Apr 2021 17:42:25 +0800 Subject: [PATCH 04/65] add repo --- cmd/helmappcontroller/main.go | 62 ++++++++ go.mod | 33 ++-- go.sum | 148 +++++++++++++++++ pkg/apis/rainbond/v1alpha1/helmapp_status.go | 42 +++++ pkg/apis/rainbond/v1alpha1/helmapp_types.go | 2 +- .../v1alpha1/zz_generated.deepcopy.go | 4 +- worker/controllers/helmapp/controlloop.go | 6 + worker/controllers/helmapp/detector.go | 21 +++ worker/controllers/helmapp/helm/helm.go | 5 + worker/controllers/helmapp/helm/repo.go | 150 ++++++++++++++++++ worker/controllers/helmapp/helm/repo_test.go | 17 ++ worker/controllers/helmapp/status.go | 40 +++++ 12 files changed, 512 insertions(+), 18 deletions(-) create mode 100644 cmd/helmappcontroller/main.go create mode 100644 pkg/apis/rainbond/v1alpha1/helmapp_status.go create mode 100644 worker/controllers/helmapp/detector.go create mode 100644 worker/controllers/helmapp/helm/helm.go create mode 100644 worker/controllers/helmapp/helm/repo.go create mode 100644 worker/controllers/helmapp/helm/repo_test.go create mode 100644 worker/controllers/helmapp/status.go diff --git a/cmd/helmappcontroller/main.go b/cmd/helmappcontroller/main.go new file mode 100644 index 000000000..8cf88c2d9 --- /dev/null +++ b/cmd/helmappcontroller/main.go @@ -0,0 +1,62 @@ +package main + +import "C" +import ( + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + k8sutil "github.com/goodrain/rainbond/util/k8s" + "github.com/goodrain/rainbond/worker/controllers/helmapp" + "github.com/sirupsen/logrus" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "os" + "time" +) + +func init() { + logrus.SetOutput(os.Stdout) + logrus.SetLevel(logrus.DebugLevel) +} + +func main() { + restcfg, err := k8sutil.NewRestConfig("/Users/abewang/.kube/config.172.20.0.20") + if err != nil { + logrus.Fatalf("create kube rest config error: %s", err.Error()) + } + + stopCh := make(chan struct{}) + defer close(stopCh) + + clientset := versioned.NewForConfigOrDie(restcfg) + + helmApp := &rainbondv1alpha1.HelmApp{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "rbd-system", + }, + Spec: rainbondv1alpha1.HelmAppSpec{ + PreStatus: "", + AppName: "", + Version: "v1.0.0", + Revision: Int32(0), + Values: "", + }, + } + if _, err := clientset.RainbondV1alpha1().HelmApps("rbd-system").Create(helmApp); err != nil { + if !k8sErrors.IsAlreadyExists(err) { + logrus.Fatal(err) + } + } + + ctrl := helmapp.NewController(stopCh, restcfg, 5*time.Second) + if err = ctrl.Start(); err != nil { + logrus.Fatalf("start controller: %v", err) + } + + select {} +} + +// Int32 returns a pointer to the int32 value passed in. +func Int32(v int32) *int32 { + return &v +} diff --git a/go.mod b/go.mod index 8d3b0cad5..e34ce4340 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/goodrain/rainbond -go 1.13 +go 1.16 require ( - github.com/DATA-DOG/go-sqlmock v1.3.3 + github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect @@ -16,10 +16,9 @@ require ( github.com/bluebreezecf/opentsdb-goclient v0.0.0-20190921120552-796138372df3 github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292 // indirect - github.com/containerd/continuity v0.0.0-20200228182428-0f16d7a0959c // indirect github.com/coreos/etcd v3.3.17+incompatible github.com/creack/pty v1.1.11 // indirect - github.com/docker/cli v0.0.0-20190711175710-5b38d82aa076 + github.com/docker/cli v20.10.3+incompatible github.com/docker/distribution v2.7.1+incompatible github.com/docker/docker v20.10.2+incompatible github.com/docker/go-units v0.4.0 @@ -41,6 +40,7 @@ require ( github.com/go-playground/validator/v10 v10.2.0 github.com/go-sql-driver/mysql v1.5.0 github.com/godbus/dbus v4.1.0+incompatible // indirect + github.com/gofrs/flock v0.8.0 github.com/gogo/protobuf v1.3.1 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/mock v1.4.4 @@ -48,6 +48,7 @@ require ( github.com/goodrain/rainbond-oam v0.0.0-20210206075623-511d0796af43 github.com/goodrain/rainbond-operator v1.3.1-0.20210401055914-f8fe4bf89a21 github.com/google/go-cmp v0.5.4 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de // indirect github.com/gorilla/websocket v1.4.2 github.com/gosuri/uitable v0.0.4 @@ -58,7 +59,6 @@ require ( github.com/json-iterator/go v1.1.10 github.com/kr/pretty v0.2.1 // indirect github.com/kr/pty v1.1.8 - github.com/lib/pq v1.3.0 // indirect github.com/mattn/go-colorable v0.1.6 // indirect github.com/mattn/go-runewidth v0.0.6 github.com/mattn/go-shellwords v1.0.10 // indirect @@ -82,10 +82,11 @@ require ( github.com/prometheus/procfs v0.2.0 github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect github.com/shirou/gopsutil v2.20.8+incompatible - github.com/sirupsen/logrus v1.6.0 + github.com/sirupsen/logrus v1.7.0 github.com/smartystreets/assertions v1.0.1 // indirect github.com/smartystreets/goconvey v1.6.4 github.com/spf13/pflag v1.0.5 + github.com/stretchr/testify v1.7.0 github.com/testcontainers/testcontainers-go v0.8.0 github.com/thejerf/suture v3.0.3+incompatible github.com/tidwall/gjson v1.6.1 @@ -93,40 +94,42 @@ require ( github.com/urfave/cli v1.22.2 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.1.0 // indirect github.com/yudai/umutex v0.0.0-20150817080136-18216d265c6b go.uber.org/atomic v1.7.0 // indirect - golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9 + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad golang.org/x/net v0.0.0-20201224014010-6772e930b67b golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 // indirect golang.org/x/sync v0.0.0-20201207232520-09787c993a3a // indirect - golang.org/x/sys v0.0.0-20201223074533-0d417f636930 + golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 golang.org/x/tools v0.0.0-20201228162255-34cd474b9958 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e // indirect google.golang.org/grpc v1.33.2 + gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect gopkg.in/alecthomas/kingpin.v2 v2.2.6 + gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect gopkg.in/src-d/go-git.v4 v4.13.1 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.1 - k8s.io/apiextensions-apiserver v0.20.1 - k8s.io/apimachinery v0.20.1 - k8s.io/apiserver v0.20.0 + helm.sh/helm/v3 v3.5.4 + k8s.io/api v0.20.4 + k8s.io/apiextensions-apiserver v0.20.4 + k8s.io/apimachinery v0.20.4 + k8s.io/apiserver v0.20.4 k8s.io/client-go v12.0.0+incompatible k8s.io/code-generator v0.20.0 k8s.io/component-base v0.20.1 // indirect sigs.k8s.io/controller-runtime v0.7.0 + sigs.k8s.io/yaml v1.2.0 ) // Pinned to kubernetes-1.20.0 replace ( github.com/coreos/etcd => github.com/coreos/etcd v3.2.31+incompatible - github.com/docker/cli => github.com/docker/cli v0.0.0-20181026144139-6b71e84ec8bf + github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d github.com/docker/docker => github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb github.com/docker/libcompose => github.com/docker/libcompose v0.4.1-0.20181019154650-213509acef0f github.com/godbus/dbus/v5 => github.com/godbus/dbus/v5 v5.0.3 - github.com/xeipuuv/gojsonschema => github.com/xeipuuv/gojsonschema v0.0.0-20160323030313-93e72a773fad google.golang.org/grpc => google.golang.org/grpc v1.29.0 k8s.io/api => k8s.io/api v0.20.0 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.20.0 diff --git a/go.sum b/go.sum index 0650cb9da..392409ed1 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,10 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= @@ -59,12 +61,23 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3 h1:CWUqKXe0s8A2z6qCgkP4Kru7wC11YoAnoupUKFDnH08= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Masterminds/squirrel v1.5.0/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= +github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.14 h1:lbPVK25c1cu5xTLITwpUcxoA9vKrKErASPYygvouJns= +github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v0.0.0-20170804200234-967539e5e271/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= @@ -79,6 +92,7 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= 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/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= @@ -111,7 +125,9 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.36.15 h1:nGqgPlXegCKPZOKXvWnYCLvLPJPRoSOHHn9d0N0DG7Y= @@ -123,6 +139,7 @@ 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/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= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -138,6 +155,10 @@ github.com/bluebreezecf/opentsdb-goclient v0.0.0-20190921120552-796138372df3 h1: github.com/bluebreezecf/opentsdb-goclient v0.0.0-20190921120552-796138372df3/go.mod h1:0GQvpWSQV6iuaYXLLau5GsbyYt22OpRD9qeSVENCXqU= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -153,6 +174,7 @@ github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXH github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -163,11 +185,22 @@ github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292/go.mod h1:qRiX68m github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codegangsta/cli v1.19.1/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20200228182428-0f16d7a0959c h1:8ahmSVELW1wghbjerVAyuEYD5+Dio66RYvSS0iGfL1M= github.com/containerd/continuity v0.0.0-20200228182428-0f16d7a0959c/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= +github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 h1:6ejg6Lkk8dskcM7wQ28gONkukbQkM4qpj4RnYbpFzrI= +github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.2.31+incompatible h1:1kNZWQMt1ejpJ30yIDY8o8q2Xf1ajX/wFZsvg7RVljM= @@ -197,6 +230,7 @@ github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ github.com/crossplane/crossplane-runtime v0.8.0/go.mod h1:gNY/21MLBaz5KNP7hmfXbBXp8reYRbwY5B/97Kp4tgM= github.com/crossplane/crossplane-tools v0.0.0-20200219001116-bb8b2ce46330/go.mod h1:C735A9X0x0lR8iGVOOxb49Mt70Ua4EM2b7PGaRPBLd4= github.com/crossplane/oam-kubernetes-runtime v0.1.0/go.mod h1:UZ4eXkl/e4lKrAhK81Pz1sR90wqeuE9PgdwVXr8kDgI= +github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/dave/jennifer v1.3.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -204,25 +238,40 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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/deislabs/oras v0.10.0 h1:Eufbi8zVaULb7vYj5HKM9qv9qw6fJ7P75JSjn//gR0E= +github.com/deislabs/oras v0.10.0/go.mod h1:N1UzE7rBa9qLyN4l8IlBTxc2PkrRcKgWQ3HTJvRnJRE= +github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= +github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/cli v0.0.0-20181026144139-6b71e84ec8bf h1:k3XMGIFcuEkk0tIBIPH5gL8tGOVHPpsvtsjzt5N2JWk= github.com/docker/cli v0.0.0-20181026144139-6b71e84ec8bf/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.3+incompatible h1:WVEgoV/GpsTK5hruhHdYi79blQ+nmcm+7Ru/ZuiF+7E= +github.com/docker/cli v20.10.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/distribution v0.0.0-20191216044856-a8371794149d h1:jC8tT/S0OGx2cswpeUTn4gOIea8P08lD3VFQT0cOZ50= +github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ= +github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb h1:PyjxRdW1mqCmSoxy/6uP01P7CGbsD+woX+oOWbaUPwQ= github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb/go.mod h1:3CPr2caMgTHxxIAZgEMd3uLYPDlRvPqCpyeRf6ncPcY= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916 h1:yWHOI+vFjEsAakUTSrtqc/SAHrhSkmn48pqjidZX3QA= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libcompose v0.4.1-0.20181019154650-213509acef0f h1:Bi8tLHoPyR0ZkRfycb6KGsoqhypYxObMRz+/KUiod6Y= github.com/docker/libcompose v0.4.1-0.20181019154650-213509acef0f/go.mod h1:EyqDS+Iyca0hS44T7qIMTeO1EOYWWWNOGpufHu9R8cs= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= @@ -278,6 +327,7 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -294,6 +344,7 @@ github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1 github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= @@ -306,6 +357,8 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= @@ -339,15 +392,25 @@ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GO github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 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/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v4.1.0+incompatible h1:WqqLRTsQic3apZUK9qC5sGNfXthmPXzUZ7nQPrNITa4= github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg= +github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= +github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -424,6 +487,8 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= @@ -440,7 +505,9 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de h1:F7WD09S8QB4LrkEpka0dFPLSotH11HRpCsLIbIcJ7sU= github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -450,6 +517,7 @@ github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0U github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 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 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -495,6 +563,7 @@ github.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+ github.com/howeyc/fsnotify v0.9.0 h1:0gtV5JmOKH4A8SsFxG2BczSeXWWPvcMT0euZt5gDAxY= github.com/howeyc/fsnotify v0.9.0/go.mod h1:41HzSPxBGeFRQKEEwgh49TRw/nKBsYZ2cF1OzPjSJsA= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -503,6 +572,7 @@ github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -515,11 +585,14 @@ github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkr github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= @@ -571,6 +644,7 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.6/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= @@ -588,11 +662,18 @@ 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/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= +github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.9.0 h1:L8nSXQQzAYByakOFMTwpjRoHsMJklur4Gi59b6VivR8= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= @@ -607,6 +688,7 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/masterzen/azure-sdk-for-go v3.2.0-beta.0.20161014135628-ee4f0065d00c+incompatible/go.mod h1:mf8fjOu33zCqxUjuiU3I8S1lJMyEAlH+0F2+M5xl3hE= github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= github.com/masterzen/winrm v0.0.0-20161014151040-7a535cd943fc/go.mod h1:CfZSN7zwz5gJiFhZJz49Uzk7mEBHIceWmbFmYx7Hf7E= @@ -624,12 +706,15 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-oci8 v0.0.7/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.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6 h1:V2iyH+aX9C5fsYCpK60U8BYIvmhqxuOL3JZcqc1NB7k= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.10 h1:Y7Xqm8piKOO3v10Thp7Z36h4FYFjt5xB//6XvOrs2Gw= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA= github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= github.com/mattn/go-xmlrpc v0.0.3 h1:Y6WEMLEsqs3RviBrAa1/7qmbGB7DVD3brZIbqMbQdGY= @@ -648,6 +733,8 @@ github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee h1:hZDujBrW3ye2xxdKN github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -662,6 +749,9 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= +github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -696,6 +786,7 @@ github.com/ncabatoff/go-seq v0.0.0-20180805175032-b08ef85ed833 h1:t4WWQ9I797y7QU github.com/ncabatoff/go-seq v0.0.0-20180805175032-b08ef85ed833/go.mod h1:0CznHmXSjMEqs5Tezj/w2emQoM41wzYM9KpDKUHPYag= github.com/ncabatoff/process-exporter v0.7.1 h1:+/jZ8rtXsUYSmK95j8JTil1bdMgS/XuC8h2qTggq0Gw= github.com/ncabatoff/process-exporter v0.7.1/go.mod h1:brL+cSga76DYqYhssNn/T8FrhTPoIKu+SFq75LMwlmk= +github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= @@ -705,6 +796,8 @@ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtb github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= 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= @@ -724,14 +817,19 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= 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 v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc91.0.20200707015106-819fcc687efb h1:LcPVE5u4oaqw8ffPbJew0lUxZC7faM5t52PgU4px1xY= github.com/opencontainers/runc v1.0.0-rc91.0.20200707015106-819fcc687efb/go.mod h1:ZuXhqlr4EiRYgDrBDNfSbE4+n9JX4+V107NwAmF7sZA= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -752,7 +850,9 @@ github.com/pebbe/zmq4 v1.2.1/go.mod h1:7N4y5R18zBiu3l0vajMUWQgZyjv464prE8RCyBcmn github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -776,6 +876,7 @@ github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.45.0 h github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.45.0/go.mod h1:3WYi4xqXxGGXWDdQIITnLNmuDzO5n6wYva9spVhR4fg= github.com/prometheus-operator/prometheus-operator/pkg/client v0.45.0 h1:2qET5dx1d91irZVhvemXWumYtIiQ+qGBZ0fRtIGrhFA= github.com/prometheus-operator/prometheus-operator/pkg/client v0.45.0/go.mod h1:k4BrWlVQQsvBiTcDnKEMgyh/euRxyxgrHdur/ZX/sdA= +github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -787,6 +888,7 @@ github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83A github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +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= @@ -794,6 +896,7 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: 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.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.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -807,6 +910,7 @@ github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tysp github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= 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-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -822,7 +926,11 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351/go.mod h1:DCgfY80j8GYL7MLEfvcpSFvjD0L5yZq/aZUJmhZklyg= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -838,6 +946,7 @@ github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.20.8+incompatible h1:8c7Atn0FAUZJo+f4wYbN0iVpdWniCQk7IYwGtgdh1mY= github.com/shirou/gopsutil v2.20.8+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/siebenmann/go-kstat v0.0.0-20200303194639-4e8294f9e9d5 h1:rRF7gJ7t0E1bfqNLwMqgb59eb273kgi+GgLE/yEiDzs= @@ -848,9 +957,12 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -861,9 +973,11 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO 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/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -890,6 +1004,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/testcontainers/testcontainers-go v0.8.0 h1:RF0179BF/6hZeIaa9/T7fJMr7QjzWMLIVL/5jl2JAKU= @@ -926,6 +1042,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20160323030313-93e72a773fad h1:LIwN+8bLzKvIuCiV5yT1nICcW/8yNfU5jVV1SHhcPco= github.com/xeipuuv/gojsonschema v0.0.0-20160323030313-93e72a773fad/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/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/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= @@ -936,6 +1054,10 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +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/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= @@ -948,6 +1070,7 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 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 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 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= @@ -979,15 +1102,19 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9 h1:sYNJzB4J8toYPQTM6pAkcmBRgw9SnQKP9oXCHfgy604= golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1037,12 +1164,14 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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-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= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1100,6 +1229,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1113,6 +1244,7 @@ golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1122,6 +1254,7 @@ golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/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= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1144,9 +1277,12 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo= golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1186,6 +1322,7 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/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= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1232,6 +1369,7 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1257,6 +1395,7 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1308,6 +1447,7 @@ gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4 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= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20160105164936-4f90aeace3a2/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1320,6 +1460,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/httprequest.v1 v1.1.1/go.mod h1:/CkavNL+g3qLOrpFHVrEx4NKepeqR4XTZWNj4sGGjz0= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -1360,6 +1501,9 @@ gotest.tools v0.0.0-20181223230014-1083505acf35/go.mod h1:R//lfYlUuTOTfblYI3lGoA gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +helm.sh/helm/v3 v3.5.4 h1:FUx2L831YESvMcoNoPTicV0oW/6+es+Tnojw5yGvyVM= +helm.sh/helm/v3 v3.5.4/go.mod h1:44SeYdnTImrEArjDazqgVQVRitFpLEZNYX97NFJyq4k= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1376,6 +1520,7 @@ k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.20.0 h1:0MwO4xCoqZwhoLbFyyBSJdu55CScp4V4sAgX6z4oPBY= k8s.io/apiserver v0.20.0/go.mod h1:6gRIWiOkvGvQt12WTYmsiYoUyYW0FXSiMdNl4m+sxY8= +k8s.io/cli-runtime v0.20.0 h1:UfTR9vGUWshJpwuekl7MqRmWumNs5tvqPj20qnmOns8= k8s.io/cli-runtime v0.20.0/go.mod h1:C5tewU1SC1t09D7pmkk83FT4lMAw+bvMDuRxA7f0t2s= k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= @@ -1396,6 +1541,8 @@ 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 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= +k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4/go.mod h1:+aW0UZgSXdTSHTIFnWnueEuXjOqerDUxGIw6Ygr+vYY= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= @@ -1418,6 +1565,7 @@ sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2 sigs.k8s.io/controller-runtime v0.7.0 h1:bU20IBBEPccWz5+zXpLnpVsgBYxqclaHu1pVDl/gEt8= sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= +sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_status.go b/pkg/apis/rainbond/v1alpha1/helmapp_status.go new file mode 100644 index 000000000..a4cb939bf --- /dev/null +++ b/pkg/apis/rainbond/v1alpha1/helmapp_status.go @@ -0,0 +1,42 @@ +package v1alpha1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// NewHelmAppCondition creates a new HelmApp condition. +func NewHelmAppCondition(condType HelmAppConditionType, status corev1.ConditionStatus, reason, message string) *HelmAppCondition { + return &HelmAppCondition{ + Type: condType, + Status: status, + LastTransitionTime: metav1.Now(), + Reason: reason, + Message: message, + } +} + +// GetCondition returns a HelmApp condition based on the given type. +func (in *HelmAppStatus) GetCondition(t HelmAppConditionType) (int, *HelmAppCondition) { + for i, c := range in.Conditions { + if t == c.Type { + return i, &c + } + } + return -1, nil +} + +// SetCondition setups the given HelmApp condition. +func (in *HelmAppStatus) SetCondition(c HelmAppCondition) { + pos, cp := in.GetCondition(c.Type) + if cp != nil && + cp.Status == c.Status && cp.Reason == c.Reason && cp.Message == c.Message { + return + } + + if cp != nil { + in.Conditions[pos] = c + } else { + in.Conditions = append(in.Conditions, c) + } +} diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 0884216e5..d6e7762ec 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -138,7 +138,7 @@ type HelmAppStatus struct { Status HelmAppStatusStatus `json:"status"` // Current state of helm app. - Contidions []HelmAppCondition `json:"conditions,omitempty"` + Conditions []HelmAppCondition `json:"conditions,omitempty"` CurrentValues string `json:"currentValues,omitempty"` diff --git a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index 21c1df628..665612384 100644 --- a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -124,8 +124,8 @@ func (in *HelmAppSpec) DeepCopy() *HelmAppSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HelmAppStatus) DeepCopyInto(out *HelmAppStatus) { *out = *in - if in.Contidions != nil { - in, out := &in.Contidions, &out.Contidions + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions *out = make([]HelmAppCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 181edaa4f..0012cb1e4 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -58,6 +58,12 @@ func (c *ControlLoop) run(obj interface{}) { func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { logrus.Debugf("HelmApp Received: %s", k8sutil.ObjKey(helmApp)) + + status := NewStatus(helmApp.Status) + + detector := NewDetector(status) + detector.Detect() + return nil } diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go new file mode 100644 index 000000000..6573cf535 --- /dev/null +++ b/worker/controllers/helmapp/detector.go @@ -0,0 +1,21 @@ +package helmapp + +type Detector struct { + status *Status +} + +func NewDetector(status *Status) *Detector { + return &Detector{ + status: status, + } +} + +func (d *Detector) Detect() error { + if d.status.isDetected() { + return nil + } + + // add repo + + return nil +} diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go new file mode 100644 index 000000000..d016dc4dd --- /dev/null +++ b/worker/controllers/helmapp/helm/helm.go @@ -0,0 +1,5 @@ +package helm + +type Helm struct { + +} diff --git a/worker/controllers/helmapp/helm/repo.go b/worker/controllers/helmapp/helm/repo.go new file mode 100644 index 000000000..55beee981 --- /dev/null +++ b/worker/controllers/helmapp/helm/repo.go @@ -0,0 +1,150 @@ +package helm + +import ( + "bytes" + "context" + "fmt" + "github.com/gofrs/flock" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v3/pkg/repo" + "io" + "io/ioutil" + "os" + "path/filepath" + "sigs.k8s.io/yaml" + "strings" + "time" +) + +// Repositories that have been permanently deleted and no longer work +var deprecatedRepos = map[string]string{ + "//kubernetes-charts.storage.googleapis.com": "https://charts.helm.sh/stable", + "//kubernetes-charts-incubator.storage.googleapis.com": "https://charts.helm.sh/incubator", +} + +// Repo - +type Repo struct { + name string + url string + username string + password string + forceUpdate bool + + repoFile string + repoCache string + + insecureSkipTLSverify bool +} + +func NewRepo(name, url, username, password, repoFile, repoCache string) *Repo { + return &Repo{ + name: name, + url: url, + username: username, + password: password, + forceUpdate: true, + repoFile: repoFile, + repoCache: repoCache, + } +} + +func (o *Repo) Add() error { + var buf bytes.Buffer + err := o.add(&buf) + if err != nil { + return err + } + + s := buf.String() + logrus.Infof("add repo: %s", s) + + return nil +} + +func (o *Repo) add(out io.Writer) error { + // Block deprecated repos + for oldURL, newURL := range deprecatedRepos { + if strings.Contains(o.url, oldURL) { + return fmt.Errorf("repo %q is no longer available; try %q instead", o.url, newURL) + } + } + + // Ensure the file directory exists as it is required for file locking + err := os.MkdirAll(filepath.Dir(o.repoFile), os.ModePerm) + if err != nil && !os.IsExist(err) { + return err + } + + // Acquire a file lock for process synchronization + fileLock := flock.New(strings.Replace(o.repoFile, filepath.Ext(o.repoFile), ".lock", 1)) + lockCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + locked, err := fileLock.TryLockContext(lockCtx, time.Second) + if err == nil && locked { + defer fileLock.Unlock() + } + if err != nil { + return err + } + + b, err := ioutil.ReadFile(o.repoFile) + if err != nil && !os.IsNotExist(err) { + return err + } + + var f repo.File + if err := yaml.Unmarshal(b, &f); err != nil { + return err + } + + c := repo.Entry{ + Name: o.name, + URL: o.url, + Username: o.username, + Password: o.password, + InsecureSkipTLSverify: o.insecureSkipTLSverify, + } + + // If the repo exists do one of two things: + // 1. If the configuration for the name is the same continue without error + // 2. When the config is different require --force-update + if !o.forceUpdate && f.Has(o.name) { + existing := f.Get(o.name) + if c != *existing { + + // The input coming in for the name is different from what is already + // configured. Return an error. + return errors.Errorf("repository name (%s) already exists, please specify a different name", o.name) + } + + // The add is idempotent so do nothing + fmt.Fprintf(out, "%q already exists with the same configuration, skipping\n", o.name) + return nil + } + + settings := cli.New() + // Disable plugins + settings.PluginsDirectory = "/foo/bar" + r, err := repo.NewChartRepository(&c, getter.All(settings)) + if err != nil { + return err + } + + if o.repoCache != "" { + r.CachePath = o.repoCache + } + if _, err := r.DownloadIndexFile(); err != nil { + return errors.Wrapf(err, "looks like %q is not a valid chart repository or cannot be reached", o.url) + } + + f.Update(&c) + + if err := f.WriteFile(o.repoFile, 0644); err != nil { + return err + } + fmt.Fprintf(out, "%q has been added to your repositories\n", o.name) + return nil +} diff --git a/worker/controllers/helmapp/helm/repo_test.go b/worker/controllers/helmapp/helm/repo_test.go new file mode 100644 index 000000000..63140905c --- /dev/null +++ b/worker/controllers/helmapp/helm/repo_test.go @@ -0,0 +1,17 @@ +package helm + +import ( + "github.com/goodrain/rainbond/util" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestRepoAdd(t *testing.T) { + repo := NewRepo(util.NewUUID(), + "https://openchart.goodrain.com/goodrain/rainbond", + "", "", + "/tmp/helm/repo/repositories.yaml", + "/tmp/helm/cache") + err := repo.Add() + assert.Nil(t, err) +} diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go new file mode 100644 index 000000000..cae141694 --- /dev/null +++ b/worker/controllers/helmapp/status.go @@ -0,0 +1,40 @@ +package helmapp + +import ( + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + corev1 "k8s.io/api/core/v1" +) + +type Status struct { + v1alpha1.HelmAppStatus +} + +// NewStatus creates a new helm app status. +func NewStatus(status v1alpha1.HelmAppStatus) *Status { + idx, _ := status.GetCondition(v1alpha1.HelmAppDetected) + if idx == -1 { + status.SetCondition(*v1alpha1.NewHelmAppCondition( + v1alpha1.HelmAppDetected, + corev1.ConditionFalse, + "", + "", + )) + } + idx, _ = status.GetCondition(v1alpha1.HelmAppInstalled) + if idx == -1 { + status.SetCondition(*v1alpha1.NewHelmAppCondition( + v1alpha1.HelmAppInstalled, + corev1.ConditionFalse, + "", + "", + )) + } + return &Status{ + HelmAppStatus: status, + } +} + +func (s *Status) isDetected() bool { + idx, condition := s.GetCondition(v1alpha1.HelmAppDetected) + return idx != -1 && condition.Status == corev1.ConditionTrue +} From 3333acd0dbfb12930dd6b1e9b691d71ad73b9be2 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 15 Apr 2021 19:36:45 +0800 Subject: [PATCH 05/65] RepoReady condition --- cmd/helmappcontroller/main.go | 18 +++-- pkg/apis/rainbond/v1alpha1/helmapp_status.go | 47 ++++++++++++ pkg/apis/rainbond/v1alpha1/helmapp_types.go | 10 ++- .../v1alpha1/zz_generated.deepcopy.go | 5 ++ .../clientset/versioned/clientset.go | 2 +- .../clientset/versioned/fake/register.go | 2 +- .../rainbond/v1alpha1/fake/fake_helmapp.go | 22 +++--- .../typed/rainbond/v1alpha1/helmapp.go | 72 ++++++++++--------- .../rainbond/v1alpha1/helmapp.go | 5 +- .../listers/rainbond/v1alpha1/helmapp.go | 5 ++ util/k8s/k8s.go | 2 - worker/controllers/helmapp/controller.go | 5 +- worker/controllers/helmapp/controlloop.go | 31 +++++++- worker/controllers/helmapp/detector.go | 25 ++++++- worker/controllers/helmapp/helm/repo.go | 49 ++++++------- worker/controllers/helmapp/helm/repo_test.go | 6 +- worker/controllers/helmapp/status.go | 23 +++--- 17 files changed, 219 insertions(+), 110 deletions(-) diff --git a/cmd/helmappcontroller/main.go b/cmd/helmappcontroller/main.go index 8cf88c2d9..2b37531bd 100644 --- a/cmd/helmappcontroller/main.go +++ b/cmd/helmappcontroller/main.go @@ -2,6 +2,10 @@ package main import "C" import ( + "context" + "os" + "time" + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" k8sutil "github.com/goodrain/rainbond/util/k8s" @@ -9,8 +13,6 @@ import ( "github.com/sirupsen/logrus" k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "os" - "time" ) func init() { @@ -36,19 +38,25 @@ func main() { }, Spec: rainbondv1alpha1.HelmAppSpec{ PreStatus: "", - AppName: "", + AppName: "rainbond-operator", Version: "v1.0.0", Revision: Int32(0), Values: "", + AppStore: &rainbondv1alpha1.HelmAppStore{ + Version: "1111111", + Name: "rainbond", + URL: "https://openchart.goodrain.com/goodrain/rainbond", + }, }, } - if _, err := clientset.RainbondV1alpha1().HelmApps("rbd-system").Create(helmApp); err != nil { + if _, err := clientset.RainbondV1alpha1().HelmApps("rbd-system").Create(context.Background(), + helmApp, metav1.CreateOptions{}); err != nil { if !k8sErrors.IsAlreadyExists(err) { logrus.Fatal(err) } } - ctrl := helmapp.NewController(stopCh, restcfg, 5*time.Second) + ctrl := helmapp.NewController(stopCh, restcfg, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") if err = ctrl.Start(); err != nil { logrus.Fatalf("start controller: %v", err) } diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_status.go b/pkg/apis/rainbond/v1alpha1/helmapp_status.go index a4cb939bf..823c0b29f 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_status.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_status.go @@ -26,6 +26,12 @@ func (in *HelmAppStatus) GetCondition(t HelmAppConditionType) (int, *HelmAppCond return -1, nil } +// IsConditionTrue checks if the condition is ready or not based on the given condition type. +func (in *HelmAppStatus) IsConditionTrue(t HelmAppConditionType) bool { + idx, condition := in.GetCondition(t) + return idx != -1 && condition.Status == corev1.ConditionTrue +} + // SetCondition setups the given HelmApp condition. func (in *HelmAppStatus) SetCondition(c HelmAppCondition) { pos, cp := in.GetCondition(c.Type) @@ -40,3 +46,44 @@ func (in *HelmAppStatus) SetCondition(c HelmAppCondition) { in.Conditions = append(in.Conditions, c) } } + +// UpdateCondition updates existing HelmApp condition or creates a new +// one. Sets LastTransitionTime to now if the status has changed. +// Returns true if HelmApp condition has changed or has been added. +func (in *HelmAppStatus) UpdateCondition(condition *HelmAppCondition) bool { + condition.LastTransitionTime = metav1.Now() + // Try to find this HelmApp condition. + conditionIndex, oldCondition := in.GetCondition(condition.Type) + + if oldCondition == nil { + // We are adding new HelmApp condition. + in.Conditions = append(in.Conditions, *condition) + return true + } + + // We are updating an existing condition, so we need to check if it has changed. + if condition.Status == oldCondition.Status { + condition.LastTransitionTime = oldCondition.LastTransitionTime + } + + isEqual := condition.Status == oldCondition.Status && + condition.Reason == oldCondition.Reason && + condition.Message == oldCondition.Message && + condition.LastTransitionTime.Equal(&oldCondition.LastTransitionTime) + + in.Conditions[conditionIndex] = *condition + // Return true if one of the fields have changed. + return !isEqual +} + +func (in *HelmAppStatus) UpdateConditionStatus(conditionType HelmAppConditionType, conditionStatus corev1.ConditionStatus) { + _, condition := in.GetCondition(conditionType) + if condition != nil { + condition.Status = conditionStatus + in.UpdateCondition(condition) + return + } + + condition = NewHelmAppCondition(conditionType, conditionStatus, "", "") + in.UpdateCondition(condition) +} diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index d6e7762ec..3e7ae09b4 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -62,8 +62,10 @@ type HelmAppConditionType string // These are valid conditions of helm app. const ( - // HelmAppDetected indicates whether the helm app has been detected. - HelmAppDetected HelmAppConditionType = "Detected" + // HelmAppRepoReady indicates whether the helm repository is ready. + HelmAppRepoReady HelmAppConditionType = "RepoReady" + // HelmAppChartReady indicates whether the chart is ready. + HelmAppChartReady HelmAppConditionType = "ChartReady" // HelmAppDetected indicates whether the helm app has been installed. HelmAppInstalled HelmAppConditionType = "Installed" ) @@ -109,6 +111,10 @@ type HelmAppSpec struct { // The values.yaml of the helm app, encoded by base64. Values string `json:"values"` + + // The helm app store. + // TODO: validation. not null + AppStore *HelmAppStore `json:"appStore"` } // HelmAppStore represents a helm repo. diff --git a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index 665612384..2b5df780f 100644 --- a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -109,6 +109,11 @@ func (in *HelmAppSpec) DeepCopyInto(out *HelmAppSpec) { *out = new(int32) **out = **in } + if in.AppStore != nil { + in, out := &in.AppStore, &out.AppStore + *out = new(HelmAppStore) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmAppSpec. diff --git a/pkg/generated/clientset/versioned/clientset.go b/pkg/generated/clientset/versioned/clientset.go index 57eafd5a6..b6cd74c83 100644 --- a/pkg/generated/clientset/versioned/clientset.go +++ b/pkg/generated/clientset/versioned/clientset.go @@ -61,7 +61,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/pkg/generated/clientset/versioned/fake/register.go b/pkg/generated/clientset/versioned/fake/register.go index 25ad0faa9..14bc99f21 100644 --- a/pkg/generated/clientset/versioned/fake/register.go +++ b/pkg/generated/clientset/versioned/fake/register.go @@ -31,7 +31,7 @@ import ( var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) + var localSchemeBuilder = runtime.SchemeBuilder{ rainbondv1alpha1.AddToScheme, } diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go index 2bfdb1bd0..b99a0797d 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go @@ -21,6 +21,8 @@ package fake import ( + "context" + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -41,7 +43,7 @@ var helmappsResource = schema.GroupVersionResource{Group: "rainbond.goodrain.io" var helmappsKind = schema.GroupVersionKind{Group: "rainbond.goodrain.io", Version: "v1alpha1", Kind: "HelmApp"} // Get takes name of the helmApp, and returns the corresponding helmApp object, and an error if there is any. -func (c *FakeHelmApps) Get(name string, options v1.GetOptions) (result *v1alpha1.HelmApp, err error) { +func (c *FakeHelmApps) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmApp, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(helmappsResource, c.ns, name), &v1alpha1.HelmApp{}) @@ -52,7 +54,7 @@ func (c *FakeHelmApps) Get(name string, options v1.GetOptions) (result *v1alpha1 } // List takes label and field selectors, and returns the list of HelmApps that match those selectors. -func (c *FakeHelmApps) List(opts v1.ListOptions) (result *v1alpha1.HelmAppList, err error) { +func (c *FakeHelmApps) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmAppList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(helmappsResource, helmappsKind, c.ns, opts), &v1alpha1.HelmAppList{}) @@ -74,14 +76,14 @@ func (c *FakeHelmApps) List(opts v1.ListOptions) (result *v1alpha1.HelmAppList, } // Watch returns a watch.Interface that watches the requested helmApps. -func (c *FakeHelmApps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeHelmApps) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(helmappsResource, c.ns, opts)) } // Create takes the representation of a helmApp and creates it. Returns the server's representation of the helmApp, and an error, if there is any. -func (c *FakeHelmApps) Create(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { +func (c *FakeHelmApps) Create(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.CreateOptions) (result *v1alpha1.HelmApp, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(helmappsResource, c.ns, helmApp), &v1alpha1.HelmApp{}) @@ -92,7 +94,7 @@ func (c *FakeHelmApps) Create(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmA } // Update takes the representation of a helmApp and updates it. Returns the server's representation of the helmApp, and an error, if there is any. -func (c *FakeHelmApps) Update(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { +func (c *FakeHelmApps) Update(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.UpdateOptions) (result *v1alpha1.HelmApp, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(helmappsResource, c.ns, helmApp), &v1alpha1.HelmApp{}) @@ -104,7 +106,7 @@ func (c *FakeHelmApps) Update(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmA // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHelmApps) UpdateStatus(helmApp *v1alpha1.HelmApp) (*v1alpha1.HelmApp, error) { +func (c *FakeHelmApps) UpdateStatus(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.UpdateOptions) (*v1alpha1.HelmApp, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(helmappsResource, "status", c.ns, helmApp), &v1alpha1.HelmApp{}) @@ -115,7 +117,7 @@ func (c *FakeHelmApps) UpdateStatus(helmApp *v1alpha1.HelmApp) (*v1alpha1.HelmAp } // Delete takes name of the helmApp and deletes it. Returns an error if one occurs. -func (c *FakeHelmApps) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeHelmApps) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(helmappsResource, c.ns, name), &v1alpha1.HelmApp{}) @@ -123,15 +125,15 @@ func (c *FakeHelmApps) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakeHelmApps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(helmappsResource, c.ns, listOptions) +func (c *FakeHelmApps) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(helmappsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.HelmAppList{}) return err } // Patch applies the patch and returns the patched helmApp. -func (c *FakeHelmApps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.HelmApp, err error) { +func (c *FakeHelmApps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApp, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(helmappsResource, c.ns, name, pt, data, subresources...), &v1alpha1.HelmApp{}) diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go index 17b5ab5ee..fa4a6594b 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go @@ -21,6 +21,7 @@ package v1alpha1 import ( + "context" "time" v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" @@ -39,15 +40,15 @@ type HelmAppsGetter interface { // HelmAppInterface has methods to work with HelmApp resources. type HelmAppInterface interface { - Create(*v1alpha1.HelmApp) (*v1alpha1.HelmApp, error) - Update(*v1alpha1.HelmApp) (*v1alpha1.HelmApp, error) - UpdateStatus(*v1alpha1.HelmApp) (*v1alpha1.HelmApp, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.HelmApp, error) - List(opts v1.ListOptions) (*v1alpha1.HelmAppList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.HelmApp, err error) + Create(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.CreateOptions) (*v1alpha1.HelmApp, error) + Update(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.UpdateOptions) (*v1alpha1.HelmApp, error) + UpdateStatus(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.UpdateOptions) (*v1alpha1.HelmApp, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.HelmApp, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.HelmAppList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApp, err error) HelmAppExpansion } @@ -66,20 +67,20 @@ func newHelmApps(c *RainbondV1alpha1Client, namespace string) *helmApps { } // Get takes name of the helmApp, and returns the corresponding helmApp object, and an error if there is any. -func (c *helmApps) Get(name string, options v1.GetOptions) (result *v1alpha1.HelmApp, err error) { +func (c *helmApps) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmApp, err error) { result = &v1alpha1.HelmApp{} err = c.client.Get(). Namespace(c.ns). Resource("helmapps"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of HelmApps that match those selectors. -func (c *helmApps) List(opts v1.ListOptions) (result *v1alpha1.HelmAppList, err error) { +func (c *helmApps) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HelmAppList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -90,13 +91,13 @@ func (c *helmApps) List(opts v1.ListOptions) (result *v1alpha1.HelmAppList, err Resource("helmapps"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested helmApps. -func (c *helmApps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *helmApps) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -107,87 +108,90 @@ func (c *helmApps) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("helmapps"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a helmApp and creates it. Returns the server's representation of the helmApp, and an error, if there is any. -func (c *helmApps) Create(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { +func (c *helmApps) Create(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.CreateOptions) (result *v1alpha1.HelmApp, err error) { result = &v1alpha1.HelmApp{} err = c.client.Post(). Namespace(c.ns). Resource("helmapps"). + VersionedParams(&opts, scheme.ParameterCodec). Body(helmApp). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a helmApp and updates it. Returns the server's representation of the helmApp, and an error, if there is any. -func (c *helmApps) Update(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { +func (c *helmApps) Update(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.UpdateOptions) (result *v1alpha1.HelmApp, err error) { result = &v1alpha1.HelmApp{} err = c.client.Put(). Namespace(c.ns). Resource("helmapps"). Name(helmApp.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(helmApp). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *helmApps) UpdateStatus(helmApp *v1alpha1.HelmApp) (result *v1alpha1.HelmApp, err error) { +func (c *helmApps) UpdateStatus(ctx context.Context, helmApp *v1alpha1.HelmApp, opts v1.UpdateOptions) (result *v1alpha1.HelmApp, err error) { result = &v1alpha1.HelmApp{} err = c.client.Put(). Namespace(c.ns). Resource("helmapps"). Name(helmApp.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(helmApp). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the helmApp and deletes it. Returns an error if one occurs. -func (c *helmApps) Delete(name string, options *v1.DeleteOptions) error { +func (c *helmApps) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("helmapps"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *helmApps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *helmApps) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("helmapps"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched helmApp. -func (c *helmApps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.HelmApp, err error) { +func (c *helmApps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HelmApp, err error) { result = &v1alpha1.HelmApp{} err = c.client.Patch(pt). Namespace(c.ns). Resource("helmapps"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go b/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go index 2431e9972..64a7a6789 100644 --- a/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go +++ b/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go @@ -21,6 +21,7 @@ package v1alpha1 import ( + "context" time "time" rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" @@ -63,13 +64,13 @@ func NewFilteredHelmAppInformer(client versioned.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.RainbondV1alpha1().HelmApps(namespace).List(options) + return client.RainbondV1alpha1().HelmApps(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RainbondV1alpha1().HelmApps(namespace).Watch(options) + return client.RainbondV1alpha1().HelmApps(namespace).Watch(context.TODO(), options) }, }, &rainbondv1alpha1.HelmApp{}, diff --git a/pkg/generated/listers/rainbond/v1alpha1/helmapp.go b/pkg/generated/listers/rainbond/v1alpha1/helmapp.go index eeafa56bd..03e5bfcf2 100644 --- a/pkg/generated/listers/rainbond/v1alpha1/helmapp.go +++ b/pkg/generated/listers/rainbond/v1alpha1/helmapp.go @@ -28,8 +28,10 @@ import ( ) // HelmAppLister helps list HelmApps. +// All objects returned here must be treated as read-only. type HelmAppLister interface { // List lists all HelmApps in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.HelmApp, err error) // HelmApps returns an object that can list and get HelmApps. HelmApps(namespace string) HelmAppNamespaceLister @@ -60,10 +62,13 @@ func (s *helmAppLister) HelmApps(namespace string) HelmAppNamespaceLister { } // HelmAppNamespaceLister helps list and get HelmApps. +// All objects returned here must be treated as read-only. type HelmAppNamespaceLister interface { // List lists all HelmApps in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.HelmApp, err error) // Get retrieves the HelmApp from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.HelmApp, error) HelmAppNamespaceListerExpansion } diff --git a/util/k8s/k8s.go b/util/k8s/k8s.go index a2c64eeb7..52af85767 100644 --- a/util/k8s/k8s.go +++ b/util/k8s/k8s.go @@ -8,8 +8,6 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index 3f2865736..22fe5596b 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -16,12 +16,13 @@ type Controller struct { controlLoop *ControlLoop } -func NewController(stopCh chan struct{}, restcfg *rest.Config, resyncPeriod time.Duration) *Controller { +func NewController(stopCh chan struct{}, restcfg *rest.Config, resyncPeriod time.Duration, + repoFile, repoCache string) *Controller { queue := workqueue.New() clientset := versioned.NewForConfigOrDie(restcfg) storer := NewStorer(clientset, resyncPeriod, queue) - controlLoop := NewControlLoop(storer, queue) + controlLoop := NewControlLoop(clientset, storer, queue, repoFile, repoCache) return &Controller{ storer: storer, diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 0012cb1e4..612623de2 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -1,6 +1,10 @@ package helmapp import ( + "context" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "strings" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" @@ -10,17 +14,26 @@ import ( ) type ControlLoop struct { + clientset versioned.Interface storer Storer workqueue workqueue.Interface + repo *helm.Repo } // NewControlLoop - -func NewControlLoop(storer Storer, +func NewControlLoop(clientset versioned.Interface, + storer Storer, workqueue workqueue.Interface, + repoFile string, + repoCache string, ) *ControlLoop { + repo := helm.NewRepo(repoFile, repoCache) + return &ControlLoop{ + clientset: clientset, storer: storer, workqueue: workqueue, + repo: repo, } } @@ -61,8 +74,20 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { status := NewStatus(helmApp.Status) - detector := NewDetector(status) - detector.Detect() + detector := NewDetector(helmApp, status, c.repo) + err := detector.Detect() + if err != nil { + // TODO: create event + return err + } + + helmApp.Status = status.HelmAppStatus + // TODO: context + if _, err := c.clientset.RainbondV1alpha1().HelmApps(helmApp.Namespace). + UpdateStatus(context.Background(), helmApp, metav1.UpdateOptions{}); err != nil { + // TODO: create event + return err + } return nil } diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 6573cf535..69bfb5314 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -1,12 +1,22 @@ package helmapp +import ( + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" + corev1 "k8s.io/api/core/v1" +) + type Detector struct { - status *Status + helmApp *v1alpha1.HelmApp + status *Status + repo *helm.Repo } -func NewDetector(status *Status) *Detector { +func NewDetector(helmApp *v1alpha1.HelmApp, status *Status, repo *helm.Repo) *Detector { return &Detector{ - status: status, + helmApp: helmApp, + status: status, + repo: repo, } } @@ -16,6 +26,15 @@ func (d *Detector) Detect() error { } // add repo + if !d.status.IsConditionTrue(v1alpha1.HelmAppRepoReady) { + appStore := d.helmApp.Spec.AppStore + if err := d.repo.Add(appStore.Name, appStore.URL, "", ""); err != nil { + d.status.SetCondition(*v1alpha1.NewHelmAppCondition( + v1alpha1.HelmAppRepoReady, corev1.ConditionFalse, "RepoFailed", err.Error())) + return err + } + d.status.UpdateConditionStatus(v1alpha1.HelmAppRepoReady, corev1.ConditionTrue) + } return nil } diff --git a/worker/controllers/helmapp/helm/repo.go b/worker/controllers/helmapp/helm/repo.go index 55beee981..129693ab6 100644 --- a/worker/controllers/helmapp/helm/repo.go +++ b/worker/controllers/helmapp/helm/repo.go @@ -27,33 +27,24 @@ var deprecatedRepos = map[string]string{ // Repo - type Repo struct { - name string - url string - username string - password string - forceUpdate bool - repoFile string repoCache string + forceUpdate bool insecureSkipTLSverify bool } -func NewRepo(name, url, username, password, repoFile, repoCache string) *Repo { +// NewRepo creates a new repo. +func NewRepo(repoFile, repoCache string) *Repo { return &Repo{ - name: name, - url: url, - username: username, - password: password, - forceUpdate: true, - repoFile: repoFile, - repoCache: repoCache, + repoFile: repoFile, + repoCache: repoCache, } } -func (o *Repo) Add() error { +func (o *Repo) Add(name, url, username, password string) error { var buf bytes.Buffer - err := o.add(&buf) + err := o.add(&buf, name, url, username, password) if err != nil { return err } @@ -64,11 +55,11 @@ func (o *Repo) Add() error { return nil } -func (o *Repo) add(out io.Writer) error { +func (o *Repo) add(out io.Writer, name, url, username, password string) error { // Block deprecated repos for oldURL, newURL := range deprecatedRepos { - if strings.Contains(o.url, oldURL) { - return fmt.Errorf("repo %q is no longer available; try %q instead", o.url, newURL) + if strings.Contains(url, oldURL) { + return fmt.Errorf("repo %q is no longer available; try %q instead", url, newURL) } } @@ -101,27 +92,27 @@ func (o *Repo) add(out io.Writer) error { } c := repo.Entry{ - Name: o.name, - URL: o.url, - Username: o.username, - Password: o.password, + Name: name, + URL: url, + Username: username, + Password: password, InsecureSkipTLSverify: o.insecureSkipTLSverify, } // If the repo exists do one of two things: // 1. If the configuration for the name is the same continue without error // 2. When the config is different require --force-update - if !o.forceUpdate && f.Has(o.name) { - existing := f.Get(o.name) + if !o.forceUpdate && f.Has(name) { + existing := f.Get(name) if c != *existing { // The input coming in for the name is different from what is already // configured. Return an error. - return errors.Errorf("repository name (%s) already exists, please specify a different name", o.name) + return errors.Errorf("repository name (%s) already exists, please specify a different name", name) } // The add is idempotent so do nothing - fmt.Fprintf(out, "%q already exists with the same configuration, skipping\n", o.name) + fmt.Fprintf(out, "%q already exists with the same configuration, skipping\n", name) return nil } @@ -137,7 +128,7 @@ func (o *Repo) add(out io.Writer) error { r.CachePath = o.repoCache } if _, err := r.DownloadIndexFile(); err != nil { - return errors.Wrapf(err, "looks like %q is not a valid chart repository or cannot be reached", o.url) + return errors.Wrapf(err, "looks like %q is not a valid chart repository or cannot be reached", url) } f.Update(&c) @@ -145,6 +136,6 @@ func (o *Repo) add(out io.Writer) error { if err := f.WriteFile(o.repoFile, 0644); err != nil { return err } - fmt.Fprintf(out, "%q has been added to your repositories\n", o.name) + fmt.Fprintf(out, "%q has been added to your repositories\n", name) return nil } diff --git a/worker/controllers/helmapp/helm/repo_test.go b/worker/controllers/helmapp/helm/repo_test.go index 63140905c..432929fc6 100644 --- a/worker/controllers/helmapp/helm/repo_test.go +++ b/worker/controllers/helmapp/helm/repo_test.go @@ -7,11 +7,9 @@ import ( ) func TestRepoAdd(t *testing.T) { - repo := NewRepo(util.NewUUID(), - "https://openchart.goodrain.com/goodrain/rainbond", - "", "", + repo := NewRepo( "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") - err := repo.Add() + err := repo.Add(util.NewUUID(), "https://openchart.goodrain.com/goodrain/rainbond", "", "") assert.Nil(t, err) } diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index cae141694..415544bb2 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -11,16 +11,7 @@ type Status struct { // NewStatus creates a new helm app status. func NewStatus(status v1alpha1.HelmAppStatus) *Status { - idx, _ := status.GetCondition(v1alpha1.HelmAppDetected) - if idx == -1 { - status.SetCondition(*v1alpha1.NewHelmAppCondition( - v1alpha1.HelmAppDetected, - corev1.ConditionFalse, - "", - "", - )) - } - idx, _ = status.GetCondition(v1alpha1.HelmAppInstalled) + idx, _ := status.GetCondition(v1alpha1.HelmAppInstalled) if idx == -1 { status.SetCondition(*v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppInstalled, @@ -35,6 +26,14 @@ func NewStatus(status v1alpha1.HelmAppStatus) *Status { } func (s *Status) isDetected() bool { - idx, condition := s.GetCondition(v1alpha1.HelmAppDetected) - return idx != -1 && condition.Status == corev1.ConditionTrue + types := []v1alpha1.HelmAppConditionType{ + v1alpha1.HelmAppRepoReady, + v1alpha1.HelmAppChartReady, + } + for _, t := range types { + if !s.IsConditionTrue(t) { + return false + } + } + return true } From 153027e6806ce36acdf8203b71f74e6ac809633b Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 16 Apr 2021 08:55:52 +0800 Subject: [PATCH 06/65] parse chart --- go.mod | 28 +---- go.sum | 102 ++++++++-------- pkg/apis/rainbond/v1alpha1/helmapp_status.go | 4 + pkg/apis/rainbond/v1alpha1/helmapp_types.go | 6 +- worker/controllers/helmapp/controller.go | 7 +- worker/controllers/helmapp/controlloop.go | 27 ++-- worker/controllers/helmapp/detector.go | 39 +++++- worker/controllers/helmapp/helm/app.go | 91 ++++++++++++++ worker/controllers/helmapp/helm/config.go | 19 +++ worker/controllers/helmapp/helm/helm.go | 122 ++++++++++++++++++- worker/controllers/helmapp/helm/repo.go | 4 +- worker/controllers/helmapp/status.go | 12 +- 12 files changed, 363 insertions(+), 98 deletions(-) create mode 100644 worker/controllers/helmapp/helm/app.go create mode 100644 worker/controllers/helmapp/helm/config.go diff --git a/go.mod b/go.mod index e34ce4340..799c9c875 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,6 @@ require ( github.com/beorn7/perks v1.0.1 github.com/bitly/go-simplejson v0.5.0 github.com/bluebreezecf/opentsdb-goclient v0.0.0-20190921120552-796138372df3 - github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292 // indirect github.com/coreos/etcd v3.3.17+incompatible github.com/creack/pty v1.1.11 // indirect @@ -61,7 +60,6 @@ require ( github.com/kr/pty v1.1.8 github.com/mattn/go-colorable v0.1.6 // indirect github.com/mattn/go-runewidth v0.0.6 - github.com/mattn/go-shellwords v1.0.10 // indirect github.com/mitchellh/go-ps v1.0.0 github.com/mitchellh/go-wordwrap v1.0.0 github.com/mitchellh/mapstructure v1.3.3 @@ -92,23 +90,18 @@ require ( github.com/tidwall/gjson v1.6.1 github.com/twinj/uuid v1.0.0 github.com/urfave/cli v1.22.2 - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yudai/umutex v0.0.0-20150817080136-18216d265c6b go.uber.org/atomic v1.7.0 // indirect golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad golang.org/x/net v0.0.0-20201224014010-6772e930b67b golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 // indirect - golang.org/x/sync v0.0.0-20201207232520-09787c993a3a // indirect golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 golang.org/x/tools v0.0.0-20201228162255-34cd474b9958 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e // indirect google.golang.org/grpc v1.33.2 - gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect gopkg.in/alecthomas/kingpin.v2 v2.2.6 - gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect gopkg.in/src-d/go-git.v4 v4.13.1 gopkg.in/yaml.v2 v2.4.0 helm.sh/helm/v3 v3.5.4 @@ -116,9 +109,9 @@ require ( k8s.io/apiextensions-apiserver v0.20.4 k8s.io/apimachinery v0.20.4 k8s.io/apiserver v0.20.4 + k8s.io/cli-runtime v0.20.4 k8s.io/client-go v12.0.0+incompatible - k8s.io/code-generator v0.20.0 - k8s.io/component-base v0.20.1 // indirect + k8s.io/code-generator v0.20.4 sigs.k8s.io/controller-runtime v0.7.0 sigs.k8s.io/yaml v1.2.0 ) @@ -129,28 +122,13 @@ replace ( github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d github.com/docker/docker => github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb github.com/docker/libcompose => github.com/docker/libcompose v0.4.1-0.20181019154650-213509acef0f - github.com/godbus/dbus/v5 => github.com/godbus/dbus/v5 v5.0.3 google.golang.org/grpc => google.golang.org/grpc v1.29.0 - k8s.io/api => k8s.io/api v0.20.0 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.20.0 k8s.io/apimachinery => k8s.io/apimachinery v0.20.0 k8s.io/apiserver => k8s.io/apiserver v0.20.0 k8s.io/cli-runtime => k8s.io/cli-runtime v0.20.0 k8s.io/client-go => k8s.io/client-go v0.20.0 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.20.0 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.20.0 k8s.io/code-generator => k8s.io/code-generator v0.20.0 k8s.io/component-base => k8s.io/component-base v0.20.0 - k8s.io/cri-api => k8s.io/cri-api v0.20.0 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20191016115521-756ffa5af0bd - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20191016114939-2b2b218dc1df - k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20191016114407-2e83b6f20229 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20191016114748-65049c67a58b - k8s.io/kubectl => k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51 - k8s.io/kubelet => k8s.io/kubelet v0.0.0-20191016114556-7841ed97f1b2 - k8s.io/kubernetes => k8s.io/kubernetes v1.16.15 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20191016115753-cf0698c3a16b - k8s.io/metrics => k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9 + ) diff --git a/go.sum b/go.sum index 392409ed1..89047b2f0 100644 --- a/go.sum +++ b/go.sum @@ -59,16 +59,18 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3 h1:CWUqKXe0s8A2z6qCgkP4Kru7wC11YoAnoupUKFDnH08= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +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/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Masterminds/squirrel v1.5.0 h1:JukIZisrUXadA9pl3rMkjhiamxiB0cXiu+HGp/Y8cY8= github.com/Masterminds/squirrel v1.5.0/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= @@ -92,6 +94,7 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= 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= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -125,6 +128,7 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +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/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= @@ -155,9 +159,13 @@ github.com/bluebreezecf/opentsdb-goclient v0.0.0-20190921120552-796138372df3 h1: github.com/bluebreezecf/opentsdb-goclient v0.0.0-20190921120552-796138372df3/go.mod h1:0GQvpWSQV6iuaYXLLau5GsbyYt22OpRD9qeSVENCXqU= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0n+2ukqUJnS2vVe5pQNA= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -193,8 +201,6 @@ github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200228182428-0f16d7a0959c h1:8ahmSVELW1wghbjerVAyuEYD5+Dio66RYvSS0iGfL1M= -github.com/containerd/continuity v0.0.0-20200228182428-0f16d7a0959c/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 h1:6ejg6Lkk8dskcM7wQ28gONkukbQkM4qpj4RnYbpFzrI= github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= @@ -233,7 +239,6 @@ github.com/crossplane/oam-kubernetes-runtime v0.1.0/go.mod h1:UZ4eXkl/e4lKrAhK81 github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/dave/jennifer v1.3.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 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= @@ -249,15 +254,10 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/cli v0.0.0-20181026144139-6b71e84ec8bf h1:k3XMGIFcuEkk0tIBIPH5gL8tGOVHPpsvtsjzt5N2JWk= -github.com/docker/cli v0.0.0-20181026144139-6b71e84ec8bf/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.3+incompatible h1:WVEgoV/GpsTK5hruhHdYi79blQ+nmcm+7Ru/ZuiF+7E= github.com/docker/cli v20.10.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20191216044856-a8371794149d h1:jC8tT/S0OGx2cswpeUTn4gOIea8P08lD3VFQT0cOZ50= github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb h1:PyjxRdW1mqCmSoxy/6uP01P7CGbsD+woX+oOWbaUPwQ= @@ -311,6 +311,7 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +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/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -327,6 +328,8 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko= 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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -355,7 +358,6 @@ github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= 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 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -374,7 +376,6 @@ github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwoh github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= @@ -398,11 +399,16 @@ github.com/go-sql-driver/mysql v1.5.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/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.1 h1:OQl5ys5MBea7OGCdvPbBJWRgnhC/fGona6QKfvFeau8= github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuTg= github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packr/v2 v2.7.1 h1:n3CIW5T17T8v4GGK5sWXLVWJhCz7b5aNLSxW6gYim4o= github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v4.1.0+incompatible h1:WqqLRTsQic3apZUK9qC5sGNfXthmPXzUZ7nQPrNITa4= @@ -473,7 +479,6 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/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 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -496,6 +501,7 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= @@ -505,6 +511,7 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de h1:F7WD09S8QB4LrkEpka0dFPLSotH11HRpCsLIbIcJ7sU= github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 h1:893HsJqtxp9z1SF76gg6hY70hRY1wVlTSnC/h1yUDCo= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -563,6 +570,7 @@ github.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+ github.com/howeyc/fsnotify v0.9.0 h1:0gtV5JmOKH4A8SsFxG2BczSeXWWPvcMT0euZt5gDAxY= github.com/howeyc/fsnotify v0.9.0/go.mod h1:41HzSPxBGeFRQKEEwgh49TRw/nKBsYZ2cF1OzPjSJsA= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -591,7 +599,9 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -601,7 +611,6 @@ github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+ github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4 h1:nwOc1YaOrYJ37sEBrtWZrdqzK22hiJs3GpDmP3sR2Yw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -645,7 +654,6 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.11.6/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -662,15 +670,15 @@ 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/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= +github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.9.0 h1:L8nSXQQzAYByakOFMTwpjRoHsMJklur4Gi59b6VivR8= github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= @@ -711,7 +719,6 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6 h1:V2iyH+aX9C5fsYCpK60U8BYIvmhqxuOL3JZcqc1NB7k= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-shellwords v1.0.10 h1:Y7Xqm8piKOO3v10Thp7Z36h4FYFjt5xB//6XvOrs2Gw= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= @@ -753,11 +760,11 @@ github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQ github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd h1:aY7OQNf2XqY/JQ6qREWamhI/81os/agb2BAGpcx5yWI= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= 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 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -802,7 +809,6 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB 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.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= @@ -852,19 +858,18 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20161029093637-248dadf4e906/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= 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/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -929,7 +934,9 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.4.0 h1:LUa41nrWTQNGhzdsZ5lTnkwbNjj6rXTdazA1cSdjkOY= github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 h1:HXr/qUllAWv9riaI4zh2eXWKmCSDqVS/XH1MRHLKRwk= github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351/go.mod h1:DCgfY80j8GYL7MLEfvcpSFvjD0L5yZq/aZUJmhZklyg= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -946,16 +953,15 @@ github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.20.8+incompatible h1:8c7Atn0FAUZJo+f4wYbN0iVpdWniCQk7IYwGtgdh1mY= github.com/shirou/gopsutil v2.20.8+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/siebenmann/go-kstat v0.0.0-20200303194639-4e8294f9e9d5 h1:rRF7gJ7t0E1bfqNLwMqgb59eb273kgi+GgLE/yEiDzs= github.com/siebenmann/go-kstat v0.0.0-20200303194639-4e8294f9e9d5/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -973,6 +979,7 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO 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/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= @@ -997,12 +1004,10 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -1040,12 +1045,11 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20160323030313-93e72a773fad h1:LIwN+8bLzKvIuCiV5yT1nICcW/8yNfU5jVV1SHhcPco= -github.com/xeipuuv/gojsonschema v0.0.0-20160323030313-93e72a773fad/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/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/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yudai/hcl v0.0.0-20151013225006-5fa2393b3552/go.mod h1:hg0ZaCmQL3rze1cH8Fh2g0a9q8vQs0uN8ESpePEwSEw= github.com/yudai/umutex v0.0.0-20150817080136-18216d265c6b h1:5/txHOjeYQCspaoZzyqanb7On7ZBSndTanlfFfOIEiE= @@ -1054,13 +1058,16 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= @@ -1078,7 +1085,6 @@ 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/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1091,7 +1097,6 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180214000028-650f4a345ab4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1111,8 +1116,6 @@ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9 h1:sYNJzB4J8toYPQTM6pAkcmBRgw9SnQKP9oXCHfgy604= -golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1168,7 +1171,6 @@ golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1279,8 +1281,6 @@ golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo= -golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1367,7 +1367,6 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= @@ -1443,7 +1442,6 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -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= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1459,7 +1457,7 @@ gopkg.in/errgo.v1 v1.0.0-20161222125816-442357a80af5/go.mod h1:u0ALmqvLRxLI95fkd gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/gorp.v1 v1.7.2 h1:j3DWlAyGVv8whO7AcIWznQ2Yj7yJkn34B8s63GViAAw= gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/httprequest.v1 v1.1.1/go.mod h1:/CkavNL+g3qLOrpFHVrEx4NKepeqR4XTZWNj4sGGjz0= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -1501,6 +1499,7 @@ gotest.tools v0.0.0-20181223230014-1083505acf35/go.mod h1:R//lfYlUuTOTfblYI3lGoA gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= helm.sh/helm/v3 v3.5.4 h1:FUx2L831YESvMcoNoPTicV0oW/6+es+Tnojw5yGvyVM= helm.sh/helm/v3 v3.5.4/go.mod h1:44SeYdnTImrEArjDazqgVQVRitFpLEZNYX97NFJyq4k= @@ -1512,8 +1511,15 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= +k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0HRNyQ+8KTEERVsK0PW48= +k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= +k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= +k8s.io/api v0.18.5/go.mod h1:tN+e/2nbdGKOAH55NMV8oGrMG+3uRlA9GaRfvnCCSNk= +k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.20.4 h1:xZjKidCirayzX6tHONRQyTNDVIR55TYVqgATqo6ZULY= +k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/apiextensions-apiserver v0.20.0 h1:HmeP9mLET/HlIQ5gjP+1c20tgJrlshY5nUyIand3AVg= k8s.io/apiextensions-apiserver v0.20.0/go.mod h1:ZH+C33L2Bh1LY1+HphoRmN1IQVLTShVcTojivK3N9xg= k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= @@ -1528,28 +1534,29 @@ k8s.io/code-generator v0.20.0 h1:c8JaABvEEZPDE8MICTOtveHX2axchl+EptM+o4OGvbg= k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.20.0 h1:BXGL8iitIQD+0NgW49UsM7MraNUUGDU3FBmrfUAtmVQ= k8s.io/component-base v0.20.0/go.mod h1:wKPj+RHnAr8LW2EIBIK7AxOHPde4gme2lzXwVSoRXeA= +k8s.io/component-helpers v0.20.4/go.mod h1:S7jGg8zQp3kwvSzfuGtNaQAMVmvzomXDioTm5vABn9g= 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/gengo v0.0.0-20201113003025-83324d819ded h1:JApXBKYyB7l9xx+DK7/+mFjC7A9Bt5A93FPvFD0HIFE= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= 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 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= 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 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4/go.mod h1:+aW0UZgSXdTSHTIFnWnueEuXjOqerDUxGIw6Ygr+vYY= -k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-aggregator v0.20.1/go.mod h1:1ZeyRfSg5HcRI8dihvWAc7VpXSMAw9UmZoWXBUOPyew= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51/go.mod h1:gL826ZTIfD4vXTGlmzgTbliCAT9NGiqpCqK2aNYv5MQ= -k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e/go.mod h1:ve7/vMWeY5lEBkZf6Bt5TTbGS3b8wAxwGbdXAsufjRs= +k8s.io/kubectl v0.18.5/go.mod h1:LAGxvYunNuwcZst0OAMXnInFIv81/IeoAz2N1Yh+AhU= +k8s.io/kubectl v0.20.4 h1:Y1gUiigiZM+ulcrnWeqSHlTd0/7xWcQIXjuMnjtHyoo= +k8s.io/kubectl v0.20.4/go.mod h1:yCC5lUQyXRmmtwyxfaakryh9ezzp/bT0O14LeoFLbGo= +k8s.io/metrics v0.18.5/go.mod h1:pqn6YiCCxUt067ivZVo4KtvppvdykV6HHG5+7ygVkNg= +k8s.io/metrics v0.20.4/go.mod h1:DDXS+Ls+2NAxRcVhXKghRPa3csljyJRjDRjPe6EOg/g= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1567,8 +1574,6 @@ sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+p sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= @@ -1576,3 +1581,4 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= +vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_status.go b/pkg/apis/rainbond/v1alpha1/helmapp_status.go index 823c0b29f..bb90f31dd 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_status.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_status.go @@ -80,6 +80,10 @@ func (in *HelmAppStatus) UpdateConditionStatus(conditionType HelmAppConditionTyp _, condition := in.GetCondition(conditionType) if condition != nil { condition.Status = conditionStatus + if conditionStatus == corev1.ConditionTrue { + condition.Reason = "" + condition.Message = "" + } in.UpdateCondition(condition) return } diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 3e7ae09b4..77bb78739 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -66,8 +66,10 @@ const ( HelmAppRepoReady HelmAppConditionType = "RepoReady" // HelmAppChartReady indicates whether the chart is ready. HelmAppChartReady HelmAppConditionType = "ChartReady" - // HelmAppDetected indicates whether the helm app has been installed. - HelmAppInstalled HelmAppConditionType = "Installed" + // HelmAppPreInstalled indicates whether the helm app has been pre installed. + HelmAppPreInstalled HelmAppConditionType = "PreInstalled" + // HelmAppPreInstalled indicates whether the chart has been parsed. + HelmAppChartParsed HelmAppConditionType = "ChartParsed" ) // HelmAppCondition contains details for the current condition of this helm application. diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index 22fe5596b..ea27712eb 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -4,13 +4,14 @@ import ( "time" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "helm.sh/helm/v3/pkg/kube" + "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/rest" "k8s.io/client-go/util/workqueue" ) // Controller - type Controller struct { - clientset versioned.Interface storer Storer stopCh chan struct{} controlLoop *ControlLoop @@ -21,8 +22,10 @@ func NewController(stopCh chan struct{}, restcfg *rest.Config, resyncPeriod time queue := workqueue.New() clientset := versioned.NewForConfigOrDie(restcfg) storer := NewStorer(clientset, resyncPeriod, queue) + configFlags := genericclioptions.NewConfigFlags(true) + kubeClient := kube.New(configFlags) - controlLoop := NewControlLoop(clientset, storer, queue, repoFile, repoCache) + controlLoop := NewControlLoop(kubeClient, clientset, configFlags, storer, queue, repoFile, repoCache) return &Controller{ storer: storer, diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 612623de2..b7abe192e 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -2,14 +2,16 @@ package helmapp import ( "context" - "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "strings" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" k8sutil "github.com/goodrain/rainbond/util/k8s" + "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/sirupsen/logrus" + "helm.sh/helm/v3/pkg/kube" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/util/workqueue" ) @@ -18,10 +20,13 @@ type ControlLoop struct { storer Storer workqueue workqueue.Interface repo *helm.Repo + helm *helm.Helm } // NewControlLoop - -func NewControlLoop(clientset versioned.Interface, +func NewControlLoop(kubeClient kube.Interface, + clientset versioned.Interface, + configFlags *genericclioptions.ConfigFlags, storer Storer, workqueue workqueue.Interface, repoFile string, @@ -34,6 +39,7 @@ func NewControlLoop(clientset versioned.Interface, storer: storer, workqueue: workqueue, repo: repo, + helm: helm.NewHelm(kubeClient, configFlags, repoFile, repoCache), } } @@ -74,21 +80,28 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { status := NewStatus(helmApp.Status) - detector := NewDetector(helmApp, status, c.repo) + defer func() { + helmApp.Status = status.HelmAppStatus + c.updateStatus(helmApp) + }() + + detector := NewDetector(helmApp, status, c.helm, c.repo) err := detector.Detect() if err != nil { // TODO: create event return err } - helmApp.Status = status.HelmAppStatus + return nil +} + +func (c *ControlLoop) updateStatus(helmApp *v1alpha1.HelmApp) error { // TODO: context if _, err := c.clientset.RainbondV1alpha1().HelmApps(helmApp.Namespace). UpdateStatus(context.Background(), helmApp, metav1.UpdateOptions{}); err != nil { // TODO: create event return err } - return nil } diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 69bfb5314..cfd9e4464 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -10,13 +10,17 @@ type Detector struct { helmApp *v1alpha1.HelmApp status *Status repo *helm.Repo + app *helm.App } -func NewDetector(helmApp *v1alpha1.HelmApp, status *Status, repo *helm.Repo) *Detector { +func NewDetector(helmApp *v1alpha1.HelmApp, status *Status, h *helm.Helm, repo *helm.Repo) *Detector { + appStore := helmApp.Spec.AppStore + app := helm.NewApp(helmApp.Spec.AppName, helmApp.Namespace, helmApp.Spec.AppName, appStore.Name, helmApp.Spec.Version, h) return &Detector{ helmApp: helmApp, status: status, repo: repo, + app: app, } } @@ -36,5 +40,38 @@ func (d *Detector) Detect() error { d.status.UpdateConditionStatus(v1alpha1.HelmAppRepoReady, corev1.ConditionTrue) } + // pull chart + if !d.status.IsConditionTrue(v1alpha1.HelmAppChartReady) { + err := d.app.Pull(d.helmApp.Spec.AppStore.Name + "/" + d.helmApp.Spec.AppName) + if err != nil { + d.status.UpdateCondition(v1alpha1.NewHelmAppCondition( + v1alpha1.HelmAppChartReady, corev1.ConditionFalse, "ChartFailed", err.Error())) + return err + } + d.status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionTrue) + } + + // check if the chart is valid + if !d.status.IsConditionTrue(v1alpha1.HelmAppPreInstalled) { + if err := d.app.PreInstall(); err != nil { + d.status.UpdateCondition(v1alpha1.NewHelmAppCondition( + v1alpha1.HelmAppPreInstalled, corev1.ConditionFalse, "PreInstallFailed", err.Error())) + return err + } + d.status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionTrue) + } + + // parse chart + if !d.status.IsConditionTrue(v1alpha1.HelmAppChartParsed) { + values, err := d.app.ParseChart() + if err != nil { + d.status.UpdateCondition(v1alpha1.NewHelmAppCondition( + v1alpha1.HelmAppChartParsed, corev1.ConditionFalse, "ChartParsed", err.Error())) + return err + } + d.status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionTrue) + d.status.CurrentValues = values + } + return nil } diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go new file mode 100644 index 000000000..fb60ad8cb --- /dev/null +++ b/worker/controllers/helmapp/helm/app.go @@ -0,0 +1,91 @@ +package helm + +import ( + "bytes" + "encoding/base64" + "github.com/sirupsen/logrus" + "helm.sh/helm/v3/pkg/action" + "helm.sh/helm/v3/pkg/cli" + "io/fs" + "io/ioutil" + "path" + "path/filepath" + "strings" +) + +type App struct { + name string + repo string + releaseName string + namespace string + version string + chartDir string + + helm *Helm +} + +func (a *App) Chart() string { + return a.repo + "/" + a.name +} + +// TODO: use appName and templateName +func NewApp(releaseName string, namespace, name, repo string, version string, helm *Helm) *App { + return &App{ + name: name, + repo: repo, + releaseName: releaseName, + namespace: namespace, + version: version, + helm: helm, + chartDir: "/tmp/helm/chart", + } +} + +func (a *App) Pull(chart string) error { + client := action.NewPull() + settings := cli.New() + settings.RepositoryConfig = a.helm.repoFile + settings.RepositoryCache = a.helm.repoCache + client.Settings = settings + client.DestDir = a.chartDir + client.Version = a.version + + output, err := client.Run(chart) + if err != nil { + return err + } + logrus.Info(output) + return nil +} + +func (a *App) PreInstall() error { + var buf bytes.Buffer + return a.helm.PreInstall(a.name, a.namespace, a.Chart(), &buf) +} + +func (a *App) ParseChart() (string, error) { + //chartPath := path.Join(a.chartDir, a.name + a.version + ".tgz") + chartDir := path.Join(a.chartDir, a.name) + + var values string + err := filepath.Walk(chartDir, func(path string, info fs.FileInfo, err error) error { + if err != nil { + return err + } + if info.IsDir() { + return nil + } + if !strings.Contains(path, "values.yaml") { + return nil + } + + file, err := ioutil.ReadFile(path) + if err != nil { + return err + } + values = base64.StdEncoding.EncodeToString(file) + + return nil + }) + return values, err +} diff --git a/worker/controllers/helmapp/helm/config.go b/worker/controllers/helmapp/helm/config.go new file mode 100644 index 000000000..cbb4f579c --- /dev/null +++ b/worker/controllers/helmapp/helm/config.go @@ -0,0 +1,19 @@ +package helm + +import "path" + +type Config struct { + helmCache string +} + +func (c *Config) RepoFile() string { + return path.Join(c.helmCache, "/repository/repositories.yaml") +} + +func (c *Config) RepoCache() string { + return path.Join(c.helmCache, "cache") +} + +func (c *Config) ChartCache() string { + return path.Join(c.helmCache, "chart") +} diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index d016dc4dd..38ddd176c 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -1,5 +1,125 @@ package helm -type Helm struct { +import ( + "io" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "helm.sh/helm/v3/pkg/action" + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/cli/values" + "helm.sh/helm/v3/pkg/downloader" + "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v3/pkg/kube" + "k8s.io/cli-runtime/pkg/genericclioptions" +) + +type Helm struct { + cfg *action.Configuration + + repoFile string + repoCache string +} + +// NewHelm creates a new helm. +func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFlags, repoFile, repoCache string) *Helm { + cfg := &action.Configuration{ + KubeClient: kubeClient, + Log: func(s string, i ...interface{}) { + logrus.Debugf(s, i) + }, + RESTClientGetter: configFlags, + } + return &Helm{ + cfg: cfg, + repoFile: repoFile, + repoCache: repoCache, + } +} + +func (h *Helm) PreInstall(name, namespace, chart string, out io.Writer) error { + return h.install(name, namespace, chart, &values.Options{}, true, out) +} + +func (h *Helm) install(name, namespace, chart string, valueOpts *values.Options, dryRun bool, out io.Writer) error { + client := action.NewInstall(h.cfg) + client.ReleaseName = name + client.Namespace = namespace + client.DryRun = dryRun + + settings := cli.New() + settings.RepositoryCache = h.repoCache + settings.RepositoryConfig = h.repoFile + + cp, err := client.ChartPathOptions.LocateChart(chart, settings) + if err != nil { + return err + } + + logrus.Debugf("CHART PATH: %s\n", cp) + + p := getter.All(settings) + vals, err := valueOpts.MergeValues(p) + if err != nil { + return err + } + + // Check chart dependencies to make sure all are present in /charts + chartRequested, err := loader.Load(cp) + if err != nil { + return err + } + + if err := checkIfInstallable(chartRequested); err != nil { + return err + } + + if chartRequested.Metadata.Deprecated { + logrus.Warningf("This chart is deprecated") + } + + if req := chartRequested.Metadata.Dependencies; req != nil { + // If CheckDependencies returns an error, we have unfulfilled dependencies. + // As of Helm 2.4.0, this is treated as a stopping condition: + // https://github.com/helm/helm/issues/2209 + if err := action.CheckDependencies(chartRequested, req); err != nil { + if client.DependencyUpdate { + man := &downloader.Manager{ + Out: out, + ChartPath: cp, + Keyring: client.ChartPathOptions.Keyring, + SkipUpdate: false, + Getters: p, + RepositoryConfig: settings.RepositoryConfig, + RepositoryCache: settings.RepositoryCache, + Debug: settings.Debug, + } + if err := man.Update(); err != nil { + return err + } + // Reload the chart with the updated Chart.lock file. + if chartRequested, err = loader.Load(cp); err != nil { + return errors.Wrap(err, "failed reloading chart after repo update") + } + } else { + return err + } + } + } + + _, err = client.Run(chartRequested, vals) + return err +} + +// checkIfInstallable validates if a chart can be installed +// +// Application chart type is only installable +func checkIfInstallable(ch *chart.Chart) error { + switch ch.Metadata.Type { + case "", "application": + return nil + } + return errors.Errorf("%s charts are not installable", ch.Metadata.Type) } diff --git a/worker/controllers/helmapp/helm/repo.go b/worker/controllers/helmapp/helm/repo.go index 129693ab6..c17a1cbd6 100644 --- a/worker/controllers/helmapp/helm/repo.go +++ b/worker/controllers/helmapp/helm/repo.go @@ -37,8 +37,8 @@ type Repo struct { // NewRepo creates a new repo. func NewRepo(repoFile, repoCache string) *Repo { return &Repo{ - repoFile: repoFile, - repoCache: repoCache, + repoFile: repoFile, + repoCache: repoCache, } } diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index 415544bb2..229cd7bac 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -2,7 +2,6 @@ package helmapp import ( "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" - corev1 "k8s.io/api/core/v1" ) type Status struct { @@ -11,15 +10,6 @@ type Status struct { // NewStatus creates a new helm app status. func NewStatus(status v1alpha1.HelmAppStatus) *Status { - idx, _ := status.GetCondition(v1alpha1.HelmAppInstalled) - if idx == -1 { - status.SetCondition(*v1alpha1.NewHelmAppCondition( - v1alpha1.HelmAppInstalled, - corev1.ConditionFalse, - "", - "", - )) - } return &Status{ HelmAppStatus: status, } @@ -29,6 +19,8 @@ func (s *Status) isDetected() bool { types := []v1alpha1.HelmAppConditionType{ v1alpha1.HelmAppRepoReady, v1alpha1.HelmAppChartReady, + v1alpha1.HelmAppPreInstalled, + v1alpha1.HelmAppChartParsed, } for _, t := range types { if !s.IsConditionTrue(t) { From 707940d7c3619883a0c1ac7d6f69997d7b8e5a4e Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 16 Apr 2021 10:07:34 +0800 Subject: [PATCH 07/65] create helm app --- Makefile | 1 + api/controller/application.go | 10 +- api/handler/application_handler.go | 62 +- api/model/model.go | 21 +- cmd/helmappcontroller/main.go | 3 +- db/model/application.go | 19 +- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 4 +- util/commonutil/convert_types.go | 918 ++++++++++++++++++++ worker/controllers/helmapp/detector.go | 4 +- worker/controllers/helmapp/helm/app.go | 51 +- worker/controllers/helmapp/helm/repo.go | 23 +- 11 files changed, 1038 insertions(+), 78 deletions(-) create mode 100644 util/commonutil/convert_types.go diff --git a/Makefile b/Makefile index c36bff769..d333481b3 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,7 @@ manifests: controller-gen # Generate code generate: controller-gen + chmod +x vendor/k8s.io/code-generator/generate-groups.sh ./hack/k8s/codegen/update-generated.sh $(CONTROLLER_GEN) object:headerFile="hack/k8s/codegen/boilerplate.go.txt" paths="./pkg/apis/..." diff --git a/api/controller/application.go b/api/controller/application.go index 087da1adb..3c879e4f0 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -27,7 +27,11 @@ func (a *ApplicationController) CreateApp(w http.ResponseWriter, r *http.Request httputil.ReturnBcodeError(r, w, bcode.NewBadRequest("the field 'app_tore_name' is required")) return } - if tenantReq.HelmAppName == "" { + if tenantReq.AppTemplateName == "" { + httputil.ReturnBcodeError(r, w, bcode.NewBadRequest("the field 'app_template_name' is required")) + return + } + if tenantReq.AppTemplateName == "" { httputil.ReturnBcodeError(r, w, bcode.NewBadRequest("the field 'helm_app_name' is required")) return } @@ -42,7 +46,7 @@ func (a *ApplicationController) CreateApp(w http.ResponseWriter, r *http.Request tenantReq.TenantID = tenant.UUID // create app - app, err := handler.GetApplicationHandler().CreateApp(&tenantReq) + app, err := handler.GetApplicationHandler().CreateApp(r.Context(), &tenantReq) if err != nil { httputil.ReturnBcodeError(r, w, err) return @@ -60,7 +64,7 @@ func (a *ApplicationController) BatchCreateApp(w http.ResponseWriter, r *http.Re // get current tenant tenant := r.Context().Value(middleware.ContextKey("tenant")).(*dbmodel.Tenants) - respList, err := handler.GetApplicationHandler().BatchCreateApp(&apps, tenant.UUID) + respList, err := handler.GetApplicationHandler().BatchCreateApp(r.Context(), &apps, tenant.UUID) if err != nil { httputil.ReturnBcodeError(r, w, err) return diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 7b1d0ad28..e7f46a416 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -11,23 +11,28 @@ import ( "github.com/goodrain/rainbond/api/util/bcode" "github.com/goodrain/rainbond/db" dbmodel "github.com/goodrain/rainbond/db/model" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/goodrain/rainbond/util" + "github.com/goodrain/rainbond/util/commonutil" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/server/pb" "github.com/jinzhu/gorm" "github.com/sirupsen/logrus" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ApplicationAction - type ApplicationAction struct { - statusCli *client.AppRuntimeSyncClient - promClient prometheus.Interface + statusCli *client.AppRuntimeSyncClient + promClient prometheus.Interface + rainbondClient versioned.Interface } // ApplicationHandler defines handler methods to TenantApplication. type ApplicationHandler interface { - CreateApp(req *model.Application) (*model.Application, error) - BatchCreateApp(req *model.CreateAppRequest, tenantID string) ([]model.CreateAppResponse, error) + CreateApp(ctx context.Context, req *model.Application) (*model.Application, error) + BatchCreateApp(ctx context.Context, req *model.CreateAppRequest, tenantID string) ([]model.CreateAppResponse, error) UpdateApp(srcApp *dbmodel.Application, req model.UpdateAppRequest) (*dbmodel.Application, error) ListApps(tenantID, appName string, page, pageSize int) (*model.ListAppResponse, error) GetAppByID(appID string) (*dbmodel.Application, error) @@ -53,16 +58,16 @@ func NewApplicationHandler(statusCli *client.AppRuntimeSyncClient, promClient pr } // CreateApp - -func (a *ApplicationAction) CreateApp(req *model.Application) (*model.Application, error) { +func (a *ApplicationAction) CreateApp(ctx context.Context, req *model.Application) (*model.Application, error) { appReq := &dbmodel.Application{ - EID: req.EID, - TenantID: req.TenantID, - AppID: util.NewUUID(), - AppName: req.AppName, - AppType: req.AppType, - AppStoreName: req.AppStoreName, - HelmAppName: req.HelmAppName, - Version: req.Version, + EID: req.EID, + TenantID: req.TenantID, + AppID: util.NewUUID(), + AppName: req.AppName, + AppType: req.AppType, + AppStoreName: req.AppStoreName, + AppTemplateName: req.AppTemplateName, + Version: req.Version, } req.AppID = appReq.AppID @@ -77,22 +82,45 @@ func (a *ApplicationAction) CreateApp(req *model.Application) (*model.Applicatio } } - // create app.rainbond.io - return nil + // create helmapp.rainbond.goodrain.io + return a.createHelmApp(ctx, appReq) }) return req, err } +func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Application) error { + helmApp := &v1alpha1.HelmApp{ + ObjectMeta: metav1.ObjectMeta{ + Name: app.AppName, + Namespace: app.TenantID, + // TODO: rainbond labels. + }, + Spec: v1alpha1.HelmAppSpec{ + EID: app.EID, + TemplateName: app.AppTemplateName, + Version: app.Version, + Revision: commonutil.Int32(0), + AppStore: &v1alpha1.HelmAppStore{ + Version: "", // TODO: setup version. + Name: app.AppStoreName, + URL: app.AppStoreURL, + }, + }} + + _, err := a.rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Name).Create(ctx, helmApp, metav1.CreateOptions{}) + return err +} + // BatchCreateApp - -func (a *ApplicationAction) BatchCreateApp(apps *model.CreateAppRequest, tenantID string) ([]model.CreateAppResponse, error) { +func (a *ApplicationAction) BatchCreateApp(ctx context.Context, apps *model.CreateAppRequest, tenantID string) ([]model.CreateAppResponse, error) { var ( resp model.CreateAppResponse respList []model.CreateAppResponse ) for _, app := range apps.AppsInfo { app.TenantID = tenantID - regionApp, err := GetApplicationHandler().CreateApp(&app) + regionApp, err := GetApplicationHandler().CreateApp(ctx, &app) if err != nil { logrus.Errorf("Batch Create App [%v] error is [%v] ", app.AppName, err) continue diff --git a/api/model/model.go b/api/model/model.go index 9555e6aef..92262d587 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1649,16 +1649,17 @@ func NewAppStatusFromImport(app *ImportAppStruct) *dbmodel.AppStatus { // Application - type Application struct { - EID string `json:"eid" validate:"required"` - AppName string `json:"app_name" validate:"required"` - AppType string `json:"app_type" validate:"required,oneof=rainbond helm"` - ConsoleAppID int64 `json:"console_app_id"` - AppID string `json:"app_id"` - TenantID string `json:"tenant_id"` - ServiceIDs []string `json:"service_ids"` - AppStoreName string `json:"app_store_name"` - HelmAppName string `json:"helm_app_name"` - Version string `json:"version"` + EID string `json:"eid" validate:"required"` + AppName string `json:"app_name" validate:"required"` + AppType string `json:"app_type" validate:"required,oneof=rainbond helm"` + ConsoleAppID int64 `json:"console_app_id"` + AppID string `json:"app_id"` + TenantID string `json:"tenant_id"` + ServiceIDs []string `json:"service_ids"` + AppStoreName string `json:"app_store_name"` + AppStoreURL string `json:"app_store_url"` + AppTemplateName string `json:"app_template_name"` + Version string `json:"version"` } // CreateAppRequest - diff --git a/cmd/helmappcontroller/main.go b/cmd/helmappcontroller/main.go index 2b37531bd..b6dde9230 100644 --- a/cmd/helmappcontroller/main.go +++ b/cmd/helmappcontroller/main.go @@ -38,8 +38,7 @@ func main() { }, Spec: rainbondv1alpha1.HelmAppSpec{ PreStatus: "", - AppName: "rainbond-operator", - Version: "v1.0.0", + Version: "1.3.0", Revision: Int32(0), Values: "", AppStore: &rainbondv1alpha1.HelmAppStore{ diff --git a/db/model/application.go b/db/model/application.go index 7fbad2991..5415ce228 100644 --- a/db/model/application.go +++ b/db/model/application.go @@ -15,15 +15,16 @@ func IsGovernanceModeValid(governanceMode string) bool { // Application - type Application struct { Model - EID string `gorm:"column:eid" json:"eid"` - TenantID string `gorm:"column:tenant_id" json:"tenant_id"` - AppName string `gorm:"column:app_name" json:"app_name"` - AppID string `gorm:"column:app_id" json:"app_id"` - AppType string `gorm:"column:app_type;default:rainbond" json:"app_type"` - AppStoreName string `gorm:"column:app_store_name" json:"app_store_name"` - HelmAppName string `gorm:"column:helm_app_name" json:"helm_app_name"` - Version string `gorm:"column:Version" json:"Version"` - GovernanceMode string `gorm:"column:governance_mode;default:'BUILD_IN_SERVICE_MESH'" json:"governance_mode"` + EID string `gorm:"column:eid" json:"eid"` + TenantID string `gorm:"column:tenant_id" json:"tenant_id"` + AppName string `gorm:"column:app_name" json:"app_name"` + AppID string `gorm:"column:app_id" json:"app_id"` + AppType string `gorm:"column:app_type;default:rainbond" json:"app_type"` + AppStoreName string `gorm:"column:app_store_name" json:"app_store_name"` + AppStoreURL string `gorm:"column:app_store_url" json:"app_store_url"` + AppTemplateName string `gorm:"column:app_template_name" json:"app_template_name"` + Version string `gorm:"column:Version" json:"Version"` + GovernanceMode string `gorm:"column:governance_mode;default:'BUILD_IN_SERVICE_MESH'" json:"governance_mode"` } // TableName return tableName "application" diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 77bb78739..d727e5534 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -96,13 +96,15 @@ type HelmAppSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file + EID string `json:"eid"` + // The prerequisite status. // +kubebuilder:validation:Enum=NotConfigured;Configured PreStatus string `json:"preStatus,omitempty"` // The application name. // TODO: validation - AppName string `json:"appName"` + TemplateName string `json:"appName"` // The application version. // TODO: validation diff --git a/util/commonutil/convert_types.go b/util/commonutil/convert_types.go new file mode 100644 index 000000000..e334ab7b5 --- /dev/null +++ b/util/commonutil/convert_types.go @@ -0,0 +1,918 @@ +package commonutil + +import "time" + +// String returns a pointer to the string value passed in. +func String(v string) *string { + return &v +} + +// StringValue returns the value of the string pointer passed in or +// "" if the pointer is nil. +func StringValue(v *string) string { + if v != nil { + return *v + } + return "" +} + +// StringSlice converts a slice of string values into a slice of +// string pointers +func StringSlice(src []string) []*string { + dst := make([]*string, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// StringValueSlice converts a slice of string pointers into a slice of +// string values +func StringValueSlice(src []*string) []string { + dst := make([]string, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// StringMap converts a string map of string values into a string +// map of string pointers +func StringMap(src map[string]string) map[string]*string { + dst := make(map[string]*string) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// StringValueMap converts a string map of string pointers into a string +// map of string values +func StringValueMap(src map[string]*string) map[string]string { + dst := make(map[string]string) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Bool returns a pointer to the bool value passed in. +func Bool(v bool) *bool { + return &v +} + +// BoolValue returns the value of the bool pointer passed in or +// false if the pointer is nil. +func BoolValue(v *bool) bool { + if v != nil { + return *v + } + return false +} + +// BoolSlice converts a slice of bool values into a slice of +// bool pointers +func BoolSlice(src []bool) []*bool { + dst := make([]*bool, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// BoolValueSlice converts a slice of bool pointers into a slice of +// bool values +func BoolValueSlice(src []*bool) []bool { + dst := make([]bool, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// BoolMap converts a string map of bool values into a string +// map of bool pointers +func BoolMap(src map[string]bool) map[string]*bool { + dst := make(map[string]*bool) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// BoolValueMap converts a string map of bool pointers into a string +// map of bool values +func BoolValueMap(src map[string]*bool) map[string]bool { + dst := make(map[string]bool) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int returns a pointer to the int value passed in. +func Int(v int) *int { + return &v +} + +// IntValue returns the value of the int pointer passed in or +// 0 if the pointer is nil. +func IntValue(v *int) int { + if v != nil { + return *v + } + return 0 +} + +// IntSlice converts a slice of int values into a slice of +// int pointers +func IntSlice(src []int) []*int { + dst := make([]*int, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// IntValueSlice converts a slice of int pointers into a slice of +// int values +func IntValueSlice(src []*int) []int { + dst := make([]int, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// IntMap converts a string map of int values into a string +// map of int pointers +func IntMap(src map[string]int) map[string]*int { + dst := make(map[string]*int) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// IntValueMap converts a string map of int pointers into a string +// map of int values +func IntValueMap(src map[string]*int) map[string]int { + dst := make(map[string]int) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Uint returns a pointer to the uint value passed in. +func Uint(v uint) *uint { + return &v +} + +// UintValue returns the value of the uint pointer passed in or +// 0 if the pointer is nil. +func UintValue(v *uint) uint { + if v != nil { + return *v + } + return 0 +} + +// UintSlice converts a slice of uint values uinto a slice of +// uint pointers +func UintSlice(src []uint) []*uint { + dst := make([]*uint, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// UintValueSlice converts a slice of uint pointers uinto a slice of +// uint values +func UintValueSlice(src []*uint) []uint { + dst := make([]uint, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// UintMap converts a string map of uint values uinto a string +// map of uint pointers +func UintMap(src map[string]uint) map[string]*uint { + dst := make(map[string]*uint) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// UintValueMap converts a string map of uint pointers uinto a string +// map of uint values +func UintValueMap(src map[string]*uint) map[string]uint { + dst := make(map[string]uint) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int8 returns a pointer to the int8 value passed in. +func Int8(v int8) *int8 { + return &v +} + +// Int8Value returns the value of the int8 pointer passed in or +// 0 if the pointer is nil. +func Int8Value(v *int8) int8 { + if v != nil { + return *v + } + return 0 +} + +// Int8Slice converts a slice of int8 values into a slice of +// int8 pointers +func Int8Slice(src []int8) []*int8 { + dst := make([]*int8, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Int8ValueSlice converts a slice of int8 pointers into a slice of +// int8 values +func Int8ValueSlice(src []*int8) []int8 { + dst := make([]int8, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Int8Map converts a string map of int8 values into a string +// map of int8 pointers +func Int8Map(src map[string]int8) map[string]*int8 { + dst := make(map[string]*int8) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Int8ValueMap converts a string map of int8 pointers into a string +// map of int8 values +func Int8ValueMap(src map[string]*int8) map[string]int8 { + dst := make(map[string]int8) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int16 returns a pointer to the int16 value passed in. +func Int16(v int16) *int16 { + return &v +} + +// Int16Value returns the value of the int16 pointer passed in or +// 0 if the pointer is nil. +func Int16Value(v *int16) int16 { + if v != nil { + return *v + } + return 0 +} + +// Int16Slice converts a slice of int16 values into a slice of +// int16 pointers +func Int16Slice(src []int16) []*int16 { + dst := make([]*int16, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Int16ValueSlice converts a slice of int16 pointers into a slice of +// int16 values +func Int16ValueSlice(src []*int16) []int16 { + dst := make([]int16, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Int16Map converts a string map of int16 values into a string +// map of int16 pointers +func Int16Map(src map[string]int16) map[string]*int16 { + dst := make(map[string]*int16) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Int16ValueMap converts a string map of int16 pointers into a string +// map of int16 values +func Int16ValueMap(src map[string]*int16) map[string]int16 { + dst := make(map[string]int16) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int32 returns a pointer to the int32 value passed in. +func Int32(v int32) *int32 { + return &v +} + +// Int32Value returns the value of the int32 pointer passed in or +// 0 if the pointer is nil. +func Int32Value(v *int32) int32 { + if v != nil { + return *v + } + return 0 +} + +// Int32Slice converts a slice of int32 values into a slice of +// int32 pointers +func Int32Slice(src []int32) []*int32 { + dst := make([]*int32, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Int32ValueSlice converts a slice of int32 pointers into a slice of +// int32 values +func Int32ValueSlice(src []*int32) []int32 { + dst := make([]int32, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Int32Map converts a string map of int32 values into a string +// map of int32 pointers +func Int32Map(src map[string]int32) map[string]*int32 { + dst := make(map[string]*int32) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Int32ValueMap converts a string map of int32 pointers into a string +// map of int32 values +func Int32ValueMap(src map[string]*int32) map[string]int32 { + dst := make(map[string]int32) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int64 returns a pointer to the int64 value passed in. +func Int64(v int64) *int64 { + return &v +} + +// Int64Value returns the value of the int64 pointer passed in or +// 0 if the pointer is nil. +func Int64Value(v *int64) int64 { + if v != nil { + return *v + } + return 0 +} + +// Int64Slice converts a slice of int64 values into a slice of +// int64 pointers +func Int64Slice(src []int64) []*int64 { + dst := make([]*int64, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Int64ValueSlice converts a slice of int64 pointers into a slice of +// int64 values +func Int64ValueSlice(src []*int64) []int64 { + dst := make([]int64, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Int64Map converts a string map of int64 values into a string +// map of int64 pointers +func Int64Map(src map[string]int64) map[string]*int64 { + dst := make(map[string]*int64) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Int64ValueMap converts a string map of int64 pointers into a string +// map of int64 values +func Int64ValueMap(src map[string]*int64) map[string]int64 { + dst := make(map[string]int64) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Uint8 returns a pointer to the uint8 value passed in. +func Uint8(v uint8) *uint8 { + return &v +} + +// Uint8Value returns the value of the uint8 pointer passed in or +// 0 if the pointer is nil. +func Uint8Value(v *uint8) uint8 { + if v != nil { + return *v + } + return 0 +} + +// Uint8Slice converts a slice of uint8 values into a slice of +// uint8 pointers +func Uint8Slice(src []uint8) []*uint8 { + dst := make([]*uint8, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Uint8ValueSlice converts a slice of uint8 pointers into a slice of +// uint8 values +func Uint8ValueSlice(src []*uint8) []uint8 { + dst := make([]uint8, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Uint8Map converts a string map of uint8 values into a string +// map of uint8 pointers +func Uint8Map(src map[string]uint8) map[string]*uint8 { + dst := make(map[string]*uint8) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Uint8ValueMap converts a string map of uint8 pointers into a string +// map of uint8 values +func Uint8ValueMap(src map[string]*uint8) map[string]uint8 { + dst := make(map[string]uint8) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Uint16 returns a pointer to the uint16 value passed in. +func Uint16(v uint16) *uint16 { + return &v +} + +// Uint16Value returns the value of the uint16 pointer passed in or +// 0 if the pointer is nil. +func Uint16Value(v *uint16) uint16 { + if v != nil { + return *v + } + return 0 +} + +// Uint16Slice converts a slice of uint16 values into a slice of +// uint16 pointers +func Uint16Slice(src []uint16) []*uint16 { + dst := make([]*uint16, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Uint16ValueSlice converts a slice of uint16 pointers into a slice of +// uint16 values +func Uint16ValueSlice(src []*uint16) []uint16 { + dst := make([]uint16, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Uint16Map converts a string map of uint16 values into a string +// map of uint16 pointers +func Uint16Map(src map[string]uint16) map[string]*uint16 { + dst := make(map[string]*uint16) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Uint16ValueMap converts a string map of uint16 pointers into a string +// map of uint16 values +func Uint16ValueMap(src map[string]*uint16) map[string]uint16 { + dst := make(map[string]uint16) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Uint32 returns a pointer to the uint32 value passed in. +func Uint32(v uint32) *uint32 { + return &v +} + +// Uint32Value returns the value of the uint32 pointer passed in or +// 0 if the pointer is nil. +func Uint32Value(v *uint32) uint32 { + if v != nil { + return *v + } + return 0 +} + +// Uint32Slice converts a slice of uint32 values into a slice of +// uint32 pointers +func Uint32Slice(src []uint32) []*uint32 { + dst := make([]*uint32, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Uint32ValueSlice converts a slice of uint32 pointers into a slice of +// uint32 values +func Uint32ValueSlice(src []*uint32) []uint32 { + dst := make([]uint32, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Uint32Map converts a string map of uint32 values into a string +// map of uint32 pointers +func Uint32Map(src map[string]uint32) map[string]*uint32 { + dst := make(map[string]*uint32) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Uint32ValueMap converts a string map of uint32 pointers into a string +// map of uint32 values +func Uint32ValueMap(src map[string]*uint32) map[string]uint32 { + dst := make(map[string]uint32) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Uint64 returns a pointer to the uint64 value passed in. +func Uint64(v uint64) *uint64 { + return &v +} + +// Uint64Value returns the value of the uint64 pointer passed in or +// 0 if the pointer is nil. +func Uint64Value(v *uint64) uint64 { + if v != nil { + return *v + } + return 0 +} + +// Uint64Slice converts a slice of uint64 values into a slice of +// uint64 pointers +func Uint64Slice(src []uint64) []*uint64 { + dst := make([]*uint64, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Uint64ValueSlice converts a slice of uint64 pointers into a slice of +// uint64 values +func Uint64ValueSlice(src []*uint64) []uint64 { + dst := make([]uint64, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Uint64Map converts a string map of uint64 values into a string +// map of uint64 pointers +func Uint64Map(src map[string]uint64) map[string]*uint64 { + dst := make(map[string]*uint64) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Uint64ValueMap converts a string map of uint64 pointers into a string +// map of uint64 values +func Uint64ValueMap(src map[string]*uint64) map[string]uint64 { + dst := make(map[string]uint64) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Float32 returns a pointer to the float32 value passed in. +func Float32(v float32) *float32 { + return &v +} + +// Float32Value returns the value of the float32 pointer passed in or +// 0 if the pointer is nil. +func Float32Value(v *float32) float32 { + if v != nil { + return *v + } + return 0 +} + +// Float32Slice converts a slice of float32 values into a slice of +// float32 pointers +func Float32Slice(src []float32) []*float32 { + dst := make([]*float32, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Float32ValueSlice converts a slice of float32 pointers into a slice of +// float32 values +func Float32ValueSlice(src []*float32) []float32 { + dst := make([]float32, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Float32Map converts a string map of float32 values into a string +// map of float32 pointers +func Float32Map(src map[string]float32) map[string]*float32 { + dst := make(map[string]*float32) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Float32ValueMap converts a string map of float32 pointers into a string +// map of float32 values +func Float32ValueMap(src map[string]*float32) map[string]float32 { + dst := make(map[string]float32) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Float64 returns a pointer to the float64 value passed in. +func Float64(v float64) *float64 { + return &v +} + +// Float64Value returns the value of the float64 pointer passed in or +// 0 if the pointer is nil. +func Float64Value(v *float64) float64 { + if v != nil { + return *v + } + return 0 +} + +// Float64Slice converts a slice of float64 values into a slice of +// float64 pointers +func Float64Slice(src []float64) []*float64 { + dst := make([]*float64, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Float64ValueSlice converts a slice of float64 pointers into a slice of +// float64 values +func Float64ValueSlice(src []*float64) []float64 { + dst := make([]float64, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Float64Map converts a string map of float64 values into a string +// map of float64 pointers +func Float64Map(src map[string]float64) map[string]*float64 { + dst := make(map[string]*float64) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Float64ValueMap converts a string map of float64 pointers into a string +// map of float64 values +func Float64ValueMap(src map[string]*float64) map[string]float64 { + dst := make(map[string]float64) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Time returns a pointer to the time.Time value passed in. +func Time(v time.Time) *time.Time { + return &v +} + +// TimeValue returns the value of the time.Time pointer passed in or +// time.Time{} if the pointer is nil. +func TimeValue(v *time.Time) time.Time { + if v != nil { + return *v + } + return time.Time{} +} + +// SecondsTimeValue converts an int64 pointer to a time.Time value +// representing seconds since Epoch or time.Time{} if the pointer is nil. +func SecondsTimeValue(v *int64) time.Time { + if v != nil { + return time.Unix((*v / 1000), 0) + } + return time.Time{} +} + +// MillisecondsTimeValue converts an int64 pointer to a time.Time value +// representing milliseconds sinch Epoch or time.Time{} if the pointer is nil. +func MillisecondsTimeValue(v *int64) time.Time { + if v != nil { + return time.Unix(0, (*v * 1000000)) + } + return time.Time{} +} + +// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". +// The result is undefined if the Unix time cannot be represented by an int64. +// Which includes calling TimeUnixMilli on a zero Time is undefined. +// +// This utility is useful for service API's such as CloudWatch Logs which require +// their unix time values to be in milliseconds. +// +// See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information. +func TimeUnixMilli(t time.Time) int64 { + return t.UnixNano() / int64(time.Millisecond/time.Nanosecond) +} + +// TimeSlice converts a slice of time.Time values into a slice of +// time.Time pointers +func TimeSlice(src []time.Time) []*time.Time { + dst := make([]*time.Time, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// TimeValueSlice converts a slice of time.Time pointers into a slice of +// time.Time values +func TimeValueSlice(src []*time.Time) []time.Time { + dst := make([]time.Time, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// TimeMap converts a string map of time.Time values into a string +// map of time.Time pointers +func TimeMap(src map[string]time.Time) map[string]*time.Time { + dst := make(map[string]*time.Time) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// TimeValueMap converts a string map of time.Time pointers into a string +// map of time.Time values +func TimeValueMap(src map[string]*time.Time) map[string]time.Time { + dst := make(map[string]time.Time) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index cfd9e4464..19652793c 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -15,7 +15,7 @@ type Detector struct { func NewDetector(helmApp *v1alpha1.HelmApp, status *Status, h *helm.Helm, repo *helm.Repo) *Detector { appStore := helmApp.Spec.AppStore - app := helm.NewApp(helmApp.Spec.AppName, helmApp.Namespace, helmApp.Spec.AppName, appStore.Name, helmApp.Spec.Version, h) + app := helm.NewApp(helmApp.Name, helmApp.Namespace, helmApp.Spec.TemplateName, appStore.Name, helmApp.Spec.Version, h) return &Detector{ helmApp: helmApp, status: status, @@ -42,7 +42,7 @@ func (d *Detector) Detect() error { // pull chart if !d.status.IsConditionTrue(v1alpha1.HelmAppChartReady) { - err := d.app.Pull(d.helmApp.Spec.AppStore.Name + "/" + d.helmApp.Spec.AppName) + err := d.app.Pull() if err != nil { d.status.UpdateCondition(v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppChartReady, corev1.ConditionFalse, "ChartFailed", err.Error())) diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index fb60ad8cb..8cfb092ee 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -3,45 +3,46 @@ package helm import ( "bytes" "encoding/base64" - "github.com/sirupsen/logrus" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/cli" "io/fs" "io/ioutil" "path" "path/filepath" "strings" + + "github.com/sirupsen/logrus" + "helm.sh/helm/v3/pkg/action" + "helm.sh/helm/v3/pkg/cli" ) type App struct { - name string - repo string - releaseName string - namespace string - version string - chartDir string + templateName string + repo string + name string + namespace string + version string + chartDir string helm *Helm } func (a *App) Chart() string { - return a.repo + "/" + a.name + return a.repo + "/" + a.templateName } // TODO: use appName and templateName -func NewApp(releaseName string, namespace, name, repo string, version string, helm *Helm) *App { +func NewApp(name, namespace, templateName, repo string, version string, helm *Helm) *App { return &App{ - name: name, - repo: repo, - releaseName: releaseName, - namespace: namespace, - version: version, - helm: helm, - chartDir: "/tmp/helm/chart", + name: name, + namespace: namespace, + templateName: templateName, + repo: repo, + version: version, + helm: helm, + chartDir: "/tmp/helm/chart", } } -func (a *App) Pull(chart string) error { +func (a *App) Pull() error { client := action.NewPull() settings := cli.New() settings.RepositoryConfig = a.helm.repoFile @@ -50,7 +51,7 @@ func (a *App) Pull(chart string) error { client.DestDir = a.chartDir client.Version = a.version - output, err := client.Run(chart) + output, err := client.Run(a.chart()) if err != nil { return err } @@ -58,14 +59,18 @@ func (a *App) Pull(chart string) error { return nil } +func (a *App) chart() string { + return a.repo + "/" + a.templateName +} + func (a *App) PreInstall() error { var buf bytes.Buffer - return a.helm.PreInstall(a.name, a.namespace, a.Chart(), &buf) + return a.helm.PreInstall(a.templateName, a.namespace, a.Chart(), &buf) } func (a *App) ParseChart() (string, error) { - //chartPath := path.Join(a.chartDir, a.name + a.version + ".tgz") - chartDir := path.Join(a.chartDir, a.name) + //chartPath := path.Join(a.chartDir, a.templateName + a.version + ".tgz") + chartDir := path.Join(a.chartDir, a.templateName) var values string err := filepath.Walk(chartDir, func(path string, info fs.FileInfo, err error) error { diff --git a/worker/controllers/helmapp/helm/repo.go b/worker/controllers/helmapp/helm/repo.go index c17a1cbd6..a706408d5 100644 --- a/worker/controllers/helmapp/helm/repo.go +++ b/worker/controllers/helmapp/helm/repo.go @@ -4,19 +4,20 @@ import ( "bytes" "context" "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "time" + "github.com/gofrs/flock" "github.com/pkg/errors" "github.com/sirupsen/logrus" "helm.sh/helm/v3/pkg/cli" "helm.sh/helm/v3/pkg/getter" "helm.sh/helm/v3/pkg/repo" - "io" - "io/ioutil" - "os" - "path/filepath" "sigs.k8s.io/yaml" - "strings" - "time" ) // Repositories that have been permanently deleted and no longer work @@ -37,8 +38,8 @@ type Repo struct { // NewRepo creates a new repo. func NewRepo(repoFile, repoCache string) *Repo { return &Repo{ - repoFile: repoFile, - repoCache: repoCache, + repoFile: repoFile, + repoCache: repoCache, } } @@ -100,15 +101,15 @@ func (o *Repo) add(out io.Writer, name, url, username, password string) error { } // If the repo exists do one of two things: - // 1. If the configuration for the name is the same continue without error + // 1. If the configuration for the templateName is the same continue without error // 2. When the config is different require --force-update if !o.forceUpdate && f.Has(name) { existing := f.Get(name) if c != *existing { - // The input coming in for the name is different from what is already + // The input coming in for the templateName is different from what is already // configured. Return an error. - return errors.Errorf("repository name (%s) already exists, please specify a different name", name) + return errors.Errorf("repository templateName (%s) already exists, please specify a different templateName", name) } // The add is idempotent so do nothing From a6ece790937ff5330f73f5fd9387ea8fff00f09b Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 16 Apr 2021 16:27:21 +0800 Subject: [PATCH 08/65] detect process --- api/api/api_interface.go | 1 + api/api_routers/version2/v2Routers.go | 1 + api/controller/application.go | 12 ++++++ api/handler/application_handler.go | 42 ++++++++++++++++--- api/handler/handler.go | 4 +- api/model/app.go | 7 ++++ cmd/api/server/server.go | 10 +++-- config/crd/rainbond.goodrain.io_helmapps.yaml | 28 +++++++++++++ db/db.go | 1 + db/model/application.go | 2 +- db/mysql/mysql.go | 4 ++ go.mod | 9 ++-- go.sum | 28 +++++++++---- worker/client/client.go | 10 ++++- worker/controllers/helmapp/helm/app.go | 4 +- 15 files changed, 136 insertions(+), 27 deletions(-) diff --git a/api/api/api_interface.go b/api/api/api_interface.go index b25ac41c4..3c644aa7f 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -165,6 +165,7 @@ type ApplicationInterface interface { BatchUpdateComponentPorts(w http.ResponseWriter, r *http.Request) GetAppStatus(w http.ResponseWriter, r *http.Request) + GetDetectProcess(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) ListConfigGroups(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index 7458e6a87..5dd8de2dc 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -316,6 +316,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/ports", controller.GetManager().BatchUpdateComponentPorts) r.Put("/status", controller.GetManager().GetAppStatus) + r.Get("/detect-process", controller.GetManager().GetDetectProcess) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) r.Get("/configgroups", controller.GetManager().ListConfigGroups) diff --git a/api/controller/application.go b/api/controller/application.go index 3c879e4f0..dd36df55a 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -193,6 +193,18 @@ func (a *ApplicationController) GetAppStatus(w http.ResponseWriter, r *http.Requ httputil.ReturnSuccess(r, w, res) } +func (a *ApplicationController) GetDetectProcess(w http.ResponseWriter, r *http.Request) { + app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) + + processes, err := handler.GetApplicationHandler().GetDetectProcess(r.Context(), app) + if err != nil { + httputil.ReturnBcodeError(r, w, err) + return + } + + httputil.ReturnSuccess(r, w, processes) +} + // BatchBindService - func (a *ApplicationController) BatchBindService(w http.ResponseWriter, r *http.Request) { appID := chi.URLParam(r, "app_id") diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index e7f46a416..f73e1dbcd 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -18,7 +18,10 @@ import ( "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/server/pb" "github.com/jinzhu/gorm" + "github.com/pkg/errors" "github.com/sirupsen/logrus" + corev1 "k8s.io/api/core/v1" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -44,16 +47,18 @@ type ApplicationHandler interface { BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error GetStatus(appID string) (*model.AppStatus, error) + GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) DeleteConfigGroup(appID, configGroupName string) error ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error) } // NewApplicationHandler creates a new Tenant Application Handler. -func NewApplicationHandler(statusCli *client.AppRuntimeSyncClient, promClient prometheus.Interface) ApplicationHandler { +func NewApplicationHandler(statusCli *client.AppRuntimeSyncClient, promClient prometheus.Interface, rainbondClient versioned.Interface) ApplicationHandler { return &ApplicationAction{ - statusCli: statusCli, - promClient: promClient, + statusCli: statusCli, + promClient: promClient, + rainbondClient: rainbondClient, } } @@ -71,8 +76,7 @@ func (a *ApplicationAction) CreateApp(ctx context.Context, req *model.Applicatio } req.AppID = appReq.AppID - tx := db.GetManager().Begin() - err := tx.Transaction(func(tx *gorm.DB) error { + err := db.GetManager().DB().Transaction(func(tx *gorm.DB) error { if err := db.GetManager().ApplicationDaoTransactions(tx).AddModel(appReq); err != nil { return err } @@ -108,7 +112,9 @@ func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Appl }, }} - _, err := a.rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Name).Create(ctx, helmApp, metav1.CreateOptions{}) + ctx, cancel := context.WithTimeout(ctx, 3*time.Second) + defer cancel() + _, err := a.rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Create(ctx, helmApp, metav1.CreateOptions{}) return err } @@ -288,6 +294,30 @@ func (a *ApplicationAction) GetStatus(appID string) (*model.AppStatus, error) { return res, nil } +func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) { + nctx, cancel := context.WithTimeout(ctx, 3*time.Second) + defer cancel() + + helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(nctx, app.AppName, metav1.GetOptions{}) + if err != nil { + if k8sErrors.IsNotFound(err) { + return nil, errors.WithStack(bcode.ErrApplicationNotFound) + } + return nil, errors.WithStack(err) + } + + var processes []*model.AppDetectProcess + for _, condition := range helmApp.Status.Conditions { + processes = append(processes, &model.AppDetectProcess{ + Type: string(condition.Type), + Ready: condition.Status == corev1.ConditionTrue, + Error: condition.Message, + }) + } + + return processes, nil +} + func (a *ApplicationAction) getDiskUsage(appID string) float64 { var result float64 query := fmt.Sprintf(`sum(max(app_resource_appfs{app_id=~"%s"}) by(app_id))`, appID) diff --git a/api/handler/handler.go b/api/handler/handler.go index 47848817d..62aaf89e5 100644 --- a/api/handler/handler.go +++ b/api/handler/handler.go @@ -26,6 +26,7 @@ import ( "github.com/goodrain/rainbond/api/handler/share" "github.com/goodrain/rainbond/cmd/api/option" "github.com/goodrain/rainbond/db" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" etcdutil "github.com/goodrain/rainbond/util/etcd" "github.com/goodrain/rainbond/worker/client" "github.com/sirupsen/logrus" @@ -38,6 +39,7 @@ func InitHandle(conf option.Config, statusCli *client.AppRuntimeSyncClient, etcdcli *clientv3.Client, kubeClient *kubernetes.Clientset, + rainbondClient versioned.Interface, ) error { mq := api_db.MQManager{ EtcdClientArgs: etcdClientArgs, @@ -80,7 +82,7 @@ func InitHandle(conf option.Config, defaultVolumeTypeHandler = CreateVolumeTypeManger(statusCli) defaultEtcdHandler = NewEtcdHandler(etcdcli) defaultmonitorHandler = NewMonitorHandler(prometheusCli) - defApplicationHandler = NewApplicationHandler(statusCli, prometheusCli) + defApplicationHandler = NewApplicationHandler(statusCli, prometheusCli, rainbondClient) return nil } diff --git a/api/model/app.go b/api/model/app.go index dfbc27127..fc4b78668 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -15,3 +15,10 @@ type AppStatus struct { Memory int64 `json:"memory"` Disk int64 `json:"disk"` } + +// AppDetectProcess - +type AppDetectProcess struct { + Type string `json:"type"` + Ready bool `json:"ready"` + Error string `json:"error"` +} diff --git a/cmd/api/server/server.go b/cmd/api/server/server.go index aebd7da83..0feee6f03 100644 --- a/cmd/api/server/server.go +++ b/cmd/api/server/server.go @@ -31,12 +31,12 @@ import ( "github.com/goodrain/rainbond/api/server" "github.com/goodrain/rainbond/cmd/api/option" "github.com/goodrain/rainbond/event" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" etcdutil "github.com/goodrain/rainbond/util/etcd" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/client" - "k8s.io/client-go/kubernetes" - "github.com/sirupsen/logrus" + "k8s.io/client-go/kubernetes" ) //Run start run @@ -64,6 +64,7 @@ func Run(s *option.APIServer) error { if err := db.CreateEventManager(s.Config); err != nil { logrus.Debugf("create event manager error, %v", err) } + config, err := k8sutil.NewRestConfig(s.KubeConfigPath) if err != nil { return err @@ -72,6 +73,8 @@ func Run(s *option.APIServer) error { if err != nil { return err } + rainbondClient := versioned.NewForConfigOrDie(config) + if err := event.NewManager(event.EventConfig{ EventLogServers: s.Config.EventLogServers, DiscoverArgs: etcdClientArgs, @@ -85,6 +88,7 @@ func Run(s *option.APIServer) error { EtcdCaFile: s.Config.EtcdCaFile, EtcdCertFile: s.Config.EtcdCertFile, EtcdKeyFile: s.Config.EtcdKeyFile, + NonBlock: s.Config.Debug, }) if err != nil { logrus.Errorf("create app status client error, %v", err) @@ -100,7 +104,7 @@ func Run(s *option.APIServer) error { //初始化 middleware handler.InitProxy(s.Config) //创建handle - if err := handler.InitHandle(s.Config, etcdClientArgs, cli, etcdcli, clientset); err != nil { + if err := handler.InitHandle(s.Config, etcdClientArgs, cli, etcdcli, clientset, rainbondClient); err != nil { logrus.Errorf("init all handle error, %v", err) return err } diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml index bc1459ee4..d03579c78 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -39,6 +39,32 @@ spec: appName: description: 'The application name. TODO: validation' type: string + appStore: + description: 'The helm app store. TODO: validation. not null' + properties: + branch: + description: The branch of a git repo. + type: string + name: + type: string + password: + type: string + url: + description: The url of helm repo, sholud be a helm native repo + url or a git url. + type: string + username: + type: string + version: + description: The verision of the helm app store. + type: string + required: + - name + - url + - version + type: object + eid: + type: string preStatus: description: The prerequisite status. enum: @@ -57,6 +83,8 @@ spec: type: string required: - appName + - appStore + - eid - revision - values - version diff --git a/db/db.go b/db/db.go index c2cac5248..4a0ab09ac 100644 --- a/db/db.go +++ b/db/db.go @@ -34,6 +34,7 @@ import ( type Manager interface { CloseManager() error Begin() *gorm.DB + DB() *gorm.DB EnsureEndTransactionFunc() func(tx *gorm.DB) VolumeTypeDao() dao.VolumeTypeDao LicenseDao() dao.LicenseDao diff --git a/db/model/application.go b/db/model/application.go index 5415ce228..2967649d5 100644 --- a/db/model/application.go +++ b/db/model/application.go @@ -23,7 +23,7 @@ type Application struct { AppStoreName string `gorm:"column:app_store_name" json:"app_store_name"` AppStoreURL string `gorm:"column:app_store_url" json:"app_store_url"` AppTemplateName string `gorm:"column:app_template_name" json:"app_template_name"` - Version string `gorm:"column:Version" json:"Version"` + Version string `gorm:"column:version" json:"version"` GovernanceMode string `gorm:"column:governance_mode;default:'BUILD_IN_SERVICE_MESH'" json:"governance_mode"` } diff --git a/db/mysql/mysql.go b/db/mysql/mysql.go index 1662257db..5e72929b9 100644 --- a/db/mysql/mysql.go +++ b/db/mysql/mysql.go @@ -79,6 +79,10 @@ func (m *Manager) Begin() *gorm.DB { return m.db.Begin() } +func (m *Manager) DB() *gorm.DB { + return m.db +} + // EnsureEndTransactionFunc - func (m *Manager) EnsureEndTransactionFunc() func(tx *gorm.DB) { return func(tx *gorm.DB) { diff --git a/go.mod b/go.mod index 799c9c875..ac9db69b2 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,10 @@ module github.com/goodrain/rainbond -go 1.16 +go 1.15 require ( github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4 // indirect github.com/aliyun/aliyun-oss-go-sdk v2.1.5+incompatible @@ -22,7 +21,6 @@ require ( github.com/docker/docker v20.10.2+incompatible github.com/docker/go-units v0.4.0 github.com/docker/libcompose v0.4.1-0.20190808084053-143e0f3f1ab9 - github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect github.com/eapache/channels v1.1.0 github.com/emicklei/go-restful v2.14.2+incompatible github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6 @@ -79,7 +77,7 @@ require ( github.com/prometheus/node_exporter v1.0.1 github.com/prometheus/procfs v0.2.0 github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect - github.com/shirou/gopsutil v2.20.8+incompatible + github.com/shirou/gopsutil v3.21.3+incompatible github.com/sirupsen/logrus v1.7.0 github.com/smartystreets/assertions v1.0.1 // indirect github.com/smartystreets/goconvey v1.6.4 @@ -120,8 +118,7 @@ require ( replace ( github.com/coreos/etcd => github.com/coreos/etcd v3.2.31+incompatible github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d - github.com/docker/docker => github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb - github.com/docker/libcompose => github.com/docker/libcompose v0.4.1-0.20181019154650-213509acef0f + github.com/docker/docker => github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible google.golang.org/grpc => google.golang.org/grpc v1.29.0 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.20.0 k8s.io/apimachinery => k8s.io/apimachinery v0.20.0 diff --git a/go.sum b/go.sum index 89047b2f0..4ec3cfa45 100644 --- a/go.sum +++ b/go.sum @@ -73,6 +73,7 @@ github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFP github.com/Masterminds/squirrel v1.5.0 h1:JukIZisrUXadA9pl3rMkjhiamxiB0cXiu+HGp/Y8cY8= github.com/Masterminds/squirrel v1.5.0/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= +github.com/Microsoft/go-winio v0.3.8/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= @@ -84,8 +85,6 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/NYTimes/gziphandler v0.0.0-20170804200234-967539e5e271/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= 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= @@ -254,23 +253,26 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/cli v0.0.0-20190711175710-5b38d82aa076/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.3+incompatible h1:WVEgoV/GpsTK5hruhHdYi79blQ+nmcm+7Ru/ZuiF+7E= github.com/docker/cli v20.10.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20191216044856-a8371794149d h1:jC8tT/S0OGx2cswpeUTn4gOIea8P08lD3VFQT0cOZ50= github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= +github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible h1:SiUATuP//KecDjpOK2tvZJgeScYAklvyjfK8JZlU6fo= +github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= -github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb h1:PyjxRdW1mqCmSoxy/6uP01P7CGbsD+woX+oOWbaUPwQ= -github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb/go.mod h1:3CPr2caMgTHxxIAZgEMd3uLYPDlRvPqCpyeRf6ncPcY= +github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916 h1:yWHOI+vFjEsAakUTSrtqc/SAHrhSkmn48pqjidZX3QA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82 h1:X0fj836zx99zFu83v/M79DuBn84IL/Syx1SY6Y5ZEMA= +github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libcompose v0.4.1-0.20181019154650-213509acef0f h1:Bi8tLHoPyR0ZkRfycb6KGsoqhypYxObMRz+/KUiod6Y= -github.com/docker/libcompose v0.4.1-0.20181019154650-213509acef0f/go.mod h1:EyqDS+Iyca0hS44T7qIMTeO1EOYWWWNOGpufHu9R8cs= +github.com/docker/libcompose v0.4.1-0.20190808084053-143e0f3f1ab9 h1:Z+aRYtQXR6iFSAnoaAq/dUTcZvL1ph8uWlsrmfIP8Bs= +github.com/docker/libcompose v0.4.1-0.20190808084053-143e0f3f1ab9/go.mod h1:YZ/h8H7gZ7/SOoviPEvSYgHomvbB82iyHvGXLVTNFwQ= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= @@ -513,6 +515,7 @@ github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORR github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 h1:893HsJqtxp9z1SF76gg6hY70hRY1wVlTSnC/h1yUDCo= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v0.0.0-20160317213430-0eeaf8392f5b/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -756,6 +759,7 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f h1:2+myh5ml7lgEU/51gbeLHfKGNfgEQQIWrlbdaOsidbQ= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -769,6 +773,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozillazg/go-pinyin v0.18.0 h1:hQompXO23/0ohH8YNjvfsAITnCQImCiR/Fny8EhIeW0= github.com/mozillazg/go-pinyin v0.18.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc= @@ -828,9 +833,11 @@ github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1 github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v0.0.0-20170515205857-f03dbe35d449/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20161109192122-51371867a01c/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc91.0.20200707015106-819fcc687efb h1:LcPVE5u4oaqw8ffPbJew0lUxZC7faM5t52PgU4px1xY= @@ -953,6 +960,8 @@ github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.20.8+incompatible h1:8c7Atn0FAUZJo+f4wYbN0iVpdWniCQk7IYwGtgdh1mY= github.com/shirou/gopsutil v2.20.8+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v3.21.3+incompatible h1:uenXGGa8ESCQq+dbgtl916dmg6PSAz2cXov0uORQ9v8= +github.com/shirou/gopsutil v3.21.3+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= @@ -1034,6 +1043,7 @@ github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -1045,6 +1055,7 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.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/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= @@ -1068,6 +1079,7 @@ github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= @@ -1085,6 +1097,7 @@ 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/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1367,6 +1380,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= diff --git a/worker/client/client.go b/worker/client/client.go index 3b0eaf679..d562de2a7 100644 --- a/worker/client/client.go +++ b/worker/client/client.go @@ -42,6 +42,7 @@ type AppRuntimeSyncClient struct { //AppRuntimeSyncClientConf client conf type AppRuntimeSyncClientConf struct { + NonBlock bool EtcdEndpoints []string EtcdCaFile string EtcdCertFile string @@ -64,7 +65,14 @@ func NewClient(ctx context.Context, conf AppRuntimeSyncClientConf) (*AppRuntimeS c, err := etcdutil.NewClient(ctx, etcdClientArgs) r := &grpcutil.GRPCResolver{Client: c} b := grpc.RoundRobin(r) - arsc.cc, err = grpc.DialContext(ctx, "/rainbond/discover/app_sync_runtime_server", grpc.WithBalancer(b), grpc.WithInsecure(), grpc.WithBlock()) + dialOpts := []grpc.DialOption{ + grpc.WithBalancer(b), + grpc.WithInsecure(), + } + if !conf.NonBlock { + dialOpts = append(dialOpts, grpc.WithBlock()) + } + arsc.cc, err = grpc.DialContext(ctx, "/rainbond/discover/app_sync_runtime_server", dialOpts...) if err != nil { return nil, err } diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index 8cfb092ee..eaefa86bd 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -3,8 +3,8 @@ package helm import ( "bytes" "encoding/base64" - "io/fs" "io/ioutil" + "os" "path" "path/filepath" "strings" @@ -73,7 +73,7 @@ func (a *App) ParseChart() (string, error) { chartDir := path.Join(a.chartDir, a.templateName) var values string - err := filepath.Walk(chartDir, func(path string, info fs.FileInfo, err error) error { + err := filepath.Walk(chartDir, func(path string, info os.FileInfo, err error) error { if err != nil { return err } From 1f32952a4078991ba4ace695aafed8b76a208f36 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 16 Apr 2021 17:48:26 +0800 Subject: [PATCH 09/65] helm app phase --- api/controller/application.go | 4 +- api/handler/application_handler.go | 34 ++++++++++-- api/model/app.go | 1 + cmd/helmappcontroller/main.go | 55 +++++++++---------- config/crd/rainbond.goodrain.io_helmapps.yaml | 6 ++ pkg/apis/rainbond/v1alpha1/helmapp_types.go | 15 +++++ worker/controllers/helmapp/controlloop.go | 2 +- worker/controllers/helmapp/detector.go | 8 +-- worker/controllers/helmapp/status.go | 30 +++++++++- 9 files changed, 113 insertions(+), 42 deletions(-) diff --git a/api/controller/application.go b/api/controller/application.go index dd36df55a..2a026932a 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -182,9 +182,9 @@ func (a *ApplicationController) BatchUpdateComponentPorts(w http.ResponseWriter, } func (a *ApplicationController) GetAppStatus(w http.ResponseWriter, r *http.Request) { - appID := r.Context().Value(middleware.ContextKey("app_id")).(string) + app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) - res, err := handler.GetApplicationHandler().GetStatus(appID) + res, err := handler.GetApplicationHandler().GetStatus(app) if err != nil { httputil.ReturnBcodeError(r, w, err) return diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index f73e1dbcd..26c3037cc 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -46,7 +46,7 @@ type ApplicationHandler interface { UpdateConfigGroup(appID, configGroupName string, req *model.UpdateAppConfigGroupReq) (*model.ApplicationConfigGroupResp, error) BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error - GetStatus(appID string) (*model.AppStatus, error) + GetStatus(app *dbmodel.Application) (*model.AppStatus, error) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) DeleteConfigGroup(appID, configGroupName string) error @@ -71,6 +71,7 @@ func (a *ApplicationAction) CreateApp(ctx context.Context, req *model.Applicatio AppName: req.AppName, AppType: req.AppType, AppStoreName: req.AppStoreName, + AppStoreURL: req.AppStoreURL, AppTemplateName: req.AppTemplateName, Version: req.Version, } @@ -115,6 +116,9 @@ func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Appl ctx, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() _, err := a.rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Create(ctx, helmApp, metav1.CreateOptions{}) + if k8sErrors.IsAlreadyExists(err) { + return errors.Wrap(bcode.ErrApplicationExist, "create helm app") + } return err } @@ -272,18 +276,40 @@ func (a *ApplicationAction) checkPorts(appID string, ports []*model.AppPort) err } // GetStatus - -func (a *ApplicationAction) GetStatus(appID string) (*model.AppStatus, error) { +func (a *ApplicationAction) GetStatus(app *dbmodel.Application) (*model.AppStatus, error) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() + if app.AppType == "helm" { + return a.getHelmAppStatus(ctx, app) + } + + return a.getRainbondAppStatus(ctx, app) +} + +func (a *ApplicationAction) getHelmAppStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) { + helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(ctx, app.AppName, metav1.GetOptions{}) + if err != nil { + if k8sErrors.IsNotFound(err) { + return nil, errors.WithStack(bcode.ErrApplicationNotFound) + } + return nil, errors.WithStack(err) + } + + return &model.AppStatus{ + Phase: string(helmApp.Status.Phase), + }, nil +} + +func (a *ApplicationAction) getRainbondAppStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) { status, err := a.statusCli.GetAppStatus(ctx, &pb.AppStatusReq{ - AppId: appID, + AppId: app.AppID, }) if err != nil { return nil, err } - diskUsage := a.getDiskUsage(appID) + diskUsage := a.getDiskUsage(app.AppID) res := &model.AppStatus{ Status: status.Status.String(), diff --git a/api/model/app.go b/api/model/app.go index fc4b78668..787d9afbd 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -14,6 +14,7 @@ type AppStatus struct { Cpu int64 `json:"cpu"` Memory int64 `json:"memory"` Disk int64 `json:"disk"` + Phase string `json:"phase"` } // AppDetectProcess - diff --git a/cmd/helmappcontroller/main.go b/cmd/helmappcontroller/main.go index b6dde9230..4db64558a 100644 --- a/cmd/helmappcontroller/main.go +++ b/cmd/helmappcontroller/main.go @@ -2,17 +2,12 @@ package main import "C" import ( - "context" "os" "time" - rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" - "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/sirupsen/logrus" - k8sErrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func init() { @@ -21,7 +16,7 @@ func init() { } func main() { - restcfg, err := k8sutil.NewRestConfig("/Users/abewang/.kube/config.172.20.0.20") + restcfg, err := k8sutil.NewRestConfig("/Users/abewang/.kube/config") if err != nil { logrus.Fatalf("create kube rest config error: %s", err.Error()) } @@ -29,31 +24,31 @@ func main() { stopCh := make(chan struct{}) defer close(stopCh) - clientset := versioned.NewForConfigOrDie(restcfg) + //clientset := versioned.NewForConfigOrDie(restcfg) - helmApp := &rainbondv1alpha1.HelmApp{ - ObjectMeta: metav1.ObjectMeta{ - Name: "foo", - Namespace: "rbd-system", - }, - Spec: rainbondv1alpha1.HelmAppSpec{ - PreStatus: "", - Version: "1.3.0", - Revision: Int32(0), - Values: "", - AppStore: &rainbondv1alpha1.HelmAppStore{ - Version: "1111111", - Name: "rainbond", - URL: "https://openchart.goodrain.com/goodrain/rainbond", - }, - }, - } - if _, err := clientset.RainbondV1alpha1().HelmApps("rbd-system").Create(context.Background(), - helmApp, metav1.CreateOptions{}); err != nil { - if !k8sErrors.IsAlreadyExists(err) { - logrus.Fatal(err) - } - } + //helmApp := &rainbondv1alpha1.HelmApp{ + // ObjectMeta: metav1.ObjectMeta{ + // Name: "foo", + // Namespace: "rbd-system", + // }, + // Spec: rainbondv1alpha1.HelmAppSpec{ + // PreStatus: "", + // Version: "1.3.0", + // Revision: Int32(0), + // Values: "", + // AppStore: &rainbondv1alpha1.HelmAppStore{ + // Version: "1111111", + // Name: "rainbond", + // URL: "https://openchart.goodrain.com/goodrain/rainbond", + // }, + // }, + //} + //if _, err := clientset.RainbondV1alpha1().HelmApps("rbd-system").Create(context.Background(), + // helmApp, metav1.CreateOptions{}); err != nil { + // if !k8sErrors.IsAlreadyExists(err) { + // logrus.Fatal(err) + // } + //} ctrl := helmapp.NewController(stopCh, restcfg, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") if err = ctrl.Start(); err != nil { diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml index d03579c78..3b9671467 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -127,10 +127,16 @@ spec: type: string currentValues: type: string + phase: + description: The phase of helm app + type: string status: description: The status of helm app. type: string + valuesTemplate: + type: string required: + - phase - status type: object type: object diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index d727e5534..7f779c4a2 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -21,6 +21,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// The phase of helm app +type HelmAppStatusPhase string + +// The phase of helm app +const ( + HelmAppStatusPhaseInitialing HelmAppStatusPhase = "initialing" + HelmAppStatusPhaseDetecting HelmAppStatusPhase = "detecting" + HelmAppStatusPhaseConfiguring HelmAppStatusPhase = "configuring" + HelmAppStatusPhaseInstalled HelmAppStatusPhase = "installed" +) + // The status of helm app // Except for `not-configured`, the other statues are the native statues of helm. type HelmAppStatusStatus string @@ -147,12 +158,16 @@ type HelmAppStatus struct { // The status of helm app. Status HelmAppStatusStatus `json:"status"` + Phase HelmAppStatusPhase `json:"phase"` + // Current state of helm app. Conditions []HelmAppCondition `json:"conditions,omitempty"` CurrentValues string `json:"currentValues,omitempty"` CurrentRevision string `json:"currentRevision,omitempty"` + + ValuesTemplate string `json:"valuesTemplate,omitempty"` } // +genclient diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index b7abe192e..1d8969b83 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -81,7 +81,7 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { status := NewStatus(helmApp.Status) defer func() { - helmApp.Status = status.HelmAppStatus + helmApp.Status = status.GetHelmAppStatus() c.updateStatus(helmApp) }() diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 19652793c..76d3ebf9f 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -30,14 +30,14 @@ func (d *Detector) Detect() error { } // add repo - if !d.status.IsConditionTrue(v1alpha1.HelmAppRepoReady) { + if !d.status.IsConditionTrue(v1alpha1.HelmAppChartReady) { appStore := d.helmApp.Spec.AppStore if err := d.repo.Add(appStore.Name, appStore.URL, "", ""); err != nil { d.status.SetCondition(*v1alpha1.NewHelmAppCondition( - v1alpha1.HelmAppRepoReady, corev1.ConditionFalse, "RepoFailed", err.Error())) + v1alpha1.HelmAppChartReady, corev1.ConditionFalse, "RepoFailed", err.Error())) return err } - d.status.UpdateConditionStatus(v1alpha1.HelmAppRepoReady, corev1.ConditionTrue) + d.status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionTrue) } // pull chart @@ -70,7 +70,7 @@ func (d *Detector) Detect() error { return err } d.status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionTrue) - d.status.CurrentValues = values + d.status.ValuesTemplate = values } return nil diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index 229cd7bac..1b3444390 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -2,6 +2,7 @@ package helmapp import ( "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + corev1 "k8s.io/api/core/v1" ) type Status struct { @@ -10,14 +11,41 @@ type Status struct { // NewStatus creates a new helm app status. func NewStatus(status v1alpha1.HelmAppStatus) *Status { + idx, _ := status.GetCondition(v1alpha1.HelmAppChartReady) + if idx == -1 { + status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionFalse) + } + idx, _ = status.GetCondition(v1alpha1.HelmAppPreInstalled) + if idx == -1 { + status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionFalse) + } + idx, _ = status.GetCondition(v1alpha1.HelmAppChartParsed) + if idx == -1 { + status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionFalse) + } return &Status{ HelmAppStatus: status, } } +func (s *Status) GetHelmAppStatus() v1alpha1.HelmAppStatus { + status := s.HelmAppStatus + + status.Phase = s.getPhase() + + return status +} + +func (s *Status) getPhase() v1alpha1.HelmAppStatusPhase { + phase := v1alpha1.HelmAppStatusPhaseInitialing + if !s.isDetected() { + phase = v1alpha1.HelmAppStatusPhaseDetecting + } + return phase +} + func (s *Status) isDetected() bool { types := []v1alpha1.HelmAppConditionType{ - v1alpha1.HelmAppRepoReady, v1alpha1.HelmAppChartReady, v1alpha1.HelmAppPreInstalled, v1alpha1.HelmAppChartParsed, From 93677ac690fb6baa110e0d434a45d00625bfe129 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 16 Apr 2021 18:40:49 +0800 Subject: [PATCH 10/65] values template --- api/handler/application_handler.go | 3 ++- api/model/app.go | 11 ++++++----- worker/controllers/helmapp/detector.go | 1 - worker/controllers/helmapp/helm/app.go | 13 ++++++++----- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 26c3037cc..bba5ec217 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -297,7 +297,8 @@ func (a *ApplicationAction) getHelmAppStatus(ctx context.Context, app *dbmodel.A } return &model.AppStatus{ - Phase: string(helmApp.Status.Phase), + Phase: string(helmApp.Status.Phase), + ValuesTemplate: helmApp.Status.ValuesTemplate, }, nil } diff --git a/api/model/app.go b/api/model/app.go index 787d9afbd..e80b9f7ce 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -10,11 +10,12 @@ type AppPort struct { // AppStatus - type AppStatus struct { - Status string `json:"status"` - Cpu int64 `json:"cpu"` - Memory int64 `json:"memory"` - Disk int64 `json:"disk"` - Phase string `json:"phase"` + Status string `json:"status"` + Cpu int64 `json:"cpu"` + Memory int64 `json:"memory"` + Disk int64 `json:"disk"` + Phase string `json:"phase"` + ValuesTemplate string `json:"valuesTemplate"` } // AppDetectProcess - diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 76d3ebf9f..19c06332b 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -37,7 +37,6 @@ func (d *Detector) Detect() error { v1alpha1.HelmAppChartReady, corev1.ConditionFalse, "RepoFailed", err.Error())) return err } - d.status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionTrue) } // pull chart diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index eaefa86bd..bd66180b3 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -9,6 +9,7 @@ import ( "path/filepath" "strings" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/cli" @@ -38,7 +39,7 @@ func NewApp(name, namespace, templateName, repo string, version string, helm *He repo: repo, version: version, helm: helm, - chartDir: "/tmp/helm/chart", + chartDir: path.Join("/tmp/helm/chart", namespace, name, version), } } @@ -50,6 +51,11 @@ func (a *App) Pull() error { client.Settings = settings client.DestDir = a.chartDir client.Version = a.version + client.Untar = true + + if err := os.RemoveAll(a.chartDir); err != nil { + return errors.WithMessage(err, "clean up chart dir") + } output, err := client.Run(a.chart()) if err != nil { @@ -69,11 +75,8 @@ func (a *App) PreInstall() error { } func (a *App) ParseChart() (string, error) { - //chartPath := path.Join(a.chartDir, a.templateName + a.version + ".tgz") - chartDir := path.Join(a.chartDir, a.templateName) - var values string - err := filepath.Walk(chartDir, func(path string, info os.FileInfo, err error) error { + err := filepath.Walk(a.chartDir, func(path string, info os.FileInfo, err error) error { if err != nil { return err } From a32205cc873d36509767edacacc2114d756260ad Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 16 Apr 2021 21:22:16 +0800 Subject: [PATCH 11/65] install app --- api/api/api_interface.go | 1 + api/api_routers/version2/v2Routers.go | 1 + api/controller/application.go | 15 +++++ api/handler/application_handler.go | 21 +++++++ api/model/model.go | 5 ++ pkg/apis/rainbond/v1alpha1/helmapp_types.go | 2 + worker/controllers/helmapp/controller.go | 6 +- worker/controllers/helmapp/controlloop.go | 43 ++++++++++---- worker/controllers/helmapp/detector.go | 4 +- worker/controllers/helmapp/helm/app.go | 65 +++++++++++++++++---- worker/controllers/helmapp/helm/helm.go | 31 +++++++--- worker/controllers/helmapp/status.go | 27 +++++---- 12 files changed, 172 insertions(+), 49 deletions(-) diff --git a/api/api/api_interface.go b/api/api/api_interface.go index 3c644aa7f..ddd50da1a 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -166,6 +166,7 @@ type ApplicationInterface interface { BatchUpdateComponentPorts(w http.ResponseWriter, r *http.Request) GetAppStatus(w http.ResponseWriter, r *http.Request) GetDetectProcess(w http.ResponseWriter, r *http.Request) + Install(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) ListConfigGroups(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index 5dd8de2dc..5d8ea959d 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -317,6 +317,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/ports", controller.GetManager().BatchUpdateComponentPorts) r.Put("/status", controller.GetManager().GetAppStatus) r.Get("/detect-process", controller.GetManager().GetDetectProcess) + r.Post("/install", controller.GetManager().Install) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) r.Get("/configgroups", controller.GetManager().ListConfigGroups) diff --git a/api/controller/application.go b/api/controller/application.go index 2a026932a..c9437eb73 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -205,6 +205,21 @@ func (a *ApplicationController) GetDetectProcess(w http.ResponseWriter, r *http. httputil.ReturnSuccess(r, w, processes) } +func (a *ApplicationController) Install(w http.ResponseWriter, r *http.Request) { + app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) + + var installAppReq model.InstallAppReq + if !httputil.ValidatorRequestStructAndErrorResponse(r, w, &installAppReq, nil) { + return + } + + err := handler.GetApplicationHandler().Install(r.Context(), app, installAppReq.Values) + if err != nil { + httputil.ReturnBcodeError(r, w, err) + return + } +} + // BatchBindService - func (a *ApplicationController) BatchBindService(w http.ResponseWriter, r *http.Request) { appID := chi.URLParam(r, "app_id") diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index bba5ec217..982bbdd5a 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -48,6 +48,7 @@ type ApplicationHandler interface { BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error GetStatus(app *dbmodel.Application) (*model.AppStatus, error) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) + Install(ctx context.Context, app *dbmodel.Application, values string) error DeleteConfigGroup(appID, configGroupName string) error ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error) @@ -335,6 +336,9 @@ func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.A var processes []*model.AppDetectProcess for _, condition := range helmApp.Status.Conditions { + if condition.Type == v1alpha1.HelmAppInstalled { + continue + } processes = append(processes, &model.AppDetectProcess{ Type: string(condition.Type), Ready: condition.Status == corev1.ConditionTrue, @@ -345,6 +349,23 @@ func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.A return processes, nil } +func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, values string) error { + nctx, cancel := context.WithTimeout(ctx, 3*time.Second) + defer cancel() + + helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(nctx, app.AppName, metav1.GetOptions{}) + if err != nil { + if k8sErrors.IsNotFound(err) { + return errors.Wrap(bcode.ErrApplicationNotFound, "install app") + } + return errors.Wrap(err, "install app") + } + + helmApp.Spec.Values = values + _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(nctx, helmApp, metav1.UpdateOptions{}) + return errors.Wrap(err, "install app") +} + func (a *ApplicationAction) getDiskUsage(appID string) float64 { var result float64 query := fmt.Sprintf(`sum(max(app_resource_appfs{app_id=~"%s"}) by(app_id))`, appID) diff --git a/api/model/model.go b/api/model/model.go index 92262d587..8fc454ef9 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1700,6 +1700,11 @@ type BindServiceRequest struct { ServiceIDs []string `json:"service_ids"` } +// InstallAppReq - +type InstallAppReq struct { + Values string `json:"values"` +} + // ConfigGroupService - type ConfigGroupService struct { AppID string `json:"app_id"` diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 7f779c4a2..e9c0d7b84 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -81,6 +81,8 @@ const ( HelmAppPreInstalled HelmAppConditionType = "PreInstalled" // HelmAppPreInstalled indicates whether the chart has been parsed. HelmAppChartParsed HelmAppConditionType = "ChartParsed" + // HelmAppInstalled indicates whether the helm app has been installed. + HelmAppInstalled HelmAppConditionType = "HelmAppInstalled" ) // HelmAppCondition contains details for the current condition of this helm application. diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index ea27712eb..f08524da7 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -4,8 +4,6 @@ import ( "time" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - "helm.sh/helm/v3/pkg/kube" - "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/rest" "k8s.io/client-go/util/workqueue" ) @@ -22,10 +20,8 @@ func NewController(stopCh chan struct{}, restcfg *rest.Config, resyncPeriod time queue := workqueue.New() clientset := versioned.NewForConfigOrDie(restcfg) storer := NewStorer(clientset, resyncPeriod, queue) - configFlags := genericclioptions.NewConfigFlags(true) - kubeClient := kube.New(configFlags) - controlLoop := NewControlLoop(kubeClient, clientset, configFlags, storer, queue, repoFile, repoCache) + controlLoop := NewControlLoop(clientset, storer, queue, repoFile, repoCache) return &Controller{ storer: storer, diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 1d8969b83..05d72296c 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -9,9 +9,8 @@ import ( k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/sirupsen/logrus" - "helm.sh/helm/v3/pkg/kube" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/util/workqueue" ) @@ -20,13 +19,12 @@ type ControlLoop struct { storer Storer workqueue workqueue.Interface repo *helm.Repo - helm *helm.Helm + repoFile string + repoCache string } // NewControlLoop - -func NewControlLoop(kubeClient kube.Interface, - clientset versioned.Interface, - configFlags *genericclioptions.ConfigFlags, +func NewControlLoop(clientset versioned.Interface, storer Storer, workqueue workqueue.Interface, repoFile string, @@ -39,7 +37,8 @@ func NewControlLoop(kubeClient kube.Interface, storer: storer, workqueue: workqueue, repo: repo, - helm: helm.NewHelm(kubeClient, configFlags, repoFile, repoCache), + repoFile: repoFile, + repoCache: repoCache, } } @@ -78,23 +77,47 @@ func (c *ControlLoop) run(obj interface{}) { func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { logrus.Debugf("HelmApp Received: %s", k8sutil.ObjKey(helmApp)) - status := NewStatus(helmApp.Status) + status := NewStatus(helmApp) defer func() { helmApp.Status = status.GetHelmAppStatus() + // TODO: handle the error c.updateStatus(helmApp) }() - detector := NewDetector(helmApp, status, c.helm, c.repo) - err := detector.Detect() + appStore := helmApp.Spec.AppStore + app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, + helmApp.Spec.TemplateName, appStore.Name, helmApp.Spec.Version, + helmApp.Spec.Values, + c.repoFile, c.repoCache) + if err != nil { + return err + } + + detector := NewDetector(helmApp, status, app, c.repo) + if err := detector.Detect(); err != nil { // TODO: create event return err } + if needUpdate(helmApp) { + if err := app.InstallOrUpdate(); err != nil { + status.SetCondition(*v1alpha1.NewHelmAppCondition( + v1alpha1.HelmAppInstalled, corev1.ConditionFalse, "InstallFailed", err.Error())) + return err + } + status.UpdateConditionStatus(v1alpha1.HelmAppInstalled, corev1.ConditionTrue) + status.CurrentValues = helmApp.Spec.Values + } + return nil } +func needUpdate(helmApp *v1alpha1.HelmApp) bool { + return helmApp.Spec.Values != helmApp.Status.CurrentValues +} + func (c *ControlLoop) updateStatus(helmApp *v1alpha1.HelmApp) error { // TODO: context if _, err := c.clientset.RainbondV1alpha1().HelmApps(helmApp.Namespace). diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 19c06332b..42d74c8b3 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -13,9 +13,7 @@ type Detector struct { app *helm.App } -func NewDetector(helmApp *v1alpha1.HelmApp, status *Status, h *helm.Helm, repo *helm.Repo) *Detector { - appStore := helmApp.Spec.AppStore - app := helm.NewApp(helmApp.Name, helmApp.Namespace, helmApp.Spec.TemplateName, appStore.Name, helmApp.Spec.Version, h) +func NewDetector(helmApp *v1alpha1.HelmApp, status *Status, app *helm.App, repo *helm.Repo) *Detector { return &Detector{ helmApp: helmApp, status: status, diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index bd66180b3..e5255eddb 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -9,10 +9,15 @@ import ( "path/filepath" "strings" + "github.com/goodrain/rainbond/util/commonutil" "github.com/pkg/errors" "github.com/sirupsen/logrus" "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/cli" + "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/storage/driver" + "k8s.io/cli-runtime/pkg/genericclioptions" + "sigs.k8s.io/yaml" ) type App struct { @@ -23,6 +28,8 @@ type App struct { version string chartDir string + encodedValues string + helm *Helm } @@ -30,17 +37,26 @@ func (a *App) Chart() string { return a.repo + "/" + a.templateName } -// TODO: use appName and templateName -func NewApp(name, namespace, templateName, repo string, version string, helm *Helm) *App { - return &App{ - name: name, - namespace: namespace, - templateName: templateName, - repo: repo, - version: version, - helm: helm, - chartDir: path.Join("/tmp/helm/chart", namespace, name, version), +func NewApp(name, namespace, templateName, repo string, version, values, repoFile, repoCache string) (*App, error) { + configFlags := genericclioptions.NewConfigFlags(true) + configFlags.Namespace = commonutil.String(namespace) + kubeClient := kube.New(configFlags) + + helm, err := NewHelm(kubeClient, configFlags, repoFile, repoCache) + if err != nil { + return nil, err } + + return &App{ + name: name, + namespace: namespace, + templateName: templateName, + repo: repo, + version: version, + encodedValues: values, + helm: helm, + chartDir: path.Join("/tmp/helm/chart", namespace, name, version), + }, nil } func (a *App) Pull() error { @@ -71,7 +87,34 @@ func (a *App) chart() string { func (a *App) PreInstall() error { var buf bytes.Buffer - return a.helm.PreInstall(a.templateName, a.namespace, a.Chart(), &buf) + if err := a.helm.PreInstall(a.templateName, a.namespace, a.Chart(), &buf); err != nil { + return err + } + logrus.Infof("pre install: %s", buf.String()) + return nil +} + +func (a *App) InstallOrUpdate() error { + err := a.helm.Status(a.name) + if errors.Is(err, driver.ErrReleaseNotFound) { + b, err := base64.StdEncoding.DecodeString(a.encodedValues) + if err != nil { + return errors.Wrap(err, "decode values") + } + + values := map[string]interface{}{} + if err := yaml.Unmarshal(b, &values); err != nil { + return errors.Wrap(err, "parse values") + } + + var buf bytes.Buffer + if err := a.helm.Install(a.templateName, a.namespace, a.Chart(), values, &buf); err != nil { + return err + } + logrus.Infof("install: %s", buf.String()) + return nil + } + return nil } func (a *App) ParseChart() (string, error) { diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index 38ddd176c..a9cfcd132 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -9,7 +9,6 @@ import ( "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/chart/loader" "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/cli/values" "helm.sh/helm/v3/pkg/downloader" "helm.sh/helm/v3/pkg/getter" "helm.sh/helm/v3/pkg/kube" @@ -24,7 +23,7 @@ type Helm struct { } // NewHelm creates a new helm. -func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFlags, repoFile, repoCache string) *Helm { +func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFlags, repoFile, repoCache string) (*Helm, error) { cfg := &action.Configuration{ KubeClient: kubeClient, Log: func(s string, i ...interface{}) { @@ -32,18 +31,29 @@ func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFla }, RESTClientGetter: configFlags, } + helmDriver := "" + settings := cli.New() + if err := cfg.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, func(format string, v ...interface{}) { + logrus.Debugf(format, v) + }); err != nil { + return nil, errors.Wrap(err, "init config") + } return &Helm{ cfg: cfg, repoFile: repoFile, repoCache: repoCache, - } + }, nil } func (h *Helm) PreInstall(name, namespace, chart string, out io.Writer) error { - return h.install(name, namespace, chart, &values.Options{}, true, out) + return h.install(name, namespace, chart, nil, true, out) } -func (h *Helm) install(name, namespace, chart string, valueOpts *values.Options, dryRun bool, out io.Writer) error { +func (h *Helm) Install(name, namespace, chart string, vals map[string]interface{}, out io.Writer) error { + return h.install(name, namespace, chart, vals, true, out) +} + +func (h *Helm) install(name, namespace, chart string, vals map[string]interface{}, dryRun bool, out io.Writer) error { client := action.NewInstall(h.cfg) client.ReleaseName = name client.Namespace = namespace @@ -61,10 +71,6 @@ func (h *Helm) install(name, namespace, chart string, valueOpts *values.Options, logrus.Debugf("CHART PATH: %s\n", cp) p := getter.All(settings) - vals, err := valueOpts.MergeValues(p) - if err != nil { - return err - } // Check chart dependencies to make sure all are present in /charts chartRequested, err := loader.Load(cp) @@ -113,6 +119,13 @@ func (h *Helm) install(name, namespace, chart string, valueOpts *values.Options, return err } +func (h *Helm) Status(name string) error { + // helm status RELEASE_NAME [flags] + client := action.NewStatus(h.cfg) + _, err := client.Run(name) + return err +} + // checkIfInstallable validates if a chart can be installed // // Application chart type is only installable diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index 1b3444390..d91a4dffa 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -7,24 +7,26 @@ import ( type Status struct { v1alpha1.HelmAppStatus + values string } // NewStatus creates a new helm app status. -func NewStatus(status v1alpha1.HelmAppStatus) *Status { - idx, _ := status.GetCondition(v1alpha1.HelmAppChartReady) +func NewStatus(app *v1alpha1.HelmApp) *Status { + idx, _ := app.Status.GetCondition(v1alpha1.HelmAppChartReady) if idx == -1 { - status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionFalse) + app.Status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionFalse) } - idx, _ = status.GetCondition(v1alpha1.HelmAppPreInstalled) + idx, _ = app.Status.GetCondition(v1alpha1.HelmAppPreInstalled) if idx == -1 { - status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionFalse) + app.Status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionFalse) } - idx, _ = status.GetCondition(v1alpha1.HelmAppChartParsed) + idx, _ = app.Status.GetCondition(v1alpha1.HelmAppChartParsed) if idx == -1 { - status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionFalse) + app.Status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionFalse) } return &Status{ - HelmAppStatus: status, + HelmAppStatus: app.Status, + values: app.Spec.Values, } } @@ -37,9 +39,12 @@ func (s *Status) GetHelmAppStatus() v1alpha1.HelmAppStatus { } func (s *Status) getPhase() v1alpha1.HelmAppStatusPhase { - phase := v1alpha1.HelmAppStatusPhaseInitialing - if !s.isDetected() { - phase = v1alpha1.HelmAppStatusPhaseDetecting + phase := v1alpha1.HelmAppStatusPhaseDetecting + if s.isDetected() { + phase = v1alpha1.HelmAppStatusPhaseConfiguring + } + if s.values != "" { + phase = v1alpha1.HelmAppStatusPhaseInstalled } return phase } From 769dd3d8ae6b757ca0937cb341657c2421e57379 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Sat, 17 Apr 2021 15:47:59 +0800 Subject: [PATCH 12/65] list app services --- api/api/api_interface.go | 3 +- api/api_routers/version2/v2Routers.go | 3 +- api/controller/application.go | 16 ++++++- api/handler/application_handler.go | 57 +++++++++++++++++++++++- api/handler/handler.go | 2 +- api/model/app.go | 11 +++++ cmd/worker/server/server.go | 6 +++ worker/controllers/helmapp/controller.go | 6 +-- worker/controllers/helmapp/helm/helm.go | 2 +- worker/controllers/helmapp/informer.go | 6 +-- 10 files changed, 98 insertions(+), 14 deletions(-) diff --git a/api/api/api_interface.go b/api/api/api_interface.go index ddd50da1a..5a6156bb9 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -157,7 +157,7 @@ type ApplicationInterface interface { BatchCreateApp(w http.ResponseWriter, r *http.Request) UpdateApp(w http.ResponseWriter, r *http.Request) ListApps(w http.ResponseWriter, r *http.Request) - ListServices(w http.ResponseWriter, r *http.Request) + ListComponents(w http.ResponseWriter, r *http.Request) BatchBindService(w http.ResponseWriter, r *http.Request) DeleteApp(w http.ResponseWriter, r *http.Request) AddConfigGroup(w http.ResponseWriter, r *http.Request) @@ -167,6 +167,7 @@ type ApplicationInterface interface { GetAppStatus(w http.ResponseWriter, r *http.Request) GetDetectProcess(w http.ResponseWriter, r *http.Request) Install(w http.ResponseWriter, r *http.Request) + ListServices(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) ListConfigGroups(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index 5d8ea959d..71408fba9 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -308,7 +308,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/", controller.GetManager().UpdateApp) r.Delete("/", controller.GetManager().DeleteApp) // Get services under application - r.Get("/services", controller.GetManager().ListServices) + r.Get("/services", controller.GetManager().ListComponents) r.Put("/services", controller.GetManager().BatchBindService) // Application configuration group r.Post("/configgroups", controller.GetManager().AddConfigGroup) @@ -318,6 +318,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/status", controller.GetManager().GetAppStatus) r.Get("/detect-process", controller.GetManager().GetDetectProcess) r.Post("/install", controller.GetManager().Install) + r.Post("/services", controller.GetManager().ListServices) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) r.Get("/configgroups", controller.GetManager().ListConfigGroups) diff --git a/api/controller/application.go b/api/controller/application.go index c9437eb73..6c04ce892 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -11,6 +11,7 @@ import ( "github.com/goodrain/rainbond/api/util/bcode" dbmodel "github.com/goodrain/rainbond/db/model" httputil "github.com/goodrain/rainbond/util/http" + "github.com/sirupsen/logrus" ) // ApplicationController - @@ -48,6 +49,7 @@ func (a *ApplicationController) CreateApp(w http.ResponseWriter, r *http.Request // create app app, err := handler.GetApplicationHandler().CreateApp(r.Context(), &tenantReq) if err != nil { + logrus.Errorf("create app: %+v", err) httputil.ReturnBcodeError(r, w, err) return } @@ -120,7 +122,7 @@ func (a *ApplicationController) ListApps(w http.ResponseWriter, r *http.Request) } // ListServices - -func (a *ApplicationController) ListServices(w http.ResponseWriter, r *http.Request) { +func (a *ApplicationController) ListComponents(w http.ResponseWriter, r *http.Request) { appID := chi.URLParam(r, "app_id") query := r.URL.Query() pageQuery := query.Get("page") @@ -220,6 +222,18 @@ func (a *ApplicationController) Install(w http.ResponseWriter, r *http.Request) } } +func (a *ApplicationController) ListServices(w http.ResponseWriter, r *http.Request) { + app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) + + services, err := handler.GetApplicationHandler().ListServices(r.Context(), app) + if err != nil { + httputil.ReturnBcodeError(r, w, err) + return + } + + httputil.ReturnSuccess(r, w, services) +} + // BatchBindService - func (a *ApplicationController) BatchBindService(w http.ResponseWriter, r *http.Request) { appID := chi.URLParam(r, "app_id") diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 982bbdd5a..31975e94d 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -13,16 +13,20 @@ import ( dbmodel "github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - "github.com/goodrain/rainbond/util" + util "github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util/commonutil" + k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/server/pb" + wutil "github.com/goodrain/rainbond/worker/util" "github.com/jinzhu/gorm" "github.com/pkg/errors" "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + clientset "k8s.io/client-go/kubernetes" ) // ApplicationAction - @@ -30,6 +34,7 @@ type ApplicationAction struct { statusCli *client.AppRuntimeSyncClient promClient prometheus.Interface rainbondClient versioned.Interface + kubeClient clientset.Interface } // ApplicationHandler defines handler methods to TenantApplication. @@ -49,17 +54,19 @@ type ApplicationHandler interface { GetStatus(app *dbmodel.Application) (*model.AppStatus, error) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) Install(ctx context.Context, app *dbmodel.Application, values string) error + ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) DeleteConfigGroup(appID, configGroupName string) error ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error) } // NewApplicationHandler creates a new Tenant Application Handler. -func NewApplicationHandler(statusCli *client.AppRuntimeSyncClient, promClient prometheus.Interface, rainbondClient versioned.Interface) ApplicationHandler { +func NewApplicationHandler(statusCli *client.AppRuntimeSyncClient, promClient prometheus.Interface, rainbondClient versioned.Interface, kubeClient clientset.Interface) ApplicationHandler { return &ApplicationAction{ statusCli: statusCli, promClient: promClient, rainbondClient: rainbondClient, + kubeClient: kubeClient, } } @@ -366,6 +373,52 @@ func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Applicatio return errors.Wrap(err, "install app") } +func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) { + nctx, cancel := context.WithTimeout(ctx, 3*time.Second) + defer cancel() + + // list services + labelSelector := labels.FormatLabels(map[string]string{ + "app.kubernetes.io/name": app.AppName, + "app.kubernetes.io/managed-by": "Helm", + }) + serviceList, err := a.kubeClient.CoreV1().Services(app.TenantID).List(nctx, metav1.ListOptions{ + LabelSelector: labelSelector, + }) + if err != nil { + return nil, err + } + + var services []*model.AppService + for _, service := range serviceList.Items { + svc := &model.AppService{ + ServiceName: service.Name, + } + + podList, err := a.kubeClient.CoreV1().Pods(service.Namespace).List(nctx, metav1.ListOptions{ + LabelSelector: labels.FormatLabels(service.Spec.Selector), + }) + if err != nil { + logrus.Warningf("list pods: %v", err) + } else { + var pods []*model.AppPod + for _, pod := range podList.Items { + podStatus := &pb.PodStatus{} + wutil.DescribePodStatus(a.kubeClient, &pod, podStatus, k8sutil.DefListEventsByPod) + pods = append(pods, &model.AppPod{ + PodName: pod.Name, + PodStatus: podStatus.TypeStr, + }) + } + svc.Pods = pods + } + + services = append(services, svc) + } + + return services, nil +} + func (a *ApplicationAction) getDiskUsage(appID string) float64 { var result float64 query := fmt.Sprintf(`sum(max(app_resource_appfs{app_id=~"%s"}) by(app_id))`, appID) diff --git a/api/handler/handler.go b/api/handler/handler.go index 62aaf89e5..7b701faad 100644 --- a/api/handler/handler.go +++ b/api/handler/handler.go @@ -82,7 +82,7 @@ func InitHandle(conf option.Config, defaultVolumeTypeHandler = CreateVolumeTypeManger(statusCli) defaultEtcdHandler = NewEtcdHandler(etcdcli) defaultmonitorHandler = NewMonitorHandler(prometheusCli) - defApplicationHandler = NewApplicationHandler(statusCli, prometheusCli, rainbondClient) + defApplicationHandler = NewApplicationHandler(statusCli, prometheusCli, rainbondClient, kubeClient) return nil } diff --git a/api/model/app.go b/api/model/app.go index e80b9f7ce..f1102164a 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -24,3 +24,14 @@ type AppDetectProcess struct { Ready bool `json:"ready"` Error string `json:"error"` } + +// AppService - +type AppService struct { + ServiceName string `json:"service_name"` + Pods []*AppPod `json:"pods"` +} + +type AppPod struct { + PodName string `json:"pod_name"` + PodStatus string `json:"pod_status"` +} diff --git a/cmd/worker/server/server.go b/cmd/worker/server/server.go index 336d2d731..61e282711 100644 --- a/cmd/worker/server/server.go +++ b/cmd/worker/server/server.go @@ -22,6 +22,7 @@ import ( "os" "os/signal" "syscall" + "time" "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/worker/option" @@ -33,6 +34,7 @@ import ( "github.com/goodrain/rainbond/worker/appm" "github.com/goodrain/rainbond/worker/appm/controller" "github.com/goodrain/rainbond/worker/appm/store" + "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/goodrain/rainbond/worker/discover" "github.com/goodrain/rainbond/worker/gc" "github.com/goodrain/rainbond/worker/master" @@ -130,6 +132,10 @@ func Run(s *option.Worker) error { } defer exporterManager.Stop() + stopCh := make(chan struct{}) + ctrl := helmapp.NewController(stopCh, restConfig, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + go ctrl.Start() + logrus.Info("worker begin running...") //step finally: listen Signal diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index f08524da7..2d149ad46 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -4,6 +4,7 @@ import ( "time" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/sirupsen/logrus" "k8s.io/client-go/rest" "k8s.io/client-go/util/workqueue" ) @@ -30,10 +31,9 @@ func NewController(stopCh chan struct{}, restcfg *rest.Config, resyncPeriod time } } -func (c *Controller) Start() error { +func (c *Controller) Start() { + logrus.Info("start helm app controller") go c.storer.Run(c.stopCh) c.controlLoop.Run() - - return nil } diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index a9cfcd132..a6b140236 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -50,7 +50,7 @@ func (h *Helm) PreInstall(name, namespace, chart string, out io.Writer) error { } func (h *Helm) Install(name, namespace, chart string, vals map[string]interface{}, out io.Writer) error { - return h.install(name, namespace, chart, vals, true, out) + return h.install(name, namespace, chart, vals, false, out) } func (h *Helm) install(name, namespace, chart string, vals map[string]interface{}, dryRun bool, out io.Writer) error { diff --git a/worker/controllers/helmapp/informer.go b/worker/controllers/helmapp/informer.go index d48c7529c..791ca3382 100644 --- a/worker/controllers/helmapp/informer.go +++ b/worker/controllers/helmapp/informer.go @@ -17,7 +17,7 @@ import ( // Storer - type Storer interface { - Run(stopCh <-chan struct{}) error + Run(stopCh <-chan struct{}) GetHelmApp(ns, name string) (*rainbondv1alpha1.HelmApp, error) } @@ -56,7 +56,7 @@ func NewStorer(clientset versioned.Interface, } } -func (i *store) Run(stopCh <-chan struct{}) error { +func (i *store) Run(stopCh <-chan struct{}) { go i.informer.Run(stopCh) // wait for all involved caches to be synced before processing items @@ -70,8 +70,6 @@ func (i *store) Run(stopCh <-chan struct{}) error { // in big clusters, deltas can keep arriving even after HasSynced // functions have returned 'true' time.Sleep(1 * time.Second) - - return nil } func (i *store) GetHelmApp(ns, name string) (*rainbondv1alpha1.HelmApp, error) { From 0c23b0ba302b90b497323fb4e8bb4b87629b9fd3 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Mon, 19 Apr 2021 11:52:52 +0800 Subject: [PATCH 13/65] return readme --- api/api_routers/version2/v2Routers.go | 1 + api/controller/pods.go | 4 +- api/handler/application_handler.go | 32 +++++++++++++++- api/handler/pod_action.go | 4 +- api/handler/pod_handler.go | 2 +- api/model/app.go | 1 + cmd/helmappcontroller/main.go | 4 +- cmd/worker/server/server.go | 16 ++++---- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 6 ++- worker/appm/store/store.go | 5 +++ worker/controllers/helmapp/controlloop.go | 24 +++++++----- worker/controllers/helmapp/detector.go | 5 ++- worker/controllers/helmapp/helm/app.go | 41 +++++++++++++++------ worker/controllers/helmapp/helm/helm.go | 7 ++-- worker/controllers/helmapp/status.go | 8 +++- worker/server/pod.go | 8 +--- 16 files changed, 115 insertions(+), 53 deletions(-) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index 71408fba9..a551aa0e5 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -136,6 +136,7 @@ func (v2 *V2) tenantNameRouter() chi.Router { r.Get("/event", controller.GetManager().Event) r.Get("/chargesverify", controller.ChargesVerifyController) //tenant app + r.Get("/pods/{pod_name}", controller.GetManager().PodDetail) r.Post("/apps", controller.GetManager().CreateApp) r.Post("/batch_create_apps", controller.GetManager().BatchCreateApp) r.Get("/apps", controller.GetManager().ListApps) diff --git a/api/controller/pods.go b/api/controller/pods.go index e80fc76b1..01672e5e2 100644 --- a/api/controller/pods.go +++ b/api/controller/pods.go @@ -88,8 +88,8 @@ func Pods(w http.ResponseWriter, r *http.Request) { // PodDetail - func (p *PodController) PodDetail(w http.ResponseWriter, r *http.Request) { podName := chi.URLParam(r, "pod_name") - serviceID := r.Context().Value(middleware.ContextKey("service_id")).(string) - pd, err := handler.GetPodHandler().PodDetail(serviceID, podName) + namespace := r.Context().Value(middleware.ContextKey("tenant_id")).(string) + pd, err := handler.GetPodHandler().PodDetail(namespace, podName) if err != nil { logrus.Errorf("error getting pod detail: %v", err) if err == server.ErrPodNotFound { diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 31975e94d..6f560040b 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -304,9 +304,37 @@ func (a *ApplicationAction) getHelmAppStatus(ctx context.Context, app *dbmodel.A return nil, errors.WithStack(err) } + phase := string(v1alpha1.HelmAppStatusPhaseDetecting) + if string(helmApp.Status.Phase) != "" { + phase = string(helmApp.Status.Phase) + } + + labelSelector := labels.FormatLabels(map[string]string{ + "app.kubernetes.io/instance": app.AppName, + "app.kubernetes.io/managed-by": "Helm", + }) + podList, err := a.kubeClient.CoreV1().Pods(app.TenantID).List(ctx, metav1.ListOptions{ + LabelSelector: labelSelector, + }) + if err != nil { + return nil, err + } + + var cpu, memory int64 + for _, pod := range podList.Items { + for _, c := range pod.Spec.Containers { + cpu += c.Resources.Requests.Cpu().MilliValue() + memory += c.Resources.Limits.Memory().Value() / 1024 / 1024 + } + } + return &model.AppStatus{ - Phase: string(helmApp.Status.Phase), + Status: string(helmApp.Status.Status), + Phase: phase, ValuesTemplate: helmApp.Status.ValuesTemplate, + Cpu: cpu, + Memory: memory, + Readme: helmApp.Status.Readme, }, nil } @@ -379,7 +407,7 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli // list services labelSelector := labels.FormatLabels(map[string]string{ - "app.kubernetes.io/name": app.AppName, + "app.kubernetes.io/instance": app.AppName, "app.kubernetes.io/managed-by": "Helm", }) serviceList, err := a.kubeClient.CoreV1().Services(app.TenantID).List(nctx, metav1.ListOptions{ diff --git a/api/handler/pod_action.go b/api/handler/pod_action.go index 760a643d6..1d9f3a73c 100644 --- a/api/handler/pod_action.go +++ b/api/handler/pod_action.go @@ -14,8 +14,8 @@ type PodAction struct { } // PodDetail - -func (p *PodAction) PodDetail(serviceID, podName string) (*pb.PodDetail, error) { - pd, err := p.statusCli.GetPodDetail(serviceID, podName) +func (p *PodAction) PodDetail(namespace, podName string) (*pb.PodDetail, error) { + pd, err := p.statusCli.GetPodDetail(namespace, podName) if err != nil { if strings.Contains(err.Error(), server.ErrPodNotFound.Error()) { return nil, server.ErrPodNotFound diff --git a/api/handler/pod_handler.go b/api/handler/pod_handler.go index 420664edf..ca0363160 100644 --- a/api/handler/pod_handler.go +++ b/api/handler/pod_handler.go @@ -7,7 +7,7 @@ import ( // PodHandler defines handler methods about k8s pods. type PodHandler interface { - PodDetail(serviceID, podName string) (*pb.PodDetail, error) + PodDetail(namespace, podName string) (*pb.PodDetail, error) } // NewPodHandler creates a new PodHandler. diff --git a/api/model/app.go b/api/model/app.go index f1102164a..393e52254 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -16,6 +16,7 @@ type AppStatus struct { Disk int64 `json:"disk"` Phase string `json:"phase"` ValuesTemplate string `json:"valuesTemplate"` + Readme string `json:"readme"` } // AppDetectProcess - diff --git a/cmd/helmappcontroller/main.go b/cmd/helmappcontroller/main.go index 4db64558a..abbe6d8af 100644 --- a/cmd/helmappcontroller/main.go +++ b/cmd/helmappcontroller/main.go @@ -51,9 +51,7 @@ func main() { //} ctrl := helmapp.NewController(stopCh, restcfg, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") - if err = ctrl.Start(); err != nil { - logrus.Fatalf("start controller: %v", err) - } + ctrl.Start() select {} } diff --git a/cmd/worker/server/server.go b/cmd/worker/server/server.go index 61e282711..39a3cc408 100644 --- a/cmd/worker/server/server.go +++ b/cmd/worker/server/server.go @@ -19,11 +19,6 @@ package server import ( - "os" - "os/signal" - "syscall" - "time" - "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/db" @@ -34,7 +29,6 @@ import ( "github.com/goodrain/rainbond/worker/appm" "github.com/goodrain/rainbond/worker/appm/controller" "github.com/goodrain/rainbond/worker/appm/store" - "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/goodrain/rainbond/worker/discover" "github.com/goodrain/rainbond/worker/gc" "github.com/goodrain/rainbond/worker/master" @@ -42,6 +36,9 @@ import ( "github.com/goodrain/rainbond/worker/server" "github.com/sirupsen/logrus" "k8s.io/client-go/kubernetes" + "os" + "os/signal" + "syscall" ) //Run start run @@ -132,9 +129,10 @@ func Run(s *option.Worker) error { } defer exporterManager.Stop() - stopCh := make(chan struct{}) - ctrl := helmapp.NewController(stopCh, restConfig, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") - go ctrl.Start() + //stopCh := make(chan struct{}) + //ctrl := helmapp.NewController(stopCh, restConfig, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + //go ctrl.Start() + //defer close(stopCh) logrus.Info("worker begin running...") diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index e9c0d7b84..040ce8689 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -124,10 +124,10 @@ type HelmAppSpec struct { Version string `json:"version"` // The application revision. - Revision *int32 `json:"revision"` + Revision *int32 `json:"revision,omitempty"` // The values.yaml of the helm app, encoded by base64. - Values string `json:"values"` + Values string `json:"values,omitempty"` // The helm app store. // TODO: validation. not null @@ -170,6 +170,8 @@ type HelmAppStatus struct { CurrentRevision string `json:"currentRevision,omitempty"` ValuesTemplate string `json:"valuesTemplate,omitempty"` + + Readme string `json:"readme,omitempty"` } // +genclient diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index 75e9ac3be..ced9bb359 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -73,6 +73,7 @@ var rc2RecordType = map[string]string{ type Storer interface { Start() error Ready() bool + GetPod(namespace, name string) (*corev1.Pod, error) RegistAppService(*v1.AppService) GetAppService(serviceID string) *v1.AppService UpdateGetAppService(serviceID string) *v1.AppService @@ -880,6 +881,10 @@ func (a *appRuntimeStore) RegistAppService(app *v1.AppService) { logrus.Debugf("current have %d app after add \n", a.appCount) } +func (a *appRuntimeStore) GetPod(namespace, name string) (*corev1.Pod, error) { + return a.listers.Pod.Pods(namespace).Get(name) +} + //DeleteAppService delete cache app service func (a *appRuntimeStore) DeleteAppService(app *v1.AppService) { //a.appServices.Delete(v1.GetCacheKeyOnlyServiceID(app.ServiceID)) diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 05d72296c..b24bda6d2 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -75,15 +75,7 @@ func (c *ControlLoop) run(obj interface{}) { } func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { - logrus.Debugf("HelmApp Received: %s", k8sutil.ObjKey(helmApp)) - - status := NewStatus(helmApp) - - defer func() { - helmApp.Status = status.GetHelmAppStatus() - // TODO: handle the error - c.updateStatus(helmApp) - }() + logrus.Debugf("HelmApp Received: %s; phase: %s", k8sutil.ObjKey(helmApp), helmApp.Status.Phase) appStore := helmApp.Spec.AppStore app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, @@ -95,6 +87,20 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { return err } + status, continu3 := NewStatus(helmApp) + + defer func() { + helmApp.Status = status.GetHelmAppStatus() + s, _ := app.Status() + helmApp.Status.Status = v1alpha1.HelmAppStatusStatus(s) + // TODO: handle the error + c.updateStatus(helmApp) + }() + + if !continu3 { + return nil + } + detector := NewDetector(helmApp, status, app, c.repo) if err := detector.Detect(); err != nil { // TODO: create event diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 42d74c8b3..28fd76ea6 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -46,6 +46,7 @@ func (d *Detector) Detect() error { return err } d.status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionTrue) + return nil } // check if the chart is valid @@ -56,11 +57,12 @@ func (d *Detector) Detect() error { return err } d.status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionTrue) + return nil } // parse chart if !d.status.IsConditionTrue(v1alpha1.HelmAppChartParsed) { - values, err := d.app.ParseChart() + values, readme, err := d.app.ParseChart() if err != nil { d.status.UpdateCondition(v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppChartParsed, corev1.ConditionFalse, "ChartParsed", err.Error())) @@ -68,6 +70,7 @@ func (d *Detector) Detect() error { } d.status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionTrue) d.status.ValuesTemplate = values + d.status.Readme = readme } return nil diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index e5255eddb..a7c83e06b 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -7,7 +7,6 @@ import ( "os" "path" "path/filepath" - "strings" "github.com/goodrain/rainbond/util/commonutil" "github.com/pkg/errors" @@ -87,15 +86,23 @@ func (a *App) chart() string { func (a *App) PreInstall() error { var buf bytes.Buffer - if err := a.helm.PreInstall(a.templateName, a.namespace, a.Chart(), &buf); err != nil { + if err := a.helm.PreInstall(a.name, a.namespace, a.Chart(), &buf); err != nil { return err } logrus.Infof("pre install: %s", buf.String()) return nil } +func (a *App) Status() (string, error) { + release, err := a.helm.Status(a.name) + if err != nil { + return "", err + } + return string(release.Info.Status), nil +} + func (a *App) InstallOrUpdate() error { - err := a.helm.Status(a.name) + _, err := a.helm.Status(a.name) if errors.Is(err, driver.ErrReleaseNotFound) { b, err := base64.StdEncoding.DecodeString(a.encodedValues) if err != nil { @@ -108,7 +115,7 @@ func (a *App) InstallOrUpdate() error { } var buf bytes.Buffer - if err := a.helm.Install(a.templateName, a.namespace, a.Chart(), values, &buf); err != nil { + if err := a.helm.Install(a.name, a.namespace, a.Chart(), values, &buf); err != nil { return err } logrus.Infof("install: %s", buf.String()) @@ -117,26 +124,38 @@ func (a *App) InstallOrUpdate() error { return nil } -func (a *App) ParseChart() (string, error) { +func (a *App) ParseChart() (string, string, error) { var values string - err := filepath.Walk(a.chartDir, func(path string, info os.FileInfo, err error) error { + var readme string + err := filepath.Walk(a.chartDir, func(p string, info os.FileInfo, err error) error { if err != nil { return err } - if info.IsDir() { + if p == a.chartDir { return nil } - if !strings.Contains(path, "values.yaml") { + if values != "" || readme != "" { + return filepath.SkipDir + } + if !info.IsDir() { return nil } - file, err := ioutil.ReadFile(path) + valuesFile := path.Join(p, "values.yaml") + valuesBytes, err := ioutil.ReadFile(valuesFile) if err != nil { return err } - values = base64.StdEncoding.EncodeToString(file) + values = base64.StdEncoding.EncodeToString(valuesBytes) + + readmeFile := path.Join(p, "README.md") + readmeBytes, err := ioutil.ReadFile(readmeFile) + if err != nil { + return err + } + readme = base64.StdEncoding.EncodeToString(readmeBytes) return nil }) - return values, err + return values, readme, err } diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index a6b140236..595985a01 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -12,6 +12,7 @@ import ( "helm.sh/helm/v3/pkg/downloader" "helm.sh/helm/v3/pkg/getter" "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/release" "k8s.io/cli-runtime/pkg/genericclioptions" ) @@ -119,11 +120,11 @@ func (h *Helm) install(name, namespace, chart string, vals map[string]interface{ return err } -func (h *Helm) Status(name string) error { +func (h *Helm) Status(name string) (*release.Release, error) { // helm status RELEASE_NAME [flags] client := action.NewStatus(h.cfg) - _, err := client.Run(name) - return err + rel, err := client.Run(name) + return rel, errors.Wrap(err, "helm status") } // checkIfInstallable validates if a chart can be installed diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index d91a4dffa..7be289feb 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -11,23 +11,27 @@ type Status struct { } // NewStatus creates a new helm app status. -func NewStatus(app *v1alpha1.HelmApp) *Status { +func NewStatus(app *v1alpha1.HelmApp) (*Status, bool) { + continu3 := true idx, _ := app.Status.GetCondition(v1alpha1.HelmAppChartReady) if idx == -1 { app.Status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionFalse) + continu3 = false } idx, _ = app.Status.GetCondition(v1alpha1.HelmAppPreInstalled) if idx == -1 { app.Status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionFalse) + continu3 = false } idx, _ = app.Status.GetCondition(v1alpha1.HelmAppChartParsed) if idx == -1 { app.Status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionFalse) + continu3 = false } return &Status{ HelmAppStatus: app.Status, values: app.Spec.Values, - } + }, continu3 } func (s *Status) GetHelmAppStatus() v1alpha1.HelmAppStatus { diff --git a/worker/server/pod.go b/worker/server/pod.go index ff08fa1e5..4371b710d 100644 --- a/worker/server/pod.go +++ b/worker/server/pod.go @@ -79,12 +79,8 @@ func (r *RuntimeServer) GetPodDetail(ctx context.Context, req *pb.GetPodDetailRe return podDetail, nil } -func (r *RuntimeServer) getPodByName(sid, name string) (*corev1.Pod, error) { - app := r.store.GetAppService(sid) - if app == nil { - return nil, ErrAppServiceNotFound - } - return app.GetPodsByName(name), nil +func (r *RuntimeServer) getPodByName(namespace, name string) (*corev1.Pod, error) { + return r.store.GetPod(namespace, name) } // GetPodEvents - From 4c6b153b1146980bb953f3785ff87d962e64cb30 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Mon, 19 Apr 2021 17:34:56 +0800 Subject: [PATCH 14/65] helm app lister --- api/controller/application.go | 2 +- api/handler/application_handler.go | 88 +-- cmd/worker/server/server.go | 15 +- db/model/application.go | 6 + worker/appm/store/informer.go | 1 + worker/appm/store/lister.go | 2 + worker/appm/store/store.go | 70 +- worker/controllers/helmapp/controller.go | 4 +- .../helmapp/{informer.go => store.go} | 0 worker/server/pb/app_runtime_server.pb.go | 623 +++++++++++------- worker/server/pb/app_runtime_server.proto | 36 +- worker/server/server.go | 90 ++- 12 files changed, 581 insertions(+), 356 deletions(-) rename worker/controllers/helmapp/{informer.go => store.go} (100%) diff --git a/api/controller/application.go b/api/controller/application.go index 6c04ce892..deea83d50 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -186,7 +186,7 @@ func (a *ApplicationController) BatchUpdateComponentPorts(w http.ResponseWriter, func (a *ApplicationController) GetAppStatus(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) - res, err := handler.GetApplicationHandler().GetStatus(app) + res, err := handler.GetApplicationHandler().GetStatus(r.Context(), app) if err != nil { httputil.ReturnBcodeError(r, w, err) return diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 6f560040b..3e0b6bc08 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -22,7 +22,6 @@ import ( "github.com/jinzhu/gorm" "github.com/pkg/errors" "github.com/sirupsen/logrus" - corev1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -51,7 +50,7 @@ type ApplicationHandler interface { UpdateConfigGroup(appID, configGroupName string, req *model.UpdateAppConfigGroupReq) (*model.ApplicationConfigGroupResp, error) BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error - GetStatus(app *dbmodel.Application) (*model.AppStatus, error) + GetStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) Install(ctx context.Context, app *dbmodel.Application, values string) error ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) @@ -284,72 +283,21 @@ func (a *ApplicationAction) checkPorts(appID string, ports []*model.AppPort) err } // GetStatus - -func (a *ApplicationAction) GetStatus(app *dbmodel.Application) (*model.AppStatus, error) { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) +func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) { + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel() - if app.AppType == "helm" { - return a.getHelmAppStatus(ctx, app) - } - - return a.getRainbondAppStatus(ctx, app) -} - -func (a *ApplicationAction) getHelmAppStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) { - helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(ctx, app.AppName, metav1.GetOptions{}) - if err != nil { - if k8sErrors.IsNotFound(err) { - return nil, errors.WithStack(bcode.ErrApplicationNotFound) - } - return nil, errors.WithStack(err) - } - - phase := string(v1alpha1.HelmAppStatusPhaseDetecting) - if string(helmApp.Status.Phase) != "" { - phase = string(helmApp.Status.Phase) - } - - labelSelector := labels.FormatLabels(map[string]string{ - "app.kubernetes.io/instance": app.AppName, - "app.kubernetes.io/managed-by": "Helm", - }) - podList, err := a.kubeClient.CoreV1().Pods(app.TenantID).List(ctx, metav1.ListOptions{ - LabelSelector: labelSelector, - }) - if err != nil { - return nil, err - } - - var cpu, memory int64 - for _, pod := range podList.Items { - for _, c := range pod.Spec.Containers { - cpu += c.Resources.Requests.Cpu().MilliValue() - memory += c.Resources.Limits.Memory().Value() / 1024 / 1024 - } - } - - return &model.AppStatus{ - Status: string(helmApp.Status.Status), - Phase: phase, - ValuesTemplate: helmApp.Status.ValuesTemplate, - Cpu: cpu, - Memory: memory, - Readme: helmApp.Status.Readme, - }, nil -} - -func (a *ApplicationAction) getRainbondAppStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) { status, err := a.statusCli.GetAppStatus(ctx, &pb.AppStatusReq{ AppId: app.AppID, }) if err != nil { - return nil, err + return nil, errors.Wrap(err, "get app status") } diskUsage := a.getDiskUsage(app.AppID) res := &model.AppStatus{ - Status: status.Status.String(), + Status: status.Status, Cpu: status.Cpu, Memory: status.Memory, Disk: int64(diskUsage), @@ -361,27 +309,23 @@ func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.A nctx, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() - helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(nctx, app.AppName, metav1.GetOptions{}) + res, err := a.statusCli.ListHelmAppDetectConditions(nctx, &pb.AppReq{ + AppId: app.AppID, + }) if err != nil { - if k8sErrors.IsNotFound(err) { - return nil, errors.WithStack(bcode.ErrApplicationNotFound) - } - return nil, errors.WithStack(err) + return nil, err } - var processes []*model.AppDetectProcess - for _, condition := range helmApp.Status.Conditions { - if condition.Type == v1alpha1.HelmAppInstalled { - continue - } - processes = append(processes, &model.AppDetectProcess{ - Type: string(condition.Type), - Ready: condition.Status == corev1.ConditionTrue, - Error: condition.Message, + var conditions []*model.AppDetectProcess + for _, condition := range res.Conditions { + conditions = append(conditions, &model.AppDetectProcess{ + Type: condition.Type, + Ready: condition.Ready, + Error: condition.Error, }) } - return processes, nil + return conditions, nil } func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, values string) error { diff --git a/cmd/worker/server/server.go b/cmd/worker/server/server.go index 39a3cc408..8149158fc 100644 --- a/cmd/worker/server/server.go +++ b/cmd/worker/server/server.go @@ -24,11 +24,13 @@ import ( "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db/config" "github.com/goodrain/rainbond/event" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" etcdutil "github.com/goodrain/rainbond/util/etcd" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/appm" "github.com/goodrain/rainbond/worker/appm/controller" "github.com/goodrain/rainbond/worker/appm/store" + "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/goodrain/rainbond/worker/discover" "github.com/goodrain/rainbond/worker/gc" "github.com/goodrain/rainbond/worker/master" @@ -39,6 +41,7 @@ import ( "os" "os/signal" "syscall" + "time" ) //Run start run @@ -82,11 +85,13 @@ func Run(s *option.Worker) error { } s.Config.KubeClient = clientset + rainbondClient := versioned.NewForConfigOrDie(restConfig) + //step 3: create resource store startCh := channels.NewRingChannel(1024) updateCh := channels.NewRingChannel(1024) probeCh := channels.NewRingChannel(1024) - cachestore := store.NewStore(restConfig, clientset, db.GetManager(), s.Config, startCh, probeCh) + cachestore := store.NewStore(restConfig, clientset, rainbondClient, db.GetManager(), s.Config, startCh, probeCh) appmController := appm.NewAPPMController(clientset, cachestore, startCh, updateCh, probeCh) if err := appmController.Start(); err != nil { logrus.Errorf("error starting appm controller: %v", err) @@ -129,10 +134,10 @@ func Run(s *option.Worker) error { } defer exporterManager.Stop() - //stopCh := make(chan struct{}) - //ctrl := helmapp.NewController(stopCh, restConfig, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") - //go ctrl.Start() - //defer close(stopCh) + stopCh := make(chan struct{}) + ctrl := helmapp.NewController(stopCh, rainbondClient, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + go ctrl.Start() + defer close(stopCh) logrus.Info("worker begin running...") diff --git a/db/model/application.go b/db/model/application.go index 2967649d5..59cc558a1 100644 --- a/db/model/application.go +++ b/db/model/application.go @@ -7,6 +7,12 @@ const ( GovernanceModeKubernetesNativeService = "KUBERNETES_NATIVE_SERVICE" ) +// app type +const ( + AppTypeRainbond = "rainbond" + AppTypeHelm = "helm" +) + // IsGovernanceModeValid checks if the governanceMode is valid. func IsGovernanceModeValid(governanceMode string) bool { return governanceMode == GovernanceModeBuildInServiceMesh || governanceMode == GovernanceModeKubernetesNativeService diff --git a/worker/appm/store/informer.go b/worker/appm/store/informer.go index 53af2d158..d519f7df8 100644 --- a/worker/appm/store/informer.go +++ b/worker/appm/store/informer.go @@ -40,6 +40,7 @@ type Informer struct { Events cache.SharedIndexInformer HorizontalPodAutoscaler cache.SharedIndexInformer CRD cache.SharedIndexInformer + HelmApp cache.SharedIndexInformer CRS map[string]cache.SharedIndexInformer } diff --git a/worker/appm/store/lister.go b/worker/appm/store/lister.go index 63f8593e3..a37e3aeca 100644 --- a/worker/appm/store/lister.go +++ b/worker/appm/store/lister.go @@ -19,6 +19,7 @@ package store import ( + "github.com/goodrain/rainbond/pkg/generated/listers/rainbond/v1alpha1" crdlisters "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" appsv1 "k8s.io/client-go/listers/apps/v1" autoscalingv2 "k8s.io/client-go/listers/autoscaling/v2beta2" @@ -42,4 +43,5 @@ type Lister struct { Claims corev1.PersistentVolumeClaimLister HorizontalPodAutoscaler autoscalingv2.HorizontalPodAutoscalerLister CRD crdlisters.CustomResourceDefinitionLister + HelmApp v1alpha1.HelmAppLister } diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index ced9bb359..f2dcb7634 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -21,29 +21,29 @@ package store import ( "context" "fmt" + "github.com/goodrain/rainbond/api/util/bcode" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/pkg/errors" "os" "sync" "time" - "github.com/goodrain/rainbond/worker/server/pb" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/selection" - - "github.com/goodrain/rainbond/util/constants" - monitorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned" - "k8s.io/apimachinery/pkg/types" - "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db/model" + rainbondversioned "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/goodrain/rainbond/pkg/generated/informers/externalversions" + "github.com/goodrain/rainbond/util/constants" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/appm/conversion" "github.com/goodrain/rainbond/worker/appm/f" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/goodrain/rainbond/worker/server/pb" workerutil "github.com/goodrain/rainbond/worker/util" "github.com/jinzhu/gorm" + monitorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned" "github.com/sirupsen/logrus" appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2beta2" @@ -53,12 +53,13 @@ import ( apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" internalclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" internalinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" - "k8s.io/apimachinery/pkg/api/errors" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" - listcorev1 "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" ) @@ -85,7 +86,6 @@ type Storer interface { GetTenantRunningApp(tenantID string) []*v1.AppService GetNeedBillingStatus(serviceIDs []string) map[string]string OnDeletes(obj ...interface{}) - GetPodLister() listcorev1.PodLister RegistPodUpdateListener(string, chan<- *corev1.Pod) UnRegistPodUpdateListener(string) RegisterVolumeTypeListener(string, chan<- *model.TenantServiceVolumeType) @@ -96,6 +96,8 @@ type Storer interface { GetServiceMonitorClient() (*versioned.Clientset, error) GetAppStatus(appID string) (pb.AppStatus_Status, error) GetAppResources(appID string) (int64, int64, error) + GetHelmApp(namespace, name string) (*v1alpha1.HelmApp, error) + ListPods(namespace string, selector labels.Selector) ([]*corev1.Pod, error) } // EventType type of event associated with an informer @@ -152,6 +154,7 @@ type appRuntimeStore struct { func NewStore( kubeconfig *rest.Config, clientset kubernetes.Interface, + rainbondClient rainbondversioned.Interface, dbmanager db.Manager, conf option.Config, startCh *channels.RingChannel, @@ -188,6 +191,11 @@ func NewStore( infFactory := informers.NewSharedInformerFactoryWithOptions(conf.KubeClient, 10*time.Second, informers.WithNamespace(corev1.NamespaceAll)) + sharedInformer := externalversions.NewSharedInformerFactoryWithOptions(rainbondClient, 10*time.Second, + externalversions.WithNamespace(corev1.NamespaceAll)) + store.listers.HelmApp = sharedInformer.Rainbond().V1alpha1().HelmApps().Lister() + store.informers.HelmApp = sharedInformer.Rainbond().V1alpha1().HelmApps().Informer() + store.informers.Namespace = infFactory.Core().V1().Namespaces().Informer() store.informers.Deployment = infFactory.Apps().V1().Deployments().Informer() @@ -409,7 +417,7 @@ func (a *appRuntimeStore) init() error { //init leader namespace leaderNamespace := a.conf.LeaderElectionNamespace if _, err := a.conf.KubeClient.CoreV1().Namespaces().Get(context.Background(), leaderNamespace, metav1.GetOptions{}); err != nil { - if errors.IsNotFound(err) { + if k8sErrors.IsNotFound(err) { _, err = a.conf.KubeClient.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: leaderNamespace, @@ -499,7 +507,8 @@ func (a *appRuntimeStore) checkReplicasetWhetherDelete(app *v1.AppService, rs *a //delete old version if v1.GetReplicaSetVersion(current) > v1.GetReplicaSetVersion(rs) { if rs.Status.Replicas == 0 && rs.Status.ReadyReplicas == 0 && rs.Status.AvailableReplicas == 0 { - if err := a.conf.KubeClient.AppsV1().ReplicaSets(rs.Namespace).Delete(context.Background(), rs.Name, metav1.DeleteOptions{}); err != nil && errors.IsNotFound(err) { + if err := a.conf.KubeClient.AppsV1().ReplicaSets(rs.Namespace).Delete(context.Background(), rs.Name, metav1.DeleteOptions{}); + err != nil && k8sErrors.IsNotFound(err) { logrus.Errorf("delete old version replicaset failure %s", err.Error()) } } @@ -667,7 +676,7 @@ func (a *appRuntimeStore) OnAdd(obj interface{}) { } if smClient != nil { err := smClient.MonitoringV1().ServiceMonitors(sm.GetNamespace()).Delete(context.Background(), sm.GetName(), metav1.DeleteOptions{}) - if err != nil && !errors.IsNotFound(err) { + if err != nil && !k8sErrors.IsNotFound(err) { logrus.Errorf("delete service monitor failure: %s", err.Error()) } } @@ -916,7 +925,7 @@ func (a *appRuntimeStore) UpdateGetAppService(serviceID string) *v1.AppService { appService := app.(*v1.AppService) if statefulset := appService.GetStatefulSet(); statefulset != nil { stateful, err := a.listers.StatefulSet.StatefulSets(statefulset.Namespace).Get(statefulset.Name) - if err != nil && errors.IsNotFound(err) { + if err != nil && k8sErrors.IsNotFound(err) { appService.DeleteStatefulSet(statefulset) } if stateful != nil { @@ -925,7 +934,7 @@ func (a *appRuntimeStore) UpdateGetAppService(serviceID string) *v1.AppService { } if deployment := appService.GetDeployment(); deployment != nil { deploy, err := a.listers.Deployment.Deployments(deployment.Namespace).Get(deployment.Name) - if err != nil && errors.IsNotFound(err) { + if err != nil && k8sErrors.IsNotFound(err) { appService.DeleteDeployment(deployment) } if deploy != nil { @@ -935,7 +944,7 @@ func (a *appRuntimeStore) UpdateGetAppService(serviceID string) *v1.AppService { if services := appService.GetServices(true); services != nil { for _, service := range services { se, err := a.listers.Service.Services(service.Namespace).Get(service.Name) - if err != nil && errors.IsNotFound(err) { + if err != nil && k8sErrors.IsNotFound(err) { appService.DeleteServices(service) } if se != nil { @@ -946,7 +955,7 @@ func (a *appRuntimeStore) UpdateGetAppService(serviceID string) *v1.AppService { if ingresses := appService.GetIngress(true); ingresses != nil { for _, ingress := range ingresses { in, err := a.listers.Ingress.Ingresses(ingress.Namespace).Get(ingress.Name) - if err != nil && errors.IsNotFound(err) { + if err != nil && k8sErrors.IsNotFound(err) { appService.DeleteIngress(ingress) } if in != nil { @@ -957,7 +966,7 @@ func (a *appRuntimeStore) UpdateGetAppService(serviceID string) *v1.AppService { if secrets := appService.GetSecrets(true); secrets != nil { for _, secret := range secrets { se, err := a.listers.Secret.Secrets(secret.Namespace).Get(secret.Name) - if err != nil && errors.IsNotFound(err) { + if err != nil && k8sErrors.IsNotFound(err) { appService.DeleteSecrets(secret) } if se != nil { @@ -968,7 +977,7 @@ func (a *appRuntimeStore) UpdateGetAppService(serviceID string) *v1.AppService { if pods := appService.GetPods(true); pods != nil { for _, pod := range pods { se, err := a.listers.Pod.Pods(pod.Namespace).Get(pod.Name) - if err != nil && errors.IsNotFound(err) { + if err != nil && k8sErrors.IsNotFound(err) { appService.DeletePods(pod) } if se != nil { @@ -1204,9 +1213,6 @@ func (a *appRuntimeStore) addAbnormalInfo(ai *v1.AbnormalInfo) { } } -func (a *appRuntimeStore) GetPodLister() listcorev1.PodLister { - return a.listers.Pod -} //GetTenantResource get tenant resource func (a *appRuntimeStore) GetTenantResource(tenantID string) TenantResource { @@ -1500,7 +1506,7 @@ func (a *appRuntimeStore) createOrUpdateImagePullSecret(ns string) error { curSecret, err := a.secretByKey(types.NamespacedName{Namespace: ns, Name: imagePullSecretName}) if err != nil { // current secret not exists. create a new one. - if errors.IsNotFound(err) { + if k8sErrors.IsNotFound(err) { curSecret = &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: rawSecret.Name, @@ -1537,6 +1543,18 @@ func (a *appRuntimeStore) secretByKey(key types.NamespacedName) (*corev1.Secret, return a.listers.Secret.Secrets(key.Namespace).Get(key.Name) } +func (a *appRuntimeStore) GetHelmApp(namespace, name string) (*v1alpha1.HelmApp, error) { + helmApp, err := a.listers.HelmApp.HelmApps(namespace).Get(name) + if err != nil && k8sErrors.IsNotFound(err) { + err = errors.Wrap(bcode.ErrApplicationNotFound, "get helm app") + } + return helmApp, err +} + +func (a *appRuntimeStore) ListPods(namespace string, selector labels.Selector) ([]*corev1.Pod, error) { + return a.listers.Pod.Pods(namespace).List(selector) +} + func isImagePullSecretEqual(a, b *corev1.Secret) bool { if len(a.Data) != len(b.Data) { return false diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index 2d149ad46..ccc2fb616 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -5,7 +5,6 @@ import ( "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/sirupsen/logrus" - "k8s.io/client-go/rest" "k8s.io/client-go/util/workqueue" ) @@ -16,10 +15,9 @@ type Controller struct { controlLoop *ControlLoop } -func NewController(stopCh chan struct{}, restcfg *rest.Config, resyncPeriod time.Duration, +func NewController(stopCh chan struct{}, clientset versioned.Interface, resyncPeriod time.Duration, repoFile, repoCache string) *Controller { queue := workqueue.New() - clientset := versioned.NewForConfigOrDie(restcfg) storer := NewStorer(clientset, resyncPeriod, queue) controlLoop := NewControlLoop(clientset, storer, queue, repoFile, repoCache) diff --git a/worker/controllers/helmapp/informer.go b/worker/controllers/helmapp/store.go similarity index 100% rename from worker/controllers/helmapp/informer.go rename to worker/controllers/helmapp/store.go diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 20dcaf681..ba08b0eb2 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -8,8 +8,6 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" math "math" ) @@ -22,7 +20,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type ServiceVolumeStatus int32 @@ -109,7 +107,7 @@ func (x PodStatus_Type) String() string { } func (PodStatus_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{22, 0} + return fileDescriptor_f94cf1a886c479d6, []int{23, 0} } type AppStatus_Status int32 @@ -146,7 +144,7 @@ func (x AppStatus_Status) String() string { } func (AppStatus_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{30, 0} + return fileDescriptor_f94cf1a886c479d6, []int{31, 0} } type Empty struct { @@ -180,6 +178,45 @@ func (m *Empty) XXX_DiscardUnknown() { var xxx_messageInfo_Empty proto.InternalMessageInfo +type AppReq struct { + AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppReq) Reset() { *m = AppReq{} } +func (m *AppReq) String() string { return proto.CompactTextString(m) } +func (*AppReq) ProtoMessage() {} +func (*AppReq) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{1} +} + +func (m *AppReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppReq.Unmarshal(m, b) +} +func (m *AppReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppReq.Marshal(b, m, deterministic) +} +func (m *AppReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppReq.Merge(m, src) +} +func (m *AppReq) XXX_Size() int { + return xxx_messageInfo_AppReq.Size(m) +} +func (m *AppReq) XXX_DiscardUnknown() { + xxx_messageInfo_AppReq.DiscardUnknown(m) +} + +var xxx_messageInfo_AppReq proto.InternalMessageInfo + +func (m *AppReq) GetAppId() string { + if m != nil { + return m.AppId + } + return "" +} + type AppStatusReq struct { AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -191,7 +228,7 @@ func (m *AppStatusReq) Reset() { *m = AppStatusReq{} } func (m *AppStatusReq) String() string { return proto.CompactTextString(m) } func (*AppStatusReq) ProtoMessage() {} func (*AppStatusReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{1} + return fileDescriptor_f94cf1a886c479d6, []int{2} } func (m *AppStatusReq) XXX_Unmarshal(b []byte) error { @@ -230,7 +267,7 @@ func (m *ServiceRequest) Reset() { *m = ServiceRequest{} } func (m *ServiceRequest) String() string { return proto.CompactTextString(m) } func (*ServiceRequest) ProtoMessage() {} func (*ServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{2} + return fileDescriptor_f94cf1a886c479d6, []int{3} } func (m *ServiceRequest) XXX_Unmarshal(b []byte) error { @@ -269,7 +306,7 @@ func (m *ServicesRequest) Reset() { *m = ServicesRequest{} } func (m *ServicesRequest) String() string { return proto.CompactTextString(m) } func (*ServicesRequest) ProtoMessage() {} func (*ServicesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{3} + return fileDescriptor_f94cf1a886c479d6, []int{4} } func (m *ServicesRequest) XXX_Unmarshal(b []byte) error { @@ -308,7 +345,7 @@ func (m *TenantRequest) Reset() { *m = TenantRequest{} } func (m *TenantRequest) String() string { return proto.CompactTextString(m) } func (*TenantRequest) ProtoMessage() {} func (*TenantRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{4} + return fileDescriptor_f94cf1a886c479d6, []int{5} } func (m *TenantRequest) XXX_Unmarshal(b []byte) error { @@ -347,7 +384,7 @@ func (m *StatusMessage) Reset() { *m = StatusMessage{} } func (m *StatusMessage) String() string { return proto.CompactTextString(m) } func (*StatusMessage) ProtoMessage() {} func (*StatusMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{5} + return fileDescriptor_f94cf1a886c479d6, []int{6} } func (m *StatusMessage) XXX_Unmarshal(b []byte) error { @@ -386,7 +423,7 @@ func (m *DiskMessage) Reset() { *m = DiskMessage{} } func (m *DiskMessage) String() string { return proto.CompactTextString(m) } func (*DiskMessage) ProtoMessage() {} func (*DiskMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{6} + return fileDescriptor_f94cf1a886c479d6, []int{7} } func (m *DiskMessage) XXX_Unmarshal(b []byte) error { @@ -426,7 +463,7 @@ func (m *ServiceAppPodList) Reset() { *m = ServiceAppPodList{} } func (m *ServiceAppPodList) String() string { return proto.CompactTextString(m) } func (*ServiceAppPodList) ProtoMessage() {} func (*ServiceAppPodList) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{7} + return fileDescriptor_f94cf1a886c479d6, []int{8} } func (m *ServiceAppPodList) XXX_Unmarshal(b []byte) error { @@ -472,7 +509,7 @@ func (m *MultiServiceAppPodList) Reset() { *m = MultiServiceAppPodList{} func (m *MultiServiceAppPodList) String() string { return proto.CompactTextString(m) } func (*MultiServiceAppPodList) ProtoMessage() {} func (*MultiServiceAppPodList) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{8} + return fileDescriptor_f94cf1a886c479d6, []int{9} } func (m *MultiServiceAppPodList) XXX_Unmarshal(b []byte) error { @@ -518,7 +555,7 @@ func (m *ServiceAppPod) Reset() { *m = ServiceAppPod{} } func (m *ServiceAppPod) String() string { return proto.CompactTextString(m) } func (*ServiceAppPod) ProtoMessage() {} func (*ServiceAppPod) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{9} + return fileDescriptor_f94cf1a886c479d6, []int{10} } func (m *ServiceAppPod) XXX_Unmarshal(b []byte) error { @@ -608,7 +645,7 @@ func (m *Container) Reset() { *m = Container{} } func (m *Container) String() string { return proto.CompactTextString(m) } func (*Container) ProtoMessage() {} func (*Container) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{10} + return fileDescriptor_f94cf1a886c479d6, []int{11} } func (m *Container) XXX_Unmarshal(b []byte) error { @@ -671,7 +708,7 @@ func (m *DeployInfo) Reset() { *m = DeployInfo{} } func (m *DeployInfo) String() string { return proto.CompactTextString(m) } func (*DeployInfo) ProtoMessage() {} func (*DeployInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{11} + return fileDescriptor_f94cf1a886c479d6, []int{12} } func (m *DeployInfo) XXX_Unmarshal(b []byte) error { @@ -786,7 +823,7 @@ func (m *TenantResource) Reset() { *m = TenantResource{} } func (m *TenantResource) String() string { return proto.CompactTextString(m) } func (*TenantResource) ProtoMessage() {} func (*TenantResource) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{12} + return fileDescriptor_f94cf1a886c479d6, []int{13} } func (m *TenantResource) XXX_Unmarshal(b []byte) error { @@ -867,7 +904,7 @@ func (m *TenantResourceList) Reset() { *m = TenantResourceList{} } func (m *TenantResourceList) String() string { return proto.CompactTextString(m) } func (*TenantResourceList) ProtoMessage() {} func (*TenantResourceList) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{13} + return fileDescriptor_f94cf1a886c479d6, []int{14} } func (m *TenantResourceList) XXX_Unmarshal(b []byte) error { @@ -910,7 +947,7 @@ func (m *AddThirdPartyEndpointsReq) Reset() { *m = AddThirdPartyEndpoint func (m *AddThirdPartyEndpointsReq) String() string { return proto.CompactTextString(m) } func (*AddThirdPartyEndpointsReq) ProtoMessage() {} func (*AddThirdPartyEndpointsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{14} + return fileDescriptor_f94cf1a886c479d6, []int{15} } func (m *AddThirdPartyEndpointsReq) XXX_Unmarshal(b []byte) error { @@ -981,7 +1018,7 @@ func (m *UpdThirdPartyEndpointsReq) Reset() { *m = UpdThirdPartyEndpoint func (m *UpdThirdPartyEndpointsReq) String() string { return proto.CompactTextString(m) } func (*UpdThirdPartyEndpointsReq) ProtoMessage() {} func (*UpdThirdPartyEndpointsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{15} + return fileDescriptor_f94cf1a886c479d6, []int{16} } func (m *UpdThirdPartyEndpointsReq) XXX_Unmarshal(b []byte) error { @@ -1051,7 +1088,7 @@ func (m *DelThirdPartyEndpointsReq) Reset() { *m = DelThirdPartyEndpoint func (m *DelThirdPartyEndpointsReq) String() string { return proto.CompactTextString(m) } func (*DelThirdPartyEndpointsReq) ProtoMessage() {} func (*DelThirdPartyEndpointsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{16} + return fileDescriptor_f94cf1a886c479d6, []int{17} } func (m *DelThirdPartyEndpointsReq) XXX_Unmarshal(b []byte) error { @@ -1116,7 +1153,7 @@ func (m *ThirdPartyEndpoint) Reset() { *m = ThirdPartyEndpoint{} } func (m *ThirdPartyEndpoint) String() string { return proto.CompactTextString(m) } func (*ThirdPartyEndpoint) ProtoMessage() {} func (*ThirdPartyEndpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{17} + return fileDescriptor_f94cf1a886c479d6, []int{18} } func (m *ThirdPartyEndpoint) XXX_Unmarshal(b []byte) error { @@ -1190,7 +1227,7 @@ func (m *ThirdPartyEndpoints) Reset() { *m = ThirdPartyEndpoints{} } func (m *ThirdPartyEndpoints) String() string { return proto.CompactTextString(m) } func (*ThirdPartyEndpoints) ProtoMessage() {} func (*ThirdPartyEndpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{18} + return fileDescriptor_f94cf1a886c479d6, []int{19} } func (m *ThirdPartyEndpoints) XXX_Unmarshal(b []byte) error { @@ -1229,7 +1266,7 @@ func (m *ListPodsBySIDReq) Reset() { *m = ListPodsBySIDReq{} } func (m *ListPodsBySIDReq) String() string { return proto.CompactTextString(m) } func (*ListPodsBySIDReq) ProtoMessage() {} func (*ListPodsBySIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{19} + return fileDescriptor_f94cf1a886c479d6, []int{20} } func (m *ListPodsBySIDReq) XXX_Unmarshal(b []byte) error { @@ -1269,7 +1306,7 @@ func (m *GetPodDetailReq) Reset() { *m = GetPodDetailReq{} } func (m *GetPodDetailReq) String() string { return proto.CompactTextString(m) } func (*GetPodDetailReq) ProtoMessage() {} func (*GetPodDetailReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{20} + return fileDescriptor_f94cf1a886c479d6, []int{21} } func (m *GetPodDetailReq) XXX_Unmarshal(b []byte) error { @@ -1318,7 +1355,7 @@ func (m *PodEvent) Reset() { *m = PodEvent{} } func (m *PodEvent) String() string { return proto.CompactTextString(m) } func (*PodEvent) ProtoMessage() {} func (*PodEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{21} + return fileDescriptor_f94cf1a886c479d6, []int{22} } func (m *PodEvent) XXX_Unmarshal(b []byte) error { @@ -1382,7 +1419,7 @@ func (m *PodStatus) Reset() { *m = PodStatus{} } func (m *PodStatus) String() string { return proto.CompactTextString(m) } func (*PodStatus) ProtoMessage() {} func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{22} + return fileDescriptor_f94cf1a886c479d6, []int{23} } func (m *PodStatus) XXX_Unmarshal(b []byte) error { @@ -1456,7 +1493,7 @@ func (m *PodContainer) Reset() { *m = PodContainer{} } func (m *PodContainer) String() string { return proto.CompactTextString(m) } func (*PodContainer) ProtoMessage() {} func (*PodContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{23} + return fileDescriptor_f94cf1a886c479d6, []int{24} } func (m *PodContainer) XXX_Unmarshal(b []byte) error { @@ -1553,7 +1590,7 @@ func (m *PodDetail) Reset() { *m = PodDetail{} } func (m *PodDetail) String() string { return proto.CompactTextString(m) } func (*PodDetail) ProtoMessage() {} func (*PodDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{24} + return fileDescriptor_f94cf1a886c479d6, []int{25} } func (m *PodDetail) XXX_Unmarshal(b []byte) error { @@ -1655,7 +1692,7 @@ func (m *StorageClasses) Reset() { *m = StorageClasses{} } func (m *StorageClasses) String() string { return proto.CompactTextString(m) } func (*StorageClasses) ProtoMessage() {} func (*StorageClasses) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{25} + return fileDescriptor_f94cf1a886c479d6, []int{26} } func (m *StorageClasses) XXX_Unmarshal(b []byte) error { @@ -1700,7 +1737,7 @@ func (m *StorageClassDetail) Reset() { *m = StorageClassDetail{} } func (m *StorageClassDetail) String() string { return proto.CompactTextString(m) } func (*StorageClassDetail) ProtoMessage() {} func (*StorageClassDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{26} + return fileDescriptor_f94cf1a886c479d6, []int{27} } func (m *StorageClassDetail) XXX_Unmarshal(b []byte) error { @@ -1781,7 +1818,7 @@ func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } func (m *TopologySelectorTerm) String() string { return proto.CompactTextString(m) } func (*TopologySelectorTerm) ProtoMessage() {} func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{27} + return fileDescriptor_f94cf1a886c479d6, []int{28} } func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error { @@ -1821,7 +1858,7 @@ func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelect func (m *TopologySelectorLabelRequirement) String() string { return proto.CompactTextString(m) } func (*TopologySelectorLabelRequirement) ProtoMessage() {} func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{28} + return fileDescriptor_f94cf1a886c479d6, []int{29} } func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error { @@ -1867,7 +1904,7 @@ func (m *ServiceVolumeStatusMessage) Reset() { *m = ServiceVolumeStatusM func (m *ServiceVolumeStatusMessage) String() string { return proto.CompactTextString(m) } func (*ServiceVolumeStatusMessage) ProtoMessage() {} func (*ServiceVolumeStatusMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{29} + return fileDescriptor_f94cf1a886c479d6, []int{30} } func (m *ServiceVolumeStatusMessage) XXX_Unmarshal(b []byte) error { @@ -1896,19 +1933,22 @@ func (m *ServiceVolumeStatusMessage) GetStatus() map[string]ServiceVolumeStatus } type AppStatus struct { - Status AppStatus_Status `protobuf:"varint,1,opt,name=status,proto3,enum=pb.AppStatus_Status" json:"status,omitempty"` - Cpu int64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` - Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Cpu int64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` + Phase string `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` + ValuesTemplate string `protobuf:"bytes,5,opt,name=valuesTemplate,proto3" json:"valuesTemplate,omitempty"` + Readme string `protobuf:"bytes,6,opt,name=readme,proto3" json:"readme,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AppStatus) Reset() { *m = AppStatus{} } func (m *AppStatus) String() string { return proto.CompactTextString(m) } func (*AppStatus) ProtoMessage() {} func (*AppStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{30} + return fileDescriptor_f94cf1a886c479d6, []int{31} } func (m *AppStatus) XXX_Unmarshal(b []byte) error { @@ -1929,11 +1969,11 @@ func (m *AppStatus) XXX_DiscardUnknown() { var xxx_messageInfo_AppStatus proto.InternalMessageInfo -func (m *AppStatus) GetStatus() AppStatus_Status { +func (m *AppStatus) GetStatus() string { if m != nil { return m.Status } - return AppStatus_NIL + return "" } func (m *AppStatus) GetCpu() int64 { @@ -1950,11 +1990,127 @@ func (m *AppStatus) GetMemory() int64 { return 0 } +func (m *AppStatus) GetPhase() string { + if m != nil { + return m.Phase + } + return "" +} + +func (m *AppStatus) GetValuesTemplate() string { + if m != nil { + return m.ValuesTemplate + } + return "" +} + +func (m *AppStatus) GetReadme() string { + if m != nil { + return m.Readme + } + return "" +} + +type AppDetectCondition struct { + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppDetectCondition) Reset() { *m = AppDetectCondition{} } +func (m *AppDetectCondition) String() string { return proto.CompactTextString(m) } +func (*AppDetectCondition) ProtoMessage() {} +func (*AppDetectCondition) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{32} +} + +func (m *AppDetectCondition) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppDetectCondition.Unmarshal(m, b) +} +func (m *AppDetectCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppDetectCondition.Marshal(b, m, deterministic) +} +func (m *AppDetectCondition) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppDetectCondition.Merge(m, src) +} +func (m *AppDetectCondition) XXX_Size() int { + return xxx_messageInfo_AppDetectCondition.Size(m) +} +func (m *AppDetectCondition) XXX_DiscardUnknown() { + xxx_messageInfo_AppDetectCondition.DiscardUnknown(m) +} + +var xxx_messageInfo_AppDetectCondition proto.InternalMessageInfo + +func (m *AppDetectCondition) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *AppDetectCondition) GetReady() bool { + if m != nil { + return m.Ready + } + return false +} + +func (m *AppDetectCondition) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +type AppDetectConditions struct { + Conditions []*AppDetectCondition `protobuf:"bytes,1,rep,name=conditions,proto3" json:"conditions,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppDetectConditions) Reset() { *m = AppDetectConditions{} } +func (m *AppDetectConditions) String() string { return proto.CompactTextString(m) } +func (*AppDetectConditions) ProtoMessage() {} +func (*AppDetectConditions) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{33} +} + +func (m *AppDetectConditions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppDetectConditions.Unmarshal(m, b) +} +func (m *AppDetectConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppDetectConditions.Marshal(b, m, deterministic) +} +func (m *AppDetectConditions) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppDetectConditions.Merge(m, src) +} +func (m *AppDetectConditions) XXX_Size() int { + return xxx_messageInfo_AppDetectConditions.Size(m) +} +func (m *AppDetectConditions) XXX_DiscardUnknown() { + xxx_messageInfo_AppDetectConditions.DiscardUnknown(m) +} + +var xxx_messageInfo_AppDetectConditions proto.InternalMessageInfo + +func (m *AppDetectConditions) GetConditions() []*AppDetectCondition { + if m != nil { + return m.Conditions + } + return nil +} + func init() { proto.RegisterEnum("pb.ServiceVolumeStatus", ServiceVolumeStatus_name, ServiceVolumeStatus_value) proto.RegisterEnum("pb.PodStatus_Type", PodStatus_Type_name, PodStatus_Type_value) proto.RegisterEnum("pb.AppStatus_Status", AppStatus_Status_name, AppStatus_Status_value) proto.RegisterType((*Empty)(nil), "pb.Empty") + proto.RegisterType((*AppReq)(nil), "pb.AppReq") proto.RegisterType((*AppStatusReq)(nil), "pb.AppStatusReq") proto.RegisterType((*ServiceRequest)(nil), "pb.ServiceRequest") proto.RegisterType((*ServicesRequest)(nil), "pb.ServicesRequest") @@ -1998,162 +2154,169 @@ func init() { proto.RegisterType((*ServiceVolumeStatusMessage)(nil), "pb.ServiceVolumeStatusMessage") proto.RegisterMapType((map[string]ServiceVolumeStatus)(nil), "pb.ServiceVolumeStatusMessage.StatusEntry") proto.RegisterType((*AppStatus)(nil), "pb.AppStatus") + proto.RegisterType((*AppDetectCondition)(nil), "pb.AppDetectCondition") + proto.RegisterType((*AppDetectConditions)(nil), "pb.AppDetectConditions") } -func init() { - proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) -} +func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2217 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x73, 0x1b, 0xc7, - 0x11, 0x26, 0x00, 0xe2, 0xd5, 0x20, 0x40, 0x70, 0x24, 0x52, 0x30, 0x6c, 0x59, 0xf2, 0x46, 0x52, - 0xa9, 0x24, 0x05, 0xb6, 0x19, 0xab, 0x2c, 0xd9, 0x8a, 0x53, 0x20, 0x00, 0x53, 0x48, 0x40, 0x10, - 0xb5, 0x00, 0x93, 0x72, 0x55, 0xaa, 0x50, 0x4b, 0xec, 0x98, 0xde, 0x68, 0x1f, 0xa3, 0x7d, 0xd0, - 0xc1, 0x31, 0xb9, 0xe5, 0x9c, 0x9f, 0x90, 0x43, 0x0e, 0xc9, 0x31, 0x97, 0x5c, 0xfc, 0x17, 0xf2, - 0x53, 0x7c, 0xc9, 0x0f, 0x48, 0xf5, 0xcc, 0xec, 0x13, 0x4b, 0x33, 0x4c, 0x25, 0x95, 0xdb, 0x4e, - 0x4f, 0x7f, 0xd3, 0x3d, 0x3d, 0x3d, 0xfd, 0x98, 0x85, 0x8e, 0xc6, 0xd8, 0xd2, 0x0d, 0x6c, 0xdf, - 0xb0, 0xe8, 0xd2, 0xa3, 0xee, 0x25, 0x75, 0x7b, 0xcc, 0x75, 0x7c, 0x87, 0x14, 0xd9, 0xb9, 0x52, - 0x85, 0xf2, 0xc8, 0x62, 0xfe, 0x5a, 0x79, 0x08, 0x3b, 0x7d, 0xc6, 0xe6, 0xbe, 0xe6, 0x07, 0x9e, - 0x4a, 0xdf, 0x92, 0x7d, 0xa8, 0x20, 0xd0, 0xd0, 0x3b, 0x85, 0xfb, 0x85, 0xc7, 0x75, 0xb5, 0xac, - 0x31, 0x36, 0xd6, 0x95, 0x0f, 0xa1, 0x35, 0xa7, 0xee, 0xa5, 0xb1, 0xa2, 0x2a, 0x7d, 0x1b, 0x50, - 0xcf, 0x27, 0x77, 0x01, 0x3c, 0x41, 0x89, 0x99, 0xeb, 0x92, 0x32, 0xd6, 0x95, 0x43, 0xd8, 0x95, - 0x00, 0x2f, 0x44, 0xdc, 0x83, 0x46, 0x8c, 0xf0, 0x24, 0x04, 0x22, 0x88, 0xa7, 0x3c, 0x83, 0xe6, - 0x82, 0xda, 0x9a, 0xed, 0x87, 0x88, 0x77, 0xa1, 0xee, 0x73, 0x42, 0x2c, 0xa2, 0x26, 0x08, 0x63, - 0x5d, 0xf9, 0x5d, 0x01, 0x9a, 0x42, 0xef, 0x13, 0xea, 0x79, 0xda, 0x05, 0x25, 0xcf, 0xa1, 0xe2, - 0x71, 0x42, 0xa7, 0x70, 0xbf, 0xf4, 0xb8, 0x71, 0x78, 0xb7, 0xc7, 0xce, 0x7b, 0x29, 0x16, 0x39, - 0x1a, 0xd9, 0xbe, 0xbb, 0x56, 0x25, 0x73, 0xf7, 0x25, 0x34, 0x12, 0x64, 0xd2, 0x86, 0xd2, 0x1b, - 0xba, 0x96, 0xe2, 0xf0, 0x93, 0xdc, 0x86, 0xf2, 0xa5, 0x66, 0x06, 0xb4, 0x53, 0x14, 0x26, 0xe1, - 0x83, 0xcf, 0x8a, 0x2f, 0x0a, 0xca, 0x1a, 0x1a, 0x43, 0xc3, 0x7b, 0x13, 0x2a, 0xf0, 0x11, 0x94, - 0x75, 0xc3, 0x7b, 0x13, 0xca, 0xef, 0xa2, 0xfc, 0xc4, 0x3c, 0xff, 0x96, 0xc2, 0x05, 0x63, 0xf7, - 0x05, 0x40, 0x4c, 0xbc, 0x4e, 0x74, 0x21, 0x29, 0xda, 0x82, 0x3d, 0x69, 0xe0, 0x3e, 0x63, 0x33, - 0x47, 0x9f, 0x18, 0x9e, 0x4f, 0x9e, 0x42, 0xd5, 0x31, 0xf5, 0x99, 0xa3, 0x87, 0x2a, 0xec, 0x71, - 0x13, 0x24, 0xf9, 0xd4, 0x90, 0x03, 0x99, 0x6d, 0xfa, 0x2d, 0x67, 0x2e, 0x5e, 0xc9, 0x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x4d, 0x5a, 0x8c, 0x14, - 0xce, 0xb6, 0x32, 0x35, 0xc3, 0x5a, 0x32, 0xc7, 0x34, 0x56, 0x6b, 0xe9, 0xcd, 0x4d, 0x49, 0x9d, - 0x71, 0x22, 0xf9, 0x04, 0x0e, 0x34, 0xd3, 0x74, 0xbe, 0x95, 0xdd, 0xdc, 0x92, 0xfe, 0x96, 0x69, - 0x36, 0x3f, 0x35, 0x91, 0xb5, 0x6e, 0xf3, 0x59, 0xd1, 0xd8, 0x8d, 0xc2, 0x39, 0xd2, 0x83, 0x5b, - 0x92, 0xff, 0xdc, 0xb0, 0x75, 0xac, 0x5c, 0x2c, 0x74, 0x37, 0xe1, 0x01, 0x7b, 0x62, 0xea, 0x48, - 0xcc, 0x9c, 0xa0, 0xef, 0x1d, 0x03, 0xe1, 0xeb, 0x50, 0x7d, 0xe9, 0x3b, 0xcc, 0x31, 0x9d, 0x0b, - 0x83, 0x86, 0xbd, 0x05, 0x6f, 0x64, 0x16, 0x82, 0xba, 0x9e, 0x53, 0x93, 0xae, 0x7c, 0xc7, 0x5d, - 0x50, 0xd7, 0x52, 0xf7, 0x24, 0x66, 0x11, 0x41, 0xba, 0x3f, 0x85, 0xdd, 0xcc, 0xa6, 0x6f, 0x54, - 0x60, 0xfa, 0x70, 0x3b, 0x4f, 0x12, 0xf9, 0x35, 0xdc, 0xb1, 0x34, 0x7f, 0xf5, 0xcd, 0xd2, 0xd4, - 0xce, 0xa9, 0x89, 0x46, 0xc0, 0x12, 0xd8, 0x70, 0xec, 0xb0, 0x80, 0x7a, 0x90, 0xa7, 0xe4, 0x04, - 0x99, 0xb1, 0x86, 0x34, 0x5c, 0x8a, 0x0d, 0x9c, 0xba, 0xcf, 0x17, 0xe1, 0xe4, 0x51, 0xbc, 0x84, - 0x32, 0x81, 0xfb, 0xd7, 0x41, 0x73, 0x76, 0x71, 0x00, 0x15, 0xae, 0xb8, 0x78, 0x55, 0xa9, 0xab, - 0x72, 0xa4, 0xfc, 0xad, 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, 0x38, 0xbc, 0x29, 0x5b, 0xe7, 0x15, 0xfe, 0xb7, 0xe2, 0x27, 0xff, 0x0a, 0x00, 0x00, 0xff, - 0xff, 0xd3, 0x7f, 0x3d, 0x80, 0xc9, 0x18, 0x00, 0x00, + // 2322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x39, 0x4b, 0x73, 0x1b, 0xc7, + 0xd1, 0x04, 0x40, 0xbc, 0x1a, 0x04, 0x08, 0x8e, 0x44, 0x12, 0x82, 0x2c, 0x4b, 0xde, 0x4f, 0x52, + 0xa9, 0x24, 0x7f, 0xb4, 0xcd, 0x58, 0xb1, 0x64, 0x2b, 0x4e, 0x41, 0x00, 0x4c, 0x22, 0x01, 0x41, + 0xd4, 0x02, 0x4c, 0xca, 0x55, 0xa9, 0x42, 0x2d, 0xb1, 0x63, 0x6a, 0xa3, 0x7d, 0x8c, 0xf7, 0x41, + 0x07, 0xc7, 0xe4, 0x2f, 0xe4, 0x27, 0xe4, 0x90, 0x43, 0x72, 0xcc, 0xd9, 0x7f, 0xc1, 0x3f, 0xc5, + 0x97, 0x5c, 0x72, 0x4b, 0xf5, 0xcc, 0xec, 0x13, 0x4b, 0x31, 0x4c, 0x25, 0x95, 0xdb, 0x76, 0x4f, + 0xf7, 0x74, 0x4f, 0x77, 0x4f, 0x3f, 0x66, 0xa1, 0xa3, 0x31, 0xb6, 0x70, 0x03, 0xdb, 0x37, 0x2c, + 0xba, 0xf0, 0xa8, 0x7b, 0x49, 0xdd, 0x03, 0xe6, 0x3a, 0xbe, 0x43, 0x8a, 0xec, 0x5c, 0xa9, 0x42, + 0x79, 0x68, 0x31, 0x7f, 0xa5, 0xdc, 0x87, 0x4a, 0x8f, 0x31, 0x95, 0x7e, 0x4b, 0x76, 0xa1, 0x82, + 0x2c, 0x86, 0xde, 0x29, 0x3c, 0x28, 0x3c, 0xa9, 0xab, 0x65, 0x8d,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4, 0x23, 0x1a, 0x61, 0xda, 0x04, 0x13, + 0x2a, 0x8d, 0x12, 0x2e, 0x1d, 0x33, 0xb0, 0xa8, 0xd7, 0xa9, 0x3d, 0x28, 0xa1, 0xd2, 0xcc, 0xd1, + 0x7f, 0x25, 0x30, 0xdd, 0x31, 0x6c, 0x67, 0xf8, 0x73, 0x2c, 0xff, 0x7f, 0x69, 0xcb, 0x37, 0x51, + 0x87, 0x88, 0x2b, 0x69, 0xf1, 0x4b, 0xa8, 0x47, 0x78, 0xf2, 0x08, 0x5a, 0x91, 0x26, 0xc2, 0x2a, + 0x62, 0xcb, 0x66, 0x84, 0xe5, 0xb6, 0xf9, 0x00, 0xb6, 0x2c, 0x6a, 0x39, 0xee, 0x6a, 0x61, 0x1a, + 0x96, 0xe1, 0x73, 0x19, 0x25, 0xb5, 0x21, 0x70, 0x63, 0x44, 0xe1, 0x29, 0x96, 0x2c, 0x58, 0xb8, + 0x22, 0x47, 0x70, 0xd3, 0x97, 0x54, 0x58, 0xb2, 0x40, 0x66, 0x0d, 0xe5, 0xc7, 0x0a, 0xc0, 0x40, + 0x38, 0xca, 0xfe, 0xc6, 0x21, 0xef, 0x41, 0x1d, 0xe5, 0x79, 0x4c, 0x5b, 0x86, 0x42, 0x63, 0x04, + 0x51, 0x60, 0x0b, 0x2d, 0x4e, 0xbf, 0x09, 0x4c, 0xea, 0x51, 0x5f, 0x3a, 0x3a, 0x85, 0x23, 0xef, + 0x83, 0xf4, 0xac, 0x45, 0x6d, 0x3f, 0xed, 0x6b, 0xc4, 0xf0, 0x40, 0xf2, 0x35, 0xd7, 0x5f, 0x60, + 0x32, 0x96, 0xde, 0xae, 0x73, 0xcc, 0xdc, 0xb0, 0x28, 0xf9, 0x10, 0x36, 0x19, 0x5e, 0x8c, 0x32, + 0xf7, 0x59, 0x87, 0x27, 0x85, 0x48, 0xbd, 0x83, 0xf8, 0x16, 0x70, 0x2a, 0xf2, 0x02, 0x6a, 0x32, + 0x06, 0x31, 0x08,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 0x11, 0x7d, + 0x16, 0x60, 0x35, 0x92, 0x65, 0x28, 0xdc, 0xa1, 0x2a, 0x7a, 0x57, 0x89, 0x95, 0x7b, 0xdc, 0xc7, + 0x76, 0x46, 0x90, 0xe1, 0x2e, 0x35, 0xd1, 0x27, 0x4a, 0x54, 0x9f, 0x05, 0xca, 0x0f, 0x22, 0x6e, + 0x44, 0x64, 0x63, 0x74, 0x26, 0xfa, 0x60, 0xfe, 0xcd, 0x71, 0x8e, 0x1e, 0x1e, 0x98, 0x7f, 0x67, + 0xba, 0xcb, 0x52, 0xb6, 0xbb, 0x7c, 0x14, 0x5d, 0xe6, 0xcd, 0xb8, 0x1f, 0x8f, 0x02, 0x30, 0xba, + 0xdb, 0x22, 0x2f, 0x94, 0xa3, 0xbc, 0xb0, 0x0f, 0x55, 0xdc, 0x1d, 0xa7, 0x10, 0x71, 0xdc, 0x0a, + 0x82, 0x23, 0x86, 0x66, 0xbc, 0xa4, 0xae, 0x67, 0x38, 0xb6, 0x3c, 0x65, 0x08, 0x92, 0x97, 0xb0, + 0x6d, 0xd8, 0x68, 0xa2, 0x78, 0x0c, 0x11, 0xad, 0x62, 0x5b, 0x8a, 0x8c, 0xa7, 0x80, 0x16, 0x12, + 0xc6, 0xa3, 0x04, 0xf9, 0x38, 0x35, 0xbc, 0xd4, 0xaf, 0xe0, 0x4a, 0xce, 0x2a, 0x0f, 0xa1, 0x42, + 0xf1, 0x12, 0x7b, 0xb2, 0x2d, 0xdc, 0x92, 0xd4, 0xfc, 0x66, 0xab, 0x72, 0x4d, 0x79, 0x05, 0xad, + 0x99, 0xef, 0xb8, 0xda, 0x05, 0xed, 0x9b, 0x1a, 0xef, 0x29, 0x9f, 0xc2, 0xa6, 0x69, 0xf0, 0x86, + 0x23, 0x4a, 0x48, 0x49, 0x0a, 0x99, 0x55, 0x38, 0x8d, 0xf2, 0xe7, 0x12, 0x90, 0xf5, 0xc5, 0x5c, + 0xc7, 0x3c, 0x80, 0x06, 0x73, 0x9d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, 0xf1, 0x53, 0x93, 0x35, 0x6e, 0x8f, 0xd4, 0x91, + 0x96, 0x3f, 0xda, 0x77, 0xf7, 0xf2, 0xa7, 0x3e, 0x65, 0x83, 0x1c, 0xc3, 0x3e, 0x7e, 0xe5, 0x35, + 0xe2, 0x79, 0x9a, 0xef, 0xe7, 0xf7, 0xe3, 0x68, 0xfa, 0x3e, 0xec, 0xe6, 0x0e, 0x75, 0x84, 0x3f, + 0xdf, 0x5c, 0x39, 0xef, 0x75, 0x63, 0x35, 0xc5, 0x26, 0xb9, 0x43, 0x99, 0xd8, 0xe4, 0xca, 0x79, + 0x6d, 0x6d, 0x93, 0xdc, 0xa9, 0x8a, 0xc8, 0x87, 0x24, 0xf3, 0x5f, 0xd9, 0xe4, 0x53, 0x1e, 0x7c, + 0x71, 0x73, 0xc5, 0x63, 0x21, 0x33, 0x48, 0x74, 0xc3, 0xd6, 0x48, 0x60, 0x38, 0x17, 0xfa, 0x31, + 0xd3, 0x41, 0x24, 0x1c, 0x41, 0xb2, 0xf5, 0x9b, 0xa2, 0xe9, 0x7e, 0xc1, 0xfd, 0xd7, 0x63, 0x2c, + 0x75, 0xdf, 0xf2, 0xec, 0xff, 0xfe, 0xbb, 0x73, 0x38, 0x0f, 0xe3, 0xbb, 0xe8, 0xd0, 0x63, 0x6a, + 0x5a, 0x79, 0x39, 0x01, 0xe4, 0x8d, 0x41, 0xed, 0xf7, 0xf3, 0x73, 0x81, 0xa7, 0x6c, 0x9c, 0x57, + 0xf8, 0x9f, 0x9f, 0x9f, 0xfc, 0x33, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x41, 0x7e, 0x9d, 0x15, 0x1a, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConnInterface +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion4 // AppRuntimeSyncClient is the client API for AppRuntimeSync service. // @@ -2174,13 +2337,14 @@ type AppRuntimeSyncClient interface { GetPodDetail(ctx context.Context, in *GetPodDetailReq, opts ...grpc.CallOption) (*PodDetail, error) GetStorageClasses(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StorageClasses, error) GetAppVolumeStatus(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceVolumeStatusMessage, error) + ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) } type appRuntimeSyncClient struct { - cc grpc.ClientConnInterface + cc *grpc.ClientConn } -func NewAppRuntimeSyncClient(cc grpc.ClientConnInterface) AppRuntimeSyncClient { +func NewAppRuntimeSyncClient(cc *grpc.ClientConn) AppRuntimeSyncClient { return &appRuntimeSyncClient{cc} } @@ -2310,6 +2474,15 @@ func (c *appRuntimeSyncClient) GetAppVolumeStatus(ctx context.Context, in *Servi return out, nil } +func (c *appRuntimeSyncClient) ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) { + out := new(AppDetectConditions) + err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListHelmAppDetectConditions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AppRuntimeSyncServer is the server API for AppRuntimeSync service. type AppRuntimeSyncServer interface { // Deprecated: - @@ -2327,53 +2500,7 @@ type AppRuntimeSyncServer interface { GetPodDetail(context.Context, *GetPodDetailReq) (*PodDetail, error) GetStorageClasses(context.Context, *Empty) (*StorageClasses, error) GetAppVolumeStatus(context.Context, *ServiceRequest) (*ServiceVolumeStatusMessage, error) -} - -// UnimplementedAppRuntimeSyncServer can be embedded to have forward compatible implementations. -type UnimplementedAppRuntimeSyncServer struct { -} - -func (*UnimplementedAppRuntimeSyncServer) GetAppStatusDeprecated(ctx context.Context, req *ServicesRequest) (*StatusMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAppStatusDeprecated not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetAppStatus(ctx context.Context, req *AppStatusReq) (*AppStatus, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAppStatus not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetAppPods(ctx context.Context, req *ServiceRequest) (*ServiceAppPodList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAppPods not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetMultiAppPods(ctx context.Context, req *ServicesRequest) (*MultiServiceAppPodList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMultiAppPods not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetDeployInfo(ctx context.Context, req *ServiceRequest) (*DeployInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDeployInfo not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetTenantResource(ctx context.Context, req *TenantRequest) (*TenantResource, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTenantResource not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetTenantResources(ctx context.Context, req *Empty) (*TenantResourceList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTenantResources not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) ListThirdPartyEndpoints(ctx context.Context, req *ServiceRequest) (*ThirdPartyEndpoints, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListThirdPartyEndpoints not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) AddThirdPartyEndpoint(ctx context.Context, req *AddThirdPartyEndpointsReq) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddThirdPartyEndpoint not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) UpdThirdPartyEndpoint(ctx context.Context, req *UpdThirdPartyEndpointsReq) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdThirdPartyEndpoint not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) DelThirdPartyEndpoint(ctx context.Context, req *DelThirdPartyEndpointsReq) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelThirdPartyEndpoint not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetPodDetail(ctx context.Context, req *GetPodDetailReq) (*PodDetail, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPodDetail not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetStorageClasses(ctx context.Context, req *Empty) (*StorageClasses, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStorageClasses not implemented") -} -func (*UnimplementedAppRuntimeSyncServer) GetAppVolumeStatus(ctx context.Context, req *ServiceRequest) (*ServiceVolumeStatusMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAppVolumeStatus not implemented") + ListHelmAppDetectConditions(context.Context, *AppReq) (*AppDetectConditions, error) } func RegisterAppRuntimeSyncServer(s *grpc.Server, srv AppRuntimeSyncServer) { @@ -2632,6 +2759,24 @@ func _AppRuntimeSync_GetAppVolumeStatus_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } +func _AppRuntimeSync_ListHelmAppDetectConditions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AppRuntimeSyncServer).ListHelmAppDetectConditions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AppRuntimeSync/ListHelmAppDetectConditions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AppRuntimeSyncServer).ListHelmAppDetectConditions(ctx, req.(*AppReq)) + } + return interceptor(ctx, in, info, handler) +} + var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AppRuntimeSync", HandlerType: (*AppRuntimeSyncServer)(nil), @@ -2692,6 +2837,10 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ MethodName: "GetAppVolumeStatus", Handler: _AppRuntimeSync_GetAppVolumeStatus_Handler, }, + { + MethodName: "ListHelmAppDetectConditions", + Handler: _AppRuntimeSync_ListHelmAppDetectConditions_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "app_runtime_server.proto", diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 6a0b7f13a..874a3831b 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -17,10 +17,15 @@ service AppRuntimeSync { rpc GetPodDetail(GetPodDetailReq) returns (PodDetail) {} rpc GetStorageClasses(Empty) returns (StorageClasses) {} rpc GetAppVolumeStatus(ServiceRequest) returns(ServiceVolumeStatusMessage){} + rpc ListHelmAppDetectConditions(AppReq) returns(AppDetectConditions){} } message Empty {} +message AppReq { + string app_id = 1; +} + message AppStatusReq { string app_id = 1; } @@ -240,15 +245,28 @@ message ServiceVolumeStatusMessage { message AppStatus { enum Status { - NIL = 0; - RUNNING = 1; - CLOSED = 2; - ABNORMAL = 3; - STARTING = 4; - STOPPING = 5; + NIL = 0; + RUNNING = 1; + CLOSED = 2; + ABNORMAL = 3; + STARTING = 4; + STOPPING = 5; } - Status status = 1; - int64 cpu = 2; - int64 memory = 3; + string status = 1; + int64 cpu = 2; + int64 memory = 3; + string phase = 4; + string valuesTemplate = 5; + string readme = 6; +} + +message AppDetectCondition { + string type = 1; + bool ready = 2; + string error = 3; +} + +message AppDetectConditions { + repeated AppDetectCondition conditions = 1; } \ No newline at end of file diff --git a/worker/server/server.go b/worker/server/server.go index 585096c92..30cf568d1 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -21,6 +21,10 @@ package server import ( "context" "fmt" + "github.com/goodrain/rainbond/db" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" "net" "strings" "time" @@ -113,23 +117,103 @@ func (r *RuntimeServer) GetAppStatusDeprecated(ctx context.Context, re *pb.Servi // GetAppStatus returns the status of application based on the given appId. func (r *RuntimeServer) GetAppStatus(ctx context.Context, in *pb.AppStatusReq) (*pb.AppStatus, error) { - status, err := r.store.GetAppStatus(in.AppId) + app, err := db.GetManager().ApplicationDao().GetAppByID(in.AppId) if err != nil { return nil, err } - cpu, memory, err := r.store.GetAppResources(in.AppId) + if app.AppType == model.AppTypeHelm { + return r.getHelmAppStatus(app) + } + + return r.getRainbondAppStatus(app) +} + +func (r *RuntimeServer) getRainbondAppStatus(app *model.Application) (*pb.AppStatus, error) { + status, err := r.store.GetAppStatus(app.AppID) + if err != nil { + return nil, err + } + + cpu, memory, err := r.store.GetAppResources(app.AppID) if err != nil { return nil, err } return &pb.AppStatus{ - Status: status, + Status: string(status), Cpu: cpu, Memory: memory, }, nil } +func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, error) { + helmApp, err := r.store.GetHelmApp(app.TenantID, app.AppName) + if err != nil { + return nil, err + } + + phase := string(v1alpha1.HelmAppStatusPhaseDetecting) + if string(helmApp.Status.Phase) != "" { + phase = string(helmApp.Status.Phase) + } + + selector := labels.NewSelector() + instanceReq, _ := labels.NewRequirement("app.kubernetes.io/instance", selection.Equals, []string{app.AppName}) + selector = selector.Add(*instanceReq) + managedReq, _ := labels.NewRequirement("app.kubernetes.io/managed-by", selection.Equals, []string{"Helm"}) + selector = selector.Add(*managedReq) + pods, err := r.store.ListPods(app.TenantID, selector) + if err != nil { + return nil, err + } + + var cpu, memory int64 + for _, pod := range pods { + for _, c := range pod.Spec.Containers { + cpu += c.Resources.Requests.Cpu().MilliValue() + memory += c.Resources.Limits.Memory().Value() / 1024 / 1024 + } + } + + return &pb.AppStatus{ + Status: string(helmApp.Status.Status), + Phase: phase, + ValuesTemplate: helmApp.Status.ValuesTemplate, + Cpu: cpu, + Memory: memory, + Readme: helmApp.Status.Readme, + }, nil +} + +func (r *RuntimeServer) ListHelmAppDetectConditions(ctx context.Context, appReq *pb.AppReq) (*pb.AppDetectConditions, error) { + app, err := db.GetManager().ApplicationDao().GetAppByID(appReq.AppId) + if err != nil { + return nil, err + } + + helmApp, err :=r.store.GetHelmApp(app.TenantID, app.AppName) + if err != nil { + return nil, err + } + + var conditions []*pb.AppDetectCondition + for _, condition := range helmApp.Status.Conditions { + if condition.Type == v1alpha1.HelmAppInstalled { + continue + } + conditions = append(conditions, &pb.AppDetectCondition{ + Type: string(condition.Type), + Ready: condition.Status == corev1.ConditionTrue, + Error: condition.Message, + }) + } + + return &pb.AppDetectConditions{ + Conditions: conditions, + }, nil +} + //GetTenantResource get tenant resource //if TenantId is "" will return the sum of the all tenant func (r *RuntimeServer) GetTenantResource(ctx context.Context, re *pb.TenantRequest) (*pb.TenantResource, error) { From ea22d12b259c0c32bbed208cbf0845e61e176c42 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Tue, 20 Apr 2021 11:25:24 +0800 Subject: [PATCH 15/65] list app service --- api/api_routers/version2/v2Routers.go | 3 +- api/handler/application_handler.go | 44 +- api/model/app.go | 2 + worker/appm/store/store.go | 5 + worker/controllers/helmapp/helm/app.go | 48 +++ worker/controllers/helmapp/helm/helm.go | 31 +- worker/server/pb/app_runtime_server.pb.go | 483 +++++++++++++++------- worker/server/pb/app_runtime_server.proto | 17 + worker/server/server.go | 75 +++- 9 files changed, 515 insertions(+), 193 deletions(-) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index a551aa0e5..c5a3a86c3 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -309,7 +309,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/", controller.GetManager().UpdateApp) r.Delete("/", controller.GetManager().DeleteApp) // Get services under application - r.Get("/services", controller.GetManager().ListComponents) + r.Get("/services", controller.GetManager().ListServices) r.Put("/services", controller.GetManager().BatchBindService) // Application configuration group r.Post("/configgroups", controller.GetManager().AddConfigGroup) @@ -319,7 +319,6 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/status", controller.GetManager().GetAppStatus) r.Get("/detect-process", controller.GetManager().GetDetectProcess) r.Post("/install", controller.GetManager().Install) - r.Post("/services", controller.GetManager().ListServices) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) r.Get("/configgroups", controller.GetManager().ListConfigGroups) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 3e0b6bc08..a035109b2 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -15,16 +15,13 @@ import ( "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" util "github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util/commonutil" - k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/server/pb" - wutil "github.com/goodrain/rainbond/worker/util" "github.com/jinzhu/gorm" "github.com/pkg/errors" "github.com/sirupsen/logrus" k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" clientset "k8s.io/client-go/kubernetes" ) @@ -349,40 +346,31 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli nctx, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() - // list services - labelSelector := labels.FormatLabels(map[string]string{ - "app.kubernetes.io/instance": app.AppName, - "app.kubernetes.io/managed-by": "Helm", - }) - serviceList, err := a.kubeClient.CoreV1().Services(app.TenantID).List(nctx, metav1.ListOptions{ - LabelSelector: labelSelector, - }) + appServices, err := a.statusCli.ListAppServices(nctx, &pb.AppReq{AppId: app.AppID}) if err != nil { return nil, err } var services []*model.AppService - for _, service := range serviceList.Items { + for _, service := range appServices.Services { svc := &model.AppService{ ServiceName: service.Name, } - podList, err := a.kubeClient.CoreV1().Pods(service.Namespace).List(nctx, metav1.ListOptions{ - LabelSelector: labels.FormatLabels(service.Spec.Selector), - }) - if err != nil { - logrus.Warningf("list pods: %v", err) - } else { - var pods []*model.AppPod - for _, pod := range podList.Items { - podStatus := &pb.PodStatus{} - wutil.DescribePodStatus(a.kubeClient, &pod, podStatus, k8sutil.DefListEventsByPod) - pods = append(pods, &model.AppPod{ - PodName: pod.Name, - PodStatus: podStatus.TypeStr, - }) - } - svc.Pods = pods + var pods []*model.AppPod + for _, pod := range service.Pods { + pods = append(pods, &model.AppPod{ + PodName: pod.Name, + PodStatus: pod.Status, + }) + } + svc.Pods = pods + + for _, port := range service.TcpPorts { + svc.TCPPorts = append(svc.TCPPorts, port) + } + for _, port := range service.UdpPorts { + svc.UDPPorts = append(svc.UDPPorts, port) } services = append(services, svc) diff --git a/api/model/app.go b/api/model/app.go index 393e52254..72bd0b00d 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -29,6 +29,8 @@ type AppDetectProcess struct { // AppService - type AppService struct { ServiceName string `json:"service_name"` + TCPPorts []int32 `json:"tcp_ports"` + UDPPorts []int32 `json:"udp_ports"` Pods []*AppPod `json:"pods"` } diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index f2dcb7634..12043bbf4 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -98,6 +98,7 @@ type Storer interface { GetAppResources(appID string) (int64, int64, error) GetHelmApp(namespace, name string) (*v1alpha1.HelmApp, error) ListPods(namespace string, selector labels.Selector) ([]*corev1.Pod, error) + ListServices(namespace string, selector labels.Selector) ([]*corev1.Service, error) } // EventType type of event associated with an informer @@ -1555,6 +1556,10 @@ func (a *appRuntimeStore) ListPods(namespace string, selector labels.Selector) ( return a.listers.Pod.Pods(namespace).List(selector) } +func (a *appRuntimeStore) ListServices(namespace string, selector labels.Selector) ([]*corev1.Service, error) { + return a.listers.Service.Services(namespace).List(selector) +} + func isImagePullSecretEqual(a, b *corev1.Secret) bool { if len(a.Data) != len(b.Data) { return false diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index a7c83e06b..229e8a8d6 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -15,7 +15,10 @@ import ( "helm.sh/helm/v3/pkg/cli" "helm.sh/helm/v3/pkg/kube" "helm.sh/helm/v3/pkg/storage/driver" + corev1 "k8s.io/api/core/v1" "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/cli-runtime/pkg/resource" + "k8s.io/client-go/kubernetes/scheme" "sigs.k8s.io/yaml" ) @@ -30,6 +33,8 @@ type App struct { encodedValues string helm *Helm + + builder *resource.Builder } func (a *App) Chart() string { @@ -157,5 +162,48 @@ func (a *App) ParseChart() (string, string, error) { return nil }) + return values, readme, err } + +func (a *App) parseServices() ([]*corev1.Service, error) { + manifests, err := a.helm.Manifests(a.name, a.namespace, a.Chart(), ioutil.Discard) + if err != nil { + return nil, errors.Wrap(err, "get manifests") + } + + // Create a local builder... + builder := resource.NewLocalBuilder(). + // Configure with a scheme to get typed objects in the versions registered with the scheme. + // As an alternative, could call Unstructured() to get unstructured objects. + WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). + // Provide input via a Reader. + // As an alternative, could call Path(false, "/path/to/file") to read from a file. + Stream(bytes.NewBufferString(manifests), "input"). + // Flatten items contained in List objects + Flatten(). + // Accumulate as many items as possible + ContinueOnError() + + // Run the builder + result := builder.Do() + + items, err := result.Infos() + if err != nil { + return nil, errors.WithMessage(err, "resource infos") + } + + var services []*corev1.Service + for _, item := range items { + if item.Object.GetObjectKind().GroupVersionKind().Kind != "Service" { + continue + } + svc, ok := item.Object.(*corev1.Service) + if !ok { + continue + } + services = append(services, svc) + } + + return services, nil +} diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index 595985a01..b1cd2df8d 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -47,14 +47,24 @@ func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFla } func (h *Helm) PreInstall(name, namespace, chart string, out io.Writer) error { - return h.install(name, namespace, chart, nil, true, out) + _, err := h.install(name, namespace, chart, nil, true, out) + return err } func (h *Helm) Install(name, namespace, chart string, vals map[string]interface{}, out io.Writer) error { - return h.install(name, namespace, chart, vals, false, out) + _, err := h.install(name, namespace, chart, vals, false, out) + return err } -func (h *Helm) install(name, namespace, chart string, vals map[string]interface{}, dryRun bool, out io.Writer) error { +func (h *Helm) Manifests(name, namespace, chart string, out io.Writer) (string, error) { + rel, err := h.install(name, namespace, chart, nil, true, out) + if err != nil { + return "", err + } + return rel.Manifest, nil +} + +func (h *Helm) install(name, namespace, chart string, vals map[string]interface{}, dryRun bool, out io.Writer) (*release.Release, error) { client := action.NewInstall(h.cfg) client.ReleaseName = name client.Namespace = namespace @@ -66,7 +76,7 @@ func (h *Helm) install(name, namespace, chart string, vals map[string]interface{ cp, err := client.ChartPathOptions.LocateChart(chart, settings) if err != nil { - return err + return nil, err } logrus.Debugf("CHART PATH: %s\n", cp) @@ -76,11 +86,11 @@ func (h *Helm) install(name, namespace, chart string, vals map[string]interface{ // Check chart dependencies to make sure all are present in /charts chartRequested, err := loader.Load(cp) if err != nil { - return err + return nil, err } if err := checkIfInstallable(chartRequested); err != nil { - return err + return nil, err } if chartRequested.Metadata.Deprecated { @@ -104,20 +114,19 @@ func (h *Helm) install(name, namespace, chart string, vals map[string]interface{ Debug: settings.Debug, } if err := man.Update(); err != nil { - return err + return nil, err } // Reload the chart with the updated Chart.lock file. if chartRequested, err = loader.Load(cp); err != nil { - return errors.Wrap(err, "failed reloading chart after repo update") + return nil, errors.Wrap(err, "failed reloading chart after repo update") } } else { - return err + return nil, err } } } - _, err = client.Run(chartRequested, vals) - return err + return client.Run(chartRequested, vals) } func (h *Helm) Status(name string) (*release.Release, error) { diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index ba08b0eb2..86523e8f1 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -2105,6 +2105,155 @@ func (m *AppDetectConditions) GetConditions() []*AppDetectCondition { return nil } +type AppService struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + TcpPorts []int32 `protobuf:"varint,2,rep,packed,name=tcpPorts,proto3" json:"tcpPorts,omitempty"` + UdpPorts []int32 `protobuf:"varint,3,rep,packed,name=udpPorts,proto3" json:"udpPorts,omitempty"` + Pods []*AppService_Pod `protobuf:"bytes,4,rep,name=pods,proto3" json:"pods,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppService) Reset() { *m = AppService{} } +func (m *AppService) String() string { return proto.CompactTextString(m) } +func (*AppService) ProtoMessage() {} +func (*AppService) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{34} +} + +func (m *AppService) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppService.Unmarshal(m, b) +} +func (m *AppService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppService.Marshal(b, m, deterministic) +} +func (m *AppService) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppService.Merge(m, src) +} +func (m *AppService) XXX_Size() int { + return xxx_messageInfo_AppService.Size(m) +} +func (m *AppService) XXX_DiscardUnknown() { + xxx_messageInfo_AppService.DiscardUnknown(m) +} + +var xxx_messageInfo_AppService proto.InternalMessageInfo + +func (m *AppService) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AppService) GetTcpPorts() []int32 { + if m != nil { + return m.TcpPorts + } + return nil +} + +func (m *AppService) GetUdpPorts() []int32 { + if m != nil { + return m.UdpPorts + } + return nil +} + +func (m *AppService) GetPods() []*AppService_Pod { + if m != nil { + return m.Pods + } + return nil +} + +type AppService_Pod struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppService_Pod) Reset() { *m = AppService_Pod{} } +func (m *AppService_Pod) String() string { return proto.CompactTextString(m) } +func (*AppService_Pod) ProtoMessage() {} +func (*AppService_Pod) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{34, 0} +} + +func (m *AppService_Pod) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppService_Pod.Unmarshal(m, b) +} +func (m *AppService_Pod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppService_Pod.Marshal(b, m, deterministic) +} +func (m *AppService_Pod) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppService_Pod.Merge(m, src) +} +func (m *AppService_Pod) XXX_Size() int { + return xxx_messageInfo_AppService_Pod.Size(m) +} +func (m *AppService_Pod) XXX_DiscardUnknown() { + xxx_messageInfo_AppService_Pod.DiscardUnknown(m) +} + +var xxx_messageInfo_AppService_Pod proto.InternalMessageInfo + +func (m *AppService_Pod) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AppService_Pod) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +type AppServices struct { + Services []*AppService `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppServices) Reset() { *m = AppServices{} } +func (m *AppServices) String() string { return proto.CompactTextString(m) } +func (*AppServices) ProtoMessage() {} +func (*AppServices) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{35} +} + +func (m *AppServices) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppServices.Unmarshal(m, b) +} +func (m *AppServices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppServices.Marshal(b, m, deterministic) +} +func (m *AppServices) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppServices.Merge(m, src) +} +func (m *AppServices) XXX_Size() int { + return xxx_messageInfo_AppServices.Size(m) +} +func (m *AppServices) XXX_DiscardUnknown() { + xxx_messageInfo_AppServices.DiscardUnknown(m) +} + +var xxx_messageInfo_AppServices proto.InternalMessageInfo + +func (m *AppServices) GetServices() []*AppService { + if m != nil { + return m.Services + } + return nil +} + func init() { proto.RegisterEnum("pb.ServiceVolumeStatus", ServiceVolumeStatus_name, ServiceVolumeStatus_value) proto.RegisterEnum("pb.PodStatus_Type", PodStatus_Type_name, PodStatus_Type_value) @@ -2156,157 +2305,166 @@ func init() { proto.RegisterType((*AppStatus)(nil), "pb.AppStatus") proto.RegisterType((*AppDetectCondition)(nil), "pb.AppDetectCondition") proto.RegisterType((*AppDetectConditions)(nil), "pb.AppDetectConditions") + proto.RegisterType((*AppService)(nil), "pb.AppService") + proto.RegisterType((*AppService_Pod)(nil), "pb.AppService.Pod") + proto.RegisterType((*AppServices)(nil), "pb.AppServices") } func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x39, 0x4b, 0x73, 0x1b, 0xc7, - 0xd1, 0x04, 0x40, 0xbc, 0x1a, 0x04, 0x08, 0x8e, 0x44, 0x12, 0x82, 0x2c, 0x4b, 0xde, 0x4f, 0x52, - 0xa9, 0x24, 0x7f, 0xb4, 0xcd, 0x58, 0xb1, 0x64, 0x2b, 0x4e, 0x41, 0x00, 0x4c, 0x22, 0x01, 0x41, - 0xd4, 0x02, 0x4c, 0xca, 0x55, 0xa9, 0x42, 0x2d, 0xb1, 0x63, 0x6a, 0xa3, 0x7d, 0x8c, 0xf7, 0x41, - 0x07, 0xc7, 0xe4, 0x2f, 0xe4, 0x27, 0xe4, 0x90, 0x43, 0x72, 0xcc, 0xd9, 0x7f, 0xc1, 0x3f, 0xc5, - 0x97, 0x5c, 0x72, 0x4b, 0xf5, 0xcc, 0xec, 0x13, 0x4b, 0x31, 0x4c, 0x25, 0x95, 0xdb, 0x76, 0x4f, - 0xf7, 0x74, 0x4f, 0x77, 0x4f, 0x3f, 0x66, 0xa1, 0xa3, 0x31, 0xb6, 0x70, 0x03, 0xdb, 0x37, 0x2c, - 0xba, 0xf0, 0xa8, 0x7b, 0x49, 0xdd, 0x03, 0xe6, 0x3a, 0xbe, 0x43, 0x8a, 0xec, 0x5c, 0xa9, 0x42, - 0x79, 0x68, 0x31, 0x7f, 0xa5, 0xdc, 0x87, 0x4a, 0x8f, 0x31, 0x95, 0x7e, 0x4b, 0x76, 0xa1, 0x82, - 0x2c, 0x86, 0xde, 0x29, 0x3c, 0x28, 0x3c, 0xa9, 0xab, 0x65, 0x8d, 0xb1, 0x91, 0xae, 0x3c, 0x82, - 0xad, 0x1e, 0x63, 0x33, 0x5f, 0xf3, 0x03, 0xef, 0x1d, 0x64, 0x1f, 0x41, 0x6b, 0x46, 0xdd, 0x4b, - 0x63, 0x49, 0x55, 0xfa, 0x6d, 0x40, 0x3d, 0x9f, 0xdc, 0x03, 0xf0, 0x04, 0x26, 0x26, 0xae, 0x4b, - 0xcc, 0x48, 0x57, 0x0e, 0x61, 0x5b, 0x32, 0x78, 0x21, 0xc7, 0x7d, 0x68, 0xc4, 0x1c, 0x9e, 0x64, - 0x81, 0x88, 0xc5, 0x53, 0x3e, 0x84, 0xe6, 0x9c, 0xda, 0x9a, 0xed, 0x87, 0x1c, 0x77, 0xa1, 0xee, - 0x73, 0x44, 0x2c, 0xa2, 0x26, 0x10, 0x23, 0x5d, 0xf9, 0x7d, 0x01, 0x9a, 0x42, 0xef, 0x13, 0xea, - 0x79, 0xda, 0x05, 0x25, 0xcf, 0xa1, 0xe2, 0x71, 0x44, 0xa7, 0xf0, 0xa0, 0xf4, 0xa4, 0x71, 0x78, - 0xef, 0x80, 0x9d, 0x1f, 0xa4, 0x48, 0x24, 0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db, 0x75, 0x94, 0x79, 0x36, 0x39, 0x1e, 0xf6, 0xc6, 0xf3, 0xe3, 0xaf, 0xdb, 0xa0, 0xfc, - 0xbd, 0x00, 0x5b, 0x53, 0x47, 0x8f, 0xbb, 0xc3, 0xdb, 0x50, 0x36, 0x2c, 0xb4, 0x80, 0x1c, 0x3a, - 0x39, 0x80, 0x58, 0xde, 0x87, 0x85, 0x05, 0x87, 0x03, 0x09, 0x3b, 0x96, 0xb2, 0x76, 0xe4, 0x3d, - 0x17, 0xd5, 0xc3, 0x86, 0x5b, 0x82, 0x58, 0x26, 0x78, 0x7d, 0x58, 0x88, 0xc2, 0x20, 0x6d, 0xd6, - 0xe0, 0xb8, 0x13, 0x8e, 0xc2, 0xd0, 0x17, 0x24, 0x4b, 0x16, 0xc8, 0xde, 0xbb, 0xc6, 0x11, 0x7d, - 0x16, 0x60, 0x35, 0x92, 0x65, 0x28, 0xdc, 0xa1, 0x2a, 0x7a, 0x57, 0x89, 0x95, 0x7b, 0xdc, 0xc7, - 0x76, 0x46, 0x90, 0xe1, 0x2e, 0x35, 0xd1, 0x27, 0x4a, 0x54, 0x9f, 0x05, 0xca, 0x0f, 0x22, 0x6e, - 0x44, 0x64, 0x63, 0x74, 0x26, 0xfa, 0x60, 0xfe, 0xcd, 0x71, 0x8e, 0x1e, 0x1e, 0x98, 0x7f, 0x67, - 0xba, 0xcb, 0x52, 0xb6, 0xbb, 0x7c, 0x14, 0x5d, 0xe6, 0xcd, 0xb8, 0x1f, 0x8f, 0x02, 0x30, 0xba, - 0xdb, 0x22, 0x2f, 0x94, 0xa3, 0xbc, 0xb0, 0x0f, 0x55, 0xdc, 0x1d, 0xa7, 0x10, 0x71, 0xdc, 0x0a, - 0x82, 0x23, 0x86, 0x66, 0xbc, 0xa4, 0xae, 0x67, 0x38, 0xb6, 0x3c, 0x65, 0x08, 0x92, 0x97, 0xb0, - 0x6d, 0xd8, 0x68, 0xa2, 0x78, 0x0c, 0x11, 0xad, 0x62, 0x5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0xf2, 0xec, 0xff, 0xfe, 0xbb, 0x73, 0x38, 0x0f, 0xe3, 0xbb, 0xe8, 0xd0, 0x63, 0x6a, - 0x5a, 0x79, 0x39, 0x01, 0xe4, 0x8d, 0x41, 0xed, 0xf7, 0xf3, 0x73, 0x81, 0xa7, 0x6c, 0x9c, 0x57, - 0xf8, 0x9f, 0x9f, 0x9f, 0xfc, 0x33, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x41, 0x7e, 0x9d, 0x15, 0x1a, + // 2418 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x72, 0x1b, 0xc7, + 0x11, 0x26, 0xfe, 0x81, 0x06, 0x01, 0x82, 0x23, 0x91, 0x84, 0x21, 0xcb, 0x92, 0x37, 0x92, 0x4a, + 0x25, 0x39, 0xb4, 0xc4, 0x58, 0xb1, 0x64, 0x2b, 0x4e, 0x41, 0x00, 0x4c, 0x21, 0x01, 0x41, 0xd4, + 0x02, 0x4c, 0xca, 0x55, 0xa9, 0x42, 0x2d, 0xb1, 0x63, 0x6a, 0xa3, 0xfd, 0x19, 0xef, 0x0f, 0x1d, + 0x1c, 0x9d, 0x57, 0xc8, 0x23, 0xe4, 0x90, 0x43, 0x72, 0x4b, 0xce, 0x7e, 0x85, 0x3c, 0x8a, 0x2f, + 0xb9, 0xe4, 0x96, 0xea, 0x99, 0xd9, 0x5f, 0x2c, 0xa5, 0x28, 0x95, 0x54, 0x6e, 0xdb, 0x3d, 0x5f, + 0x4f, 0xf7, 0xf4, 0xf4, 0xf4, 0x74, 0xcf, 0x42, 0x57, 0x63, 0x6c, 0xe9, 0x06, 0xb6, 0x6f, 0x58, + 0x74, 0xe9, 0x51, 0xf7, 0x92, 0xba, 0x87, 0xcc, 0x75, 0x7c, 0x87, 0x14, 0xd9, 0xb9, 0x52, 0x83, + 0xca, 0xc8, 0x62, 0xfe, 0x5a, 0xb9,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 0xe4, 0x35, 0x17, + 0xd5, 0xc3, 0x82, 0x5b, 0x92, 0x78, 0x4d, 0xf0, 0xfb, 0x61, 0x29, 0x2e, 0x06, 0xe9, 0xb3, 0x26, + 0xe7, 0x9d, 0x70, 0x16, 0x86, 0xbe, 0x80, 0xac, 0x58, 0x20, 0x6b, 0xef, 0x3a, 0x67, 0x0c, 0x58, + 0x80, 0xb7, 0x91, 0xbc, 0x86, 0xc2, 0x19, 0x6a, 0xa2, 0x76, 0x95, 0x5c, 0x39, 0xc7, 0x2d, 0x2c, + 0x67, 0x04, 0x0c, 0x67, 0xa9, 0x8b, 0x3a, 0x51, 0xb2, 0x06, 0x2c, 0x50, 0xfe, 0x2e, 0xe2, 0x46, + 0x44, 0x36, 0x46, 0x67, 0xa2, 0x0e, 0xe6, 0xdf, 0x9c, 0xe7, 0xe8, 0xe1, 0x82, 0xf9, 0x77, 0xa6, + 0xba, 0x2c, 0x65, 0xab, 0xcb, 0xbb, 0xd1, 0x61, 0x2e, 0xc7, 0xf5, 0x78, 0x14, 0x80, 0xd1, 0xd9, + 0x16, 0x79, 0xa1, 0x12, 0xe5, 0x85, 0x03, 0xa8, 0xe1, 0xec, 0xd8, 0x85, 0x88, 0xe5, 0x56, 0x91, + 0x1c, 0x33, 0x74, 0xe3, 0x25, 0x75, 0x3d, 0xc3, 0xb1, 0xe5, 0x2a, 0x43, 0x92, 0x3c, 0x83, 0x1d, + 0xc3, 0x46, 0x17, 0xc5, 0x6d, 0x88, 0x28, 0x15, 0x3b, 0x52, 0x65, 0xdc, 0x05, 0xb4, 0x11, 0x18, + 0xb7, 0x12, 0xe4, 0x51, 0xaa, 0x79, 0x69, 0x5c, 0x21, 0x95, 0xec, 0x55, 0xee, 0x40, 0x95, 0xe2, + 0x21, 0xf6, 0x64, 0x59, 0xb8, 0x2d, 0xd1, 0xfc, 0x64, 0xab, 0x72, 0x4c, 0x79, 0x0e, 0xed, 0xb9, + 0xef, 0xb8, 0xda, 0x05, 0x1d, 0x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c5, 0xd5, 0x24, 0x8f, 0x85, 0x4c, 0xe7, 0xd4, 0x0b, 0x6b, 0x41, 0xc1, 0xe1, 0x52, 0xb8, 0x8f, + 0x99, 0x92, 0x29, 0xb1, 0x11, 0x24, 0x5b, 0xb0, 0x50, 0x74, 0xdd, 0x2f, 0xf8, 0xfe, 0xf5, 0x19, + 0x4b, 0x9d, 0xb7, 0x3c, 0xff, 0x7f, 0xf0, 0xe6, 0x4b, 0x8b, 0x87, 0xf1, 0x0d, 0xdc, 0xd0, 0x97, + 0xd4, 0xb4, 0xf2, 0x92, 0x20, 0xc8, 0x13, 0x83, 0xd6, 0x1f, 0xe4, 0x27, 0x3f, 0xb4, 0xe8, 0x11, + 0xec, 0xe0, 0x2c, 0xc9, 0x0c, 0x92, 0x94, 0xdc, 0x49, 0xe7, 0x0e, 0x4f, 0xd9, 0x3a, 0xaf, 0xf2, + 0x9f, 0x63, 0x3f, 0xf9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x72, 0xc8, 0xae, 0x38, 0x1b, 0x00, 0x00, } @@ -2338,6 +2496,7 @@ type AppRuntimeSyncClient interface { GetStorageClasses(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StorageClasses, error) GetAppVolumeStatus(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceVolumeStatusMessage, error) ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) + ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) } type appRuntimeSyncClient struct { @@ -2483,6 +2642,15 @@ func (c *appRuntimeSyncClient) ListHelmAppDetectConditions(ctx context.Context, return out, nil } +func (c *appRuntimeSyncClient) ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) { + out := new(AppServices) + err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListAppServices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AppRuntimeSyncServer is the server API for AppRuntimeSync service. type AppRuntimeSyncServer interface { // Deprecated: - @@ -2501,6 +2669,7 @@ type AppRuntimeSyncServer interface { GetStorageClasses(context.Context, *Empty) (*StorageClasses, error) GetAppVolumeStatus(context.Context, *ServiceRequest) (*ServiceVolumeStatusMessage, error) ListHelmAppDetectConditions(context.Context, *AppReq) (*AppDetectConditions, error) + ListAppServices(context.Context, *AppReq) (*AppServices, error) } func RegisterAppRuntimeSyncServer(s *grpc.Server, srv AppRuntimeSyncServer) { @@ -2777,6 +2946,24 @@ func _AppRuntimeSync_ListHelmAppDetectConditions_Handler(srv interface{}, ctx co return interceptor(ctx, in, info, handler) } +func _AppRuntimeSync_ListAppServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AppRuntimeSyncServer).ListAppServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AppRuntimeSync/ListAppServices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AppRuntimeSyncServer).ListAppServices(ctx, req.(*AppReq)) + } + return interceptor(ctx, in, info, handler) +} + var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AppRuntimeSync", HandlerType: (*AppRuntimeSyncServer)(nil), @@ -2841,6 +3028,10 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ MethodName: "ListHelmAppDetectConditions", Handler: _AppRuntimeSync_ListHelmAppDetectConditions_Handler, }, + { + MethodName: "ListAppServices", + Handler: _AppRuntimeSync_ListAppServices_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "app_runtime_server.proto", diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 874a3831b..bca405ef0 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -18,6 +18,7 @@ service AppRuntimeSync { rpc GetStorageClasses(Empty) returns (StorageClasses) {} rpc GetAppVolumeStatus(ServiceRequest) returns(ServiceVolumeStatusMessage){} rpc ListHelmAppDetectConditions(AppReq) returns(AppDetectConditions){} + rpc ListAppServices(AppReq) returns(AppServices){} } message Empty {} @@ -269,4 +270,20 @@ message AppDetectCondition { message AppDetectConditions { repeated AppDetectCondition conditions = 1; +} + +message AppService { + message Pod { + string name=1; + string status=2; + } + + string name=1; + repeated int32 tcpPorts=2; + repeated int32 udpPorts=3; + repeated Pod pods=4; +} + +message AppServices { + repeated AppService services=1; } \ No newline at end of file diff --git a/worker/server/server.go b/worker/server/server.go index 30cf568d1..7a0cc37bb 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -21,21 +21,20 @@ package server import ( "context" "fmt" - "github.com/goodrain/rainbond/db" - "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/selection" "net" "strings" "time" "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/worker/option" + "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db/model" discover "github.com/goodrain/rainbond/discover.v2" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/util" etcdutil "github.com/goodrain/rainbond/util/etcd" "github.com/goodrain/rainbond/util/k8s" + k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/appm/store" "github.com/goodrain/rainbond/worker/appm/thirdparty/discovery" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" @@ -46,6 +45,8 @@ import ( "google.golang.org/grpc/reflection" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/util/duration" "k8s.io/client-go/kubernetes" ) @@ -192,7 +193,7 @@ func (r *RuntimeServer) ListHelmAppDetectConditions(ctx context.Context, appReq return nil, err } - helmApp, err :=r.store.GetHelmApp(app.TenantID, app.AppName) + helmApp, err := r.store.GetHelmApp(app.TenantID, app.AppName) if err != nil { return nil, err } @@ -210,7 +211,7 @@ func (r *RuntimeServer) ListHelmAppDetectConditions(ctx context.Context, appReq } return &pb.AppDetectConditions{ - Conditions: conditions, + Conditions: conditions, }, nil } @@ -680,3 +681,65 @@ func (r *RuntimeServer) GetAppVolumeStatus(ctx context.Context, re *pb.ServiceRe return ret, nil } + +func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb.AppServices, error) { + app, err := db.GetManager().ApplicationDao().GetAppByID(in.AppId) + if err != nil { + return nil, err + } + + selector := labels.NewSelector() + instanceReq, _ := labels.NewRequirement("app.kubernetes.io/instance", selection.Equals, []string{app.AppName}) + selector = selector.Add(*instanceReq) + managedReq, _ := labels.NewRequirement("app.kubernetes.io/managed-by", selection.Equals, []string{"Helm"}) + selector = selector.Add(*managedReq) + services, err := r.store.ListServices(app.TenantID, selector) + if err != nil { + return nil, err + } + + var appServices []*pb.AppService + for _, svc := range services { + var tcpPorts []int32 + var udpPorts []int32 + for _, port := range svc.Spec.Ports { + if port.Protocol == corev1.ProtocolUDP { + udpPorts = append(udpPorts, port.Port) + } + if port.Protocol == corev1.ProtocolTCP { + tcpPorts = append(tcpPorts, port.Port) + } + } + selector := labels.NewSelector() + for key, val := range svc.Spec.Selector { + req, _ := labels.NewRequirement(key, selection.Equals, []string{val}) + selector = selector.Add(*req) + } + + pods, err := r.store.ListPods(svc.Namespace, selector) + if err != nil { + return nil, err + } + + var spods []*pb.AppService_Pod + for _, pod := range pods { + podStatus := &pb.PodStatus{} + wutil.DescribePodStatus(r.clientset, pod, podStatus, k8sutil.DefListEventsByPod) + spods = append(spods, &pb.AppService_Pod{ + Name: pod.Name, + Status: podStatus.TypeStr, + }) + } + + appServices = append(appServices, &pb.AppService{ + Name: svc.Name, + TcpPorts: tcpPorts, + UdpPorts: udpPorts, + Pods: spods, + }) + } + + return &pb.AppServices{ + Services: appServices, + }, nil +} From 63f54f3178b3921cf066856c5b19158ece47d110 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Tue, 20 Apr 2021 22:27:09 +0800 Subject: [PATCH 16/65] run informer --- api/controller/application.go | 4 +- api/handler/application_handler.go | 45 +- cmd/helmappcontroller/main.go | 4 +- config/crd/rainbond.goodrain.io_helmapps.yaml | 6 +- util/http/api.go | 4 + worker/appm/store/informer.go | 1 + worker/controllers/helmapp/helm/app.go | 12 +- worker/controllers/helmapp/helm/helm.go | 5 +- worker/server/pb/app_runtime_server.pb.go | 389 +++++++++++------- worker/server/pb/app_runtime_server.proto | 9 +- worker/server/server.go | 109 ++++- 11 files changed, 398 insertions(+), 190 deletions(-) diff --git a/api/controller/application.go b/api/controller/application.go index deea83d50..13080877e 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -215,11 +215,13 @@ func (a *ApplicationController) Install(w http.ResponseWriter, r *http.Request) return } - err := handler.GetApplicationHandler().Install(r.Context(), app, installAppReq.Values) + services, err := handler.GetApplicationHandler().Install(r.Context(), app, installAppReq.Values) if err != nil { httputil.ReturnBcodeError(r, w, err) return } + + httputil.ReturnSuccess(r, w, services) } func (a *ApplicationController) ListServices(w http.ResponseWriter, r *http.Request) { diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index a035109b2..12d798e53 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -49,7 +49,7 @@ type ApplicationHandler interface { BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error GetStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) - Install(ctx context.Context, app *dbmodel.Application, values string) error + Install(ctx context.Context, app *dbmodel.Application, values string) ([]*pb.AppService, error) ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) DeleteConfigGroup(appID, configGroupName string) error @@ -294,10 +294,13 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat diskUsage := a.getDiskUsage(app.AppID) res := &model.AppStatus{ - Status: status.Status, - Cpu: status.Cpu, - Memory: status.Memory, - Disk: int64(diskUsage), + Status: status.Status, + Cpu: status.Cpu, + Memory: status.Memory, + Disk: int64(diskUsage), + Phase: status.Phase, + ValuesTemplate: status.ValuesTemplate, + Readme: status.Readme, } return res, nil } @@ -325,21 +328,39 @@ func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.A return conditions, nil } -func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, values string) error { - nctx, cancel := context.WithTimeout(ctx, 3*time.Second) +func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, values string) ([]*pb.AppService, error) { + ctx1, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() - helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(nctx, app.AppName, metav1.GetOptions{}) + helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(ctx1, app.AppName, metav1.GetOptions{}) if err != nil { if k8sErrors.IsNotFound(err) { - return errors.Wrap(bcode.ErrApplicationNotFound, "install app") + return nil, errors.Wrap(bcode.ErrApplicationNotFound, "install app") } - return errors.Wrap(err, "install app") + return nil, errors.Wrap(err, "install app") } + //ctx2, cancel := context.WithTimeout(ctx, 30*time.Second) + //defer cancel() + //var services []*pb.AppService + //appServices, err := a.statusCli.ParseAppServices(ctx2, &pb.ParseAppServicesReq{ + // AppID: app.AppID, + // Values: values, + //}) + //if err != nil { + // logrus.Warningf("[ApplicationAction] [Install] parse services: %v", err) + //} else { + // services = appServices.Services + //} + + ctx3, cancel := context.WithTimeout(ctx, 3*time.Second) + defer cancel() helmApp.Spec.Values = values - _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(nctx, helmApp, metav1.UpdateOptions{}) - return errors.Wrap(err, "install app") + _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(ctx3, helmApp, metav1.UpdateOptions{}) + if err != nil { + return nil, err + } + return nil, errors.Wrap(err, "install app") } func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) { diff --git a/cmd/helmappcontroller/main.go b/cmd/helmappcontroller/main.go index abbe6d8af..62b63aeb3 100644 --- a/cmd/helmappcontroller/main.go +++ b/cmd/helmappcontroller/main.go @@ -5,6 +5,7 @@ import ( "os" "time" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/sirupsen/logrus" @@ -49,8 +50,9 @@ func main() { // logrus.Fatal(err) // } //} + rainbondClient := versioned.NewForConfigOrDie(restcfg) - ctrl := helmapp.NewController(stopCh, restcfg, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + ctrl := helmapp.NewController(stopCh, rainbondClient, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") ctrl.Start() select {} diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml index 3b9671467..bb6bf1611 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -85,8 +85,6 @@ spec: - appName - appStore - eid - - revision - - values - version type: object status: @@ -130,6 +128,10 @@ spec: phase: description: The phase of helm app type: string + readme: + type: string + services: + type: string status: description: The status of helm app. type: string diff --git a/util/http/api.go b/util/http/api.go index 162ef33bd..e92454675 100644 --- a/util/http/api.go +++ b/util/http/api.go @@ -218,6 +218,10 @@ func ReturnBcodeError(r *http.Request, w http.ResponseWriter, err error) { result.Msg = err.Error() } + if berr.GetStatus() == 500 { + logrus.Errorf("path: %s\n: %+v", r.RequestURI, err) + } + r = r.WithContext(context.WithValue(r.Context(), render.StatusCtxKey, status)) render.DefaultResponder(w, r, result) } diff --git a/worker/appm/store/informer.go b/worker/appm/store/informer.go index d519f7df8..4fc4a39b6 100644 --- a/worker/appm/store/informer.go +++ b/worker/appm/store/informer.go @@ -69,6 +69,7 @@ func (i *Informer) Start(stop chan struct{}) { go i.HorizontalPodAutoscaler.Run(stop) go i.Claims.Run(stop) go i.CRD.Run(stop) + go i.HelmApp.Run(stop) } //Ready if all kube informers is syncd, store is ready diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index 229e8a8d6..afe401c84 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -120,12 +120,15 @@ func (a *App) InstallOrUpdate() error { } var buf bytes.Buffer + logrus.Debugf("name: %s; namespace: %s; chart: %s; install helm app", a.name, a.namespace, a.Chart()) if err := a.helm.Install(a.name, a.namespace, a.Chart(), values, &buf); err != nil { return err } - logrus.Infof("install: %s", buf.String()) + logrus.Infof("[App] [InstallOrUpdate] %s", buf.String()) + return nil } + // TODO: upgrade return nil } @@ -166,12 +169,7 @@ func (a *App) ParseChart() (string, string, error) { return values, readme, err } -func (a *App) parseServices() ([]*corev1.Service, error) { - manifests, err := a.helm.Manifests(a.name, a.namespace, a.Chart(), ioutil.Discard) - if err != nil { - return nil, errors.Wrap(err, "get manifests") - } - +func (a *App) parseServices(manifests string) ([]*corev1.Service, error) { // Create a local builder... builder := resource.NewLocalBuilder(). // Configure with a scheme to get typed objects in the versions registered with the scheme. diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index b1cd2df8d..380c3b5aa 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -52,12 +52,13 @@ func (h *Helm) PreInstall(name, namespace, chart string, out io.Writer) error { } func (h *Helm) Install(name, namespace, chart string, vals map[string]interface{}, out io.Writer) error { + // TODO: discard the output _, err := h.install(name, namespace, chart, vals, false, out) return err } -func (h *Helm) Manifests(name, namespace, chart string, out io.Writer) (string, error) { - rel, err := h.install(name, namespace, chart, nil, true, out) +func (h *Helm) Manifests(name, namespace, chart string, vals map[string]interface{}, out io.Writer) (string, error) { + rel, err := h.install(name, namespace, chart, vals, true, out) if err != nil { return "", err } diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 86523e8f1..1a07c30bb 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -2254,6 +2254,53 @@ func (m *AppServices) GetServices() []*AppService { return nil } +type ParseAppServicesReq struct { + AppID string `protobuf:"bytes,1,opt,name=appID,proto3" json:"appID,omitempty"` + Values string `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ParseAppServicesReq) Reset() { *m = ParseAppServicesReq{} } +func (m *ParseAppServicesReq) String() string { return proto.CompactTextString(m) } +func (*ParseAppServicesReq) ProtoMessage() {} +func (*ParseAppServicesReq) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{36} +} + +func (m *ParseAppServicesReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ParseAppServicesReq.Unmarshal(m, b) +} +func (m *ParseAppServicesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ParseAppServicesReq.Marshal(b, m, deterministic) +} +func (m *ParseAppServicesReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParseAppServicesReq.Merge(m, src) +} +func (m *ParseAppServicesReq) XXX_Size() int { + return xxx_messageInfo_ParseAppServicesReq.Size(m) +} +func (m *ParseAppServicesReq) XXX_DiscardUnknown() { + xxx_messageInfo_ParseAppServicesReq.DiscardUnknown(m) +} + +var xxx_messageInfo_ParseAppServicesReq proto.InternalMessageInfo + +func (m *ParseAppServicesReq) GetAppID() string { + if m != nil { + return m.AppID + } + return "" +} + +func (m *ParseAppServicesReq) GetValues() string { + if m != nil { + return m.Values + } + return "" +} + func init() { proto.RegisterEnum("pb.ServiceVolumeStatus", ServiceVolumeStatus_name, ServiceVolumeStatus_value) proto.RegisterEnum("pb.PodStatus_Type", PodStatus_Type_name, PodStatus_Type_value) @@ -2308,164 +2355,167 @@ func init() { proto.RegisterType((*AppService)(nil), "pb.AppService") proto.RegisterType((*AppService_Pod)(nil), "pb.AppService.Pod") proto.RegisterType((*AppServices)(nil), "pb.AppServices") + proto.RegisterType((*ParseAppServicesReq)(nil), "pb.ParseAppServicesReq") } func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2418 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x72, 0x1b, 0xc7, - 0x11, 0x26, 0xfe, 0x81, 0x06, 0x01, 0x82, 0x23, 0x91, 0x84, 0x21, 0xcb, 0x92, 0x37, 0x92, 0x4a, - 0x25, 0x39, 0xb4, 0xc4, 0x58, 0xb1, 0x64, 0x2b, 0x4e, 0x41, 0x00, 0x4c, 0x21, 0x01, 0x41, 0xd4, - 0x02, 0x4c, 0xca, 0x55, 0xa9, 0x42, 0x2d, 0xb1, 0x63, 0x6a, 0xa3, 0xfd, 0x19, 0xef, 0x0f, 0x1d, - 0x1c, 0x9d, 0x57, 0xc8, 0x23, 0xe4, 0x90, 0x43, 0x72, 0x4b, 0xce, 0x7e, 0x85, 0x3c, 0x8a, 0x2f, - 0xb9, 0xe4, 0x96, 0xea, 0x99, 0xd9, 0x5f, 0x2c, 0xa5, 0x28, 0x95, 0x54, 0x6e, 0xdb, 0x3d, 0x5f, - 0x4f, 0xf7, 0xf4, 0xf4, 0xf4, 0x74, 0xcf, 0x42, 0x57, 0x63, 0x6c, 0xe9, 0x06, 0xb6, 0x6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 0xe1, 0x75, 0xa8, 0x18, 0x16, 0x7a, 0x40, 0x36, 0x9d, 0x9c, - 0x40, 0x2e, 0xaf, 0xc3, 0xc2, 0x0b, 0x87, 0x13, 0x09, 0x3f, 0x96, 0xb2, 0x7e, 0xe4, 0x35, 0x17, - 0xd5, 0xc3, 0x82, 0x5b, 0x92, 0x78, 0x4d, 0xf0, 0xfb, 0x61, 0x29, 0x2e, 0x06, 0xe9, 0xb3, 0x26, - 0xe7, 0x9d, 0x70, 0x16, 0x86, 0xbe, 0x80, 0xac, 0x58, 0x20, 0x6b, 0xef, 0x3a, 0x67, 0x0c, 0x58, - 0x80, 0xb7, 0x91, 0xbc, 0x86, 0xc2, 0x19, 0x6a, 0xa2, 0x76, 0x95, 0x5c, 0x39, 0xc7, 0x2d, 0x2c, - 0x67, 0x04, 0x0c, 0x67, 0xa9, 0x8b, 0x3a, 0x51, 0xb2, 0x06, 0x2c, 0x50, 0xfe, 0x2e, 0xe2, 0x46, - 0x44, 0x36, 0x46, 0x67, 0xa2, 0x0e, 0xe6, 0xdf, 0x9c, 0xe7, 0xe8, 0xe1, 0x82, 0xf9, 0x77, 0xa6, - 0xba, 0x2c, 0x65, 0xab, 0xcb, 0xbb, 0xd1, 0x61, 0x2e, 0xc7, 0xf5, 0x78, 0x14, 0x80, 0xd1, 0xd9, - 0x16, 0x79, 0xa1, 0x12, 0xe5, 0x85, 0x03, 0xa8, 0xe1, 0xec, 0xd8, 0x85, 0x88, 0xe5, 0x56, 0x91, - 0x1c, 0x33, 0x74, 0xe3, 0x25, 0x75, 0x3d, 0xc3, 0xb1, 0xe5, 0x2a, 0x43, 0x92, 0x3c, 0x83, 0x1d, - 0xc3, 0x46, 0x17, 0xc5, 0x6d, 0x88, 0x28, 0x15, 0x3b, 0x52, 0x65, 0xdc, 0x05, 0xb4, 0x11, 0x18, - 0xb7, 0x12, 0xe4, 0x51, 0xaa, 0x79, 0x69, 0x5c, 0x21, 0x95, 0xec, 0x55, 0xee, 0x40, 0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e4, 0x76, 0xa1, 0x62, 0x92, 0x2b, 0x1b, - 0xd4, 0x8d, 0x49, 0x72, 0xdb, 0x48, 0x22, 0x5f, 0xce, 0xcc, 0x7f, 0x67, 0x92, 0x4f, 0x78, 0xf0, - 0xc5, 0xd5, 0x24, 0x8f, 0x85, 0x4c, 0xe7, 0xd4, 0x0b, 0x6b, 0x41, 0xc1, 0xe1, 0x52, 0xb8, 0x8f, - 0x99, 0x92, 0x29, 0xb1, 0x11, 0x24, 0x5b, 0xb0, 0x50, 0x74, 0xdd, 0x2f, 0xf8, 0xfe, 0xf5, 0x19, - 0x4b, 0x9d, 0xb7, 0x3c, 0xff, 0x7f, 0xf0, 0xe6, 0x4b, 0x8b, 0x87, 0xf1, 0x0d, 0xdc, 0xd0, 0x97, - 0xd4, 0xb4, 0xf2, 0x92, 0x20, 0xc8, 0x13, 0x83, 0xd6, 0x1f, 0xe4, 0x27, 0x3f, 0xb4, 0xe8, 0x11, - 0xec, 0xe0, 0x2c, 0xc9, 0x0c, 0x92, 0x94, 0xdc, 0x49, 0xe7, 0x0e, 0x4f, 0xd9, 0x3a, 0xaf, 0xf2, - 0x9f, 0x63, 0x3f, 0xf9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x72, 0xc8, 0xae, 0x38, 0x1b, - 0x00, 0x00, + // 2456 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x73, 0x1b, 0xc7, + 0x11, 0x26, 0x00, 0xe2, 0xd5, 0x20, 0x40, 0x70, 0xf8, 0x82, 0x61, 0xcb, 0x92, 0x37, 0x92, 0x4a, + 0x25, 0x39, 0xb4, 0xc4, 0x58, 0xb1, 0x64, 0x2b, 0x4a, 0x41, 0x00, 0x4c, 0x21, 0x01, 0x41, 0xd4, + 0x02, 0x4c, 0xca, 0x55, 0xa9, 0x42, 0x2d, 0xb1, 0x63, 0x6a,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 0xbe, 0x08, 0xcd, 0x94, 0xc0, 0x5b, 0x22, 0x18, + 0x83, 0x4f, 0xa7, 0xcc, 0x74, 0x56, 0x38, 0x2a, 0x76, 0xbe, 0x26, 0x18, 0x23, 0x1d, 0x63, 0x59, + 0x0e, 0xfa, 0x2b, 0x46, 0x3b, 0x25, 0x11, 0xcb, 0x82, 0x35, 0x5f, 0x31, 0x4a, 0xde, 0x83, 0x1a, + 0x73, 0xf4, 0x85, 0xad, 0x59, 0xb4, 0xb3, 0xc9, 0x47, 0xab, 0xcc, 0xd1, 0x27, 0x9a, 0x45, 0xf1, + 0x88, 0xe1, 0x90, 0xc1, 0x3a, 0x65, 0x11, 0x4f, 0xcc, 0xd1, 0x47, 0x0c, 0xcd, 0x41, 0xb6, 0x8c, + 0xe0, 0x8a, 0x30, 0x87, 0x39, 0xba, 0x88, 0x4d, 0xd2, 0x03, 0x58, 0x3a, 0xb6, 0xaf, 0x19, 0x36, + 0x75, 0xbd, 0x4e, 0x95, 0x3b, 0xf9, 0xa3, 0xb5, 0x55, 0x1f, 0xf5, 0x23, 0x19, 0xe1, 0xda, 0x04, + 0x08, 0x8d, 0x46, 0x0d, 0x57, 0x8e, 0x19, 0x58, 0xd4, 0xeb, 0xd4, 0x6e, 0x95, 0xd0, 0x68, 0xe6, + 0xe8, 0xbf, 0x10, 0x9c, 0xee, 0x18, 0xb6, 0x33, 0xf8, 0x1c, 0xcf, 0xff, 0x20, 0xed, 0xf9, 0x26, + 0xda, 0x10, 0xa1, 0x92, 0x1e, 0xbf, 0x82, 0x7a, 0xc4, 0x27, 0x77, 0xa0, 0x15, 0x59, 0x22, 0xbc, + 0x22, 0xa6, 0x6c, 0x46, 0x5c, 0xee, 0x9b, 0x8f, 0x60, 0xcb, 0xa2, 0x96, 0xe3, 0xae, 0x16, 0xa6, + 0x61, 0x19, 0x3e, 0xd7, 0x51, 0x52, 0x1b, 0x82, 0x37, 0x46, 0x16, 0xae, 0x62, 0xc9, 0x82, 0x85, + 0x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0x20, + 0x27, 0x1f, 0xe5, 0xe0, 0x2f, 0x2a, 0xfc, 0x0f, 0xdd, 0x8f, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, + 0x60, 0x8b, 0x81, 0x4b, 0xbd, 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2497,6 +2547,7 @@ type AppRuntimeSyncClient interface { GetAppVolumeStatus(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceVolumeStatusMessage, error) ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) + ParseAppServices(ctx context.Context, in *ParseAppServicesReq, opts ...grpc.CallOption) (*AppServices, error) } type appRuntimeSyncClient struct { @@ -2651,6 +2702,15 @@ func (c *appRuntimeSyncClient) ListAppServices(ctx context.Context, in *AppReq, return out, nil } +func (c *appRuntimeSyncClient) ParseAppServices(ctx context.Context, in *ParseAppServicesReq, opts ...grpc.CallOption) (*AppServices, error) { + out := new(AppServices) + err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ParseAppServices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AppRuntimeSyncServer is the server API for AppRuntimeSync service. type AppRuntimeSyncServer interface { // Deprecated: - @@ -2670,6 +2730,7 @@ type AppRuntimeSyncServer interface { GetAppVolumeStatus(context.Context, *ServiceRequest) (*ServiceVolumeStatusMessage, error) ListHelmAppDetectConditions(context.Context, *AppReq) (*AppDetectConditions, error) ListAppServices(context.Context, *AppReq) (*AppServices, error) + ParseAppServices(context.Context, *ParseAppServicesReq) (*AppServices, error) } func RegisterAppRuntimeSyncServer(s *grpc.Server, srv AppRuntimeSyncServer) { @@ -2964,6 +3025,24 @@ func _AppRuntimeSync_ListAppServices_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _AppRuntimeSync_ParseAppServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParseAppServicesReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AppRuntimeSyncServer).ParseAppServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AppRuntimeSync/ParseAppServices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AppRuntimeSyncServer).ParseAppServices(ctx, req.(*ParseAppServicesReq)) + } + return interceptor(ctx, in, info, handler) +} + var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AppRuntimeSync", HandlerType: (*AppRuntimeSyncServer)(nil), @@ -3032,6 +3111,10 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ MethodName: "ListAppServices", Handler: _AppRuntimeSync_ListAppServices_Handler, }, + { + MethodName: "ParseAppServices", + Handler: _AppRuntimeSync_ParseAppServices_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "app_runtime_server.proto", diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index bca405ef0..548f15784 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -19,6 +19,7 @@ service AppRuntimeSync { rpc GetAppVolumeStatus(ServiceRequest) returns(ServiceVolumeStatusMessage){} rpc ListHelmAppDetectConditions(AppReq) returns(AppDetectConditions){} rpc ListAppServices(AppReq) returns(AppServices){} + rpc ParseAppServices(ParseAppServicesReq) returns(AppServices){} } message Empty {} @@ -286,4 +287,10 @@ message AppService { message AppServices { repeated AppService services=1; -} \ No newline at end of file +} + +message ParseAppServicesReq { + string appID=1; + string values=2; +} + diff --git a/worker/server/server.go b/worker/server/server.go index 7a0cc37bb..58e46679f 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -19,12 +19,24 @@ package server import ( + "bytes" "context" + "encoding/base64" "fmt" + "io/ioutil" "net" "strings" "time" + "github.com/goodrain/rainbond/util/commonutil" + "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" + "github.com/pkg/errors" + "helm.sh/helm/v3/pkg/kube" + "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/cli-runtime/pkg/resource" + "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/yaml" + "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/db" @@ -698,6 +710,14 @@ func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb return nil, err } + appServices := r.convertServices(services) + + return &pb.AppServices{ + Services: appServices, + }, nil +} + +func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppService { var appServices []*pb.AppService for _, svc := range services { var tcpPorts []int32 @@ -716,19 +736,19 @@ func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb selector = selector.Add(*req) } + var spods []*pb.AppService_Pod pods, err := r.store.ListPods(svc.Namespace, selector) if err != nil { - return nil, err - } - - var spods []*pb.AppService_Pod - for _, pod := range pods { - podStatus := &pb.PodStatus{} - wutil.DescribePodStatus(r.clientset, pod, podStatus, k8sutil.DefListEventsByPod) - spods = append(spods, &pb.AppService_Pod{ - Name: pod.Name, - Status: podStatus.TypeStr, - }) + logrus.Warningf("parse services: %v", err) + } else { + for _, pod := range pods { + podStatus := &pb.PodStatus{} + wutil.DescribePodStatus(r.clientset, pod, podStatus, k8sutil.DefListEventsByPod) + spods = append(spods, &pb.AppService_Pod{ + Name: pod.Name, + Status: podStatus.TypeStr, + }) + } } appServices = append(appServices, &pb.AppService{ @@ -738,6 +758,73 @@ func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb Pods: spods, }) } + return appServices +} + +func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppServicesReq) (*pb.AppServices, error) { + app, err := db.GetManager().ApplicationDao().GetAppByID(req.AppID) + if err != nil { + return nil, err + } + + b, err := base64.StdEncoding.DecodeString(req.Values) + if err != nil { + return nil, errors.Wrap(err, "decode values") + } + + vals := map[string]interface{}{} + if err := yaml.Unmarshal(b, &vals); err != nil { + return nil, errors.Wrap(err, "parse values") + } + + configFlags := genericclioptions.NewConfigFlags(true) + configFlags.Namespace = commonutil.String(app.TenantID) + kubeClient := kube.New(configFlags) + + h, err := helm.NewHelm(kubeClient, configFlags, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + if err != nil { + return nil, err + } + + manifests, err := h.Manifests(app.AppName, app.TenantID, app.AppStoreName+"/"+app.AppTemplateName, vals, ioutil.Discard) + if err != nil { + return nil, err + } + + // Create a local builder... + builder := resource.NewLocalBuilder(). + // Configure with a scheme to get typed objects in the versions registered with the scheme. + // As an alternative, could call Unstructured() to get unstructured objects. + WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). + // Provide input via a Reader. + // As an alternative, could call Path(false, "/path/to/file") to read from a file. + Stream(bytes.NewBufferString(manifests), "input"). + // Flatten items contained in List objects + Flatten(). + // Accumulate as many items as possible + ContinueOnError() + + // Run the builder + result := builder.Do() + + items, err := result.Infos() + if err != nil { + return nil, errors.WithMessage(err, "resource infos") + } + + var services []*corev1.Service + for _, item := range items { + if item.Object.GetObjectKind().GroupVersionKind().Kind != "Service" { + continue + } + svc, ok := item.Object.(*corev1.Service) + if !ok { + continue + } + services = append(services, svc) + } + + appServices := r.convertServices(services) return &pb.AppServices{ Services: appServices, From aa483887c69cd28398b20c62430ea771c23627f5 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 21 Apr 2021 15:12:34 +0800 Subject: [PATCH 17/65] service address --- api/handler/application_handler.go | 4 +- api/model/app.go | 2 +- worker/server/pb/app_runtime_server.pb.go | 325 +++++++++++----------- worker/server/pb/app_runtime_server.proto | 7 +- worker/server/server.go | 6 + 5 files changed, 179 insertions(+), 165 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 12d798e53..9820223e9 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -376,6 +376,7 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli for _, service := range appServices.Services { svc := &model.AppService{ ServiceName: service.Name, + Address: service.Address, } var pods []*model.AppPod @@ -390,9 +391,6 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli for _, port := range service.TcpPorts { svc.TCPPorts = append(svc.TCPPorts, port) } - for _, port := range service.UdpPorts { - svc.UDPPorts = append(svc.UDPPorts, port) - } services = append(services, svc) } diff --git a/api/model/app.go b/api/model/app.go index 72bd0b00d..cb4cb0390 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -29,8 +29,8 @@ type AppDetectProcess struct { // AppService - type AppService struct { ServiceName string `json:"service_name"` + Address string `json:"address"` TCPPorts []int32 `json:"tcp_ports"` - UDPPorts []int32 `json:"udp_ports"` Pods []*AppPod `json:"pods"` } diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 1a07c30bb..5e0a6de2e 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -2107,9 +2107,10 @@ func (m *AppDetectConditions) GetConditions() []*AppDetectCondition { type AppService struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - TcpPorts []int32 `protobuf:"varint,2,rep,packed,name=tcpPorts,proto3" json:"tcpPorts,omitempty"` - UdpPorts []int32 `protobuf:"varint,3,rep,packed,name=udpPorts,proto3" json:"udpPorts,omitempty"` - Pods []*AppService_Pod `protobuf:"bytes,4,rep,name=pods,proto3" json:"pods,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + TcpPorts []int32 `protobuf:"varint,3,rep,packed,name=tcpPorts,proto3" json:"tcpPorts,omitempty"` + UdpPorts []int32 `protobuf:"varint,4,rep,packed,name=udpPorts,proto3" json:"udpPorts,omitempty"` + Pods []*AppService_Pod `protobuf:"bytes,5,rep,name=pods,proto3" json:"pods,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2147,6 +2148,13 @@ func (m *AppService) GetName() string { return "" } +func (m *AppService) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + func (m *AppService) GetTcpPorts() []int32 { if m != nil { return m.TcpPorts @@ -2361,161 +2369,162 @@ func init() { func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2456 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x73, 0x1b, 0xc7, - 0x11, 0x26, 0x00, 0xe2, 0xd5, 0x20, 0x40, 0x70, 0xf8, 0x82, 0x61, 0xcb, 0x92, 0x37, 0x92, 0x4a, - 0x25, 0x39, 0xb4, 0xc4, 0x58, 0xb1, 0x64, 0x2b, 0x4a, 0x41, 0x00, 0x4c, 0x21, 0x01, 0x41, 0xd4, - 0x02, 0x4c, 0xca, 0x55, 0xa9, 0x42, 0x2d, 0xb1, 0x63, 0x6a, 0xa3, 0x7d, 0x8c, 0xf7, 0x41, 0x07, - 0xc7, 0xe4, 0x2f, 0xe4, 0x27, 0xe4, 0x90, 0x43, 0x72, 0x4b, 0xce, 0xae, 0xca, 0x2f, 0xc8, 0x4f, - 0xf1, 0x25, 0x97, 0xdc, 0x52, 0x3d, 0x33, 0xfb, 0xc4, 0x52, 0x8a, 0x52, 0x49, 0xe5, 0xb6, 0xdd, - 0xd3, 0xdf, 0x74, 0x4f, 0x4f, 0x4f, 0x4f, 0xf7, 0x2c, 0x74, 0x34, 0xc6, 0x16, 0x6e, 0x60, 0xfb, - 0x86, 0x45, 0x17, 0x1e, 0x75, 0xaf, 0xa8, 0x7b, 0xc4, 0x5c, 0xc7, 0x77, 0x48, 0x91, 0x5d, 0x28, - 0x55, 0x28, 0x0f, 0x2d, 0xe6, 0xaf, 0x94, 0x9b, 0x50, 0xe9, 0x31, 0xa6, 0xd2, 0x6f, 0xc8, 0x3e, - 0x54, 0x10, 0x62, 0xe8, 0x9d, 0xc2, 0xad, 0xc2, 0xbd, 0xba, 0x5a, 0xd6, 0x18, 0x1b, 0xe9, 0xca, - 0x1d, 0xd8, 0xea, 0x31, 0x36, 0xf3, 0x35, 0x3f, 0xf0, 0xde, 0x20, 0xf6, 0x09, 0xb4, 0x66, 0xd4, - 0xbd, 0x32, 0x96, 0x54, 0xa5, 0xdf, 0x04, 0xd4, 0xf3, 0xc9, 0x0d, 0x00, 0x4f, 0x70, 0x62, 0xe1, - 0xba, 0xe4, 0x8c, 0x74, 0xe5, 0x18, 0xb6, 0x25, 0xc0, 0x0b, 0x11, 0x37, 0xa1, 0x11, 0x23, 0x3c, - 0x09, 0x81, 0x08, 0xe2, 0x29, 0x1f, 0x43, 0x73, 0x4e, 0x6d, 0xcd, 0xf6, 0x43, 0xc4, 0xfb, 0x50, - 0xf7, 0x39, 0x23, 0x56, 0x51, 0x13, 0x8c, 0x91, 0xae, 0xfc, 0xb6, 0x00, 0x4d, 0x61, 0xf7, 0x29, - 0xf5, 0x3c, 0xed, 0x92, 0x92, 0xc7, 0x50, 0xf1, 0x38, 0xa3, 0x53, 0xb8, 0x55, 0xba, 0xd7, 0x38, - 0xbe, 0x71, 0xc4, 0x2e, 0x8e, 0x52, 0x22, 0x92, 0x1a, 0xda, 0xbe, 0xbb, 0x52, 0xa5, 0x70, 0xf7, - 0x29, 0x34, 0x12, 0x6c, 0xd2, 0x86, 0xd2, 0x6b, 0xba, 0x92, 0xea, 0xf0, 0x93, 0xec, 0x41, 0xf9, - 0x4a, 0x33, 0x03, 0xda, 0x29, 0x0a, 0x97, 0x70, 0xe2, 0xf3, 0xe2, 0x93, 0x82, 0xb2, 0x82, 0xc6, - 0xc0, 0xf0, 0x5e, 0x87, 0x06, 0x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 0xeb, 0xda, 0x2e, - 0xb9, 0x1b, 0x9b, 0x29, 0x26, 0xc9, 0x6d, 0x65, 0xc5, 0x24, 0xd7, 0x76, 0xb9, 0x6b, 0x93, 0xe4, - 0xf6, 0xa2, 0x44, 0x3e, 0xbf, 0x99, 0xff, 0xce, 0x24, 0x9f, 0xf2, 0xe0, 0x8b, 0x4b, 0x52, 0x1e, - 0x0b, 0x99, 0xf6, 0xab, 0x1b, 0x16, 0x94, 0x82, 0xc3, 0x51, 0xb8, 0x8f, 0x99, 0xba, 0x2b, 0xb1, - 0x11, 0x24, 0x5b, 0xf5, 0x50, 0x74, 0xdd, 0xcf, 0xf8, 0xfe, 0xf5, 0x18, 0x4b, 0x9d, 0xb7, 0x3c, - 0xff, 0x7f, 0xf8, 0xe6, 0x9b, 0x8f, 0x87, 0xf1, 0xfb, 0xb8, 0xa1, 0x2f, 0xa9, 0x69, 0xe5, 0x65, - 0x52, 0x90, 0x27, 0x06, 0xad, 0x3f, 0xcc, 0xcf, 0xa0, 0x68, 0xd1, 0x43, 0xd8, 0xc6, 0x59, 0x92, - 0x69, 0x28, 0x89, 0xdc, 0x4e, 0x27, 0x20, 0x44, 0x3c, 0x87, 0x76, 0x36, 0xf3, 0x10, 0xae, 0x20, - 0x27, 0x1f, 0xe5, 0xe0, 0x2f, 0x2a, 0xfc, 0x0f, 0xdd, 0x8f, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, - 0x60, 0x8b, 0x81, 0x4b, 0xbd, 0x1b, 0x00, 0x00, + // 2468 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x5f, 0x73, 0xdb, 0xc6, + 0x11, 0x17, 0x49, 0xf1, 0xdf, 0x52, 0xa2, 0xa8, 0xd3, 0x3f, 0x86, 0x89, 0x63, 0x07, 0xb5, 0x3d, + 0x1e, 0x3b, 0x55, 0x6c, 0x35, 0x6e, 0xec, 0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eb, 0xa4, 0x09, 0x30, 0xed, 0x9f, 0x0e, 0x46, 0xdd, 0x29, 0xea, + 0x95, 0xc9, 0x06, 0xd4, 0xba, 0x2f, 0x46, 0x67, 0xfa, 0x69, 0x77, 0xd8, 0xaa, 0xe0, 0xe8, 0x60, + 0x34, 0x98, 0x0e, 0xc4, 0x68, 0x15, 0xe9, 0xc9, 0xf1, 0xcb, 0x7e, 0xef, 0x7c, 0x88, 0x74, 0x0d, + 0xa5, 0x47, 0x67, 0x53, 0xbd, 0xdf, 0xed, 0x7d, 0xd5, 0xaa, 0xa3, 0xcd, 0xf3, 0xd1, 0xcb, 0x7e, + 0x77, 0x38, 0x7d, 0xf9, 0x55, 0x0b, 0xb4, 0x7f, 0x14, 0x60, 0x63, 0xec, 0x99, 0x09, 0x3a, 0xdc, + 0x85, 0xb2, 0xe5, 0x60, 0x04, 0x64, 0xd3, 0xc9, 0x09, 0xe4, 0x72, 0x1c, 0x16, 0x5d, 0x38, 0x9c, + 0x50, 0xe2, 0x58, 0xca, 0xc6, 0x91, 0x63, 0x2e, 0x6a, 0x46, 0x80, 0x5b, 0x92, 0x78, 0x4d, 0xf0, + 0xfb, 0x61, 0x26, 0x2e, 0x06, 0x19, 0xb3, 0x06, 0xe7, 0x9d, 0x72, 0x16, 0xa6, 0xbe, 0x10, 0x99, + 0xb3, 0x85, 0xc4, 0xde, 0x35, 0xce, 0x38, 0x66, 0x0b, 0xbc, 0x8d, 0xe4, 0x35, 0x14, 0xcd, 0x50, + 0x15, 0xd8, 0x55, 0x72, 0xe5, 0x1c, 0x37, 0x11, 0xce, 0x08, 0x31, 0x9c, 0xa5, 0x26, 0x70, 0xa2, + 0x64, 0x1d, 0xb3, 0x85, 0xf6, 0x77, 0x91, 0x37, 0x22, 0xb3, 0x31, 0x3b, 0x15, 0x1c, 0xcc, 0xbf, + 0x39, 0xcf, 0x33, 0xa3, 0x05, 0xf3, 0xef, 0x0c, 0xba, 0x2c, 0x65, 0xd1, 0xe5, 0x9d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, 0x3c, 0x31, 0xe8, + 0xfd, 0x41, 0x7e, 0x6d, 0x45, 0x8f, 0x1e, 0xc2, 0x16, 0xce, 0xa2, 0x96, 0x21, 0x55, 0x73, 0x2b, + 0x5d, 0x80, 0x50, 0xe3, 0x39, 0xb4, 0xb2, 0x95, 0x87, 0x70, 0x03, 0x39, 0xf5, 0x28, 0x47, 0xff, + 0xa2, 0xc2, 0xff, 0xdd, 0xfd, 0xe8, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x08, 0x53, 0x84, + 0xd7, 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 548f15784..556031e61 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -280,9 +280,10 @@ message AppService { } string name=1; - repeated int32 tcpPorts=2; - repeated int32 udpPorts=3; - repeated Pod pods=4; + string address=2; + repeated int32 tcpPorts=3; + repeated int32 udpPorts=4; + repeated Pod pods=5; } message AppServices { diff --git a/worker/server/server.go b/worker/server/server.go index 58e46679f..e866a81c4 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -751,8 +751,14 @@ func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppSer } } + address := svc.Spec.ClusterIP + if address == "" || address == "None" { + address = svc.Name + "." + svc.Namespace + } + appServices = append(appServices, &pb.AppService{ Name: svc.Name, + Address: address, TcpPorts: tcpPorts, UdpPorts: udpPorts, Pods: spods, From 163b67fa6efb07a02c58046d9a79ac0810d57568 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 21 Apr 2021 16:14:59 +0800 Subject: [PATCH 18/65] no longer parse services --- api/controller/application.go | 5 +---- api/handler/application_handler.go | 25 ++++++------------------- worker/server/server.go | 10 ++++++++++ 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/api/controller/application.go b/api/controller/application.go index 13080877e..a8260fb99 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -215,13 +215,10 @@ func (a *ApplicationController) Install(w http.ResponseWriter, r *http.Request) return } - services, err := handler.GetApplicationHandler().Install(r.Context(), app, installAppReq.Values) - if err != nil { + if err := handler.GetApplicationHandler().Install(r.Context(), app, installAppReq.Values); err != nil { httputil.ReturnBcodeError(r, w, err) return } - - httputil.ReturnSuccess(r, w, services) } func (a *ApplicationController) ListServices(w http.ResponseWriter, r *http.Request) { diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 9820223e9..06c4b84d6 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -49,7 +49,7 @@ type ApplicationHandler interface { BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error GetStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) - Install(ctx context.Context, app *dbmodel.Application, values string) ([]*pb.AppService, error) + Install(ctx context.Context, app *dbmodel.Application, values string) error ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) DeleteConfigGroup(appID, configGroupName string) error @@ -328,39 +328,26 @@ func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.A return conditions, nil } -func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, values string) ([]*pb.AppService, error) { +func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, values string) error { ctx1, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(ctx1, app.AppName, metav1.GetOptions{}) if err != nil { if k8sErrors.IsNotFound(err) { - return nil, errors.Wrap(bcode.ErrApplicationNotFound, "install app") + return errors.Wrap(bcode.ErrApplicationNotFound, "install app") } - return nil, errors.Wrap(err, "install app") + return errors.Wrap(err, "install app") } - //ctx2, cancel := context.WithTimeout(ctx, 30*time.Second) - //defer cancel() - //var services []*pb.AppService - //appServices, err := a.statusCli.ParseAppServices(ctx2, &pb.ParseAppServicesReq{ - // AppID: app.AppID, - // Values: values, - //}) - //if err != nil { - // logrus.Warningf("[ApplicationAction] [Install] parse services: %v", err) - //} else { - // services = appServices.Services - //} - ctx3, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() helmApp.Spec.Values = values _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(ctx3, helmApp, metav1.UpdateOptions{}) if err != nil { - return nil, err + return err } - return nil, errors.Wrap(err, "install app") + return errors.Wrap(err, "install app") } func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) { diff --git a/worker/server/server.go b/worker/server/server.go index e866a81c4..790c13994 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -792,6 +792,11 @@ func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppSe return nil, err } + repo := helm.NewRepo("/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + if err := repo.Add(app.AppStoreName, app.AppStoreURL, "", ""); err != nil { + logrus.Warningf("add repo: %v", err) + } + manifests, err := h.Manifests(app.AppName, app.TenantID, app.AppStoreName+"/"+app.AppTemplateName, vals, ioutil.Discard) if err != nil { return nil, err @@ -811,8 +816,13 @@ func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppSe ContinueOnError() // Run the builder + logrus.Debugf("start parse manifests: %s", manifests) result := builder.Do() + if result.Err() != nil { + logrus.Warningf("parse manifests: %v", err) + } + items, err := result.Infos() if err != nil { return nil, errors.WithMessage(err, "resource infos") From 185a5eee8b4f0d3b0a1b7b699defc113ae838b9a Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 21 Apr 2021 18:17:15 +0800 Subject: [PATCH 19/65] uninstall helm app --- api/controller/application.go | 4 +- api/handler/application_handler.go | 23 ++++++-- worker/controllers/helmapp/controller.go | 14 +++-- worker/controllers/helmapp/controlloop.go | 2 +- worker/controllers/helmapp/finilizer.go | 67 +++++++++++++++++++++++ worker/controllers/helmapp/helm/app.go | 4 ++ worker/controllers/helmapp/helm/helm.go | 6 ++ worker/controllers/helmapp/store.go | 8 ++- 8 files changed, 114 insertions(+), 14 deletions(-) create mode 100644 worker/controllers/helmapp/finilizer.go diff --git a/api/controller/application.go b/api/controller/application.go index a8260fb99..d7af92933 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -149,10 +149,10 @@ func (a *ApplicationController) ListComponents(w http.ResponseWriter, r *http.Re // DeleteApp - func (a *ApplicationController) DeleteApp(w http.ResponseWriter, r *http.Request) { - appID := chi.URLParam(r, "app_id") + app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) // Delete application - err := handler.GetApplicationHandler().DeleteApp(appID) + err := handler.GetApplicationHandler().DeleteApp(r.Context(), app) if err != nil { httputil.ReturnBcodeError(r, w, err) return diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 06c4b84d6..88b26238e 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -41,7 +41,7 @@ type ApplicationHandler interface { ListApps(tenantID, appName string, page, pageSize int) (*model.ListAppResponse, error) GetAppByID(appID string) (*dbmodel.Application, error) BatchBindService(appID string, req model.BindServiceRequest) error - DeleteApp(appID string) error + DeleteApp(ctx context.Context, app *dbmodel.Application) error AddConfigGroup(appID string, req *model.ApplicationConfigGroup) (*model.ApplicationConfigGroupResp, error) UpdateConfigGroup(appID, configGroupName string, req *model.UpdateAppConfigGroupReq) (*model.ApplicationConfigGroupResp, error) @@ -192,16 +192,31 @@ func (a *ApplicationAction) GetAppByID(appID string) (*dbmodel.Application, erro } // DeleteApp - -func (a *ApplicationAction) DeleteApp(appID string) error { +func (a *ApplicationAction) DeleteApp(ctx context.Context, app *dbmodel.Application) error { // Get the number of services under the application - total, err := db.GetManager().TenantServiceDao().CountServiceByAppID(appID) + total, err := db.GetManager().TenantServiceDao().CountServiceByAppID(app.AppID) if err != nil { return err } if total != 0 { return bcode.ErrDeleteDueToBindService } - return db.GetManager().ApplicationDao().DeleteApp(appID) + + ctx, cancel := context.WithTimeout(ctx, 5 * time.Second) + defer cancel() + + return db.GetManager().DB().Transaction(func(tx *gorm.DB) error { + if err := db.GetManager().ApplicationDaoTransactions(tx).DeleteApp(app.AppID); err != nil { + return err + } + + if err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Delete(ctx, app.AppName, metav1.DeleteOptions{}); err != nil { + if !k8sErrors.IsNotFound(err) { + return err + } + } + return nil + }) } // BatchUpdateComponentPorts - diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index ccc2fb616..945f8ac78 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -13,25 +13,29 @@ type Controller struct { storer Storer stopCh chan struct{} controlLoop *ControlLoop + finalizer *Finalizer } func NewController(stopCh chan struct{}, clientset versioned.Interface, resyncPeriod time.Duration, repoFile, repoCache string) *Controller { - queue := workqueue.New() - storer := NewStorer(clientset, resyncPeriod, queue) + workQueue := workqueue.New() + finalizerQueue := workqueue.New() + storer := NewStorer(clientset, resyncPeriod, workQueue, finalizerQueue) - controlLoop := NewControlLoop(clientset, storer, queue, repoFile, repoCache) + controlLoop := NewControlLoop(clientset, storer, workQueue, repoFile, repoCache) + finalizer := NewFinalizer(clientset, finalizerQueue, repoFile, repoCache) return &Controller{ storer: storer, stopCh: stopCh, controlLoop: controlLoop, + finalizer: finalizer, } } func (c *Controller) Start() { logrus.Info("start helm app controller") go c.storer.Run(c.stopCh) - - c.controlLoop.Run() + go c.controlLoop.Run() + c.finalizer.Run() } diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index b24bda6d2..6b9ccd8db 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -68,7 +68,7 @@ func (c *ControlLoop) run(obj interface{}) { } if err := c.Reconcile(helmApp); err != nil { - // ignore the error, informer will push the same time into workqueue later. + // ignore the error, informer will push the same time into queue later. logrus.Warningf("[HelmAppController] [ControlLoop] [Reconcile]: %v", err) return } diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go new file mode 100644 index 000000000..188a64514 --- /dev/null +++ b/worker/controllers/helmapp/finilizer.go @@ -0,0 +1,67 @@ +package helmapp + +import ( + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" + "github.com/sirupsen/logrus" + "k8s.io/client-go/util/workqueue" +) + +type Finalizer struct { + clientset versioned.Interface + queue workqueue.Interface + repoFile string + repoCache string +} + +// NewControlLoop - +func NewFinalizer(clientset versioned.Interface, + workqueue workqueue.Interface, + repoFile string, + repoCache string, +) *Finalizer { + + return &Finalizer{ + clientset: clientset, + queue: workqueue, + repoFile: repoFile, + repoCache: repoCache, + } +} + +func (c *Finalizer) Run() { + for { + obj, shutdown := c.queue.Get() + if shutdown { + return + } + + err := c.run(obj) + if err != nil { + logrus.Warningf("[HelmAppFinalizer] run finalizer: %v", err) + continue + } + c.queue.Done(obj) + } +} + +func (c *Finalizer) run(obj interface{}) error { + helmApp, ok := obj.(*v1alpha1.HelmApp) + if !ok { + return nil + } + + logrus.Infof("start uninstall helm app: %s/%s", helmApp.Name, helmApp.Namespace) + + appStore := helmApp.Spec.AppStore + app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, + helmApp.Spec.TemplateName, appStore.Name, helmApp.Spec.Version, + helmApp.Spec.Values, + c.repoFile, c.repoCache) + if err != nil { + return err + } + + return app.Uninstall() +} diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index afe401c84..3a639864a 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -205,3 +205,7 @@ func (a *App) parseServices(manifests string) ([]*corev1.Service, error) { return services, nil } + +func (a *App) Uninstall() error { + return a.helm.Uninstall(a.name) +} diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index 380c3b5aa..e279c318e 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -137,6 +137,12 @@ func (h *Helm) Status(name string) (*release.Release, error) { return rel, errors.Wrap(err, "helm status") } +func (h *Helm) Uninstall(name string) error { + uninstall := action.NewUninstall(h.cfg) + _, err := uninstall.Run(name) + return err +} + // checkIfInstallable validates if a chart can be installed // // Application chart type is only installable diff --git a/worker/controllers/helmapp/store.go b/worker/controllers/helmapp/store.go index 791ca3382..f4f716c2e 100644 --- a/worker/controllers/helmapp/store.go +++ b/worker/controllers/helmapp/store.go @@ -28,7 +28,8 @@ type store struct { func NewStorer(clientset versioned.Interface, resyncPeriod time.Duration, - workqueue workqueue.Interface) Storer { + workqueue workqueue.Interface, + finalizerQueue workqueue.Interface) Storer { // create informers factory, enable and assign required informers sharedInformer := externalversions.NewSharedInformerFactoryWithOptions(clientset, resyncPeriod, externalversions.WithNamespace(corev1.NamespaceAll)) @@ -46,7 +47,10 @@ func NewStorer(clientset versioned.Interface, workqueue.Add(k8sutil.ObjKey(helmApp)) }, DeleteFunc: func(obj interface{}) { - + // Two purposes of using finalizerQueue + // 1. non-block DeleteFunc + // 2. retry if the finalizer is failed + finalizerQueue.Add(obj) }, }) From 790dccd84f6f33a6d4b15d0c1b43f02d2226c3d8 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 21 Apr 2021 19:45:00 +0800 Subject: [PATCH 20/65] ensure app name --- api/api/api_interface.go | 1 + api/api_routers/version2/v2Routers.go | 1 + api/controller/application.go | 17 +++++++++++++++++ api/handler/application_handler.go | 24 +++++++++++++++++++++++- api/model/model.go | 10 ++++++++++ 5 files changed, 52 insertions(+), 1 deletion(-) diff --git a/api/api/api_interface.go b/api/api/api_interface.go index 5a6156bb9..00b72a0b8 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -168,6 +168,7 @@ type ApplicationInterface interface { GetDetectProcess(w http.ResponseWriter, r *http.Request) Install(w http.ResponseWriter, r *http.Request) ListServices(w http.ResponseWriter, r *http.Request) + EnsureAppName(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) ListConfigGroups(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index c5a3a86c3..3f521db5a 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -140,6 +140,7 @@ func (v2 *V2) tenantNameRouter() chi.Router { r.Post("/apps", controller.GetManager().CreateApp) r.Post("/batch_create_apps", controller.GetManager().BatchCreateApp) r.Get("/apps", controller.GetManager().ListApps) + r.Post("/ensure-app-name", controller.GetManager().EnsureAppName) r.Mount("/apps/{app_id}", v2.applicationRouter()) //get some service pod info r.Get("/pods", controller.Pods) diff --git a/api/controller/application.go b/api/controller/application.go index d7af92933..9fb8c5180 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -249,3 +249,20 @@ func (a *ApplicationController) BatchBindService(w http.ResponseWriter, r *http. } httputil.ReturnSuccess(r, w, nil) } + +func (a *ApplicationController) EnsureAppName(w http.ResponseWriter, r *http.Request) { + var req model.EnsureAppNameReq + if !httputil.ValidatorRequestStructAndErrorResponse(r, w, &req, nil) { + return + } + + tenant := r.Context().Value(middleware.ContextKey("tenant")).(*dbmodel.Tenants) + + res, err := handler.GetApplicationHandler().EnsureAppName(r.Context(), tenant.UUID, req.AppName) + if err != nil { + httputil.ReturnBcodeError(r, w, err) + return + } + + httputil.ReturnSuccess(r, w, res) +} diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 88b26238e..7b4a6d962 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -51,6 +51,7 @@ type ApplicationHandler interface { GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) Install(ctx context.Context, app *dbmodel.Application, values string) error ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) + EnsureAppName(ctx context.Context, namespace, appName string) (*model.EnsureAppNameResp, error) DeleteConfigGroup(appID, configGroupName string) error ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error) @@ -202,7 +203,7 @@ func (a *ApplicationAction) DeleteApp(ctx context.Context, app *dbmodel.Applicat return bcode.ErrDeleteDueToBindService } - ctx, cancel := context.WithTimeout(ctx, 5 * time.Second) + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel() return db.GetManager().DB().Transaction(func(tx *gorm.DB) error { @@ -422,3 +423,24 @@ func (a *ApplicationAction) BatchBindService(appID string, req model.BindService } return nil } + +func (a *ApplicationAction) EnsureAppName(ctx context.Context, namespace, appName string) (*model.EnsureAppNameResp, error) { + nctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + retries := 3 + for i := 0; i < retries; i++ { + _, err := a.rainbondClient.RainbondV1alpha1().HelmApps(namespace).Get(nctx, appName, metav1.GetOptions{}) + if err != nil { + if k8sErrors.IsNotFound(err) { + break + } + return nil, errors.Wrap(err, "ensure app name") + } + appName += "-" + util.NewUUID()[:5] + } + + return &model.EnsureAppNameResp{ + AppName: appName, + }, nil +} diff --git a/api/model/model.go b/api/model/model.go index 8fc454ef9..f1632a981 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1756,3 +1756,13 @@ type ListApplicationConfigGroupResp struct { Page int `json:"page"` PageSize int `json:"pageSize"` } + +// EnsureAppNameReq - +type EnsureAppNameReq struct { + AppName string `json:"app_name"` +} + +// EnsureAppNameResp - +type EnsureAppNameResp struct { + AppName string `json:"app_name"` +} From e4f495dcd3c0ca2bf9b5113db90947898704ee9e Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 22 Apr 2021 11:00:09 +0800 Subject: [PATCH 21/65] helm app installing --- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 1 + worker/controllers/helmapp/status.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 040ce8689..8b95cdca1 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -29,6 +29,7 @@ const ( HelmAppStatusPhaseInitialing HelmAppStatusPhase = "initialing" HelmAppStatusPhaseDetecting HelmAppStatusPhase = "detecting" HelmAppStatusPhaseConfiguring HelmAppStatusPhase = "configuring" + HelmAppStatusPhaseInstalling HelmAppStatusPhase = "installing" HelmAppStatusPhaseInstalled HelmAppStatusPhase = "installed" ) diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index 7be289feb..f1fddb424 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -48,6 +48,9 @@ func (s *Status) getPhase() v1alpha1.HelmAppStatusPhase { phase = v1alpha1.HelmAppStatusPhaseConfiguring } if s.values != "" { + phase = v1alpha1.HelmAppStatusPhaseInstalling + } + if s.values == s.CurrentValues { phase = v1alpha1.HelmAppStatusPhaseInstalled } return phase From 509c8d0e6a173f808c788c280fe9163c51de5582 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 23 Apr 2021 10:03:15 +0800 Subject: [PATCH 22/65] sort app services --- api/api/api_interface.go | 1 + api/api_routers/version2/v2Routers.go | 1 + api/controller/application.go | 19 ++++++++++- api/handler/application_handler.go | 40 +++++++++++++++++++++-- api/model/app.go | 8 +++++ api/model/model.go | 5 +++ worker/controllers/helmapp/controlloop.go | 5 ++- worker/controllers/helmapp/finilizer.go | 4 +-- worker/controllers/helmapp/helm/app.go | 16 +++++++-- worker/controllers/helmapp/status.go | 2 +- 10 files changed, 90 insertions(+), 11 deletions(-) diff --git a/api/api/api_interface.go b/api/api/api_interface.go index 00b72a0b8..587fadc00 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -169,6 +169,7 @@ type ApplicationInterface interface { Install(w http.ResponseWriter, r *http.Request) ListServices(w http.ResponseWriter, r *http.Request) EnsureAppName(w http.ResponseWriter, r *http.Request) + ParseServices(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) ListConfigGroups(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index 3f521db5a..4cbef2cea 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -320,6 +320,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/status", controller.GetManager().GetAppStatus) r.Get("/detect-process", controller.GetManager().GetDetectProcess) r.Post("/install", controller.GetManager().Install) + r.Post("/parse-services", controller.GetManager().ParseServices) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) r.Get("/configgroups", controller.GetManager().ListConfigGroups) diff --git a/api/controller/application.go b/api/controller/application.go index 9fb8c5180..2763a1bb5 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -121,7 +121,7 @@ func (a *ApplicationController) ListApps(w http.ResponseWriter, r *http.Request) httputil.ReturnSuccess(r, w, resp) } -// ListServices - +// ListComponents - func (a *ApplicationController) ListComponents(w http.ResponseWriter, r *http.Request) { appID := chi.URLParam(r, "app_id") query := r.URL.Query() @@ -266,3 +266,20 @@ func (a *ApplicationController) EnsureAppName(w http.ResponseWriter, r *http.Req httputil.ReturnSuccess(r, w, res) } + +func (a *ApplicationController) ParseServices(w http.ResponseWriter, r *http.Request) { + app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) + + var installAppReq model.ParseAppServicesReq + if !httputil.ValidatorRequestStructAndErrorResponse(r, w, &installAppReq, nil) { + return + } + + services, err := handler.GetApplicationHandler().ParseServices(r.Context(), app, installAppReq.Values) + if err != nil { + httputil.ReturnBcodeError(r, w, err) + return + } + + httputil.ReturnSuccess(r, w, services) +} diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 7b4a6d962..a6930a3d5 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -3,6 +3,7 @@ package handler import ( "context" "fmt" + "sort" "strconv" "time" @@ -52,6 +53,7 @@ type ApplicationHandler interface { Install(ctx context.Context, app *dbmodel.Application, values string) error ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) EnsureAppName(ctx context.Context, namespace, appName string) (*model.EnsureAppNameResp, error) + ParseServices(ctx context.Context, app *dbmodel.Application, values string) ([]*model.AppService, error) DeleteConfigGroup(appID, configGroupName string) error ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error) @@ -92,8 +94,11 @@ func (a *ApplicationAction) CreateApp(ctx context.Context, req *model.Applicatio } } - // create helmapp.rainbond.goodrain.io - return a.createHelmApp(ctx, appReq) + if appReq.AppType == model.AppTypeHelm { + // create helmapp.rainbond.goodrain.io + return a.createHelmApp(ctx, appReq) + } + return nil }) return req, err @@ -344,6 +349,35 @@ func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.A return conditions, nil } +func (a *ApplicationAction) ParseServices(ctx context.Context, app *dbmodel.Application, values string) ([]*model.AppService, error) { + nctx, cancel := context.WithTimeout(ctx, 60*time.Second) + defer cancel() + + services, err := a.statusCli.ParseAppServices(nctx, &pb.ParseAppServicesReq{ + AppID: app.AppID, + Values: values, + }) + if err != nil { + return nil, err + } + + var appServices []*model.AppService + for _, service := range services.Services { + svc := &model.AppService{ + ServiceName: service.Name, + Address: service.Address, + } + + for _, port := range service.TcpPorts { + svc.TCPPorts = append(svc.TCPPorts, port) + } + + appServices = append(appServices, svc) + } + + return appServices, nil +} + func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, values string) error { ctx1, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() @@ -398,6 +432,8 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli services = append(services, svc) } + sort.Sort(model.ByServiceName(services)) + return services, nil } diff --git a/api/model/app.go b/api/model/app.go index cb4cb0390..57717f3ca 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -34,6 +34,14 @@ type AppService struct { Pods []*AppPod `json:"pods"` } +// ByServiceName implements sort.Interface for []*AppService based on +// the ServiceName field. +type ByServiceName []*AppService + +func (a ByServiceName) Len() int { return len(a) } +func (a ByServiceName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a ByServiceName) Less(i, j int) bool { return a[i].ServiceName < a[j].ServiceName } + type AppPod struct { PodName string `json:"pod_name"` PodStatus string `json:"pod_status"` diff --git a/api/model/model.go b/api/model/model.go index f1632a981..bf405999e 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1705,6 +1705,11 @@ type InstallAppReq struct { Values string `json:"values"` } +// ParseAppServicesReq - +type ParseAppServicesReq struct { + Values string `json:"values"` +} + // ConfigGroupService - type ConfigGroupService struct { AppID string `json:"app_id"` diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 6b9ccd8db..203bb04e8 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -79,9 +79,8 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { appStore := helmApp.Spec.AppStore app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, - helmApp.Spec.TemplateName, appStore.Name, helmApp.Spec.Version, - helmApp.Spec.Values, - c.repoFile, c.repoCache) + helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Values, + appStore.Name, appStore.URL, c.repoFile, c.repoCache) if err != nil { return err diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go index 188a64514..8d1b19ea8 100644 --- a/worker/controllers/helmapp/finilizer.go +++ b/worker/controllers/helmapp/finilizer.go @@ -56,9 +56,9 @@ func (c *Finalizer) run(obj interface{}) error { appStore := helmApp.Spec.AppStore app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, - helmApp.Spec.TemplateName, appStore.Name, helmApp.Spec.Version, + helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Values, - c.repoFile, c.repoCache) + appStore.Name, appStore.URL, c.repoFile, c.repoCache) if err != nil { return err } diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index 3a639864a..2c92d69ed 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -7,6 +7,7 @@ import ( "os" "path" "path/filepath" + "sigs.k8s.io/yaml" "github.com/goodrain/rainbond/util/commonutil" "github.com/pkg/errors" @@ -19,12 +20,12 @@ import ( "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/yaml" ) type App struct { templateName string repo string + repoURL string name string namespace string version string @@ -41,7 +42,7 @@ func (a *App) Chart() string { return a.repo + "/" + a.templateName } -func NewApp(name, namespace, templateName, repo string, version, values, repoFile, repoCache string) (*App, error) { +func NewApp(name, namespace, templateName, version, values, repo, repoURL, repoFile, repoCache string) (*App, error) { configFlags := genericclioptions.NewConfigFlags(true) configFlags.Namespace = commonutil.String(namespace) kubeClient := kube.New(configFlags) @@ -56,6 +57,7 @@ func NewApp(name, namespace, templateName, repo string, version, values, repoFil namespace: namespace, templateName: templateName, repo: repo, + repoURL: repoURL, version: version, encodedValues: values, helm: helm, @@ -108,6 +110,15 @@ func (a *App) Status() (string, error) { func (a *App) InstallOrUpdate() error { _, err := a.helm.Status(a.name) + if err != nil && !errors.Is(err, driver.ErrReleaseNotFound) { + return err + } + + repo := NewRepo(a.helm.repoFile, a.helm.repoCache) + if err := repo.Add(a.repo, a.repoURL, "", ""); err != nil { + return err + } + if errors.Is(err, driver.ErrReleaseNotFound) { b, err := base64.StdEncoding.DecodeString(a.encodedValues) if err != nil { @@ -128,6 +139,7 @@ func (a *App) InstallOrUpdate() error { return nil } + // TODO: upgrade return nil } diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index f1fddb424..41cbde926 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -50,7 +50,7 @@ func (s *Status) getPhase() v1alpha1.HelmAppStatusPhase { if s.values != "" { phase = v1alpha1.HelmAppStatusPhaseInstalling } - if s.values == s.CurrentValues { + if s.values != "" && s.values == s.CurrentValues { phase = v1alpha1.HelmAppStatusPhaseInstalled } return phase From 70cceb2337dea57d64a81bb7dee148e682b86de5 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 23 Apr 2021 11:35:54 +0800 Subject: [PATCH 23/65] use full name instead of name --- api/handler/application_handler.go | 7 ++++--- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 7 +++++++ worker/controllers/helmapp/controlloop.go | 2 +- worker/controllers/helmapp/finilizer.go | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index a6930a3d5..f826bb0a5 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -117,9 +117,10 @@ func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Appl Version: app.Version, Revision: commonutil.Int32(0), AppStore: &v1alpha1.HelmAppStore{ - Version: "", // TODO: setup version. - Name: app.AppStoreName, - URL: app.AppStoreURL, + Version: "", // TODO: setup version. + EnterpriseID: app.EID, + Name: app.AppStoreName, + URL: app.AppStoreURL, }, }} diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 8b95cdca1..d77dd798a 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -140,6 +140,8 @@ type HelmAppStore struct { // The verision of the helm app store. Version string `json:"version"` + EnterpriseID string `json:"enterpriseID"` + Name string `json:"name"` // The url of helm repo, sholud be a helm native repo url or a git url. @@ -153,6 +155,11 @@ type HelmAppStore struct { Password string `json:"password,omitempty"` } +// FullName returns the full name of the app store. +func (in *HelmAppStore) FullName() string { + return in.EnterpriseID + "-" + in.Name +} + // HelmAppStatus defines the observed state of HelmApp type HelmAppStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 203bb04e8..e59767e4f 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -80,7 +80,7 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { appStore := helmApp.Spec.AppStore app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Values, - appStore.Name, appStore.URL, c.repoFile, c.repoCache) + appStore.FullName(), appStore.URL, c.repoFile, c.repoCache) if err != nil { return err diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go index 8d1b19ea8..9094d7e7d 100644 --- a/worker/controllers/helmapp/finilizer.go +++ b/worker/controllers/helmapp/finilizer.go @@ -58,7 +58,7 @@ func (c *Finalizer) run(obj interface{}) error { app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Values, - appStore.Name, appStore.URL, c.repoFile, c.repoCache) + appStore.FullName(), appStore.URL, c.repoFile, c.repoCache) if err != nil { return err } From 6932658f41daea86842e61c2bea1a67d84842633 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 23 Apr 2021 14:30:46 +0800 Subject: [PATCH 24/65] open inner port --- api/controller/resources.go | 5 +++-- api/handler/gateway_action.go | 32 +++++++++++++++++++++++--------- api/handler/gateway_handler.go | 12 +++++++++++- api/handler/service.go | 26 ++++++++++++++++++++++++++ worker/discover/model/model.go | 1 - worker/server/server.go | 2 +- 6 files changed, 64 insertions(+), 14 deletions(-) diff --git a/api/controller/resources.go b/api/controller/resources.go index 98319482b..5b7caa5e5 100644 --- a/api/controller/resources.go +++ b/api/controller/resources.go @@ -680,6 +680,7 @@ func (t *TenantStruct) CreateService(w http.ResponseWriter, r *http.Request) { if err := handler.GetServiceManager().ServiceCreate(&ss); err != nil { if strings.Contains(err.Error(), "is exist in tenant") { httputil.ReturnError(r, w, 400, fmt.Sprintf("create service error, %v", err)) + return } httputil.ReturnError(r, w, 500, fmt.Sprintf("create service error, %v", err)) return @@ -1525,7 +1526,7 @@ func (t *TenantStruct) PortOuterController(w http.ResponseWriter, r *http.Reques rc["port"] = fmt.Sprintf("%v", vsPort.Port) } - if err := handler.GetGatewayHandler().SendTask(map[string]interface{}{ + if err := handler.GetGatewayHandler().SendTaskDeprecated(map[string]interface{}{ "service_id": serviceID, "action": "port-" + data.Body.Operation, "port": containerPort, @@ -1584,7 +1585,7 @@ func (t *TenantStruct) PortInnerController(w http.ResponseWriter, r *http.Reques } } - if err := handler.GetGatewayHandler().SendTask(map[string]interface{}{ + if err := handler.GetGatewayHandler().SendTaskDeprecated(map[string]interface{}{ "service_id": serviceID, "action": "port-" + data.Body.Operation, "port": containerPort, diff --git a/api/handler/gateway_action.go b/api/handler/gateway_action.go index 086185fd9..032c294cf 100644 --- a/api/handler/gateway_action.go +++ b/api/handler/gateway_action.go @@ -34,6 +34,7 @@ import ( "github.com/goodrain/rainbond/mq/client" "github.com/goodrain/rainbond/util" "github.com/jinzhu/gorm" + "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -118,7 +119,7 @@ func (g *GatewayAction) AddHTTPRule(req *apimodel.AddHTTPRuleStruct) error { return fmt.Errorf("commit transaction: %v", err) } // Effective immediately - if err := g.SendTask(map[string]interface{}{ + if err := g.SendTaskDeprecated(map[string]interface{}{ "service_id": req.ServiceID, "action": "add-http-rule", "limit": map[string]string{"domain": req.Domain}, @@ -213,7 +214,7 @@ func (g *GatewayAction) UpdateHTTPRule(req *apimodel.UpdateHTTPRuleStruct) error return err } - if err := g.SendTask(map[string]interface{}{ + if err := g.SendTaskDeprecated(map[string]interface{}{ "service_id": rule.ServiceID, "action": "update-http-rule", "limit": map[string]string{"domain": req.Domain}, @@ -263,7 +264,7 @@ func (g *GatewayAction) DeleteHTTPRule(req *apimodel.DeleteHTTPRuleStruct) error return err } - if err := g.SendTask(map[string]interface{}{ + if err := g.SendTaskDeprecated(map[string]interface{}{ "service_id": svcID, "action": "delete-http-rule", "limit": map[string]string{"domain": httpRule.Domain}, @@ -365,7 +366,7 @@ func (g *GatewayAction) AddTCPRule(req *apimodel.AddTCPRuleStruct) error { if err := tx.Commit().Error; err != nil { return err } - if err := g.SendTask(map[string]interface{}{ + if err := g.SendTaskDeprecated(map[string]interface{}{ "service_id": tcpRule.ServiceID, "action": "add-tcp-rule", "limit": map[string]string{"tcp-address": fmt.Sprintf("%s:%d", tcpRule.IP, tcpRule.Port)}, @@ -434,7 +435,7 @@ func (g *GatewayAction) UpdateTCPRule(req *apimodel.UpdateTCPRuleStruct, minPort logrus.Debugf("TCP rule id: %s;error end transaction %v", tcpRule.UUID, err) return err } - if err := g.SendTask(map[string]interface{}{ + if err := g.SendTaskDeprecated(map[string]interface{}{ "service_id": tcpRule.ServiceID, "action": "update-tcp-rule", "limit": map[string]string{"tcp-address": fmt.Sprintf("%s:%d", tcpRule.IP, tcpRule.Port)}, @@ -482,7 +483,7 @@ func (g *GatewayAction) DeleteTCPRule(req *apimodel.DeleteTCPRuleStruct) error { return err } - if err := g.SendTask(map[string]interface{}{ + if err := g.SendTaskDeprecated(map[string]interface{}{ "service_id": tcpRule.ServiceID, "action": "delete-tcp-rule", "limit": map[string]string{"tcp-address": fmt.Sprintf("%s:%d", tcpRule.IP, tcpRule.Port)}, @@ -597,7 +598,7 @@ func (g *GatewayAction) TCPIPPortExists(host string, port int) bool { } // SendTask sends apply rules task -func (g *GatewayAction) SendTask(in map[string]interface{}) error { +func (g *GatewayAction) SendTaskDeprecated(in map[string]interface{}) error { sid := in["service_id"].(string) service, err := db.GetManager().TenantServiceDao().GetServiceByID(sid) if err != nil { @@ -619,6 +620,19 @@ func (g *GatewayAction) SendTask(in map[string]interface{}) error { return nil } +// SendTask sends apply rules task +func (g *GatewayAction) SendTask(task *ComponentIngressTask) error { + err := g.mqclient.SendBuilderTopic(client.TaskStruct{ + Topic: client.WorkerTopic, + TaskType: "apply_rule", + TaskBody: task, + }) + if err != nil { + return errors.WithMessage(err, "send gateway task") + } + return nil +} + // RuleConfig - func (g *GatewayAction) RuleConfig(req *apimodel.RuleConfigReq) error { var configs []*model.GwRuleConfig @@ -699,7 +713,7 @@ func (g *GatewayAction) RuleConfig(req *apimodel.RuleConfigReq) error { return err } - if err := g.SendTask(map[string]interface{}{ + if err := g.SendTaskDeprecated(map[string]interface{}{ "service_id": req.ServiceID, "action": "update-rule-config", "event_id": req.EventID, @@ -750,7 +764,7 @@ func (g *GatewayAction) UpdCertificate(req *apimodel.UpdCertificateReq) error { for _, rule := range rules { eventID := util.NewUUID() - if err := g.SendTask(map[string]interface{}{ + if err := g.SendTaskDeprecated(map[string]interface{}{ "service_id": rule.ServiceID, "action": "update-rule-config", "event_id": eventID, diff --git a/api/handler/gateway_handler.go b/api/handler/gateway_handler.go index b785c5221..a4628244f 100644 --- a/api/handler/gateway_handler.go +++ b/api/handler/gateway_handler.go @@ -24,6 +24,14 @@ import ( "github.com/jinzhu/gorm" ) +// ComponentIngressTask - +type ComponentIngressTask struct { + ComponentID string `json:"service_id"` + Action string `json:"action"` + Port int `json:"port"` + IsInner bool `json:"is_inner"` +} + //GatewayHandler gateway api handler type GatewayHandler interface { AddHTTPRule(req *apimodel.AddHTTPRuleStruct) error @@ -41,7 +49,9 @@ type GatewayHandler interface { AddRuleExtensions(ruleID string, ruleExtensions []*apimodel.RuleExtensionStruct, tx *gorm.DB) error GetAvailablePort(ip string) (int, error) TCPIPPortExists(ip string, port int) bool - SendTask(in map[string]interface{}) error + // Deprecated. + SendTaskDeprecated(in map[string]interface{}) error + SendTask(task *ComponentIngressTask) error RuleConfig(req *apimodel.RuleConfigReq) error UpdCertificate(req *apimodel.UpdCertificateReq) error GetGatewayIPs() []IPAndAvailablePort diff --git a/api/handler/service.go b/api/handler/service.go index 0e29ecaa9..a04e82ac2 100644 --- a/api/handler/service.go +++ b/api/handler/service.go @@ -40,6 +40,7 @@ import ( "github.com/goodrain/rainbond/cmd/api/option" "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/event" + "github.com/goodrain/rainbond/util/commonutil" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/discover/model" "github.com/goodrain/rainbond/worker/server" @@ -750,9 +751,34 @@ func (s *ServiceAction) ServiceCreate(sc *api_model.ServiceStruct) error { return err } logrus.Debugf("create a new app %s success", ts.ServiceAlias) + + if sc.Kind == dbmodel.ServiceKindThirdParty.String() { + s.openInnerPorts(ts.ServiceID, ports) + } + return nil } +func (s *ServiceAction) openInnerPorts(componentID string, ports []dbmodel.TenantServicesPort) { + // TODO: support open multiple ports in one task. + for _, port := range ports { + if !commonutil.BoolValue(port.IsInnerService) { + continue + } + + logrus.Infof("component: %s; port: %d; open inner ports", componentID, port.ContainerPort) + task := &ComponentIngressTask{ + ComponentID: componentID, + Action: "port-open", + Port: port.ContainerPort, + IsInner: true, + } + if err := GetGatewayHandler().SendTask(task); err != nil { + logrus.Warningf("send runtime message about gateway failure %s", err.Error()) + } + } +} + //ServiceUpdate update service func (s *ServiceAction) ServiceUpdate(sc map[string]interface{}) error { ts, err := db.GetManager().TenantServiceDao().GetServiceByID(sc["service_id"].(string)) diff --git a/worker/discover/model/model.go b/worker/discover/model/model.go index 8136a585d..3b61fcb35 100644 --- a/worker/discover/model/model.go +++ b/worker/discover/model/model.go @@ -306,7 +306,6 @@ type GroupStartTaskBody struct { // ApplyRuleTaskBody contains information for ApplyRuleTask type ApplyRuleTaskBody struct { ServiceID string `json:"service_id"` - DeployVersion string `json:"deploy_version"` EventID string `json:"event_id"` ServiceKind string `json:"service_kind"` Action string `json:"action"` diff --git a/worker/server/server.go b/worker/server/server.go index 790c13994..3e8f561b1 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -726,7 +726,7 @@ func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppSer if port.Protocol == corev1.ProtocolUDP { udpPorts = append(udpPorts, port.Port) } - if port.Protocol == corev1.ProtocolTCP { + if port.Protocol == corev1.ProtocolTCP || port.Protocol == "" { tcpPorts = append(tcpPorts, port.Port) } } From 913882c89ec1b8d5abedf6cb5cc235eca25da5c5 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Mon, 26 Apr 2021 14:51:23 +0800 Subject: [PATCH 25/65] update helm app --- api/controller/application.go | 2 +- api/handler/application_handler.go | 54 ++- api/model/app.go | 4 +- api/model/model.go | 1 + pkg/apis/rainbond/v1alpha1/helmapp_types.go | 15 +- worker/controllers/helmapp/controlloop.go | 2 +- worker/controllers/helmapp/finilizer.go | 2 +- worker/controllers/helmapp/helm/app.go | 63 ++-- worker/controllers/helmapp/helm/helm.go | 79 +++-- worker/controllers/helmapp/helm/repo.go | 6 +- worker/controllers/helmapp/helm/repo_test.go | 2 +- worker/server/pb/app_runtime_server.pb.go | 329 ++++++++++--------- worker/server/pb/app_runtime_server.proto | 2 + worker/server/server.go | 6 +- 14 files changed, 333 insertions(+), 234 deletions(-) diff --git a/api/controller/application.go b/api/controller/application.go index 2763a1bb5..a78ea65d1 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -83,7 +83,7 @@ func (a *ApplicationController) UpdateApp(w http.ResponseWriter, r *http.Request app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) // update app - app, err := handler.GetApplicationHandler().UpdateApp(app, updateAppReq) + app, err := handler.GetApplicationHandler().UpdateApp(r.Context(), app, updateAppReq) if err != nil { httputil.ReturnBcodeError(r, w, err) return diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index f826bb0a5..fb6c718e4 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -38,7 +38,7 @@ type ApplicationAction struct { type ApplicationHandler interface { CreateApp(ctx context.Context, req *model.Application) (*model.Application, error) BatchCreateApp(ctx context.Context, req *model.CreateAppRequest, tenantID string) ([]model.CreateAppResponse, error) - UpdateApp(srcApp *dbmodel.Application, req model.UpdateAppRequest) (*dbmodel.Application, error) + UpdateApp(ctx context.Context, app *dbmodel.Application, req model.UpdateAppRequest) (*dbmodel.Application, error) ListApps(tenantID, appName string, page, pageSize int) (*model.ListAppResponse, error) GetAppByID(appID string) (*dbmodel.Application, error) BatchBindService(appID string, req model.BindServiceRequest) error @@ -118,7 +118,6 @@ func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Appl Revision: commonutil.Int32(0), AppStore: &v1alpha1.HelmAppStore{ Version: "", // TODO: setup version. - EnterpriseID: app.EID, Name: app.AppStoreName, URL: app.AppStoreURL, }, @@ -154,20 +153,44 @@ func (a *ApplicationAction) BatchCreateApp(ctx context.Context, apps *model.Crea } // UpdateApp - -func (a *ApplicationAction) UpdateApp(srcApp *dbmodel.Application, req model.UpdateAppRequest) (*dbmodel.Application, error) { +func (a *ApplicationAction) UpdateApp(ctx context.Context, app *dbmodel.Application, req model.UpdateAppRequest) (*dbmodel.Application, error) { if req.AppName != "" { - srcApp.AppName = req.AppName + app.AppName = req.AppName } if req.GovernanceMode != "" { if !dbmodel.IsGovernanceModeValid(req.GovernanceMode) { return nil, bcode.NewBadRequest(fmt.Sprintf("governance mode '%s' is valid", req.GovernanceMode)) } - srcApp.GovernanceMode = req.GovernanceMode + app.GovernanceMode = req.GovernanceMode } - if err := db.GetManager().ApplicationDao().UpdateModel(srcApp); err != nil { - return nil, err - } - return srcApp, nil + + err := db.GetManager().DB().Transaction(func(tx *gorm.DB) error { + if err := db.GetManager().ApplicationDao().UpdateModel(app); err != nil { + return err + } + + if req.Values != "" { + ctx, cancel := context.WithTimeout(ctx, 5 * time.Second) + defer cancel() + helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(ctx, app.AppName, metav1.GetOptions{}) + if err != nil { + if k8sErrors.IsNotFound(err) { + return errors.Wrap(bcode.ErrApplicationNotFound, "update app") + } + return errors.Wrap(err, "update app") + } + if helmApp.Spec.Values == req.Values { + return nil + } + helmApp.Spec.Values = req.Values + _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(ctx, helmApp, metav1.UpdateOptions{}) + return err + } + + return nil + }) + + return app, err } // ListApps - @@ -315,10 +338,19 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat diskUsage := a.getDiskUsage(app.AppID) + var cpu *int64 + if status.SetCPU { + cpu = commonutil.Int64(status.Cpu) + } + var memory *int64 + if status.SetMemory { + memory = commonutil.Int64(status.Memory) + } + res := &model.AppStatus{ Status: status.Status, - Cpu: status.Cpu, - Memory: status.Memory, + Cpu: cpu, + Memory: memory, Disk: int64(diskUsage), Phase: status.Phase, ValuesTemplate: status.ValuesTemplate, diff --git a/api/model/app.go b/api/model/app.go index 57717f3ca..c357c92c0 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -11,8 +11,8 @@ type AppPort struct { // AppStatus - type AppStatus struct { Status string `json:"status"` - Cpu int64 `json:"cpu"` - Memory int64 `json:"memory"` + Cpu *int64 `json:"cpu"` + Memory *int64 `json:"memory"` Disk int64 `json:"disk"` Phase string `json:"phase"` ValuesTemplate string `json:"valuesTemplate"` diff --git a/api/model/model.go b/api/model/model.go index bf405999e..bfbce0283 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1693,6 +1693,7 @@ type ListServiceResponse struct { type UpdateAppRequest struct { AppName string `json:"app_name"` GovernanceMode string `json:"governance_mode"` + Values string `json:"values"` } // BindServiceRequest - diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index d77dd798a..b989ff54b 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -135,13 +135,19 @@ type HelmAppSpec struct { AppStore *HelmAppStore `json:"appStore"` } +// FullName returns the full name of the app store. +func (in *HelmAppSpec) FullName() string { + if in.AppStore == nil { + return "" + } + return in.EID + "-" + in.AppStore.Name +} + // HelmAppStore represents a helm repo. type HelmAppStore struct { // The verision of the helm app store. Version string `json:"version"` - EnterpriseID string `json:"enterpriseID"` - Name string `json:"name"` // The url of helm repo, sholud be a helm native repo url or a git url. @@ -155,11 +161,6 @@ type HelmAppStore struct { Password string `json:"password,omitempty"` } -// FullName returns the full name of the app store. -func (in *HelmAppStore) FullName() string { - return in.EnterpriseID + "-" + in.Name -} - // HelmAppStatus defines the observed state of HelmApp type HelmAppStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index e59767e4f..67699c1bd 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -80,7 +80,7 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { appStore := helmApp.Spec.AppStore app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Values, - appStore.FullName(), appStore.URL, c.repoFile, c.repoCache) + helmApp.Spec.FullName(), appStore.URL, c.repoFile, c.repoCache) if err != nil { return err diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go index 9094d7e7d..98da7c2dd 100644 --- a/worker/controllers/helmapp/finilizer.go +++ b/worker/controllers/helmapp/finilizer.go @@ -58,7 +58,7 @@ func (c *Finalizer) run(obj interface{}) error { app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Values, - appStore.FullName(), appStore.URL, c.repoFile, c.repoCache) + helmApp.Spec.FullName(), appStore.URL, c.repoFile, c.repoCache) if err != nil { return err } diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index 2c92d69ed..14cec7a34 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -24,7 +24,7 @@ import ( type App struct { templateName string - repo string + repoName string repoURL string name string namespace string @@ -34,38 +34,45 @@ type App struct { encodedValues string helm *Helm + repo *Repo builder *resource.Builder } func (a *App) Chart() string { - return a.repo + "/" + a.templateName + return a.repoName + "/" + a.templateName } -func NewApp(name, namespace, templateName, version, values, repo, repoURL, repoFile, repoCache string) (*App, error) { +func NewApp(name, namespace, templateName, version, values, repoName, repoURL, repoFile, repoCache string) (*App, error) { configFlags := genericclioptions.NewConfigFlags(true) configFlags.Namespace = commonutil.String(namespace) kubeClient := kube.New(configFlags) - helm, err := NewHelm(kubeClient, configFlags, repoFile, repoCache) + helm, err := NewHelm(kubeClient, configFlags, namespace, repoFile, repoCache) if err != nil { return nil, err } + repo := NewRepo(repoFile, repoCache) return &App{ name: name, namespace: namespace, templateName: templateName, - repo: repo, + repoName: repoName, repoURL: repoURL, version: version, encodedValues: values, helm: helm, + repo: repo, chartDir: path.Join("/tmp/helm/chart", namespace, name, version), }, nil } func (a *App) Pull() error { + if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { + return err + } + client := action.NewPull() settings := cli.New() settings.RepositoryConfig = a.helm.repoFile @@ -88,12 +95,16 @@ func (a *App) Pull() error { } func (a *App) chart() string { - return a.repo + "/" + a.templateName + return a.repoName + "/" + a.templateName } func (a *App) PreInstall() error { + if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { + return err + } + var buf bytes.Buffer - if err := a.helm.PreInstall(a.name, a.namespace, a.Chart(), &buf); err != nil { + if err := a.helm.PreInstall(a.name, a.Chart(), &buf); err != nil { return err } logrus.Infof("pre install: %s", buf.String()) @@ -109,39 +120,35 @@ func (a *App) Status() (string, error) { } func (a *App) InstallOrUpdate() error { - _, err := a.helm.Status(a.name) + if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { + return err + } + + b, err := base64.StdEncoding.DecodeString(a.encodedValues) + if err != nil { + return errors.Wrap(err, "decode values") + } + values := map[string]interface{}{} + if err := yaml.Unmarshal(b, &values); err != nil { + return errors.Wrap(err, "parse values") + } + + _, err = a.helm.Status(a.name) if err != nil && !errors.Is(err, driver.ErrReleaseNotFound) { return err } - repo := NewRepo(a.helm.repoFile, a.helm.repoCache) - if err := repo.Add(a.repo, a.repoURL, "", ""); err != nil { - return err - } - if errors.Is(err, driver.ErrReleaseNotFound) { - b, err := base64.StdEncoding.DecodeString(a.encodedValues) - if err != nil { - return errors.Wrap(err, "decode values") - } - - values := map[string]interface{}{} - if err := yaml.Unmarshal(b, &values); err != nil { - return errors.Wrap(err, "parse values") - } - - var buf bytes.Buffer logrus.Debugf("name: %s; namespace: %s; chart: %s; install helm app", a.name, a.namespace, a.Chart()) - if err := a.helm.Install(a.name, a.namespace, a.Chart(), values, &buf); err != nil { + if err := a.helm.Install(a.name, a.Chart(), values); err != nil { return err } - logrus.Infof("[App] [InstallOrUpdate] %s", buf.String()) return nil } - // TODO: upgrade - return nil + logrus.Debugf("name: %s; namespace: %s; chart: %s; upgrade helm app", a.name, a.namespace, a.Chart()) + return a.helm.Upgrade(a.name, a.chart(), values) } func (a *App) ParseChart() (string, string, error) { diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index e279c318e..8578b8ba0 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -2,6 +2,8 @@ package helm import ( "io" + "io/ioutil" + "unsafe" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -17,14 +19,16 @@ import ( ) type Helm struct { - cfg *action.Configuration + cfg *action.Configuration + settings *cli.EnvSettings + namespace string repoFile string repoCache string } // NewHelm creates a new helm. -func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFlags, repoFile, repoCache string) (*Helm, error) { +func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFlags, namespace, repoFile, repoCache string) (*Helm, error) { cfg := &action.Configuration{ KubeClient: kubeClient, Log: func(s string, i ...interface{}) { @@ -34,6 +38,12 @@ func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFla } helmDriver := "" settings := cli.New() + // set namespace + namespacePtr := (*string)(unsafe.Pointer(settings)) + *namespacePtr = namespace + settings.RepositoryConfig = repoFile + settings.RepositoryCache = repoCache + // initializes the action configuration if err := cfg.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, func(format string, v ...interface{}) { logrus.Debugf(format, v) }); err != nil { @@ -41,48 +51,45 @@ func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFla } return &Helm{ cfg: cfg, + settings: settings, + namespace: namespace, repoFile: repoFile, repoCache: repoCache, }, nil } -func (h *Helm) PreInstall(name, namespace, chart string, out io.Writer) error { - _, err := h.install(name, namespace, chart, nil, true, out) +func (h *Helm) PreInstall(name, chart string, out io.Writer) error { + _, err := h.install(name, chart, nil, true, out) return err } -func (h *Helm) Install(name, namespace, chart string, vals map[string]interface{}, out io.Writer) error { - // TODO: discard the output - _, err := h.install(name, namespace, chart, vals, false, out) +func (h *Helm) Install(name, chart string, vals map[string]interface{}) error { + _, err := h.install(name, chart, vals, false, ioutil.Discard) return err } -func (h *Helm) Manifests(name, namespace, chart string, vals map[string]interface{}, out io.Writer) (string, error) { - rel, err := h.install(name, namespace, chart, vals, true, out) +func (h *Helm) Manifests(name, chart string, vals map[string]interface{}, out io.Writer) (string, error) { + rel, err := h.install(name, chart, vals, true, out) if err != nil { return "", err } return rel.Manifest, nil } -func (h *Helm) install(name, namespace, chart string, vals map[string]interface{}, dryRun bool, out io.Writer) (*release.Release, error) { +func (h *Helm) install(name, chart string, vals map[string]interface{}, dryRun bool, out io.Writer) (*release.Release, error) { client := action.NewInstall(h.cfg) client.ReleaseName = name - client.Namespace = namespace + client.Namespace = h.namespace client.DryRun = dryRun - settings := cli.New() - settings.RepositoryCache = h.repoCache - settings.RepositoryConfig = h.repoFile - - cp, err := client.ChartPathOptions.LocateChart(chart, settings) + cp, err := client.ChartPathOptions.LocateChart(chart, h.settings) if err != nil { return nil, err } logrus.Debugf("CHART PATH: %s\n", cp) - p := getter.All(settings) + p := getter.All(h.settings) // Check chart dependencies to make sure all are present in /charts chartRequested, err := loader.Load(cp) @@ -110,16 +117,16 @@ func (h *Helm) install(name, namespace, chart string, vals map[string]interface{ Keyring: client.ChartPathOptions.Keyring, SkipUpdate: false, Getters: p, - RepositoryConfig: settings.RepositoryConfig, - RepositoryCache: settings.RepositoryCache, - Debug: settings.Debug, + RepositoryConfig: h.settings.RepositoryConfig, + RepositoryCache: h.settings.RepositoryCache, + Debug: h.settings.Debug, } if err := man.Update(); err != nil { return nil, err } // Reload the chart with the updated Chart.lock file. if chartRequested, err = loader.Load(cp); err != nil { - return nil, errors.Wrap(err, "failed reloading chart after repo update") + return nil, errors.Wrap(err, "failed reloading chart after repoName update") } } else { return nil, err @@ -130,6 +137,36 @@ func (h *Helm) install(name, namespace, chart string, vals map[string]interface{ return client.Run(chartRequested, vals) } +func (h *Helm) Upgrade(name string, chart string, vals map[string]interface{}) error { + client := action.NewUpgrade(h.cfg) + client.Namespace = h.namespace + + chartPath, err := client.ChartPathOptions.LocateChart(chart, h.settings) + if err != nil { + return err + } + + // Check chart dependencies to make sure all are present in /charts + ch, err := loader.Load(chartPath) + if err != nil { + return err + } + if req := ch.Metadata.Dependencies; req != nil { + if err := action.CheckDependencies(ch, req); err != nil { + return err + } + } + + if ch.Metadata.Deprecated { + logrus.Warningf("This chart is deprecated") + } + + upgrade := action.NewUpgrade(h.cfg) + upgrade.Namespace = h.namespace + _, err = upgrade.Run(name, ch, vals) + return err +} + func (h *Helm) Status(name string) (*release.Release, error) { // helm status RELEASE_NAME [flags] client := action.NewStatus(h.cfg) diff --git a/worker/controllers/helmapp/helm/repo.go b/worker/controllers/helmapp/helm/repo.go index a706408d5..c94e7d665 100644 --- a/worker/controllers/helmapp/helm/repo.go +++ b/worker/controllers/helmapp/helm/repo.go @@ -51,7 +51,7 @@ func (o *Repo) Add(name, url, username, password string) error { } s := buf.String() - logrus.Infof("add repo: %s", s) + logrus.Debugf("add repo: %s", s) return nil } @@ -60,7 +60,7 @@ func (o *Repo) add(out io.Writer, name, url, username, password string) error { // Block deprecated repos for oldURL, newURL := range deprecatedRepos { if strings.Contains(url, oldURL) { - return fmt.Errorf("repo %q is no longer available; try %q instead", url, newURL) + return fmt.Errorf("repoName %q is no longer available; try %q instead", url, newURL) } } @@ -100,7 +100,7 @@ func (o *Repo) add(out io.Writer, name, url, username, password string) error { InsecureSkipTLSverify: o.insecureSkipTLSverify, } - // If the repo exists do one of two things: + // If the repoName exists do one of two things: // 1. If the configuration for the templateName is the same continue without error // 2. When the config is different require --force-update if !o.forceUpdate && f.Has(name) { diff --git a/worker/controllers/helmapp/helm/repo_test.go b/worker/controllers/helmapp/helm/repo_test.go index 432929fc6..a8398551a 100644 --- a/worker/controllers/helmapp/helm/repo_test.go +++ b/worker/controllers/helmapp/helm/repo_test.go @@ -8,7 +8,7 @@ import ( func TestRepoAdd(t *testing.T) { repo := NewRepo( - "/tmp/helm/repo/repositories.yaml", + "/tmp/helm/repoName/repositories.yaml", "/tmp/helm/cache") err := repo.Add(util.NewUUID(), "https://openchart.goodrain.com/goodrain/rainbond", "", "") assert.Nil(t, err) diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 5e0a6de2e..49ee1b628 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -1939,6 +1939,8 @@ type AppStatus struct { Phase string `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` ValuesTemplate string `protobuf:"bytes,5,opt,name=valuesTemplate,proto3" json:"valuesTemplate,omitempty"` Readme string `protobuf:"bytes,6,opt,name=readme,proto3" json:"readme,omitempty"` + SetCPU bool `protobuf:"varint,7,opt,name=setCPU,proto3" json:"setCPU,omitempty"` + SetMemory bool `protobuf:"varint,8,opt,name=setMemory,proto3" json:"setMemory,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2011,6 +2013,20 @@ func (m *AppStatus) GetReadme() string { return "" } +func (m *AppStatus) GetSetCPU() bool { + if m != nil { + return m.SetCPU + } + return false +} + +func (m *AppStatus) GetSetMemory() bool { + if m != nil { + return m.SetMemory + } + return false +} + type AppDetectCondition struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready,omitempty"` @@ -2369,162 +2385,163 @@ func init() { func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2468 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x5f, 0x73, 0xdb, 0xc6, - 0x11, 0x17, 0x49, 0xf1, 0xdf, 0x52, 0xa2, 0xa8, 0xd3, 0x3f, 0x86, 0x89, 0x63, 0x07, 0xb5, 0x3d, - 0x1e, 0x3b, 0x55, 0x6c, 0x35, 0x6e, 0xec, 0xc4, 0x75, 0x87, 0x16, 0x19, 0x99, 0x2d, 0x45, 0x71, - 0x40, 0xaa, 0x9d, 0xcc, 0x74, 0x86, 0x03, 0x11, 0x17, 0x19, 0x35, 0xfe, 0x5c, 0x00, 0x50, 0x29, - 0x1f, 0xdb, 0xaf, 0xd0, 0x8f, 0xd0, 0x87, 0x3e, 0xb4, 0x8f, 0x7d, 0xce, 0x4c, 0x3f, 0x40, 0xa7, - 0x1f, 0x25, 0x2f, 0x7d, 0xe9, 0x5b, 0x67, 0xef, 0x0e, 0xc0, 0x01, 0x84, 0xec, 0xba, 0xd3, 0x4e, - 0xdf, 0xb0, 0x7b, 0xbb, 0xb7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, 0xf9, 0x55, 0x0b, 0xb4, 0x7f, 0x14, 0x60, 0x63, 0xec, 0x99, 0x09, 0x3a, 0xdc, - 0x85, 0xb2, 0xe5, 0x60, 0x04, 0x64, 0xd3, 0xc9, 0x09, 0xe4, 0x72, 0x1c, 0x16, 0x5d, 0x38, 0x9c, - 0x50, 0xe2, 0x58, 0xca, 0xc6, 0x91, 0x63, 0x2e, 0x6a, 0x46, 0x80, 0x5b, 0x92, 0x78, 0x4d, 0xf0, - 0xfb, 0x61, 0x26, 0x2e, 0x06, 0x19, 0xb3, 0x06, 0xe7, 0x9d, 0x72, 0x16, 0xa6, 0xbe, 0x10, 0x99, - 0xb3, 0x85, 0xc4, 0xde, 0x35, 0xce, 0x38, 0x66, 0x0b, 0xbc, 0x8d, 0xe4, 0x35, 0x14, 0xcd, 0x50, - 0x15, 0xd8, 0x55, 0x72, 0xe5, 0x1c, 0x37, 0x11, 0xce, 0x08, 0x31, 0x9c, 0xa5, 0x26, 0x70, 0xa2, - 0x64, 0x1d, 0xb3, 0x85, 0xf6, 0x77, 0x91, 0x37, 0x22, 0xb3, 0x31, 0x3b, 0x15, 0x1c, 0xcc, 0xbf, - 0x39, 0xcf, 0x33, 0xa3, 0x05, 0xf3, 0xef, 0x0c, 0xba, 0x2c, 0x65, 0xd1, 0xe5, 0x9d, 0xf8, 0x30, - 0xaf, 0x27, 0x78, 0x3c, 0x4e, 0xc0, 0xf8, 0x6c, 0x8b, 0xba, 0x50, 0x8e, 0xeb, 0xc2, 0x01, 0x54, - 0x71, 0x76, 0xec, 0x42, 0xc4, 0x72, 0x2b, 0x48, 0x0e, 0x18, 0x86, 0xf1, 0x8a, 0xfa, 0x81, 0xe5, - 0xb9, 0x72, 0x95, 0x11, 0x49, 0x9e, 0xc2, 0x96, 0xe5, 0x62, 0x88, 0x92, 0x36, 0x44, 0x40, 0xc5, - 0x96, 0x34, 0x99, 0x74, 0x01, 0x4d, 0x14, 0x4c, 0x5a, 0x09, 0xf2, 0x30, 0x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 0x8a, 0x76, 0x40, 0xea, 0x28, 0xcb, 0x7f, 0x82, 0x74, 0xf6, 0xf3, 0xbb, 0x68, - 0x6d, 0x8d, 0xbc, 0x84, 0x03, 0xfc, 0xca, 0x6b, 0x6c, 0xf2, 0x3c, 0x3f, 0xc8, 0xef, 0x6f, 0x30, - 0xf4, 0xc7, 0xb0, 0x97, 0xdb, 0x24, 0x13, 0xfe, 0x1c, 0x76, 0x6d, 0xff, 0xdc, 0x49, 0xdc, 0x14, - 0x93, 0xe4, 0x36, 0xb9, 0x62, 0x92, 0x6b, 0xfb, 0xdf, 0x95, 0x49, 0x72, 0xbb, 0x54, 0x22, 0x1f, - 0xe6, 0xec, 0x7f, 0x67, 0x92, 0x4f, 0x79, 0xf2, 0x25, 0x60, 0x95, 0xe7, 0x42, 0xa6, 0x31, 0xeb, - 0x44, 0x50, 0x53, 0x70, 0xb8, 0x16, 0xee, 0x63, 0x06, 0x91, 0x29, 0x1b, 0x41, 0xb2, 0x78, 0x88, - 0x62, 0xe8, 0x7e, 0xc6, 0xf7, 0xaf, 0xcb, 0x58, 0xea, 0xbc, 0xe5, 0xc5, 0xff, 0xc3, 0x37, 0xdf, - 0x89, 0x3c, 0x8d, 0xdf, 0xc7, 0x0d, 0x7d, 0x49, 0x6d, 0x27, 0xaf, 0xc6, 0x82, 0x3c, 0x31, 0xe8, - 0xfd, 0x41, 0x7e, 0x6d, 0x45, 0x8f, 0x1e, 0xc2, 0x16, 0xce, 0xa2, 0x96, 0x21, 0x55, 0x73, 0x2b, - 0x5d, 0x80, 0x50, 0xe3, 0x39, 0xb4, 0xb2, 0x95, 0x87, 0x70, 0x03, 0x39, 0xf5, 0x28, 0x47, 0xff, - 0xa2, 0xc2, 0xff, 0xdd, 0xfd, 0xe8, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x08, 0x53, 0x84, - 0xd7, 0x1b, 0x00, 0x00, + // 2490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08,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08, 0xc9, 0x0d, 0x80, 0x40, 0x60, + 0x12, 0xe2, 0xba, 0xc4, 0x0c, 0x4d, 0xed, 0x08, 0xb6, 0x24, 0x43, 0x10, 0x71, 0xdc, 0x84, 0x46, + 0xc2, 0x11, 0x48, 0x16, 0x88, 0x59, 0x02, 0xed, 0x63, 0xd8, 0x9c, 0x52, 0xd7, 0x70, 0xc3, 0x88, + 0xe3, 0x7d, 0xa8, 0x87, 0x1c, 0x91, 0x88, 0xa8, 0x09, 0xc4, 0xd0, 0xd4, 0x7e, 0x5b, 0x80, 0x4d, + 0xa1, 0xf7, 0x29, 0x0d, 0x02, 0xe3, 0x92, 0x92, 0xc7, 0x50, 0x09, 0x38, 0xa2, 0x5d, 0xb8, 0x55, + 0xba, 0xd7, 0x38, 0xba, 0x71, 0xc8, 0x2e, 0x0e, 0x53, 0x24, 0x12, 0x1a, 0xb8, 0xa1, 0xbf, 0xd4, + 0x25, 0x71, 0xe7, 0x29, 0x34, 0x14, 0x34, 0x69, 0x41, 0xe9, 0x35, 0x5d, 0x4a, 0x71, 0xf8, 0x49, + 0x76, 0xa1, 0x7c, 0x65, 0xd8, 0x0b, 0xda, 0x2e, 0x0a, 0x93, 0x70, 0xe0, 0xf3, 0xe2, 0x93, 0x82, + 0xb6, 0x84, 0x46, 0xdf, 0x0a, 0x5e, 0x47, 0x0a, 0x3c, 0x84, 0xb2, 0x69, 0x05, 0xaf, 0x23, 0xf9, + 0x1d, 0x94, 0xaf, 0xac, 0xf3, 0x6f, 0x29, 0x5c, 0x10, 0x76, 0x9e, 0x00, 0x24, 0xc8, 0xb7, 0x89, + 0x2e, 0xa8, 0xa2, 0x1d, 0xd8, 0x96, 0x06, 0xee, 0x32, 0x36, 0xf6, 0xcc, 0x13, 0x2b, 0x08, 0xc9, + 0x03, 0xa8, 0x7a, 0xb6, 0x39, 0xf6, 0xcc, 0x48, 0x85, 0x6d, 0x6e, 0x02, 0x95, 0x4e, 0x8f, 0x28, + 0x90, 0xd8, 0xa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02, 0x5b, 0x19, 0xfe, 0x1c, 0xcb, 0xff, 0x20, + 0x6d, 0xf9, 0x4d, 0xd4, 0x21, 0xe6, 0x52, 0x2d, 0x7e, 0x05, 0xf5, 0x18, 0x4f, 0xee, 0x40, 0x33, + 0xd6, 0x44, 0x58, 0x45, 0x6c, 0xb9, 0x19, 0x63, 0xb9, 0x6d, 0x3e, 0x82, 0x0d, 0x87, 0x3a, 0x9e, + 0xbf, 0x9c, 0xd9, 0x96, 0x63, 0x85, 0x5c, 0x46, 0x49, 0x6f, 0x08, 0xdc, 0x09, 0xa2, 0xf0, 0x14, + 0x73, 0xb6, 0x98, 0xf9, 0x22, 0x47, 0x70, 0xd3, 0x97, 0x74, 0x98, 0xb3, 0x85, 0xcc, 0x1a, 0xda, + 0xf7, 0x15, 0x80, 0xbe, 0xb8, 0x28, 0xf7, 0x6b, 0x8f, 0x7c, 0x00, 0x75, 0x94, 0x17, 0x30, 0x63, + 0x1e, 0x09, 0x4d, 0x10, 0x44, 0x83, 0x0d, 0xb4, 0x38, 0xfd, 0x7a, 0x61, 0xd3, 0x80, 0x86, 0xf2, + 0xa2, 0x53, 0x38, 0xf2, 0x21, 0xc8, 0x9b, 0x75, 0xa8, 0x1b, 0xa6, 0xef, 0x1a, 0x31, 0xdc, 0x91, + 0x42, 0xc3, 0x0f, 0x67, 0x98, 0x8c, 0xe5, 0x6d, 0xd7, 0x39, 0x66, 0x6a, 0x39, 0x94, 0x7c, 0x0c, + 0xeb, 0x0c, 0x03, 0xa3, 0xcc, 0xef, 0xac, 0xcd, 0x93, 0x42, 0xac, 0xde, 0x61, 0x12, 0x05, 0x9c, + 0x8a, 0x3c, 0x81, 0x9a, 0xf4, 0x41, 0x74, 0x02, 0xe4, 0xf8, 0x20, 0xc3, 0x11, 0xe5, 0x55, 0xc1, + 0x15, 0x53, 0x93, 0x2f, 0xa0, 0x4e, 0x5d, 0x93, 0x79, 0x96, 0x1b, 0x46, 0x0e, 0x72, 0x23, 0xc3, + 0x3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0x7a, 0x79, 0xc5, + 0xc8, 0x2e, 0x94, 0x51, 0xff, 0x25, 0xb7, 0x5b, 0x4d, 0x17, 0x00, 0x62, 0xa9, 0xef, 0x7b, 0xbe, + 0xcc, 0xf5, 0x02, 0xd0, 0x4e, 0x61, 0x67, 0x75, 0xd7, 0x80, 0xfc, 0x98, 0x67, 0x56, 0x09, 0xa9, + 0x59, 0x6f, 0x95, 0x58, 0x57, 0x28, 0xb5, 0xbf, 0x17, 0x00, 0xf0, 0x5a, 0xc5, 0xe5, 0xe7, 0xe6, + 0xbc, 0x36, 0x54, 0x0d, 0xd3, 0xc4, 0x68, 0x88, 0x8a, 0x2c, 0x09, 0x92, 0x0e, 0xd4, 0xc2, 0x39, + 0x1b, 0x7b, 0x7e, 0x28, 0x32, 0x5d, 0x59, 0x8f, 0x61, 0x5c, 0x5b, 0x98, 0x72, 0x6d, 0x5d, 0xac, + 0x45, 0x30, 0x96, 0x4a, 0xca, 0x24, 0x84, 0x48, 0x35, 0xa5, 0x0e, 0x98, 0xdd, 0xc5, 0x0c, 0xa4, + 0xf3, 0x08, 0x4a, 0x63, 0xcf, 0xcc, 0x55, 0x2a, 0x71, 0xc0, 0xa2, 0xea, 0x80, 0xda, 0x53, 0x68, + 0x24, 0x5b, 0xe1, 0x33, 0x90, 0x4c, 0x51, 0x84, 0x51, 0x9a, 0x69, 0x69, 0xc9, 0xdc, 0x44, 0xeb, + 0xc1, 0xce, 0xd8, 0xf0, 0x03, 0xaa, 0xf0, 0x63, 0xd9, 0xb9, 0x0b, 0x7c, 0xf6, 0xdd, 0x57, 0x07, + 0xe1, 0xfd, 0x54, 0x74, 0x17, 0x92, 0xe8, 0xbe, 0xff, 0x09, 0xec, 0xe4, 0x04, 0x12, 0xa9, 0x43, + 0x59, 0xd4, 0x40, 0x6b, 0x58, 0x03, 0x8d, 0xce, 0xa6, 0x33, 0x01, 0x16, 0x8e, 0xfe, 0x56, 0x83, + 0x66, 0x97, 0x31, 0x5d, 0x8c, 0x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c, 0xf2, 0x29, 0x77, 0xbe, 0xa4, 0xc4, + 0xe5, 0xbe, 0x90, 0x69, 0xe7, 0x3a, 0x51, 0x81, 0x2a, 0x30, 0x9c, 0x0b, 0xef, 0x31, 0x53, 0xc7, + 0x29, 0x17, 0x41, 0xb2, 0x55, 0x14, 0x45, 0xd3, 0xfd, 0x8c, 0xdf, 0x5f, 0x97, 0xb1, 0x54, 0xbc, + 0xe5, 0xd9, 0xff, 0xc3, 0x37, 0xbf, 0xa4, 0xdc, 0x8d, 0xdf, 0xc7, 0x0b, 0x7d, 0x49, 0x6d, 0x27, + 0x2f, 0xc7, 0x82, 0x8c, 0x18, 0xd4, 0xfe, 0x20, 0x3f, 0xb7, 0xa2, 0x46, 0x0f, 0x61, 0x0b, 0x77, + 0x51, 0xd3, 0x90, 0xca, 0xb9, 0x95, 0x4e, 0x40, 0xc8, 0xf1, 0x1c, 0x5a, 0xd9, 0xcc, 0x43, 0xb8, + 0x80, 0x9c, 0x7c, 0x94, 0xc3, 0x7f, 0x51, 0xe1, 0x7f, 0xfc, 0x7e, 0xf4, 0xaf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xb5, 0xa1, 0xe9, 0xd3, 0x0d, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 556031e61..d071651f9 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -261,6 +261,8 @@ message AppStatus { string phase = 4; string valuesTemplate = 5; string readme = 6; + bool setCPU = 7; + bool setMemory = 8; } message AppDetectCondition { diff --git a/worker/server/server.go b/worker/server/server.go index 3e8f561b1..a921e0d08 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -194,7 +194,9 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, Phase: phase, ValuesTemplate: helmApp.Status.ValuesTemplate, Cpu: cpu, + SetCPU: cpu > 0, Memory: memory, + SetMemory: memory > 0, Readme: helmApp.Status.Readme, }, nil } @@ -787,7 +789,7 @@ func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppSe configFlags.Namespace = commonutil.String(app.TenantID) kubeClient := kube.New(configFlags) - h, err := helm.NewHelm(kubeClient, configFlags, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + h, err := helm.NewHelm(kubeClient, configFlags, app.TenantID, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") if err != nil { return nil, err } @@ -797,7 +799,7 @@ func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppSe logrus.Warningf("add repo: %v", err) } - manifests, err := h.Manifests(app.AppName, app.TenantID, app.AppStoreName+"/"+app.AppTemplateName, vals, ioutil.Discard) + manifests, err := h.Manifests(app.AppName, app.AppStoreName+"/"+app.AppTemplateName, vals, ioutil.Discard) if err != nil { return nil, err } From 6fb9a5f4d034e8f2c2d7258fb25ed868a05bedcc Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Mon, 26 Apr 2021 16:17:07 +0800 Subject: [PATCH 26/65] upgrade helm app --- api/handler/application_handler.go | 18 ++++++++++-------- api/model/model.go | 1 + pkg/apis/rainbond/v1alpha1/helmapp_types.go | 2 ++ worker/controllers/helmapp/controlloop.go | 4 +++- worker/controllers/helmapp/helm/app.go | 6 +++--- worker/controllers/helmapp/helm/helm.go | 18 ++++++++++-------- worker/server/server.go | 2 +- 7 files changed, 30 insertions(+), 21 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index fb6c718e4..f5e38f4a4 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -117,9 +117,9 @@ func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Appl Version: app.Version, Revision: commonutil.Int32(0), AppStore: &v1alpha1.HelmAppStore{ - Version: "", // TODO: setup version. - Name: app.AppStoreName, - URL: app.AppStoreURL, + Version: "", // TODO: setup version. + Name: app.AppStoreName, + URL: app.AppStoreURL, }, }} @@ -169,8 +169,8 @@ func (a *ApplicationAction) UpdateApp(ctx context.Context, app *dbmodel.Applicat return err } - if req.Values != "" { - ctx, cancel := context.WithTimeout(ctx, 5 * time.Second) + if req.Values != "" || req.Version != "" { + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel() helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(ctx, app.AppName, metav1.GetOptions{}) if err != nil { @@ -179,10 +179,12 @@ func (a *ApplicationAction) UpdateApp(ctx context.Context, app *dbmodel.Applicat } return errors.Wrap(err, "update app") } - if helmApp.Spec.Values == req.Values { - return nil + if req.Values != "" { + helmApp.Spec.Values = req.Values + } + if req.Version != "" { + helmApp.Spec.Version = req.Version } - helmApp.Spec.Values = req.Values _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(ctx, helmApp, metav1.UpdateOptions{}) return err } diff --git a/api/model/model.go b/api/model/model.go index bfbce0283..b90752f53 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1694,6 +1694,7 @@ type UpdateAppRequest struct { AppName string `json:"app_name"` GovernanceMode string `json:"governance_mode"` Values string `json:"values"` + Version string `json:"version"` } // BindServiceRequest - diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index b989ff54b..7d558fe94 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -178,6 +178,8 @@ type HelmAppStatus struct { CurrentRevision string `json:"currentRevision,omitempty"` + CurrentVersion string `json:"currentVersion,omitempty"` + ValuesTemplate string `json:"valuesTemplate,omitempty"` Readme string `json:"readme,omitempty"` diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 67699c1bd..4f7140d65 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -114,13 +114,15 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { } status.UpdateConditionStatus(v1alpha1.HelmAppInstalled, corev1.ConditionTrue) status.CurrentValues = helmApp.Spec.Values + status.CurrentVersion = helmApp.Spec.Version } return nil } func needUpdate(helmApp *v1alpha1.HelmApp) bool { - return helmApp.Spec.Values != helmApp.Status.CurrentValues + return helmApp.Spec.Values != helmApp.Status.CurrentValues || + helmApp.Spec.Version != helmApp.Status.CurrentVersion } func (c *ControlLoop) updateStatus(helmApp *v1alpha1.HelmApp) error { diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index 14cec7a34..ec7658636 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -104,7 +104,7 @@ func (a *App) PreInstall() error { } var buf bytes.Buffer - if err := a.helm.PreInstall(a.name, a.Chart(), &buf); err != nil { + if err := a.helm.PreInstall(a.name, a.Chart(), a.version, &buf); err != nil { return err } logrus.Infof("pre install: %s", buf.String()) @@ -140,7 +140,7 @@ func (a *App) InstallOrUpdate() error { if errors.Is(err, driver.ErrReleaseNotFound) { logrus.Debugf("name: %s; namespace: %s; chart: %s; install helm app", a.name, a.namespace, a.Chart()) - if err := a.helm.Install(a.name, a.Chart(), values); err != nil { + if err := a.helm.Install(a.name, a.Chart(), a.version, values); err != nil { return err } @@ -148,7 +148,7 @@ func (a *App) InstallOrUpdate() error { } logrus.Debugf("name: %s; namespace: %s; chart: %s; upgrade helm app", a.name, a.namespace, a.Chart()) - return a.helm.Upgrade(a.name, a.chart(), values) + return a.helm.Upgrade(a.name, a.chart(), a.version, values) } func (a *App) ParseChart() (string, string, error) { diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index 8578b8ba0..b42c89beb 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -58,28 +58,29 @@ func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFla }, nil } -func (h *Helm) PreInstall(name, chart string, out io.Writer) error { - _, err := h.install(name, chart, nil, true, out) +func (h *Helm) PreInstall(name, chart, version string, out io.Writer) error { + _, err := h.install(name, chart, version, nil, true, out) return err } -func (h *Helm) Install(name, chart string, vals map[string]interface{}) error { - _, err := h.install(name, chart, vals, false, ioutil.Discard) +func (h *Helm) Install(name, chart, version string, vals map[string]interface{}) error { + _, err := h.install(name, chart, version, vals, false, ioutil.Discard) return err } -func (h *Helm) Manifests(name, chart string, vals map[string]interface{}, out io.Writer) (string, error) { - rel, err := h.install(name, chart, vals, true, out) +func (h *Helm) Manifests(name, chart, version string, vals map[string]interface{}, out io.Writer) (string, error) { + rel, err := h.install(name, chart, version, vals, true, out) if err != nil { return "", err } return rel.Manifest, nil } -func (h *Helm) install(name, chart string, vals map[string]interface{}, dryRun bool, out io.Writer) (*release.Release, error) { +func (h *Helm) install(name, chart, version string, vals map[string]interface{}, dryRun bool, out io.Writer) (*release.Release, error) { client := action.NewInstall(h.cfg) client.ReleaseName = name client.Namespace = h.namespace + client.Version = version client.DryRun = dryRun cp, err := client.ChartPathOptions.LocateChart(chart, h.settings) @@ -137,9 +138,10 @@ func (h *Helm) install(name, chart string, vals map[string]interface{}, dryRun b return client.Run(chartRequested, vals) } -func (h *Helm) Upgrade(name string, chart string, vals map[string]interface{}) error { +func (h *Helm) Upgrade(name string, chart, version string, vals map[string]interface{}) error { client := action.NewUpgrade(h.cfg) client.Namespace = h.namespace + client.Version = version chartPath, err := client.ChartPathOptions.LocateChart(chart, h.settings) if err != nil { diff --git a/worker/server/server.go b/worker/server/server.go index a921e0d08..8958ceb30 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -799,7 +799,7 @@ func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppSe logrus.Warningf("add repo: %v", err) } - manifests, err := h.Manifests(app.AppName, app.AppStoreName+"/"+app.AppTemplateName, vals, ioutil.Discard) + manifests, err := h.Manifests(app.AppName, app.AppStoreName+"/"+app.AppTemplateName, app.Version, vals, ioutil.Discard) if err != nil { return nil, err } From 89ce30459e235b0a99a3a7295611a8446adf9d6c Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Tue, 27 Apr 2021 11:13:54 +0800 Subject: [PATCH 27/65] rollback helm app --- api/api/api_interface.go | 1 + api/api_routers/version2/v2Routers.go | 1 + api/controller/application.go | 12 + api/handler/application_handler.go | 79 ++- api/model/app.go | 15 +- api/model/model.go | 16 + cmd/worker/option/option.go | 15 + config/crd/rainbond.goodrain.io_helmapps.yaml | 21 +- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 15 +- .../v1alpha1/zz_generated.deepcopy.go | 5 - worker/controllers/helmapp/controlloop.go | 31 +- worker/controllers/helmapp/finilizer.go | 3 +- worker/controllers/helmapp/helm/app.go | 59 +-- worker/controllers/helmapp/helm/helm.go | 102 ++++ worker/server/pb/app_runtime_server.pb.go | 499 ++++++++++++------ worker/server/pb/app_runtime_server.proto | 16 + worker/server/server.go | 46 +- 17 files changed, 693 insertions(+), 243 deletions(-) diff --git a/api/api/api_interface.go b/api/api/api_interface.go index 587fadc00..691c93216 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -170,6 +170,7 @@ type ApplicationInterface interface { ListServices(w http.ResponseWriter, r *http.Request) EnsureAppName(w http.ResponseWriter, r *http.Request) ParseServices(w http.ResponseWriter, r *http.Request) + ListHelmAppReleases(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) ListConfigGroups(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index 4cbef2cea..332b855c0 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -321,6 +321,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Get("/detect-process", controller.GetManager().GetDetectProcess) r.Post("/install", controller.GetManager().Install) r.Post("/parse-services", controller.GetManager().ParseServices) + r.Get("/helm-releases", controller.GetManager().ListHelmAppReleases) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) r.Get("/configgroups", controller.GetManager().ListConfigGroups) diff --git a/api/controller/application.go b/api/controller/application.go index a78ea65d1..558133f59 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -283,3 +283,15 @@ func (a *ApplicationController) ParseServices(w http.ResponseWriter, r *http.Req httputil.ReturnSuccess(r, w, services) } + +func (a *ApplicationController) ListHelmAppReleases(w http.ResponseWriter, r *http.Request) { + app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) + + releases, err := handler.GetApplicationHandler().ListHelmAppReleases(r.Context(), app) + if err != nil { + httputil.ReturnBcodeError(r, w, err) + return + } + + httputil.ReturnSuccess(r, w, releases) +} diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index f5e38f4a4..1fe9f51b8 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -54,6 +54,7 @@ type ApplicationHandler interface { ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) EnsureAppName(ctx context.Context, namespace, appName string) (*model.EnsureAppNameResp, error) ParseServices(ctx context.Context, app *dbmodel.Application, values string) ([]*model.AppService, error) + ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error) DeleteConfigGroup(appID, configGroupName string) error ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error) @@ -115,7 +116,6 @@ func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Appl EID: app.EID, TemplateName: app.AppTemplateName, Version: app.Version, - Revision: commonutil.Int32(0), AppStore: &v1alpha1.HelmAppStore{ Version: "", // TODO: setup version. Name: app.AppStoreName, @@ -169,24 +169,10 @@ func (a *ApplicationAction) UpdateApp(ctx context.Context, app *dbmodel.Applicat return err } - if req.Values != "" || req.Version != "" { - ctx, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() - helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(ctx, app.AppName, metav1.GetOptions{}) - if err != nil { - if k8sErrors.IsNotFound(err) { - return errors.Wrap(bcode.ErrApplicationNotFound, "update app") - } - return errors.Wrap(err, "update app") + if req.NeedUpdateHelmApp() { + if err := a.updateHelmApp(ctx, app, req); err != nil { + return err } - if req.Values != "" { - helmApp.Spec.Values = req.Values - } - if req.Version != "" { - helmApp.Spec.Version = req.Version - } - _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(ctx, helmApp, metav1.UpdateOptions{}) - return err } return nil @@ -195,6 +181,29 @@ func (a *ApplicationAction) UpdateApp(ctx context.Context, app *dbmodel.Applicat return app, err } +func (a *ApplicationAction) updateHelmApp(ctx context.Context, app *dbmodel.Application, req model.UpdateAppRequest) error { + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Get(ctx, app.AppName, metav1.GetOptions{}) + if err != nil { + if k8sErrors.IsNotFound(err) { + return errors.Wrap(bcode.ErrApplicationNotFound, "update app") + } + return errors.Wrap(err, "update app") + } + if req.Values != "" { + helmApp.Spec.Values = req.Values + } + if req.Version != "" { + helmApp.Spec.Version = req.Version + } + if req.Revision != 0 { + helmApp.Spec.Revision = req.Revision + } + _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(ctx, helmApp, metav1.UpdateOptions{}) + return err +} + // ListApps - func (a *ApplicationAction) ListApps(tenantID, appName string, page, pageSize int) (*model.ListAppResponse, error) { var resp model.ListAppResponse @@ -356,7 +365,10 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat Disk: int64(diskUsage), Phase: status.Phase, ValuesTemplate: status.ValuesTemplate, + Values: status.Values, Readme: status.Readme, + Version: status.Version, + Revision: int(status.Revision), } return res, nil } @@ -458,6 +470,7 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli PodStatus: pod.Status, }) } + sort.Sort(model.ByPodName(pods)) svc.Pods = pods for _, port := range service.TcpPorts { @@ -515,3 +528,33 @@ func (a *ApplicationAction) EnsureAppName(ctx context.Context, namespace, appNam AppName: appName, }, nil } + +func (a *ApplicationAction) ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error) { + // only for helm app + if app.AppType != model.AppTypeHelm { + return nil, nil + } + + nctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + releases, err := a.statusCli.ListHelmAppRelease(nctx, &pb.AppReq{ + AppId: app.AppID, + }) + if err != nil { + return nil, err + } + + var result []*model.HelmAppRelease + for _, rel := range releases.HelmAppRelease { + result = append(result, &model.HelmAppRelease{ + Revision: int(rel.Revision), + Updated: rel.Updated, + Status: rel.Status, + Chart: rel.Chart, + AppVersion: rel.AppVersion, + Description: rel.Description, + }) + } + return result, nil +} diff --git a/api/model/app.go b/api/model/app.go index c357c92c0..6f9b1f36e 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -11,12 +11,15 @@ type AppPort struct { // AppStatus - type AppStatus struct { Status string `json:"status"` - Cpu *int64 `json:"cpu"` - Memory *int64 `json:"memory"` + Cpu *int64 `json:"cpu"` + Memory *int64 `json:"memory"` Disk int64 `json:"disk"` Phase string `json:"phase"` ValuesTemplate string `json:"valuesTemplate"` + Values string `json:"values"` Readme string `json:"readme"` + Version string `json:"version"` + Revision int `json:"revision"` } // AppDetectProcess - @@ -46,3 +49,11 @@ type AppPod struct { PodName string `json:"pod_name"` PodStatus string `json:"pod_status"` } + +// ByPodName implements sort.Interface for []*AppPod based on +// the PodName field. +type ByPodName []*AppPod + +func (a ByPodName) Len() int { return len(a) } +func (a ByPodName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a ByPodName) Less(i, j int) bool { return a[i].PodName < a[j].PodName } diff --git a/api/model/model.go b/api/model/model.go index b90752f53..4b1f52838 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1695,6 +1695,12 @@ type UpdateAppRequest struct { GovernanceMode string `json:"governance_mode"` Values string `json:"values"` Version string `json:"version"` + Revision int `json:"revision"` +} + +// NeedUpdateHelmApp check if necessary to update the helm app. +func (u *UpdateAppRequest) NeedUpdateHelmApp() bool { + return u.Values != "" || u.Version != "" || u.Revision != 0 } // BindServiceRequest - @@ -1773,3 +1779,13 @@ type EnsureAppNameReq struct { type EnsureAppNameResp struct { AppName string `json:"app_name"` } + +// HelmAppRelease - +type HelmAppRelease struct { + Revision int `json:"revision"` + Updated string `json:"updated"` + Status string `json:"status"` + Chart string `json:"chart"` + AppVersion string `json:"app_version"` + Description string `json:"description"` +} diff --git a/cmd/worker/option/option.go b/cmd/worker/option/option.go index c4b90f12b..f48de35b9 100644 --- a/cmd/worker/option/option.go +++ b/cmd/worker/option/option.go @@ -21,6 +21,7 @@ package option import ( "fmt" "os" + "path" "github.com/sirupsen/logrus" "github.com/spf13/pflag" @@ -52,6 +53,13 @@ type Config struct { LeaderElectionIdentity string RBDNamespace string GrdataPVCName string + Helm Helm +} + +type Helm struct { + DataDir string + RepoFile string + RepoCache string } //Worker worker server @@ -91,6 +99,13 @@ func (a *Worker) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&a.LeaderElectionIdentity, "leader-election-identity", "", "Unique idenity of this attcher. Typically name of the pod where the attacher runs.") fs.StringVar(&a.RBDNamespace, "rbd-system-namespace", "rbd-system", "rbd components kubernetes namespace") fs.StringVar(&a.GrdataPVCName, "grdata-pvc-name", "rbd-cpt-grdata", "The name of grdata persistent volume claim") + fs.StringVar(&a.Helm.DataDir, "helm-data-dir", "helm-data-dir", "The data directory of Helm.") + + if a.Helm.DataDir == "" { + a.Helm.DataDir = "/grdata/helm" + } + a.Helm.RepoFile = path.Join(a.Helm.DataDir, "repo/repositories.yaml") + a.Helm.RepoCache = path.Join(a.Helm.DataDir, "cache") } //SetLog 设置log diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml index bb6bf1611..b54c49892 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -73,7 +73,6 @@ spec: type: string revision: description: The application revision. - format: int32 type: integer values: description: The values.yaml of the helm app, encoded by base64. @@ -122,20 +121,32 @@ spec: type: object type: array currentRevision: - type: string + description: The actual revision of the helm app, as same as the revision + from 'helm status' + type: integer currentValues: + description: The base64 encoded string from the active values. + type: string + currentVersion: type: string phase: - description: The phase of helm app + description: The phase of the helm app. type: string readme: - type: string - services: + description: The base64 encoded string from README.md type: string status: description: The status of helm app. type: string + targetRevision: + description: TargetRevision is the revision that used to rollbak the + helm app. After executing command 'helm rollback [appName] [targetRevision]', + the actual revision of helm app is currentRevision, not targetRevision. + The new currentRevision is equals to the origin currentRevision plus + one. + type: integer valuesTemplate: + description: The base64 encoded string from values.yaml type: string required: - phase diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 7d558fe94..6d2c66f4e 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -125,7 +125,7 @@ type HelmAppSpec struct { Version string `json:"version"` // The application revision. - Revision *int32 `json:"revision,omitempty"` + Revision int `json:"revision,omitempty"` // The values.yaml of the helm app, encoded by base64. Values string `json:"values,omitempty"` @@ -169,19 +169,30 @@ type HelmAppStatus struct { // The status of helm app. Status HelmAppStatusStatus `json:"status"` + // The phase of the helm app. Phase HelmAppStatusPhase `json:"phase"` // Current state of helm app. Conditions []HelmAppCondition `json:"conditions,omitempty"` + // The base64 encoded string from the active values. CurrentValues string `json:"currentValues,omitempty"` - CurrentRevision string `json:"currentRevision,omitempty"` + // The actual revision of the helm app, as same as the revision from 'helm status' + CurrentRevision int `json:"currentRevision,omitempty"` + + // TargetRevision is the revision that used to rollbak the helm app. + // After executing command 'helm rollback [appName] [targetRevision]', the actual + // revision of helm app is currentRevision, not targetRevision. + // The new currentRevision is equals to the origin currentRevision plus one. + TargetRevision int `json:"targetRevision,omitempty"` CurrentVersion string `json:"currentVersion,omitempty"` + // The base64 encoded string from values.yaml ValuesTemplate string `json:"valuesTemplate,omitempty"` + // The base64 encoded string from README.md Readme string `json:"readme,omitempty"` } diff --git a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index 2b5df780f..3c86fc178 100644 --- a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -104,11 +104,6 @@ func (in *HelmAppList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HelmAppSpec) DeepCopyInto(out *HelmAppSpec) { *out = *in - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(int32) - **out = **in - } if in.AppStore != nil { in, out := &in.AppStore, &out.AppStore *out = new(HelmAppStore) diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 4f7140d65..3b7ce28d7 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -79,7 +79,7 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { appStore := helmApp.Spec.AppStore app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, - helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Values, + helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Revision, helmApp.Spec.Values, helmApp.Spec.FullName(), appStore.URL, c.repoFile, c.repoCache) if err != nil { @@ -90,12 +90,20 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { defer func() { helmApp.Status = status.GetHelmAppStatus() - s, _ := app.Status() - helmApp.Status.Status = v1alpha1.HelmAppStatusStatus(s) + appStatus, err := app.Status() + if err != nil { + logrus.Warningf("get app status: %v", err) + } else { + helmApp.Status.Status = v1alpha1.HelmAppStatusStatus(appStatus.Info.Status) + helmApp.Status.CurrentRevision = appStatus.Version + } // TODO: handle the error - c.updateStatus(helmApp) + if err := c.updateStatus(helmApp); err != nil { + logrus.Warningf("update app status: %v", err) + } }() + // update condition quickly if !continu3 { return nil } @@ -117,14 +125,29 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { status.CurrentVersion = helmApp.Spec.Version } + if needRollback(helmApp) { + if err := app.Rollback(); err != nil { + logrus.Warningf("app: %s; namespace: %s; rollback helm app: %v", helmApp.Name, helmApp.Namespace, err) + } else { + status.TargetRevision = helmApp.Spec.Revision + } + } + return nil } +// check if the helmApp needed to be update func needUpdate(helmApp *v1alpha1.HelmApp) bool { return helmApp.Spec.Values != helmApp.Status.CurrentValues || helmApp.Spec.Version != helmApp.Status.CurrentVersion } +// check if the helmApp needed to be rollback +func needRollback(helmApp *v1alpha1.HelmApp) bool { + return helmApp.Spec.Revision != 0 && + helmApp.Spec.Revision != helmApp.Status.TargetRevision +} + func (c *ControlLoop) updateStatus(helmApp *v1alpha1.HelmApp) error { // TODO: context if _, err := c.clientset.RainbondV1alpha1().HelmApps(helmApp.Namespace). diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go index 98da7c2dd..c0630bdd8 100644 --- a/worker/controllers/helmapp/finilizer.go +++ b/worker/controllers/helmapp/finilizer.go @@ -55,8 +55,9 @@ func (c *Finalizer) run(obj interface{}) error { logrus.Infof("start uninstall helm app: %s/%s", helmApp.Name, helmApp.Namespace) appStore := helmApp.Spec.AppStore + // TODO: too much args app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, - helmApp.Spec.TemplateName, helmApp.Spec.Version, + helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Revision, helmApp.Spec.Values, helmApp.Spec.FullName(), appStore.URL, c.repoFile, c.repoCache) if err != nil { diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index ec7658636..b9e6a92dc 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -7,7 +7,6 @@ import ( "os" "path" "path/filepath" - "sigs.k8s.io/yaml" "github.com/goodrain/rainbond/util/commonutil" "github.com/pkg/errors" @@ -15,11 +14,10 @@ import ( "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/cli" "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/release" "helm.sh/helm/v3/pkg/storage/driver" - corev1 "k8s.io/api/core/v1" "k8s.io/cli-runtime/pkg/genericclioptions" - "k8s.io/cli-runtime/pkg/resource" - "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/yaml" ) type App struct { @@ -30,20 +28,19 @@ type App struct { namespace string version string chartDir string + revision int encodedValues string helm *Helm repo *Repo - - builder *resource.Builder } func (a *App) Chart() string { return a.repoName + "/" + a.templateName } -func NewApp(name, namespace, templateName, version, values, repoName, repoURL, repoFile, repoCache string) (*App, error) { +func NewApp(name, namespace, templateName, version string, revision int, values, repoName, repoURL, repoFile, repoCache string) (*App, error) { configFlags := genericclioptions.NewConfigFlags(true) configFlags.Namespace = commonutil.String(namespace) kubeClient := kube.New(configFlags) @@ -61,6 +58,7 @@ func NewApp(name, namespace, templateName, version, values, repoName, repoURL, r repoName: repoName, repoURL: repoURL, version: version, + revision: revision, encodedValues: values, helm: helm, repo: repo, @@ -111,12 +109,12 @@ func (a *App) PreInstall() error { return nil } -func (a *App) Status() (string, error) { +func (a *App) Status() (*release.Release, error) { release, err := a.helm.Status(a.name) if err != nil { - return "", err + return nil, err } - return string(release.Info.Status), nil + return release, nil } func (a *App) InstallOrUpdate() error { @@ -188,43 +186,10 @@ func (a *App) ParseChart() (string, string, error) { return values, readme, err } -func (a *App) parseServices(manifests string) ([]*corev1.Service, error) { - // Create a local builder... - builder := resource.NewLocalBuilder(). - // Configure with a scheme to get typed objects in the versions registered with the scheme. - // As an alternative, could call Unstructured() to get unstructured objects. - WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). - // Provide input via a Reader. - // As an alternative, could call Path(false, "/path/to/file") to read from a file. - Stream(bytes.NewBufferString(manifests), "input"). - // Flatten items contained in List objects - Flatten(). - // Accumulate as many items as possible - ContinueOnError() - - // Run the builder - result := builder.Do() - - items, err := result.Infos() - if err != nil { - return nil, errors.WithMessage(err, "resource infos") - } - - var services []*corev1.Service - for _, item := range items { - if item.Object.GetObjectKind().GroupVersionKind().Kind != "Service" { - continue - } - svc, ok := item.Object.(*corev1.Service) - if !ok { - continue - } - services = append(services, svc) - } - - return services, nil -} - func (a *App) Uninstall() error { return a.helm.Uninstall(a.name) } + +func (a *App) Rollback() error { + return a.helm.Rollback(a.name, a.revision) +} diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index b42c89beb..663f29be6 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -1,6 +1,7 @@ package helm import ( + "fmt" "io" "io/ioutil" "unsafe" @@ -15,9 +16,22 @@ import ( "helm.sh/helm/v3/pkg/getter" "helm.sh/helm/v3/pkg/kube" "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v3/pkg/releaseutil" + helmtime "helm.sh/helm/v3/pkg/time" "k8s.io/cli-runtime/pkg/genericclioptions" ) +type ReleaseInfo struct { + Revision int `json:"revision"` + Updated helmtime.Time `json:"updated"` + Status string `json:"status"` + Chart string `json:"chart"` + AppVersion string `json:"app_version"` + Description string `json:"description"` +} + +type ReleaseHistory []ReleaseInfo + type Helm struct { cfg *action.Configuration settings *cli.EnvSettings @@ -182,6 +196,44 @@ func (h *Helm) Uninstall(name string) error { return err } +func (h *Helm) Rollback(name string, revision int) error { + logrus.Infof("name: %s; revision: %d; rollback helm app", name, revision) + client := action.NewRollback(h.cfg) + client.Version = revision + + if err := client.Run(name); err != nil { + return errors.Wrap(err, "helm rollback") + } + return nil +} + +func (h *Helm) History(name string) (ReleaseHistory, error) { + logrus.Debugf("name: %s; list helm app history", name) + client := action.NewHistory(h.cfg) + client.Max = 256 + + hist, err := client.Run(name) + if err != nil { + return nil, err + } + + releaseutil.Reverse(hist, releaseutil.SortByRevision) + + var rels []*release.Release + for i := 0; i < min(len(hist), client.Max); i++ { + rels = append(rels, hist[i]) + } + + if len(rels) == 0 { + logrus.Debugf("name: %s; helm app history not found", name) + return nil, nil + } + + releaseHistory := getReleaseHistory(rels) + + return releaseHistory, nil +} + // checkIfInstallable validates if a chart can be installed // // Application chart type is only installable @@ -192,3 +244,53 @@ func checkIfInstallable(ch *chart.Chart) error { } return errors.Errorf("%s charts are not installable", ch.Metadata.Type) } + +func min(x, y int) int { + if x < y { + return x + } + return y +} + +func getReleaseHistory(rls []*release.Release) (history ReleaseHistory) { + for i := len(rls) - 1; i >= 0; i-- { + r := rls[i] + c := formatChartname(r.Chart) + s := r.Info.Status.String() + v := r.Version + d := r.Info.Description + a := formatAppVersion(r.Chart) + + rInfo := ReleaseInfo{ + Revision: v, + Status: s, + Chart: c, + AppVersion: a, + Description: d, + } + if !r.Info.LastDeployed.IsZero() { + rInfo.Updated = r.Info.LastDeployed + } + history = append(history, rInfo) + } + + return history +} + +func formatChartname(c *chart.Chart) string { + if c == nil || c.Metadata == nil { + // This is an edge case that has happened in prod, though we don't + // know how: https://github.com/helm/helm/issues/1347 + return "MISSING" + } + return fmt.Sprintf("%s-%s", c.Name(), c.Metadata.Version) +} + +func formatAppVersion(c *chart.Chart) string { + if c == nil || c.Metadata == nil { + // This is an edge case that has happened in prod, though we don't + // know how: https://github.com/helm/helm/issues/1347 + return "MISSING" + } + return c.AppVersion() +} diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 49ee1b628..d554f3b69 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -1941,6 +1941,9 @@ type AppStatus struct { Readme string `protobuf:"bytes,6,opt,name=readme,proto3" json:"readme,omitempty"` SetCPU bool `protobuf:"varint,7,opt,name=setCPU,proto3" json:"setCPU,omitempty"` SetMemory bool `protobuf:"varint,8,opt,name=setMemory,proto3" json:"setMemory,omitempty"` + Values string `protobuf:"bytes,9,opt,name=values,proto3" json:"values,omitempty"` + Version string `protobuf:"bytes,10,opt,name=version,proto3" json:"version,omitempty"` + Revision int32 `protobuf:"varint,11,opt,name=revision,proto3" json:"revision,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2027,6 +2030,27 @@ func (m *AppStatus) GetSetMemory() bool { return false } +func (m *AppStatus) GetValues() string { + if m != nil { + return m.Values + } + return "" +} + +func (m *AppStatus) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *AppStatus) GetRevision() int32 { + if m != nil { + return m.Revision + } + return 0 +} + type AppDetectCondition struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready,omitempty"` @@ -2325,6 +2349,124 @@ func (m *ParseAppServicesReq) GetValues() string { return "" } +type HelmAppReleases struct { + HelmAppRelease []*HelmAppRelease `protobuf:"bytes,1,rep,name=helmAppRelease,proto3" json:"helmAppRelease,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HelmAppReleases) Reset() { *m = HelmAppReleases{} } +func (m *HelmAppReleases) String() string { return proto.CompactTextString(m) } +func (*HelmAppReleases) ProtoMessage() {} +func (*HelmAppReleases) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{37} +} + +func (m *HelmAppReleases) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HelmAppReleases.Unmarshal(m, b) +} +func (m *HelmAppReleases) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HelmAppReleases.Marshal(b, m, deterministic) +} +func (m *HelmAppReleases) XXX_Merge(src proto.Message) { + xxx_messageInfo_HelmAppReleases.Merge(m, src) +} +func (m *HelmAppReleases) XXX_Size() int { + return xxx_messageInfo_HelmAppReleases.Size(m) +} +func (m *HelmAppReleases) XXX_DiscardUnknown() { + xxx_messageInfo_HelmAppReleases.DiscardUnknown(m) +} + +var xxx_messageInfo_HelmAppReleases proto.InternalMessageInfo + +func (m *HelmAppReleases) GetHelmAppRelease() []*HelmAppRelease { + if m != nil { + return m.HelmAppRelease + } + return nil +} + +type HelmAppRelease struct { + Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` + Updated string `protobuf:"bytes,2,opt,name=updated,proto3" json:"updated,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + Chart string `protobuf:"bytes,4,opt,name=chart,proto3" json:"chart,omitempty"` + AppVersion string `protobuf:"bytes,5,opt,name=appVersion,proto3" json:"appVersion,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HelmAppRelease) Reset() { *m = HelmAppRelease{} } +func (m *HelmAppRelease) String() string { return proto.CompactTextString(m) } +func (*HelmAppRelease) ProtoMessage() {} +func (*HelmAppRelease) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{38} +} + +func (m *HelmAppRelease) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HelmAppRelease.Unmarshal(m, b) +} +func (m *HelmAppRelease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HelmAppRelease.Marshal(b, m, deterministic) +} +func (m *HelmAppRelease) XXX_Merge(src proto.Message) { + xxx_messageInfo_HelmAppRelease.Merge(m, src) +} +func (m *HelmAppRelease) XXX_Size() int { + return xxx_messageInfo_HelmAppRelease.Size(m) +} +func (m *HelmAppRelease) XXX_DiscardUnknown() { + xxx_messageInfo_HelmAppRelease.DiscardUnknown(m) +} + +var xxx_messageInfo_HelmAppRelease proto.InternalMessageInfo + +func (m *HelmAppRelease) GetRevision() int32 { + if m != nil { + return m.Revision + } + return 0 +} + +func (m *HelmAppRelease) GetUpdated() string { + if m != nil { + return m.Updated + } + return "" +} + +func (m *HelmAppRelease) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +func (m *HelmAppRelease) GetChart() string { + if m != nil { + return m.Chart + } + return "" +} + +func (m *HelmAppRelease) GetAppVersion() string { + if m != nil { + return m.AppVersion + } + return "" +} + +func (m *HelmAppRelease) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + func init() { proto.RegisterEnum("pb.ServiceVolumeStatus", ServiceVolumeStatus_name, ServiceVolumeStatus_value) proto.RegisterEnum("pb.PodStatus_Type", PodStatus_Type_name, PodStatus_Type_value) @@ -2380,168 +2522,178 @@ func init() { proto.RegisterType((*AppService_Pod)(nil), "pb.AppService.Pod") proto.RegisterType((*AppServices)(nil), "pb.AppServices") proto.RegisterType((*ParseAppServicesReq)(nil), "pb.ParseAppServicesReq") + proto.RegisterType((*HelmAppReleases)(nil), "pb.HelmAppReleases") + proto.RegisterType((*HelmAppRelease)(nil), "pb.HelmAppRelease") } func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2490 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x19, 0x5d, 0x6f, 0x1b, 0xc7, - 0x51, 0x24, 0xc5, 0xaf, 0xa1, 0x44, 0x51, 0xab, 0x2f, 0x86, 0x89, 0x63, 0xe7, 0x6a, 0x1b, 0x86, - 0x9d, 0x2a, 0xb6, 0x1a, 0x37, 0x76, 0xe2, 0xba, 0xa0, 0x49, 0x46, 0x66, 0x2b, 0x51, 0xc4, 0x91, - 0x6a, 0x11, 0xa0, 0x00, 0x71, 0xe2, 0x6d, 0xe4, 0xab, 0xef, 0x63, 0x73, 0x77, 0x54, 0xca, 0xc7, - 0xf6, 0x2f, 0xf4, 0x27, 0xf4, 0xa1, 0x0f, 0x2d, 0xd0, 0x97, 0x3e, 0x07, 0xe8, 0x0f, 0x28, 0xfa, - 0x53, 0xf2, 0xd2, 0x1f, 0x50, 0xcc, 0xee, 0xde, 0xdd, 0xde, 0xf1, 0x64, 0xd7, 0x45, 0x8b, 0xbe, - 0xdd, 0xcc, 0xce, 0xec, 0xcc, 0xce, 0xce, 0xcc, 0xce, 0xcc, 0x41, 0xdb, 0x60, 0x6c, 0xe6, 0x2f, - 0xdc, 0xd0, 0x72, 0xe8, 0x2c, 0xa0, 0xfe, 0x15, 0xf5, 0x0f, 0x99, 0xef, 0x85, 0x1e, 0x29, 0xb2, - 0x0b, 0xad, 0x0a, 0xe5, 0x81, 0xc3, 0xc2, 0xa5, 0x76, 0x13, 0x2a, 0x5d, 0xc6, 0x74, 0xfa, 0x0d, - 0xd9, 0x83, 0x0a, 0xb2, 0x58, 0x66, 0xbb, 0x70, 0xab, 0x70, 0xaf, 0xae, 0x97, 0x0d, 0xc6, 0x86, - 0xa6, 0x76, 0x07, 0x36, 0xba, 0x8c, 0x4d, 0x42, 0x23, 0x5c, 0x04, 0x6f, 0x20, 0xfb, 0x04, 0x9a, - 0x13, 0xea, 0x5f, 0x59, 0x73, 0xaa, 0xd3, 0x6f, 0x16, 0x34, 0x08, 0xc9, 0x0d, 0x80, 0x40, 0x60, - 0x12, 0xe2, 0xba, 0xc4, 0x0c, 0x4d, 0xed, 0x08, 0xb6, 0x24, 0x43, 0x10, 0x71, 0xdc, 0x84, 0x46, - 0xc2, 0x11, 0x48, 0x16, 0x88, 0x59, 0x02, 0xed, 0x63, 0xd8, 0x9c, 0x52, 0xd7, 0x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x3e, 0x82, 0x0d, 0x87, 0x3a, 0x9e, - 0xbf, 0x9c, 0xd9, 0x96, 0x63, 0x85, 0x5c, 0x46, 0x49, 0x6f, 0x08, 0xdc, 0x09, 0xa2, 0xf0, 0x14, - 0x73, 0xb6, 0x98, 0xf9, 0x22, 0x47, 0x70, 0xd3, 0x97, 0x74, 0x98, 0xb3, 0x85, 0xcc, 0x1a, 0xda, - 0xf7, 0x15, 0x80, 0xbe, 0xb8, 0x28, 0xf7, 0x6b, 0x8f, 0x7c, 0x00, 0x75, 0x94, 0x17, 0x30, 0x63, - 0x1e, 0x09, 0x4d, 0x10, 0x44, 0x83, 0x0d, 0xb4, 0x38, 0xfd, 0x7a, 0x61, 0xd3, 0x80, 0x86, 0xf2, - 0xa2, 0x53, 0x38, 0xf2, 0x21, 0xc8, 0x9b, 0x75, 0xa8, 0x1b, 0xa6, 0xef, 0x1a, 0x31, 0xdc, 0x91, - 0x42, 0xc3, 0x0f, 0x67, 0x98, 0x8c, 0xe5, 0x6d, 0xd7, 0x39, 0x66, 0x6a, 0x39, 0x94, 0x7c, 0x0c, - 0xeb, 0x0c, 0x03, 0xa3, 0xcc, 0xef, 0xac, 0xcd, 0x93, 0x42, 0xac, 0xde, 0x61, 0x12, 0x05, 0x9c, - 0x8a, 0x3c, 0x81, 0x9a, 0xf4, 0x41, 0x74, 0x02, 0xe4, 0xf8, 0x20, 0xc3, 0x11, 0xe5, 0x55, 0xc1, - 0x15, 0x53, 0x93, 0x2f, 0xa0, 0x4e, 0x5d, 0x93, 0x79, 0x96, 0x1b, 0x46, 0x0e, 0x72, 0x23, 0xc3, - 0x3a, 0x88, 0xd6, 0x05, 0x6f, 0x42, 0x4f, 0x1e, 0x43, 0x35, 0xa0, 0x73, 0x9f, 0x86, 0xc2, 0x2f, - 0x1a, 0x47, 0xef, 0xaf, 0x48, 0xe5, 0xab, 0x82, 0x31, 0xa2, 0x45, 0x99, 0x96, 0x7b, 0xe9, 0xd3, - 0x20, 0xa0, 0x41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5f, 0x97, 0xb1, 0x54, 0xbc, - 0xe5, 0xd9, 0xff, 0xc3, 0x37, 0xbf, 0xa4, 0xdc, 0x8d, 0xdf, 0xc7, 0x0b, 0x7d, 0x49, 0x6d, 0x27, - 0x2f, 0xc7, 0x82, 0x8c, 0x18, 0xd4, 0xfe, 0x20, 0x3f, 0xb7, 0xa2, 0x46, 0x0f, 0x61, 0x0b, 0x77, - 0x51, 0xd3, 0x90, 0xca, 0xb9, 0x95, 0x4e, 0x40, 0xc8, 0xf1, 0x1c, 0x5a, 0xd9, 0xcc, 0x43, 0xb8, - 0x80, 0x9c, 0x7c, 0x94, 0xc3, 0x7f, 0x51, 0xe1, 0x7f, 0xfc, 0x7e, 0xf4, 0xaf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xb5, 0xa1, 0xe9, 0xd3, 0x0d, 0x1c, 0x00, 0x00, + // 2615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x19, 0x5d, 0x6f, 0xdb, 0xc8, + 0xd1, 0x92, 0xac, 0xaf, 0x91, 0x2d, 0xcb, 0xeb, 0x2f, 0x9d, 0xee, 0xf2, 0x71, 0x6c, 0x12, 0x04, + 0xc9, 0xd5, 0x97, 0xb8, 0x97, 0xe6, 0xe3, 0xd2, 0x14, 0x8a, 0xa4, 0x73, 0xd4, 0xda, 0xb2, 0x40, + 0xcb, 0x57, 0x1c, 0x50, 0x40, 0xa0, 0xc5, 0x3d, 0x87, 0x0d, 0x3f, 0xf6, 0x48, 0xca, 0x57, 0x3d, + 0xb6, 0x7f, 0xa1, 0x3f, 0xa1, 0x0f, 0x7d, 0x68, 0x1f, 0x8b, 0x3e, 0xde, 0x3f, 0x28, 0xfa, 0x53, + 0xee, 0xa5, 0x4f, 0x05, 0x0a, 0x14, 0xb3, 0xbb, 0x24, 0x97, 0x14, 0x9d, 0x34, 0x45, 0x8b, 0xbe, + 0x71, 0x66, 0x67, 0x76, 0x66, 0x67, 0x66, 0x67, 0x66, 0x87, 0xd0, 0x36, 0x18, 0x9b, 0xfa, 0x73, + 0x37, 0xb4, 0x1c, 0x3a, 0x0d, 0xa8, 0x7f, 0x49, 0xfd, 0x7d, 0xe6, 0x7b, 0xa1, 0x47, 0x8a, 0xec, + 0x5c, 0xab, 0x42, 0x79, 0xe0, 0xb0, 0x70, 0xa1, 0xdd, 0x80, 0x4a, 0x97, 0x31, 0x9d, 0x7e, 0x43, + 0x76, 0xa0, 0x82, 0x2c, 0x96, 0xd9, 0x2e, 0xdc, 0x2c, 0xdc, 0xad, 0xeb, 0x65, 0x83, 0xb1, 0xa1, + 0xa9, 0xdd, 0x86, 0xb5, 0x2e, 0x63, 0xa7, 0xa1, 0x11, 0xce, 0x83, 0xb7, 0x90, 0x7d, 0x0a, 0xcd, + 0x53, 0xea, 0x5f, 0x5a, 0x33, 0xaa, 0xd3, 0x6f, 0xe6, 0x34, 0x08, 0xc9, 0x35, 0x80, 0x40, 0x60, + 0x12, 0xe2, 0xba, 0xc4, 0x0c, 0x4d, 0xed, 0x00, 0x36, 0x24, 0x43, 0x10, 0x71, 0xdc, 0x80, 0x46, + 0xc2, 0x11, 0x48, 0x16, 0x88, 0x59, 0x02, 0xed, 0x13, 0x58, 0x9f, 0x50, 0xd7, 0x70, 0xc3, 0x88, + 0xe3, 0x43, 0xa8, 0x87, 0x1c, 0x91, 0x88, 0xa8, 0x09, 0xc4, 0xd0, 0xd4, 0x7e, 0x53, 0x80, 0x75, + 0xa1, 0xf7, 0x31, 0x0d, 0x02, 0xe3, 0x82, 0x92, 0x47, 0x50, 0x09, 0x38, 0xa2, 0x5d, 0xb8, 0x59, + 0xba, 0xdb, 0x38, 0xb8, 0xb6, 0xcf, 0xce, 0xf7, 0x53, 0x24, 0x12, 0x1a, 0xb8, 0xa1, 0xbf, 0xd0, + 0x25, 0x71, 0xe7, 0x29, 0x34, 0x14, 0x34, 0x69, 0x41, 0xe9, 0x0d, 0x5d, 0x48, 0x71, 0xf8, 0x49, + 0xb6, 0xa1, 0x7c, 0x69, 0xd8, 0x73, 0xda, 0x2e, 0x0a, 0x93, 0x70, 0xe0, 0x59, 0xf1, 0x49, 0x41, + 0x5b, 0x40, 0xa3, 0x6f, 0x05, 0x6f, 0x22, 0x05, 0x1e, 0x40, 0xd9, 0xb4, 0x82, 0x37, 0x91, 0xfc, + 0x0e, 0xca, 0x57, 0xd6, 0xf9, 0xb7, 0x14, 0x2e, 0x08, 0x3b, 0x4f, 0x00, 0x12, 0xe4, 0xbb, 0x44, + 0x17, 0x54, 0xd1, 0x0e, 0x6c, 0x4a, 0x03, 0x77, 0x19, 0x1b, 0x7b, 0xe6, 0x91, 0x15, 0x84, 0xe4, + 0x3e, 0x54, 0x3d, 0xdb, 0x1c, 0x7b, 0x66, 0xa4, 0xc2, 0x26, 0x37, 0x81, 0x4a, 0xa7, 0x47, 0x14, + 0x48, 0xec, 0xd2, 0x6f, 0x39, 0x71, 0xf1, 0x4a, 0x62, 0x49, 0xa1, 0x7d, 0x57, 0x80, 0xdd, 0xe3, + 0xb9, 0x1d, 0x5a, 0xcb, 0x42, 0x8f, 0x63, 0xbf, 0x2a, 0x82, 0xef, 0xe3, 0x5e, 0xf9, 0x0c, 0x91, + 0x08, 0xa4, 0x16, 0xc6, 0x50, 0xf9, 0x3b, 0x67, 0xd0, 0xca, 0x12, 0xe4, 0x18, 0xe6, 0xbe, 0x6a, + 0x98, 0xc6, 0xc1, 0xce, 0x92, 0xea, 0x28, 0x49, 0xb5, 0xd7, 0xf7, 0x45, 0x58, 0x4f, 0x11, 0xbc, + 0x23, 0x82, 0x31, 0xf8, 0x4c, 0xca, 0x6c, 0x6f, 0x81, 0xab, 0xc2, 0xf3, 0x35, 0x81, 0x18, 0x9a, + 0x18, 0xcb, 0x72, 0x31, 0x5c, 0x30, 0xda, 0x2e, 0x89, 0x58, 0x16, 0xa8, 0xc9, 0x82, 0x51, 0xf2, + 0x01, 0xd4, 0x98,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x43, 0x91, 0x37, 0xcb, 0x7a, 0x0c, 0xe3, 0xda, + 0xdc, 0x94, 0x6b, 0xab, 0x62, 0x2d, 0x82, 0xb1, 0xf1, 0x52, 0xe6, 0x2a, 0x44, 0xaa, 0x29, 0x75, + 0xc0, 0x5a, 0x21, 0x26, 0x2a, 0x9d, 0x87, 0x50, 0x1a, 0x7b, 0x66, 0xae, 0x52, 0x49, 0x38, 0x17, + 0xd5, 0x70, 0xd6, 0x9e, 0x42, 0x23, 0xd9, 0x0a, 0x8b, 0x4a, 0x32, 0x93, 0x11, 0x46, 0x69, 0xa6, + 0xa5, 0x25, 0x53, 0x18, 0xad, 0x07, 0x5b, 0x63, 0xc3, 0x0f, 0xa8, 0xc2, 0x8f, 0x4d, 0xec, 0x36, + 0xf0, 0x49, 0x7a, 0x5f, 0x1d, 0xab, 0xf7, 0x53, 0xb9, 0x42, 0x09, 0x40, 0xed, 0x18, 0x36, 0x5e, + 0x51, 0xdb, 0xe1, 0xa3, 0x7b, 0x9b, 0x1a, 0x58, 0xd8, 0x9e, 0x41, 0xf3, 0x75, 0x0a, 0x25, 0x35, + 0xe1, 0xe7, 0x4e, 0x13, 0xeb, 0x19, 0x4a, 0xed, 0x2f, 0x05, 0x68, 0xa6, 0x49, 0x52, 0x81, 0x5c, + 0x48, 0x07, 0x32, 0xba, 0x6a, 0xce, 0x4c, 0x03, 0x3b, 0x29, 0xe9, 0x2a, 0x09, 0x2a, 0xf6, 0x2a, + 0xa5, 0xae, 0xff, 0x36, 0x94, 0x67, 0xaf, 0x0d, 0xf9, 0xcc, 0xa8, 0xeb, 0x02, 0x20, 0xd7, 0x01, + 0x0c, 0xc6, 0xbe, 0x94, 0x37, 0x49, 0x5c, 0x68, 0x05, 0x83, 0x45, 0xd5, 0xa4, 0xc1, 0xcc, 0xb7, + 0x18, 0x46, 0x91, 0xbc, 0xd1, 0x2a, 0xea, 0xde, 0xa7, 0xb0, 0x95, 0x93, 0x9e, 0x48, 0x1d, 0xca, + 0x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0x49, 0xee, 0xc0, 0x41, 0x6c, 0x72, 0xe5, 0x2c, 0x62, 0x69, + 0x93, 0xdc, 0x89, 0x01, 0x91, 0x43, 0x52, 0xfb, 0xdf, 0xd9, 0xe4, 0x33, 0x1e, 0x7c, 0xc9, 0xc3, + 0x81, 0xc7, 0x42, 0xe6, 0x91, 0xdc, 0x89, 0xda, 0x7e, 0x81, 0xe1, 0x5c, 0xe8, 0xc7, 0x4c, 0x77, + 0xac, 0x38, 0x82, 0x64, 0x7b, 0x53, 0x8a, 0xa6, 0xfb, 0x19, 0xf7, 0x5f, 0x97, 0xb1, 0xd4, 0x7d, + 0xcb, 0xb3, 0xff, 0xf5, 0xb7, 0xf7, 0x27, 0x3c, 0x8c, 0x3f, 0x44, 0x87, 0xca, 0xc4, 0xb3, 0x54, + 0x6b, 0x40, 0xde, 0x18, 0xd4, 0x7e, 0x2f, 0xbf, 0xc6, 0xa0, 0x46, 0x0f, 0x60, 0x03, 0x77, 0x51, + 0xd3, 0xb1, 0xca, 0xb9, 0x91, 0x4e, 0xc4, 0xc8, 0xf1, 0x02, 0x5a, 0xd9, 0x0c, 0x4c, 0xb8, 0x80, + 0x9c, 0xbc, 0x9c, 0xc7, 0xff, 0x18, 0x88, 0xa2, 0x77, 0x94, 0x30, 0x55, 0xa1, 0x5b, 0xcb, 0x39, + 0x37, 0xd0, 0x56, 0xce, 0x2b, 0xfc, 0x07, 0xec, 0x8f, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x71, + 0xdb, 0x30, 0xf5, 0x9c, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2574,6 +2726,7 @@ type AppRuntimeSyncClient interface { ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) ParseAppServices(ctx context.Context, in *ParseAppServicesReq, opts ...grpc.CallOption) (*AppServices, error) + ListHelmAppRelease(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*HelmAppReleases, error) } type appRuntimeSyncClient struct { @@ -2737,6 +2890,15 @@ func (c *appRuntimeSyncClient) ParseAppServices(ctx context.Context, in *ParseAp return out, nil } +func (c *appRuntimeSyncClient) ListHelmAppRelease(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*HelmAppReleases, error) { + out := new(HelmAppReleases) + err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListHelmAppRelease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AppRuntimeSyncServer is the server API for AppRuntimeSync service. type AppRuntimeSyncServer interface { // Deprecated: - @@ -2757,6 +2919,7 @@ type AppRuntimeSyncServer interface { ListHelmAppDetectConditions(context.Context, *AppReq) (*AppDetectConditions, error) ListAppServices(context.Context, *AppReq) (*AppServices, error) ParseAppServices(context.Context, *ParseAppServicesReq) (*AppServices, error) + ListHelmAppRelease(context.Context, *AppReq) (*HelmAppReleases, error) } func RegisterAppRuntimeSyncServer(s *grpc.Server, srv AppRuntimeSyncServer) { @@ -3069,6 +3232,24 @@ func _AppRuntimeSync_ParseAppServices_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _AppRuntimeSync_ListHelmAppRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AppRuntimeSyncServer).ListHelmAppRelease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AppRuntimeSync/ListHelmAppRelease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AppRuntimeSyncServer).ListHelmAppRelease(ctx, req.(*AppReq)) + } + return interceptor(ctx, in, info, handler) +} + var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AppRuntimeSync", HandlerType: (*AppRuntimeSyncServer)(nil), @@ -3141,6 +3322,10 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ MethodName: "ParseAppServices", Handler: _AppRuntimeSync_ParseAppServices_Handler, }, + { + MethodName: "ListHelmAppRelease", + Handler: _AppRuntimeSync_ListHelmAppRelease_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "app_runtime_server.proto", diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index d071651f9..01aec68b8 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -20,6 +20,7 @@ service AppRuntimeSync { rpc ListHelmAppDetectConditions(AppReq) returns(AppDetectConditions){} rpc ListAppServices(AppReq) returns(AppServices){} rpc ParseAppServices(ParseAppServicesReq) returns(AppServices){} + rpc ListHelmAppRelease(AppReq) returns(HelmAppReleases){} } message Empty {} @@ -263,6 +264,9 @@ message AppStatus { string readme = 6; bool setCPU = 7; bool setMemory = 8; + string values = 9; + string version = 10; + int32 revision = 11; } message AppDetectCondition { @@ -297,3 +301,15 @@ message ParseAppServicesReq { string values=2; } +message HelmAppReleases { + repeated HelmAppRelease helmAppRelease=1; +} + +message HelmAppRelease { + int32 revision=1; + string updated=2; + string status=3; + string chart=4; + string appVersion=5; + string description=6; +} diff --git a/worker/server/server.go b/worker/server/server.go index 8958ceb30..da2977f49 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -198,6 +198,9 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, Memory: memory, SetMemory: memory > 0, Readme: helmApp.Status.Readme, + Values: helmApp.Status.CurrentValues, + Version: helmApp.Status.CurrentVersion, + Revision: int32(helmApp.Status.CurrentRevision), }, nil } @@ -789,12 +792,12 @@ func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppSe configFlags.Namespace = commonutil.String(app.TenantID) kubeClient := kube.New(configFlags) - h, err := helm.NewHelm(kubeClient, configFlags, app.TenantID, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + h, err := helm.NewHelm(kubeClient, configFlags, app.TenantID, r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) if err != nil { return nil, err } - repo := helm.NewRepo("/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + repo := helm.NewRepo(r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) if err := repo.Add(app.AppStoreName, app.AppStoreURL, "", ""); err != nil { logrus.Warningf("add repo: %v", err) } @@ -848,3 +851,42 @@ func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppSe Services: appServices, }, nil } + +func (r *RuntimeServer) ListHelmAppRelease(ctx context.Context, req *pb.AppReq) (*pb.HelmAppReleases, error) { + app, err := db.GetManager().ApplicationDao().GetAppByID(req.AppId) + if err != nil { + return nil, err + } + + configFlags := genericclioptions.NewConfigFlags(true) + configFlags.Namespace = commonutil.String(app.TenantID) + kubeClient := kube.New(configFlags) + + h, err := helm.NewHelm(kubeClient, configFlags, app.TenantID, r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) + if err != nil { + return nil, err + } + + rels, err := h.History(app.AppName) + if err != nil { + return nil, err + } + + var releases []*pb.HelmAppRelease + for _, rel := range rels { + releases = append(releases, &pb.HelmAppRelease{ + Revision: int32(rel.Revision), + Updated: rel.Updated.String(), + Status: rel.Status, + Chart: rel.Chart, + AppVersion: rel.AppVersion, + Description: rel.Description, + }) + } + + logrus.Debugf("%d releases were found for app %s", len(releases), app.AppName+"/"+app.TenantID) + + return &pb.HelmAppReleases{ + HelmAppRelease: releases, + }, nil +} From 161443cccfc2f503fadf7cd4b5ccb90c799c00f3 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Tue, 27 Apr 2021 17:46:25 +0800 Subject: [PATCH 28/65] delete halm app --- api/handler/application_handler.go | 48 ++++++++++++++++++++++-- api/handler/service.go | 47 +++++++++++------------ api/handler/service_handler.go | 2 + db/dao/dao.go | 3 ++ db/mysql/dao/application_config_group.go | 15 ++++++++ worker/server/server.go | 2 +- 6 files changed, 90 insertions(+), 27 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 1fe9f51b8..1e73b2516 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -234,20 +234,42 @@ func (a *ApplicationAction) GetAppByID(appID string) (*dbmodel.Application, erro // DeleteApp - func (a *ApplicationAction) DeleteApp(ctx context.Context, app *dbmodel.Application) error { - // Get the number of services under the application - total, err := db.GetManager().TenantServiceDao().CountServiceByAppID(app.AppID) + if app.AppType == dbmodel.AppTypeHelm { + return a.deleteHelmApp(ctx, app) + } + + return a.deleteRainbondApp(app) +} + +func (a *ApplicationAction) deleteRainbondApp(app *dbmodel.Application) error { + // can't delete rainbond app with components + if err := a.isContainComponents(app.AppID); err != nil { + return err + } + + return db.GetManager().DB().Transaction(func(tx *gorm.DB) error { + return errors.WithMessage(a.deleteApp(tx, app), "delete app from db") + }) +} + +// isContainComponents checks if the app contains components. +func (a *ApplicationAction) isContainComponents(appID string) error { + total, err := db.GetManager().TenantServiceDao().CountServiceByAppID(appID) if err != nil { return err } if total != 0 { return bcode.ErrDeleteDueToBindService } + return nil +} +func (a *ApplicationAction) deleteHelmApp(ctx context.Context, app *dbmodel.Application) error { ctx, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel() return db.GetManager().DB().Transaction(func(tx *gorm.DB) error { - if err := db.GetManager().ApplicationDaoTransactions(tx).DeleteApp(app.AppID); err != nil { + if err := a.deleteApp(tx, app); err != nil { return err } @@ -260,6 +282,26 @@ func (a *ApplicationAction) DeleteApp(ctx context.Context, app *dbmodel.Applicat }) } +func (a *ApplicationAction) deleteApp(tx *gorm.DB, app *dbmodel.Application) error { + // delete app config group service + if err := db.GetManager().AppConfigGroupServiceDaoTransactions(tx).DeleteByAppID(app.AppID); err != nil { + return err + } + + // delete config group items + if err := db.GetManager().AppConfigGroupItemDaoTransactions(tx).DeleteByAppID(app.AppID); err != nil { + return err + } + + // delete config group + if err := db.GetManager().AppConfigGroupDaoTransactions(tx).DeleteByAppID(app.AppID); err != nil { + return err + } + + // delete application + return db.GetManager().ApplicationDaoTransactions(tx).DeleteApp(app.AppID) +} + // BatchUpdateComponentPorts - func (a *ApplicationAction) BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error { if err := a.checkPorts(appID, ports); err != nil { diff --git a/api/handler/service.go b/api/handler/service.go index a04e82ac2..939fe4e02 100644 --- a/api/handler/service.go +++ b/api/handler/service.go @@ -2062,24 +2062,20 @@ func (s *ServiceAction) isServiceClosed(serviceID string) error { return nil } -// delServiceMetadata deletes service-related metadata in the database. -func (s *ServiceAction) delServiceMetadata(serviceID string) error { - service, err := db.GetManager().TenantServiceDao().GetServiceByID(serviceID) - if err != nil { - return err - } - logrus.Infof("delete service %s %s", serviceID, service.ServiceAlias) - tx := db.GetManager().Begin() - defer func() { - if r := recover(); r != nil { - logrus.Errorf("Unexpected panic occurred, rollback transaction: %v", r) - tx.Rollback() +func (s *ServiceAction) DeleteComponentInBatch(tx *gorm.DB, components []*dbmodel.TenantServices) error { + for _, cpt := range components { + err := s.deleteComponent(tx, cpt) + if err != nil { + return err } - }() + } + return nil +} + +func (s *ServiceAction) deleteComponent(tx *gorm.DB, service *dbmodel.TenantServices) error { delService := service.ChangeDelete() delService.ID = 0 if err := db.GetManager().TenantServiceDeleteDaoTransactions(tx).AddModel(delService); err != nil { - tx.Rollback() return err } var deleteServicePropertyFunc = []func(serviceID string) error{ @@ -2104,27 +2100,32 @@ func (s *ServiceAction) delServiceMetadata(serviceID string) error { db.GetManager().TenantServiceMonitorDaoTransactions(tx).DeleteServiceMonitorByServiceID, db.GetManager().AppConfigGroupServiceDaoTransactions(tx).DeleteEffectiveServiceByServiceID, } - if err := GetGatewayHandler().DeleteTCPRuleByServiceIDWithTransaction(serviceID, tx); err != nil { - tx.Rollback() + if err := GetGatewayHandler().DeleteTCPRuleByServiceIDWithTransaction(service.ServiceID, tx); err != nil { return err } - if err := GetGatewayHandler().DeleteHTTPRuleByServiceIDWithTransaction(serviceID, tx); err != nil { - tx.Rollback() + if err := GetGatewayHandler().DeleteHTTPRuleByServiceIDWithTransaction(service.ServiceID, tx); err != nil { return err } for _, del := range deleteServicePropertyFunc { - if err := del(serviceID); err != nil { + if err := del(service.ServiceID); err != nil { if err != gorm.ErrRecordNotFound { - tx.Rollback() return err } } } - if err := tx.Commit().Error; err != nil { - tx.Rollback() + return nil +} + +// delServiceMetadata deletes service-related metadata in the database. +func (s *ServiceAction) delServiceMetadata(serviceID string) error { + service, err := db.GetManager().TenantServiceDao().GetServiceByID(serviceID) + if err != nil { return err } - return nil + logrus.Infof("delete service %s %s", serviceID, service.ServiceAlias) + return db.GetManager().DB().Transaction(func(tx *gorm.DB) error { + return s.deleteComponent(tx, service) + }) } // delLogFile deletes persistent data related to the service based on serviceID. diff --git a/api/handler/service_handler.go b/api/handler/service_handler.go index 716f63dfa..bb7ffce26 100644 --- a/api/handler/service_handler.go +++ b/api/handler/service_handler.go @@ -25,6 +25,7 @@ import ( dbmodel "github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/worker/discover/model" "github.com/goodrain/rainbond/worker/server/pb" + "github.com/jinzhu/gorm" ) //ServiceHandler service handler @@ -76,6 +77,7 @@ type ServiceHandler interface { GetServiceCheckInfo(uuid string) (*exector.ServiceCheckResult, *util.APIHandleError) GetServiceDeployInfo(tenantID, serviceID string) (*pb.DeployInfo, *util.APIHandleError) ListVersionInfo(serviceID string) (*api_model.BuildListRespVO, error) + DeleteComponentInBatch(tx *gorm.DB, components []*dbmodel.TenantServices) error AddAutoscalerRule(req *api_model.AutoscalerRuleReq) error UpdAutoscalerRule(req *api_model.AutoscalerRuleReq) error diff --git a/db/dao/dao.go b/db/dao/dao.go index 5a188d8ab..80cb0200b 100644 --- a/db/dao/dao.go +++ b/db/dao/dao.go @@ -83,6 +83,7 @@ type AppConfigGroupDao interface { ListByServiceID(sid string) ([]*model.ApplicationConfigGroup, error) GetConfigGroupsByAppID(appID string, page, pageSize int) ([]*model.ApplicationConfigGroup, int64, error) DeleteConfigGroup(appID, configGroupName string) error + DeleteByAppID(appID string) error } //AppConfigGroupServiceDao service config group Dao @@ -91,6 +92,7 @@ type AppConfigGroupServiceDao interface { GetConfigGroupServicesByID(appID, configGroupName string) ([]*model.ConfigGroupService, error) DeleteConfigGroupService(appID, configGroupName string) error DeleteEffectiveServiceByServiceID(serviceID string) error + DeleteByAppID(appID string) error } //AppConfigGroupItemDao Application config item group Dao @@ -99,6 +101,7 @@ type AppConfigGroupItemDao interface { GetConfigGroupItemsByID(appID, configGroupName string) ([]*model.ConfigGroupItem, error) ListByServiceID(sid string) ([]*model.ConfigGroupItem, error) DeleteConfigGroupItem(appID, configGroupName string) error + DeleteByAppID(appID string) error } // VolumeTypeDao volume type dao diff --git a/db/mysql/dao/application_config_group.go b/db/mysql/dao/application_config_group.go index 53d003a9d..0f798f9f4 100644 --- a/db/mysql/dao/application_config_group.go +++ b/db/mysql/dao/application_config_group.go @@ -69,6 +69,11 @@ func (a *AppConfigGroupDaoImpl) DeleteConfigGroup(appID, configGroupName string) return a.DB.Where("app_id = ? AND config_group_name = ?", appID, configGroupName).Delete(model.ApplicationConfigGroup{}).Error } +// DeleteByAppID - +func (a *AppConfigGroupDaoImpl) DeleteByAppID(appID string) error { + return a.DB.Where("app_id=?", appID).Delete(model.ApplicationConfigGroup{}).Error +} + // AppConfigGroupServiceDaoImpl - type AppConfigGroupServiceDaoImpl struct { DB *gorm.DB @@ -111,6 +116,11 @@ func (a *AppConfigGroupServiceDaoImpl) DeleteEffectiveServiceByServiceID(service return a.DB.Where("service_id = ?", serviceID).Delete(model.ConfigGroupService{}).Error } +// DeleteByAppID deletes ConfigGroupService based on the given appID. +func (a *AppConfigGroupServiceDaoImpl) DeleteByAppID(appID string) error { + return a.DB.Where("app_id = ?", appID).Delete(model.ConfigGroupService{}).Error +} + // AppConfigGroupItemDaoImpl - type AppConfigGroupItemDaoImpl struct { DB *gorm.DB @@ -159,3 +169,8 @@ func (a *AppConfigGroupItemDaoImpl) ListByServiceID(sid string) ([]*model.Config func (a *AppConfigGroupItemDaoImpl) DeleteConfigGroupItem(appID, configGroupName string) error { return a.DB.Where("app_id = ? AND config_group_name = ?", appID, configGroupName).Delete(model.ConfigGroupItem{}).Error } + +// DeleteByAppID - +func (a *AppConfigGroupItemDaoImpl) DeleteByAppID(appID string) error { + return a.DB.Where("app_id=?", appID).Delete(model.ConfigGroupItem{}).Error +} diff --git a/worker/server/server.go b/worker/server/server.go index da2977f49..8a0cad8c5 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -185,7 +185,7 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, for _, pod := range pods { for _, c := range pod.Spec.Containers { cpu += c.Resources.Requests.Cpu().MilliValue() - memory += c.Resources.Limits.Memory().Value() / 1024 / 1024 + memory += c.Resources.Requests.Memory().Value() / 1024 / 1024 } } From ef9d4ef057484279d0eafaa775acf5074c628c33 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 29 Apr 2021 15:56:34 +0800 Subject: [PATCH 29/65] replase values with overrides --- api/api/api_interface.go | 1 - api/api_routers/version2/v2Routers.go | 1 - api/controller/application.go | 19 +- api/handler/application_config_group_test.go | 2 +- api/handler/application_handler.go | 77 ++-- api/model/app.go | 20 +- api/model/model.go | 14 +- api/util/bcode/application.go | 2 + config/crd/rainbond.goodrain.io_helmapps.yaml | 32 +- db/db_mock.go | 206 +++++++++ hack/k8s/codegen/boilerplate.go.txt | 2 +- hack/k8s/codegen/update-generated.sh | 2 +- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 43 +- .../v1alpha1/zz_generated.deepcopy.go | 12 +- .../clientset/versioned/clientset.go | 2 +- pkg/generated/clientset/versioned/doc.go | 2 +- .../versioned/fake/clientset_generated.go | 2 +- pkg/generated/clientset/versioned/fake/doc.go | 2 +- .../clientset/versioned/fake/register.go | 2 +- .../clientset/versioned/scheme/doc.go | 2 +- .../clientset/versioned/scheme/register.go | 2 +- .../versioned/typed/rainbond/v1alpha1/doc.go | 2 +- .../typed/rainbond/v1alpha1/fake/doc.go | 2 +- .../rainbond/v1alpha1/fake/fake_helmapp.go | 2 +- .../v1alpha1/fake/fake_rainbond_client.go | 2 +- .../rainbond/v1alpha1/generated_expansion.go | 2 +- .../typed/rainbond/v1alpha1/helmapp.go | 2 +- .../rainbond/v1alpha1/rainbond_client.go | 2 +- .../informers/externalversions/factory.go | 2 +- .../informers/externalversions/generic.go | 2 +- .../internalinterfaces/factory_interfaces.go | 2 +- .../externalversions/rainbond/interface.go | 2 +- .../rainbond/v1alpha1/helmapp.go | 2 +- .../rainbond/v1alpha1/interface.go | 2 +- .../rainbond/v1alpha1/expansion_generated.go | 2 +- .../listers/rainbond/v1alpha1/helmapp.go | 2 +- worker/controllers/helmapp/controlloop.go | 26 +- worker/controllers/helmapp/detector.go | 2 +- worker/controllers/helmapp/finilizer.go | 2 +- worker/controllers/helmapp/helm/app.go | 60 +-- worker/controllers/helmapp/helm/helm.go | 40 +- worker/controllers/helmapp/status.go | 10 +- worker/server/pb/app_runtime_server.pb.go | 410 +++++++----------- worker/server/pb/app_runtime_server.proto | 7 +- worker/server/server.go | 121 +----- 45 files changed, 609 insertions(+), 546 deletions(-) diff --git a/api/api/api_interface.go b/api/api/api_interface.go index 691c93216..74df6b001 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -169,7 +169,6 @@ type ApplicationInterface interface { Install(w http.ResponseWriter, r *http.Request) ListServices(w http.ResponseWriter, r *http.Request) EnsureAppName(w http.ResponseWriter, r *http.Request) - ParseServices(w http.ResponseWriter, r *http.Request) ListHelmAppReleases(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index 332b855c0..f815ea09f 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -320,7 +320,6 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/status", controller.GetManager().GetAppStatus) r.Get("/detect-process", controller.GetManager().GetDetectProcess) r.Post("/install", controller.GetManager().Install) - r.Post("/parse-services", controller.GetManager().ParseServices) r.Get("/helm-releases", controller.GetManager().ListHelmAppReleases) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) diff --git a/api/controller/application.go b/api/controller/application.go index 558133f59..77839c544 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -215,7 +215,7 @@ func (a *ApplicationController) Install(w http.ResponseWriter, r *http.Request) return } - if err := handler.GetApplicationHandler().Install(r.Context(), app, installAppReq.Values); err != nil { + if err := handler.GetApplicationHandler().Install(r.Context(), app, installAppReq.Overrides); err != nil { httputil.ReturnBcodeError(r, w, err) return } @@ -267,23 +267,6 @@ func (a *ApplicationController) EnsureAppName(w http.ResponseWriter, r *http.Req httputil.ReturnSuccess(r, w, res) } -func (a *ApplicationController) ParseServices(w http.ResponseWriter, r *http.Request) { - app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) - - var installAppReq model.ParseAppServicesReq - if !httputil.ValidatorRequestStructAndErrorResponse(r, w, &installAppReq, nil) { - return - } - - services, err := handler.GetApplicationHandler().ParseServices(r.Context(), app, installAppReq.Values) - if err != nil { - httputil.ReturnBcodeError(r, w, err) - return - } - - httputil.ReturnSuccess(r, w, services) -} - func (a *ApplicationController) ListHelmAppReleases(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) diff --git a/api/handler/application_config_group_test.go b/api/handler/application_config_group_test.go index cadb49630..948197031 100644 --- a/api/handler/application_config_group_test.go +++ b/api/handler/application_config_group_test.go @@ -282,7 +282,7 @@ func TestListConfigGroups(t *testing.T) { db.SetTestManager(manager) tc.mockFunc(manager, ctrl) - appAction := NewApplicationHandler(nil, nil) + appAction := NewApplicationHandler(nil, nil, nil, nil) resp, err := appAction.ListConfigGroups(tc.appID, 1, 10) if (err != nil) != tc.wanterr { t.Errorf("Unexpected error = %v, wantErr %v", err, tc.wanterr) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 1e73b2516..1d8999d2e 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -2,6 +2,7 @@ package handler import ( "context" + "encoding/base64" "fmt" "sort" "strconv" @@ -24,6 +25,7 @@ import ( k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientset "k8s.io/client-go/kubernetes" + "sigs.k8s.io/yaml" ) // ApplicationAction - @@ -50,10 +52,9 @@ type ApplicationHandler interface { BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error GetStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) - Install(ctx context.Context, app *dbmodel.Application, values string) error + Install(ctx context.Context, app *dbmodel.Application, overrides []string) error ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) EnsureAppName(ctx context.Context, namespace, appName string) (*model.EnsureAppNameResp, error) - ParseServices(ctx context.Context, app *dbmodel.Application, values string) ([]*model.AppService, error) ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error) DeleteConfigGroup(appID, configGroupName string) error @@ -191,8 +192,8 @@ func (a *ApplicationAction) updateHelmApp(ctx context.Context, app *dbmodel.Appl } return errors.Wrap(err, "update app") } - if req.Values != "" { - helmApp.Spec.Values = req.Values + if len(req.Overrides) > 0 { + helmApp.Spec.Overrides = req.Overrides } if req.Version != "" { helmApp.Spec.Version = req.Version @@ -204,6 +205,20 @@ func (a *ApplicationAction) updateHelmApp(ctx context.Context, app *dbmodel.Appl return err } +func (a *ApplicationAction) validateValues(encodedValues string) error { + values, err := base64.StdEncoding.DecodeString(encodedValues) + if err != nil { + return errors.Wrap(bcode.ErrInvalidHelmAppValues, err.Error()) + } + + obj := make(map[string]interface{}) + if err = yaml.Unmarshal(values, obj); err != nil { + return errors.Wrap(bcode.ErrInvalidHelmAppValues, err.Error()) + } + + return nil +} + // ListApps - func (a *ApplicationAction) ListApps(tenantID, appName string, page, pageSize int) (*model.ListAppResponse, error) { var resp model.ListAppResponse @@ -401,16 +416,16 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat } res := &model.AppStatus{ - Status: status.Status, - Cpu: cpu, - Memory: memory, - Disk: int64(diskUsage), - Phase: status.Phase, - ValuesTemplate: status.ValuesTemplate, - Values: status.Values, - Readme: status.Readme, - Version: status.Version, - Revision: int(status.Revision), + Status: status.Status, + Cpu: cpu, + Memory: memory, + Disk: int64(diskUsage), + Phase: status.Phase, + Overrides: status.Overrides, + Values: status.Values, + Readme: status.Readme, + Version: status.Version, + Revision: int(status.Revision), } return res, nil } @@ -438,36 +453,7 @@ func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.A return conditions, nil } -func (a *ApplicationAction) ParseServices(ctx context.Context, app *dbmodel.Application, values string) ([]*model.AppService, error) { - nctx, cancel := context.WithTimeout(ctx, 60*time.Second) - defer cancel() - - services, err := a.statusCli.ParseAppServices(nctx, &pb.ParseAppServicesReq{ - AppID: app.AppID, - Values: values, - }) - if err != nil { - return nil, err - } - - var appServices []*model.AppService - for _, service := range services.Services { - svc := &model.AppService{ - ServiceName: service.Name, - Address: service.Address, - } - - for _, port := range service.TcpPorts { - svc.TCPPorts = append(svc.TCPPorts, port) - } - - appServices = append(appServices, svc) - } - - return appServices, nil -} - -func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, values string) error { +func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, overrides []string) error { ctx1, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() @@ -481,7 +467,8 @@ func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Applicatio ctx3, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() - helmApp.Spec.Values = values + helmApp.Spec.Overrides = overrides + helmApp.Spec.PreStatus = "Configured" _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(ctx3, helmApp, metav1.UpdateOptions{}) if err != nil { return err diff --git a/api/model/app.go b/api/model/app.go index 6f9b1f36e..2fb78f5b8 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -10,16 +10,16 @@ type AppPort struct { // AppStatus - type AppStatus struct { - Status string `json:"status"` - Cpu *int64 `json:"cpu"` - Memory *int64 `json:"memory"` - Disk int64 `json:"disk"` - Phase string `json:"phase"` - ValuesTemplate string `json:"valuesTemplate"` - Values string `json:"values"` - Readme string `json:"readme"` - Version string `json:"version"` - Revision int `json:"revision"` + Status string `json:"status"` + Cpu *int64 `json:"cpu"` + Memory *int64 `json:"memory"` + Disk int64 `json:"disk"` + Phase string `json:"phase"` + Values string `json:"values"` + Readme string `json:"readme"` + Version string `json:"version"` + Revision int `json:"revision"` + Overrides []string `json:"overrides"` } // AppDetectProcess - diff --git a/api/model/model.go b/api/model/model.go index 4b1f52838..4fec9fde3 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1691,16 +1691,16 @@ type ListServiceResponse struct { // UpdateAppRequest - type UpdateAppRequest struct { - AppName string `json:"app_name"` - GovernanceMode string `json:"governance_mode"` - Values string `json:"values"` - Version string `json:"version"` - Revision int `json:"revision"` + AppName string `json:"app_name"` + GovernanceMode string `json:"governance_mode"` + Overrides []string `json:"overrides"` + Version string `json:"version"` + Revision int `json:"revision"` } // NeedUpdateHelmApp check if necessary to update the helm app. func (u *UpdateAppRequest) NeedUpdateHelmApp() bool { - return u.Values != "" || u.Version != "" || u.Revision != 0 + return len(u.Overrides) > 0 || u.Version != "" || u.Revision != 0 } // BindServiceRequest - @@ -1710,7 +1710,7 @@ type BindServiceRequest struct { // InstallAppReq - type InstallAppReq struct { - Values string `json:"values"` + Overrides []string `json:"overrides"` } // ParseAppServicesReq - diff --git a/api/util/bcode/application.go b/api/util/bcode/application.go index 632e9e2de..004214ce2 100644 --- a/api/util/bcode/application.go +++ b/api/util/bcode/application.go @@ -14,6 +14,8 @@ var ( ErrDeleteDueToBindService = newByMessage(400, 11005, "the application cannot be deleted because there are bound services") ErrK8sServiceNameExists = newByMessage(400, 11006, "kubernetes service name already exists") + + ErrInvalidHelmAppValues = newByMessage(400, 11007, "invalid helm app values") ) // app config group 11100~11199 diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml index b54c49892..d4384bd60 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -37,23 +37,28 @@ spec: description: HelmAppSpec defines the desired state of HelmApp properties: appName: - description: 'The application name. TODO: validation' + description: The application name. type: string appStore: - description: 'The helm app store. TODO: validation. not null' + description: The helm app store. properties: branch: description: The branch of a git repo. type: string name: + description: The name of app store. type: string password: + description: The chart repository password where to locate the requested + chart type: string url: description: The url of helm repo, sholud be a helm native repo url or a git url. type: string username: + description: The chart repository username where to locate the requested + chart type: string version: description: The verision of the helm app store. @@ -65,6 +70,11 @@ spec: type: object eid: type: string + overrides: + description: Overrides will overrides the values in the chart. + items: + type: string + type: array preStatus: description: The prerequisite status. enum: @@ -74,11 +84,8 @@ spec: revision: description: The application revision. type: integer - values: - description: The values.yaml of the helm app, encoded by base64. - type: string version: - description: 'The application version. TODO: validation' + description: The application version. type: string required: - appName @@ -124,11 +131,14 @@ spec: description: The actual revision of the helm app, as same as the revision from 'helm status' type: integer - currentValues: - description: The base64 encoded string from the active values. - type: string currentVersion: + description: The version infect. type: string + overrides: + additionalProperties: + type: string + description: Overrides in effect. + type: object phase: description: The phase of the helm app. type: string @@ -139,13 +149,13 @@ spec: description: The status of helm app. type: string targetRevision: - description: TargetRevision is the revision that used to rollbak the + description: TargetRevision is the revision that used to rollback the helm app. After executing command 'helm rollback [appName] [targetRevision]', the actual revision of helm app is currentRevision, not targetRevision. The new currentRevision is equals to the origin currentRevision plus one. type: integer - valuesTemplate: + values: description: The base64 encoded string from values.yaml type: string required: diff --git a/db/db_mock.go b/db/db_mock.go index 36f25e660..5b137760c 100644 --- a/db/db_mock.go +++ b/db/db_mock.go @@ -36,6 +36,7 @@ func (m *MockManager) EXPECT() *MockManagerMockRecorder { // CloseManager mocks base method func (m *MockManager) CloseManager() error { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CloseManager") ret0, _ := ret[0].(error) return ret0 @@ -43,11 +44,13 @@ func (m *MockManager) CloseManager() error { // CloseManager indicates an expected call of CloseManager func (mr *MockManagerMockRecorder) CloseManager() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseManager", reflect.TypeOf((*MockManager)(nil).CloseManager)) } // Begin mocks base method func (m *MockManager) Begin() *gorm.DB { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Begin") ret0, _ := ret[0].(*gorm.DB) return ret0 @@ -55,11 +58,27 @@ func (m *MockManager) Begin() *gorm.DB { // Begin indicates an expected call of Begin func (mr *MockManagerMockRecorder) Begin() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Begin", reflect.TypeOf((*MockManager)(nil).Begin)) } +// DB mocks base method +func (m *MockManager) DB() *gorm.DB { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DB") + ret0, _ := ret[0].(*gorm.DB) + return ret0 +} + +// DB indicates an expected call of DB +func (mr *MockManagerMockRecorder) DB() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DB", reflect.TypeOf((*MockManager)(nil).DB)) +} + // EnsureEndTransactionFunc mocks base method func (m *MockManager) EnsureEndTransactionFunc() func(*gorm.DB) { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EnsureEndTransactionFunc") ret0, _ := ret[0].(func(*gorm.DB)) return ret0 @@ -67,11 +86,13 @@ func (m *MockManager) EnsureEndTransactionFunc() func(*gorm.DB) { // EnsureEndTransactionFunc indicates an expected call of EnsureEndTransactionFunc func (mr *MockManagerMockRecorder) EnsureEndTransactionFunc() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureEndTransactionFunc", reflect.TypeOf((*MockManager)(nil).EnsureEndTransactionFunc)) } // VolumeTypeDao mocks base method func (m *MockManager) VolumeTypeDao() dao.VolumeTypeDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "VolumeTypeDao") ret0, _ := ret[0].(dao.VolumeTypeDao) return ret0 @@ -79,11 +100,13 @@ func (m *MockManager) VolumeTypeDao() dao.VolumeTypeDao { // VolumeTypeDao indicates an expected call of VolumeTypeDao func (mr *MockManagerMockRecorder) VolumeTypeDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VolumeTypeDao", reflect.TypeOf((*MockManager)(nil).VolumeTypeDao)) } // LicenseDao mocks base method func (m *MockManager) LicenseDao() dao.LicenseDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "LicenseDao") ret0, _ := ret[0].(dao.LicenseDao) return ret0 @@ -91,11 +114,13 @@ func (m *MockManager) LicenseDao() dao.LicenseDao { // LicenseDao indicates an expected call of LicenseDao func (mr *MockManagerMockRecorder) LicenseDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LicenseDao", reflect.TypeOf((*MockManager)(nil).LicenseDao)) } // AppDao mocks base method func (m *MockManager) AppDao() dao.AppDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppDao") ret0, _ := ret[0].(dao.AppDao) return ret0 @@ -103,11 +128,13 @@ func (m *MockManager) AppDao() dao.AppDao { // AppDao indicates an expected call of AppDao func (mr *MockManagerMockRecorder) AppDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppDao", reflect.TypeOf((*MockManager)(nil).AppDao)) } // ApplicationDao mocks base method func (m *MockManager) ApplicationDao() dao.ApplicationDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ApplicationDao") ret0, _ := ret[0].(dao.ApplicationDao) return ret0 @@ -115,11 +142,27 @@ func (m *MockManager) ApplicationDao() dao.ApplicationDao { // ApplicationDao indicates an expected call of ApplicationDao func (mr *MockManagerMockRecorder) ApplicationDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationDao", reflect.TypeOf((*MockManager)(nil).ApplicationDao)) } +// ApplicationDaoTransactions mocks base method +func (m *MockManager) ApplicationDaoTransactions(db *gorm.DB) dao.ApplicationDao { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ApplicationDaoTransactions", db) + ret0, _ := ret[0].(dao.ApplicationDao) + return ret0 +} + +// ApplicationDaoTransactions indicates an expected call of ApplicationDaoTransactions +func (mr *MockManagerMockRecorder) ApplicationDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationDaoTransactions", reflect.TypeOf((*MockManager)(nil).ApplicationDaoTransactions), db) +} + // AppConfigGroupDao mocks base method func (m *MockManager) AppConfigGroupDao() dao.AppConfigGroupDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppConfigGroupDao") ret0, _ := ret[0].(dao.AppConfigGroupDao) return ret0 @@ -127,11 +170,13 @@ func (m *MockManager) AppConfigGroupDao() dao.AppConfigGroupDao { // AppConfigGroupDao indicates an expected call of AppConfigGroupDao func (mr *MockManagerMockRecorder) AppConfigGroupDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppConfigGroupDao", reflect.TypeOf((*MockManager)(nil).AppConfigGroupDao)) } // AppConfigGroupDaoTransactions mocks base method func (m *MockManager) AppConfigGroupDaoTransactions(db *gorm.DB) dao.AppConfigGroupDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppConfigGroupDaoTransactions", db) ret0, _ := ret[0].(dao.AppConfigGroupDao) return ret0 @@ -139,11 +184,13 @@ func (m *MockManager) AppConfigGroupDaoTransactions(db *gorm.DB) dao.AppConfigGr // AppConfigGroupDaoTransactions indicates an expected call of AppConfigGroupDaoTransactions func (mr *MockManagerMockRecorder) AppConfigGroupDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppConfigGroupDaoTransactions", reflect.TypeOf((*MockManager)(nil).AppConfigGroupDaoTransactions), db) } // AppConfigGroupServiceDao mocks base method func (m *MockManager) AppConfigGroupServiceDao() dao.AppConfigGroupServiceDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppConfigGroupServiceDao") ret0, _ := ret[0].(dao.AppConfigGroupServiceDao) return ret0 @@ -151,11 +198,13 @@ func (m *MockManager) AppConfigGroupServiceDao() dao.AppConfigGroupServiceDao { // AppConfigGroupServiceDao indicates an expected call of AppConfigGroupServiceDao func (mr *MockManagerMockRecorder) AppConfigGroupServiceDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppConfigGroupServiceDao", reflect.TypeOf((*MockManager)(nil).AppConfigGroupServiceDao)) } // AppConfigGroupServiceDaoTransactions mocks base method func (m *MockManager) AppConfigGroupServiceDaoTransactions(db *gorm.DB) dao.AppConfigGroupServiceDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppConfigGroupServiceDaoTransactions", db) ret0, _ := ret[0].(dao.AppConfigGroupServiceDao) return ret0 @@ -163,11 +212,13 @@ func (m *MockManager) AppConfigGroupServiceDaoTransactions(db *gorm.DB) dao.AppC // AppConfigGroupServiceDaoTransactions indicates an expected call of AppConfigGroupServiceDaoTransactions func (mr *MockManagerMockRecorder) AppConfigGroupServiceDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppConfigGroupServiceDaoTransactions", reflect.TypeOf((*MockManager)(nil).AppConfigGroupServiceDaoTransactions), db) } // AppConfigGroupItemDao mocks base method func (m *MockManager) AppConfigGroupItemDao() dao.AppConfigGroupItemDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppConfigGroupItemDao") ret0, _ := ret[0].(dao.AppConfigGroupItemDao) return ret0 @@ -175,11 +226,13 @@ func (m *MockManager) AppConfigGroupItemDao() dao.AppConfigGroupItemDao { // AppConfigGroupItemDao indicates an expected call of AppConfigGroupItemDao func (mr *MockManagerMockRecorder) AppConfigGroupItemDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppConfigGroupItemDao", reflect.TypeOf((*MockManager)(nil).AppConfigGroupItemDao)) } // AppConfigGroupItemDaoTransactions mocks base method func (m *MockManager) AppConfigGroupItemDaoTransactions(db *gorm.DB) dao.AppConfigGroupItemDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppConfigGroupItemDaoTransactions", db) ret0, _ := ret[0].(dao.AppConfigGroupItemDao) return ret0 @@ -187,11 +240,13 @@ func (m *MockManager) AppConfigGroupItemDaoTransactions(db *gorm.DB) dao.AppConf // AppConfigGroupItemDaoTransactions indicates an expected call of AppConfigGroupItemDaoTransactions func (mr *MockManagerMockRecorder) AppConfigGroupItemDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppConfigGroupItemDaoTransactions", reflect.TypeOf((*MockManager)(nil).AppConfigGroupItemDaoTransactions), db) } // EnterpriseDao mocks base method func (m *MockManager) EnterpriseDao() dao.EnterpriseDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EnterpriseDao") ret0, _ := ret[0].(dao.EnterpriseDao) return ret0 @@ -199,11 +254,13 @@ func (m *MockManager) EnterpriseDao() dao.EnterpriseDao { // EnterpriseDao indicates an expected call of EnterpriseDao func (mr *MockManagerMockRecorder) EnterpriseDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnterpriseDao", reflect.TypeOf((*MockManager)(nil).EnterpriseDao)) } // TenantDao mocks base method func (m *MockManager) TenantDao() dao.TenantDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantDao") ret0, _ := ret[0].(dao.TenantDao) return ret0 @@ -211,11 +268,13 @@ func (m *MockManager) TenantDao() dao.TenantDao { // TenantDao indicates an expected call of TenantDao func (mr *MockManagerMockRecorder) TenantDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantDao", reflect.TypeOf((*MockManager)(nil).TenantDao)) } // TenantDaoTransactions mocks base method func (m *MockManager) TenantDaoTransactions(db *gorm.DB) dao.TenantDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantDaoTransactions", db) ret0, _ := ret[0].(dao.TenantDao) return ret0 @@ -223,11 +282,13 @@ func (m *MockManager) TenantDaoTransactions(db *gorm.DB) dao.TenantDao { // TenantDaoTransactions indicates an expected call of TenantDaoTransactions func (mr *MockManagerMockRecorder) TenantDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantDaoTransactions), db) } // TenantServiceDao mocks base method func (m *MockManager) TenantServiceDao() dao.TenantServiceDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceDao") ret0, _ := ret[0].(dao.TenantServiceDao) return ret0 @@ -235,11 +296,13 @@ func (m *MockManager) TenantServiceDao() dao.TenantServiceDao { // TenantServiceDao indicates an expected call of TenantServiceDao func (mr *MockManagerMockRecorder) TenantServiceDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceDao", reflect.TypeOf((*MockManager)(nil).TenantServiceDao)) } // TenantServiceDeleteDao mocks base method func (m *MockManager) TenantServiceDeleteDao() dao.TenantServiceDeleteDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceDeleteDao") ret0, _ := ret[0].(dao.TenantServiceDeleteDao) return ret0 @@ -247,11 +310,13 @@ func (m *MockManager) TenantServiceDeleteDao() dao.TenantServiceDeleteDao { // TenantServiceDeleteDao indicates an expected call of TenantServiceDeleteDao func (mr *MockManagerMockRecorder) TenantServiceDeleteDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceDeleteDao", reflect.TypeOf((*MockManager)(nil).TenantServiceDeleteDao)) } // TenantServiceDaoTransactions mocks base method func (m *MockManager) TenantServiceDaoTransactions(db *gorm.DB) dao.TenantServiceDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServiceDao) return ret0 @@ -259,11 +324,13 @@ func (m *MockManager) TenantServiceDaoTransactions(db *gorm.DB) dao.TenantServic // TenantServiceDaoTransactions indicates an expected call of TenantServiceDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceDaoTransactions), db) } // TenantServiceDeleteDaoTransactions mocks base method func (m *MockManager) TenantServiceDeleteDaoTransactions(db *gorm.DB) dao.TenantServiceDeleteDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceDeleteDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServiceDeleteDao) return ret0 @@ -271,11 +338,13 @@ func (m *MockManager) TenantServiceDeleteDaoTransactions(db *gorm.DB) dao.Tenant // TenantServiceDeleteDaoTransactions indicates an expected call of TenantServiceDeleteDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceDeleteDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceDeleteDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceDeleteDaoTransactions), db) } // TenantServicesPortDao mocks base method func (m *MockManager) TenantServicesPortDao() dao.TenantServicesPortDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServicesPortDao") ret0, _ := ret[0].(dao.TenantServicesPortDao) return ret0 @@ -283,11 +352,13 @@ func (m *MockManager) TenantServicesPortDao() dao.TenantServicesPortDao { // TenantServicesPortDao indicates an expected call of TenantServicesPortDao func (mr *MockManagerMockRecorder) TenantServicesPortDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServicesPortDao", reflect.TypeOf((*MockManager)(nil).TenantServicesPortDao)) } // TenantServicesPortDaoTransactions mocks base method func (m *MockManager) TenantServicesPortDaoTransactions(arg0 *gorm.DB) dao.TenantServicesPortDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServicesPortDaoTransactions", arg0) ret0, _ := ret[0].(dao.TenantServicesPortDao) return ret0 @@ -295,11 +366,13 @@ func (m *MockManager) TenantServicesPortDaoTransactions(arg0 *gorm.DB) dao.Tenan // TenantServicesPortDaoTransactions indicates an expected call of TenantServicesPortDaoTransactions func (mr *MockManagerMockRecorder) TenantServicesPortDaoTransactions(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServicesPortDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServicesPortDaoTransactions), arg0) } // TenantServiceRelationDao mocks base method func (m *MockManager) TenantServiceRelationDao() dao.TenantServiceRelationDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceRelationDao") ret0, _ := ret[0].(dao.TenantServiceRelationDao) return ret0 @@ -307,11 +380,13 @@ func (m *MockManager) TenantServiceRelationDao() dao.TenantServiceRelationDao { // TenantServiceRelationDao indicates an expected call of TenantServiceRelationDao func (mr *MockManagerMockRecorder) TenantServiceRelationDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceRelationDao", reflect.TypeOf((*MockManager)(nil).TenantServiceRelationDao)) } // TenantServiceRelationDaoTransactions mocks base method func (m *MockManager) TenantServiceRelationDaoTransactions(arg0 *gorm.DB) dao.TenantServiceRelationDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceRelationDaoTransactions", arg0) ret0, _ := ret[0].(dao.TenantServiceRelationDao) return ret0 @@ -319,11 +394,13 @@ func (m *MockManager) TenantServiceRelationDaoTransactions(arg0 *gorm.DB) dao.Te // TenantServiceRelationDaoTransactions indicates an expected call of TenantServiceRelationDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceRelationDaoTransactions(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceRelationDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceRelationDaoTransactions), arg0) } // TenantServiceEnvVarDao mocks base method func (m *MockManager) TenantServiceEnvVarDao() dao.TenantServiceEnvVarDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceEnvVarDao") ret0, _ := ret[0].(dao.TenantServiceEnvVarDao) return ret0 @@ -331,11 +408,13 @@ func (m *MockManager) TenantServiceEnvVarDao() dao.TenantServiceEnvVarDao { // TenantServiceEnvVarDao indicates an expected call of TenantServiceEnvVarDao func (mr *MockManagerMockRecorder) TenantServiceEnvVarDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceEnvVarDao", reflect.TypeOf((*MockManager)(nil).TenantServiceEnvVarDao)) } // TenantServiceEnvVarDaoTransactions mocks base method func (m *MockManager) TenantServiceEnvVarDaoTransactions(arg0 *gorm.DB) dao.TenantServiceEnvVarDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceEnvVarDaoTransactions", arg0) ret0, _ := ret[0].(dao.TenantServiceEnvVarDao) return ret0 @@ -343,11 +422,13 @@ func (m *MockManager) TenantServiceEnvVarDaoTransactions(arg0 *gorm.DB) dao.Tena // TenantServiceEnvVarDaoTransactions indicates an expected call of TenantServiceEnvVarDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceEnvVarDaoTransactions(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceEnvVarDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceEnvVarDaoTransactions), arg0) } // TenantServiceMountRelationDao mocks base method func (m *MockManager) TenantServiceMountRelationDao() dao.TenantServiceMountRelationDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceMountRelationDao") ret0, _ := ret[0].(dao.TenantServiceMountRelationDao) return ret0 @@ -355,11 +436,13 @@ func (m *MockManager) TenantServiceMountRelationDao() dao.TenantServiceMountRela // TenantServiceMountRelationDao indicates an expected call of TenantServiceMountRelationDao func (mr *MockManagerMockRecorder) TenantServiceMountRelationDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceMountRelationDao", reflect.TypeOf((*MockManager)(nil).TenantServiceMountRelationDao)) } // TenantServiceMountRelationDaoTransactions mocks base method func (m *MockManager) TenantServiceMountRelationDaoTransactions(db *gorm.DB) dao.TenantServiceMountRelationDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceMountRelationDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServiceMountRelationDao) return ret0 @@ -367,11 +450,13 @@ func (m *MockManager) TenantServiceMountRelationDaoTransactions(db *gorm.DB) dao // TenantServiceMountRelationDaoTransactions indicates an expected call of TenantServiceMountRelationDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceMountRelationDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceMountRelationDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceMountRelationDaoTransactions), db) } // TenantServiceVolumeDao mocks base method func (m *MockManager) TenantServiceVolumeDao() dao.TenantServiceVolumeDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceVolumeDao") ret0, _ := ret[0].(dao.TenantServiceVolumeDao) return ret0 @@ -379,11 +464,13 @@ func (m *MockManager) TenantServiceVolumeDao() dao.TenantServiceVolumeDao { // TenantServiceVolumeDao indicates an expected call of TenantServiceVolumeDao func (mr *MockManagerMockRecorder) TenantServiceVolumeDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceVolumeDao", reflect.TypeOf((*MockManager)(nil).TenantServiceVolumeDao)) } // TenantServiceVolumeDaoTransactions mocks base method func (m *MockManager) TenantServiceVolumeDaoTransactions(arg0 *gorm.DB) dao.TenantServiceVolumeDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceVolumeDaoTransactions", arg0) ret0, _ := ret[0].(dao.TenantServiceVolumeDao) return ret0 @@ -391,11 +478,13 @@ func (m *MockManager) TenantServiceVolumeDaoTransactions(arg0 *gorm.DB) dao.Tena // TenantServiceVolumeDaoTransactions indicates an expected call of TenantServiceVolumeDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceVolumeDaoTransactions(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceVolumeDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceVolumeDaoTransactions), arg0) } // TenantServiceConfigFileDao mocks base method func (m *MockManager) TenantServiceConfigFileDao() dao.TenantServiceConfigFileDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceConfigFileDao") ret0, _ := ret[0].(dao.TenantServiceConfigFileDao) return ret0 @@ -403,11 +492,13 @@ func (m *MockManager) TenantServiceConfigFileDao() dao.TenantServiceConfigFileDa // TenantServiceConfigFileDao indicates an expected call of TenantServiceConfigFileDao func (mr *MockManagerMockRecorder) TenantServiceConfigFileDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceConfigFileDao", reflect.TypeOf((*MockManager)(nil).TenantServiceConfigFileDao)) } // TenantServiceConfigFileDaoTransactions mocks base method func (m *MockManager) TenantServiceConfigFileDaoTransactions(arg0 *gorm.DB) dao.TenantServiceConfigFileDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceConfigFileDaoTransactions", arg0) ret0, _ := ret[0].(dao.TenantServiceConfigFileDao) return ret0 @@ -415,11 +506,13 @@ func (m *MockManager) TenantServiceConfigFileDaoTransactions(arg0 *gorm.DB) dao. // TenantServiceConfigFileDaoTransactions indicates an expected call of TenantServiceConfigFileDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceConfigFileDaoTransactions(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceConfigFileDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceConfigFileDaoTransactions), arg0) } // ServiceProbeDao mocks base method func (m *MockManager) ServiceProbeDao() dao.ServiceProbeDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ServiceProbeDao") ret0, _ := ret[0].(dao.ServiceProbeDao) return ret0 @@ -427,11 +520,13 @@ func (m *MockManager) ServiceProbeDao() dao.ServiceProbeDao { // ServiceProbeDao indicates an expected call of ServiceProbeDao func (mr *MockManagerMockRecorder) ServiceProbeDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceProbeDao", reflect.TypeOf((*MockManager)(nil).ServiceProbeDao)) } // ServiceProbeDaoTransactions mocks base method func (m *MockManager) ServiceProbeDaoTransactions(arg0 *gorm.DB) dao.ServiceProbeDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ServiceProbeDaoTransactions", arg0) ret0, _ := ret[0].(dao.ServiceProbeDao) return ret0 @@ -439,11 +534,13 @@ func (m *MockManager) ServiceProbeDaoTransactions(arg0 *gorm.DB) dao.ServiceProb // ServiceProbeDaoTransactions indicates an expected call of ServiceProbeDaoTransactions func (mr *MockManagerMockRecorder) ServiceProbeDaoTransactions(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceProbeDaoTransactions", reflect.TypeOf((*MockManager)(nil).ServiceProbeDaoTransactions), arg0) } // TenantServiceLBMappingPortDao mocks base method func (m *MockManager) TenantServiceLBMappingPortDao() dao.TenantServiceLBMappingPortDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceLBMappingPortDao") ret0, _ := ret[0].(dao.TenantServiceLBMappingPortDao) return ret0 @@ -451,11 +548,13 @@ func (m *MockManager) TenantServiceLBMappingPortDao() dao.TenantServiceLBMapping // TenantServiceLBMappingPortDao indicates an expected call of TenantServiceLBMappingPortDao func (mr *MockManagerMockRecorder) TenantServiceLBMappingPortDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceLBMappingPortDao", reflect.TypeOf((*MockManager)(nil).TenantServiceLBMappingPortDao)) } // TenantServiceLBMappingPortDaoTransactions mocks base method func (m *MockManager) TenantServiceLBMappingPortDaoTransactions(arg0 *gorm.DB) dao.TenantServiceLBMappingPortDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceLBMappingPortDaoTransactions", arg0) ret0, _ := ret[0].(dao.TenantServiceLBMappingPortDao) return ret0 @@ -463,11 +562,13 @@ func (m *MockManager) TenantServiceLBMappingPortDaoTransactions(arg0 *gorm.DB) d // TenantServiceLBMappingPortDaoTransactions indicates an expected call of TenantServiceLBMappingPortDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceLBMappingPortDaoTransactions(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceLBMappingPortDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceLBMappingPortDaoTransactions), arg0) } // TenantServiceLabelDao mocks base method func (m *MockManager) TenantServiceLabelDao() dao.TenantServiceLabelDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceLabelDao") ret0, _ := ret[0].(dao.TenantServiceLabelDao) return ret0 @@ -475,11 +576,13 @@ func (m *MockManager) TenantServiceLabelDao() dao.TenantServiceLabelDao { // TenantServiceLabelDao indicates an expected call of TenantServiceLabelDao func (mr *MockManagerMockRecorder) TenantServiceLabelDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceLabelDao", reflect.TypeOf((*MockManager)(nil).TenantServiceLabelDao)) } // TenantServiceLabelDaoTransactions mocks base method func (m *MockManager) TenantServiceLabelDaoTransactions(db *gorm.DB) dao.TenantServiceLabelDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceLabelDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServiceLabelDao) return ret0 @@ -487,11 +590,13 @@ func (m *MockManager) TenantServiceLabelDaoTransactions(db *gorm.DB) dao.TenantS // TenantServiceLabelDaoTransactions indicates an expected call of TenantServiceLabelDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceLabelDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceLabelDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceLabelDaoTransactions), db) } // LocalSchedulerDao mocks base method func (m *MockManager) LocalSchedulerDao() dao.LocalSchedulerDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "LocalSchedulerDao") ret0, _ := ret[0].(dao.LocalSchedulerDao) return ret0 @@ -499,11 +604,13 @@ func (m *MockManager) LocalSchedulerDao() dao.LocalSchedulerDao { // LocalSchedulerDao indicates an expected call of LocalSchedulerDao func (mr *MockManagerMockRecorder) LocalSchedulerDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalSchedulerDao", reflect.TypeOf((*MockManager)(nil).LocalSchedulerDao)) } // TenantPluginDaoTransactions mocks base method func (m *MockManager) TenantPluginDaoTransactions(db *gorm.DB) dao.TenantPluginDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginDaoTransactions", db) ret0, _ := ret[0].(dao.TenantPluginDao) return ret0 @@ -511,11 +618,13 @@ func (m *MockManager) TenantPluginDaoTransactions(db *gorm.DB) dao.TenantPluginD // TenantPluginDaoTransactions indicates an expected call of TenantPluginDaoTransactions func (mr *MockManagerMockRecorder) TenantPluginDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantPluginDaoTransactions), db) } // TenantPluginDao mocks base method func (m *MockManager) TenantPluginDao() dao.TenantPluginDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginDao") ret0, _ := ret[0].(dao.TenantPluginDao) return ret0 @@ -523,11 +632,13 @@ func (m *MockManager) TenantPluginDao() dao.TenantPluginDao { // TenantPluginDao indicates an expected call of TenantPluginDao func (mr *MockManagerMockRecorder) TenantPluginDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginDao", reflect.TypeOf((*MockManager)(nil).TenantPluginDao)) } // TenantPluginDefaultENVDaoTransactions mocks base method func (m *MockManager) TenantPluginDefaultENVDaoTransactions(db *gorm.DB) dao.TenantPluginDefaultENVDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginDefaultENVDaoTransactions", db) ret0, _ := ret[0].(dao.TenantPluginDefaultENVDao) return ret0 @@ -535,11 +646,13 @@ func (m *MockManager) TenantPluginDefaultENVDaoTransactions(db *gorm.DB) dao.Ten // TenantPluginDefaultENVDaoTransactions indicates an expected call of TenantPluginDefaultENVDaoTransactions func (mr *MockManagerMockRecorder) TenantPluginDefaultENVDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginDefaultENVDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantPluginDefaultENVDaoTransactions), db) } // TenantPluginDefaultENVDao mocks base method func (m *MockManager) TenantPluginDefaultENVDao() dao.TenantPluginDefaultENVDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginDefaultENVDao") ret0, _ := ret[0].(dao.TenantPluginDefaultENVDao) return ret0 @@ -547,11 +660,13 @@ func (m *MockManager) TenantPluginDefaultENVDao() dao.TenantPluginDefaultENVDao // TenantPluginDefaultENVDao indicates an expected call of TenantPluginDefaultENVDao func (mr *MockManagerMockRecorder) TenantPluginDefaultENVDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginDefaultENVDao", reflect.TypeOf((*MockManager)(nil).TenantPluginDefaultENVDao)) } // TenantPluginBuildVersionDao mocks base method func (m *MockManager) TenantPluginBuildVersionDao() dao.TenantPluginBuildVersionDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginBuildVersionDao") ret0, _ := ret[0].(dao.TenantPluginBuildVersionDao) return ret0 @@ -559,11 +674,13 @@ func (m *MockManager) TenantPluginBuildVersionDao() dao.TenantPluginBuildVersion // TenantPluginBuildVersionDao indicates an expected call of TenantPluginBuildVersionDao func (mr *MockManagerMockRecorder) TenantPluginBuildVersionDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginBuildVersionDao", reflect.TypeOf((*MockManager)(nil).TenantPluginBuildVersionDao)) } // TenantPluginBuildVersionDaoTransactions mocks base method func (m *MockManager) TenantPluginBuildVersionDaoTransactions(db *gorm.DB) dao.TenantPluginBuildVersionDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginBuildVersionDaoTransactions", db) ret0, _ := ret[0].(dao.TenantPluginBuildVersionDao) return ret0 @@ -571,11 +688,13 @@ func (m *MockManager) TenantPluginBuildVersionDaoTransactions(db *gorm.DB) dao.T // TenantPluginBuildVersionDaoTransactions indicates an expected call of TenantPluginBuildVersionDaoTransactions func (mr *MockManagerMockRecorder) TenantPluginBuildVersionDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginBuildVersionDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantPluginBuildVersionDaoTransactions), db) } // TenantPluginVersionENVDao mocks base method func (m *MockManager) TenantPluginVersionENVDao() dao.TenantPluginVersionEnvDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginVersionENVDao") ret0, _ := ret[0].(dao.TenantPluginVersionEnvDao) return ret0 @@ -583,11 +702,13 @@ func (m *MockManager) TenantPluginVersionENVDao() dao.TenantPluginVersionEnvDao // TenantPluginVersionENVDao indicates an expected call of TenantPluginVersionENVDao func (mr *MockManagerMockRecorder) TenantPluginVersionENVDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginVersionENVDao", reflect.TypeOf((*MockManager)(nil).TenantPluginVersionENVDao)) } // TenantPluginVersionENVDaoTransactions mocks base method func (m *MockManager) TenantPluginVersionENVDaoTransactions(db *gorm.DB) dao.TenantPluginVersionEnvDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginVersionENVDaoTransactions", db) ret0, _ := ret[0].(dao.TenantPluginVersionEnvDao) return ret0 @@ -595,11 +716,13 @@ func (m *MockManager) TenantPluginVersionENVDaoTransactions(db *gorm.DB) dao.Ten // TenantPluginVersionENVDaoTransactions indicates an expected call of TenantPluginVersionENVDaoTransactions func (mr *MockManagerMockRecorder) TenantPluginVersionENVDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginVersionENVDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantPluginVersionENVDaoTransactions), db) } // TenantPluginVersionConfigDao mocks base method func (m *MockManager) TenantPluginVersionConfigDao() dao.TenantPluginVersionConfigDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginVersionConfigDao") ret0, _ := ret[0].(dao.TenantPluginVersionConfigDao) return ret0 @@ -607,11 +730,13 @@ func (m *MockManager) TenantPluginVersionConfigDao() dao.TenantPluginVersionConf // TenantPluginVersionConfigDao indicates an expected call of TenantPluginVersionConfigDao func (mr *MockManagerMockRecorder) TenantPluginVersionConfigDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginVersionConfigDao", reflect.TypeOf((*MockManager)(nil).TenantPluginVersionConfigDao)) } // TenantPluginVersionConfigDaoTransactions mocks base method func (m *MockManager) TenantPluginVersionConfigDaoTransactions(db *gorm.DB) dao.TenantPluginVersionConfigDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantPluginVersionConfigDaoTransactions", db) ret0, _ := ret[0].(dao.TenantPluginVersionConfigDao) return ret0 @@ -619,11 +744,13 @@ func (m *MockManager) TenantPluginVersionConfigDaoTransactions(db *gorm.DB) dao. // TenantPluginVersionConfigDaoTransactions indicates an expected call of TenantPluginVersionConfigDaoTransactions func (mr *MockManagerMockRecorder) TenantPluginVersionConfigDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantPluginVersionConfigDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantPluginVersionConfigDaoTransactions), db) } // TenantServicePluginRelationDao mocks base method func (m *MockManager) TenantServicePluginRelationDao() dao.TenantServicePluginRelationDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServicePluginRelationDao") ret0, _ := ret[0].(dao.TenantServicePluginRelationDao) return ret0 @@ -631,11 +758,13 @@ func (m *MockManager) TenantServicePluginRelationDao() dao.TenantServicePluginRe // TenantServicePluginRelationDao indicates an expected call of TenantServicePluginRelationDao func (mr *MockManagerMockRecorder) TenantServicePluginRelationDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServicePluginRelationDao", reflect.TypeOf((*MockManager)(nil).TenantServicePluginRelationDao)) } // TenantServicePluginRelationDaoTransactions mocks base method func (m *MockManager) TenantServicePluginRelationDaoTransactions(db *gorm.DB) dao.TenantServicePluginRelationDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServicePluginRelationDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServicePluginRelationDao) return ret0 @@ -643,11 +772,13 @@ func (m *MockManager) TenantServicePluginRelationDaoTransactions(db *gorm.DB) da // TenantServicePluginRelationDaoTransactions indicates an expected call of TenantServicePluginRelationDaoTransactions func (mr *MockManagerMockRecorder) TenantServicePluginRelationDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServicePluginRelationDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServicePluginRelationDaoTransactions), db) } // TenantServicesStreamPluginPortDao mocks base method func (m *MockManager) TenantServicesStreamPluginPortDao() dao.TenantServicesStreamPluginPortDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServicesStreamPluginPortDao") ret0, _ := ret[0].(dao.TenantServicesStreamPluginPortDao) return ret0 @@ -655,11 +786,13 @@ func (m *MockManager) TenantServicesStreamPluginPortDao() dao.TenantServicesStre // TenantServicesStreamPluginPortDao indicates an expected call of TenantServicesStreamPluginPortDao func (mr *MockManagerMockRecorder) TenantServicesStreamPluginPortDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServicesStreamPluginPortDao", reflect.TypeOf((*MockManager)(nil).TenantServicesStreamPluginPortDao)) } // TenantServicesStreamPluginPortDaoTransactions mocks base method func (m *MockManager) TenantServicesStreamPluginPortDaoTransactions(db *gorm.DB) dao.TenantServicesStreamPluginPortDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServicesStreamPluginPortDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServicesStreamPluginPortDao) return ret0 @@ -667,11 +800,13 @@ func (m *MockManager) TenantServicesStreamPluginPortDaoTransactions(db *gorm.DB) // TenantServicesStreamPluginPortDaoTransactions indicates an expected call of TenantServicesStreamPluginPortDaoTransactions func (mr *MockManagerMockRecorder) TenantServicesStreamPluginPortDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServicesStreamPluginPortDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServicesStreamPluginPortDaoTransactions), db) } // CodeCheckResultDao mocks base method func (m *MockManager) CodeCheckResultDao() dao.CodeCheckResultDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CodeCheckResultDao") ret0, _ := ret[0].(dao.CodeCheckResultDao) return ret0 @@ -679,11 +814,13 @@ func (m *MockManager) CodeCheckResultDao() dao.CodeCheckResultDao { // CodeCheckResultDao indicates an expected call of CodeCheckResultDao func (mr *MockManagerMockRecorder) CodeCheckResultDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CodeCheckResultDao", reflect.TypeOf((*MockManager)(nil).CodeCheckResultDao)) } // CodeCheckResultDaoTransactions mocks base method func (m *MockManager) CodeCheckResultDaoTransactions(db *gorm.DB) dao.CodeCheckResultDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CodeCheckResultDaoTransactions", db) ret0, _ := ret[0].(dao.CodeCheckResultDao) return ret0 @@ -691,11 +828,13 @@ func (m *MockManager) CodeCheckResultDaoTransactions(db *gorm.DB) dao.CodeCheckR // CodeCheckResultDaoTransactions indicates an expected call of CodeCheckResultDaoTransactions func (mr *MockManagerMockRecorder) CodeCheckResultDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CodeCheckResultDaoTransactions", reflect.TypeOf((*MockManager)(nil).CodeCheckResultDaoTransactions), db) } // ServiceEventDao mocks base method func (m *MockManager) ServiceEventDao() dao.EventDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ServiceEventDao") ret0, _ := ret[0].(dao.EventDao) return ret0 @@ -703,11 +842,13 @@ func (m *MockManager) ServiceEventDao() dao.EventDao { // ServiceEventDao indicates an expected call of ServiceEventDao func (mr *MockManagerMockRecorder) ServiceEventDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceEventDao", reflect.TypeOf((*MockManager)(nil).ServiceEventDao)) } // ServiceEventDaoTransactions mocks base method func (m *MockManager) ServiceEventDaoTransactions(db *gorm.DB) dao.EventDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ServiceEventDaoTransactions", db) ret0, _ := ret[0].(dao.EventDao) return ret0 @@ -715,11 +856,13 @@ func (m *MockManager) ServiceEventDaoTransactions(db *gorm.DB) dao.EventDao { // ServiceEventDaoTransactions indicates an expected call of ServiceEventDaoTransactions func (mr *MockManagerMockRecorder) ServiceEventDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceEventDaoTransactions", reflect.TypeOf((*MockManager)(nil).ServiceEventDaoTransactions), db) } // VersionInfoDao mocks base method func (m *MockManager) VersionInfoDao() dao.VersionInfoDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "VersionInfoDao") ret0, _ := ret[0].(dao.VersionInfoDao) return ret0 @@ -727,11 +870,13 @@ func (m *MockManager) VersionInfoDao() dao.VersionInfoDao { // VersionInfoDao indicates an expected call of VersionInfoDao func (mr *MockManagerMockRecorder) VersionInfoDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VersionInfoDao", reflect.TypeOf((*MockManager)(nil).VersionInfoDao)) } // VersionInfoDaoTransactions mocks base method func (m *MockManager) VersionInfoDaoTransactions(db *gorm.DB) dao.VersionInfoDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "VersionInfoDaoTransactions", db) ret0, _ := ret[0].(dao.VersionInfoDao) return ret0 @@ -739,11 +884,13 @@ func (m *MockManager) VersionInfoDaoTransactions(db *gorm.DB) dao.VersionInfoDao // VersionInfoDaoTransactions indicates an expected call of VersionInfoDaoTransactions func (mr *MockManagerMockRecorder) VersionInfoDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VersionInfoDaoTransactions", reflect.TypeOf((*MockManager)(nil).VersionInfoDaoTransactions), db) } // RegionUserInfoDao mocks base method func (m *MockManager) RegionUserInfoDao() dao.RegionUserInfoDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RegionUserInfoDao") ret0, _ := ret[0].(dao.RegionUserInfoDao) return ret0 @@ -751,11 +898,13 @@ func (m *MockManager) RegionUserInfoDao() dao.RegionUserInfoDao { // RegionUserInfoDao indicates an expected call of RegionUserInfoDao func (mr *MockManagerMockRecorder) RegionUserInfoDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegionUserInfoDao", reflect.TypeOf((*MockManager)(nil).RegionUserInfoDao)) } // RegionUserInfoDaoTransactions mocks base method func (m *MockManager) RegionUserInfoDaoTransactions(db *gorm.DB) dao.RegionUserInfoDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RegionUserInfoDaoTransactions", db) ret0, _ := ret[0].(dao.RegionUserInfoDao) return ret0 @@ -763,11 +912,13 @@ func (m *MockManager) RegionUserInfoDaoTransactions(db *gorm.DB) dao.RegionUserI // RegionUserInfoDaoTransactions indicates an expected call of RegionUserInfoDaoTransactions func (mr *MockManagerMockRecorder) RegionUserInfoDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegionUserInfoDaoTransactions", reflect.TypeOf((*MockManager)(nil).RegionUserInfoDaoTransactions), db) } // RegionAPIClassDao mocks base method func (m *MockManager) RegionAPIClassDao() dao.RegionAPIClassDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RegionAPIClassDao") ret0, _ := ret[0].(dao.RegionAPIClassDao) return ret0 @@ -775,11 +926,13 @@ func (m *MockManager) RegionAPIClassDao() dao.RegionAPIClassDao { // RegionAPIClassDao indicates an expected call of RegionAPIClassDao func (mr *MockManagerMockRecorder) RegionAPIClassDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegionAPIClassDao", reflect.TypeOf((*MockManager)(nil).RegionAPIClassDao)) } // RegionAPIClassDaoTransactions mocks base method func (m *MockManager) RegionAPIClassDaoTransactions(db *gorm.DB) dao.RegionAPIClassDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RegionAPIClassDaoTransactions", db) ret0, _ := ret[0].(dao.RegionAPIClassDao) return ret0 @@ -787,11 +940,13 @@ func (m *MockManager) RegionAPIClassDaoTransactions(db *gorm.DB) dao.RegionAPICl // RegionAPIClassDaoTransactions indicates an expected call of RegionAPIClassDaoTransactions func (mr *MockManagerMockRecorder) RegionAPIClassDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegionAPIClassDaoTransactions", reflect.TypeOf((*MockManager)(nil).RegionAPIClassDaoTransactions), db) } // NotificationEventDao mocks base method func (m *MockManager) NotificationEventDao() dao.NotificationEventDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "NotificationEventDao") ret0, _ := ret[0].(dao.NotificationEventDao) return ret0 @@ -799,11 +954,13 @@ func (m *MockManager) NotificationEventDao() dao.NotificationEventDao { // NotificationEventDao indicates an expected call of NotificationEventDao func (mr *MockManagerMockRecorder) NotificationEventDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationEventDao", reflect.TypeOf((*MockManager)(nil).NotificationEventDao)) } // AppBackupDao mocks base method func (m *MockManager) AppBackupDao() dao.AppBackupDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppBackupDao") ret0, _ := ret[0].(dao.AppBackupDao) return ret0 @@ -811,11 +968,13 @@ func (m *MockManager) AppBackupDao() dao.AppBackupDao { // AppBackupDao indicates an expected call of AppBackupDao func (mr *MockManagerMockRecorder) AppBackupDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppBackupDao", reflect.TypeOf((*MockManager)(nil).AppBackupDao)) } // AppBackupDaoTransactions mocks base method func (m *MockManager) AppBackupDaoTransactions(db *gorm.DB) dao.AppBackupDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AppBackupDaoTransactions", db) ret0, _ := ret[0].(dao.AppBackupDao) return ret0 @@ -823,11 +982,13 @@ func (m *MockManager) AppBackupDaoTransactions(db *gorm.DB) dao.AppBackupDao { // AppBackupDaoTransactions indicates an expected call of AppBackupDaoTransactions func (mr *MockManagerMockRecorder) AppBackupDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppBackupDaoTransactions", reflect.TypeOf((*MockManager)(nil).AppBackupDaoTransactions), db) } // ServiceSourceDao mocks base method func (m *MockManager) ServiceSourceDao() dao.ServiceSourceDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ServiceSourceDao") ret0, _ := ret[0].(dao.ServiceSourceDao) return ret0 @@ -835,11 +996,13 @@ func (m *MockManager) ServiceSourceDao() dao.ServiceSourceDao { // ServiceSourceDao indicates an expected call of ServiceSourceDao func (mr *MockManagerMockRecorder) ServiceSourceDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceSourceDao", reflect.TypeOf((*MockManager)(nil).ServiceSourceDao)) } // CertificateDao mocks base method func (m *MockManager) CertificateDao() dao.CertificateDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CertificateDao") ret0, _ := ret[0].(dao.CertificateDao) return ret0 @@ -847,11 +1010,13 @@ func (m *MockManager) CertificateDao() dao.CertificateDao { // CertificateDao indicates an expected call of CertificateDao func (mr *MockManagerMockRecorder) CertificateDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertificateDao", reflect.TypeOf((*MockManager)(nil).CertificateDao)) } // CertificateDaoTransactions mocks base method func (m *MockManager) CertificateDaoTransactions(db *gorm.DB) dao.CertificateDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CertificateDaoTransactions", db) ret0, _ := ret[0].(dao.CertificateDao) return ret0 @@ -859,11 +1024,13 @@ func (m *MockManager) CertificateDaoTransactions(db *gorm.DB) dao.CertificateDao // CertificateDaoTransactions indicates an expected call of CertificateDaoTransactions func (mr *MockManagerMockRecorder) CertificateDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertificateDaoTransactions", reflect.TypeOf((*MockManager)(nil).CertificateDaoTransactions), db) } // RuleExtensionDao mocks base method func (m *MockManager) RuleExtensionDao() dao.RuleExtensionDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RuleExtensionDao") ret0, _ := ret[0].(dao.RuleExtensionDao) return ret0 @@ -871,11 +1038,13 @@ func (m *MockManager) RuleExtensionDao() dao.RuleExtensionDao { // RuleExtensionDao indicates an expected call of RuleExtensionDao func (mr *MockManagerMockRecorder) RuleExtensionDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RuleExtensionDao", reflect.TypeOf((*MockManager)(nil).RuleExtensionDao)) } // RuleExtensionDaoTransactions mocks base method func (m *MockManager) RuleExtensionDaoTransactions(db *gorm.DB) dao.RuleExtensionDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RuleExtensionDaoTransactions", db) ret0, _ := ret[0].(dao.RuleExtensionDao) return ret0 @@ -883,11 +1052,13 @@ func (m *MockManager) RuleExtensionDaoTransactions(db *gorm.DB) dao.RuleExtensio // RuleExtensionDaoTransactions indicates an expected call of RuleExtensionDaoTransactions func (mr *MockManagerMockRecorder) RuleExtensionDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RuleExtensionDaoTransactions", reflect.TypeOf((*MockManager)(nil).RuleExtensionDaoTransactions), db) } // HTTPRuleDao mocks base method func (m *MockManager) HTTPRuleDao() dao.HTTPRuleDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HTTPRuleDao") ret0, _ := ret[0].(dao.HTTPRuleDao) return ret0 @@ -895,11 +1066,13 @@ func (m *MockManager) HTTPRuleDao() dao.HTTPRuleDao { // HTTPRuleDao indicates an expected call of HTTPRuleDao func (mr *MockManagerMockRecorder) HTTPRuleDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPRuleDao", reflect.TypeOf((*MockManager)(nil).HTTPRuleDao)) } // HTTPRuleDaoTransactions mocks base method func (m *MockManager) HTTPRuleDaoTransactions(db *gorm.DB) dao.HTTPRuleDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HTTPRuleDaoTransactions", db) ret0, _ := ret[0].(dao.HTTPRuleDao) return ret0 @@ -907,11 +1080,13 @@ func (m *MockManager) HTTPRuleDaoTransactions(db *gorm.DB) dao.HTTPRuleDao { // HTTPRuleDaoTransactions indicates an expected call of HTTPRuleDaoTransactions func (mr *MockManagerMockRecorder) HTTPRuleDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HTTPRuleDaoTransactions", reflect.TypeOf((*MockManager)(nil).HTTPRuleDaoTransactions), db) } // TCPRuleDao mocks base method func (m *MockManager) TCPRuleDao() dao.TCPRuleDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TCPRuleDao") ret0, _ := ret[0].(dao.TCPRuleDao) return ret0 @@ -919,11 +1094,13 @@ func (m *MockManager) TCPRuleDao() dao.TCPRuleDao { // TCPRuleDao indicates an expected call of TCPRuleDao func (mr *MockManagerMockRecorder) TCPRuleDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TCPRuleDao", reflect.TypeOf((*MockManager)(nil).TCPRuleDao)) } // TCPRuleDaoTransactions mocks base method func (m *MockManager) TCPRuleDaoTransactions(db *gorm.DB) dao.TCPRuleDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TCPRuleDaoTransactions", db) ret0, _ := ret[0].(dao.TCPRuleDao) return ret0 @@ -931,11 +1108,13 @@ func (m *MockManager) TCPRuleDaoTransactions(db *gorm.DB) dao.TCPRuleDao { // TCPRuleDaoTransactions indicates an expected call of TCPRuleDaoTransactions func (mr *MockManagerMockRecorder) TCPRuleDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TCPRuleDaoTransactions", reflect.TypeOf((*MockManager)(nil).TCPRuleDaoTransactions), db) } // GwRuleConfigDao mocks base method func (m *MockManager) GwRuleConfigDao() dao.GwRuleConfigDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GwRuleConfigDao") ret0, _ := ret[0].(dao.GwRuleConfigDao) return ret0 @@ -943,11 +1122,13 @@ func (m *MockManager) GwRuleConfigDao() dao.GwRuleConfigDao { // GwRuleConfigDao indicates an expected call of GwRuleConfigDao func (mr *MockManagerMockRecorder) GwRuleConfigDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GwRuleConfigDao", reflect.TypeOf((*MockManager)(nil).GwRuleConfigDao)) } // GwRuleConfigDaoTransactions mocks base method func (m *MockManager) GwRuleConfigDaoTransactions(db *gorm.DB) dao.GwRuleConfigDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GwRuleConfigDaoTransactions", db) ret0, _ := ret[0].(dao.GwRuleConfigDao) return ret0 @@ -955,11 +1136,13 @@ func (m *MockManager) GwRuleConfigDaoTransactions(db *gorm.DB) dao.GwRuleConfigD // GwRuleConfigDaoTransactions indicates an expected call of GwRuleConfigDaoTransactions func (mr *MockManagerMockRecorder) GwRuleConfigDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GwRuleConfigDaoTransactions", reflect.TypeOf((*MockManager)(nil).GwRuleConfigDaoTransactions), db) } // EndpointsDao mocks base method func (m *MockManager) EndpointsDao() dao.EndpointsDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EndpointsDao") ret0, _ := ret[0].(dao.EndpointsDao) return ret0 @@ -967,11 +1150,13 @@ func (m *MockManager) EndpointsDao() dao.EndpointsDao { // EndpointsDao indicates an expected call of EndpointsDao func (mr *MockManagerMockRecorder) EndpointsDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsDao", reflect.TypeOf((*MockManager)(nil).EndpointsDao)) } // EndpointsDaoTransactions mocks base method func (m *MockManager) EndpointsDaoTransactions(db *gorm.DB) dao.EndpointsDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EndpointsDaoTransactions", db) ret0, _ := ret[0].(dao.EndpointsDao) return ret0 @@ -979,11 +1164,13 @@ func (m *MockManager) EndpointsDaoTransactions(db *gorm.DB) dao.EndpointsDao { // EndpointsDaoTransactions indicates an expected call of EndpointsDaoTransactions func (mr *MockManagerMockRecorder) EndpointsDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsDaoTransactions", reflect.TypeOf((*MockManager)(nil).EndpointsDaoTransactions), db) } // ThirdPartySvcDiscoveryCfgDao mocks base method func (m *MockManager) ThirdPartySvcDiscoveryCfgDao() dao.ThirdPartySvcDiscoveryCfgDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ThirdPartySvcDiscoveryCfgDao") ret0, _ := ret[0].(dao.ThirdPartySvcDiscoveryCfgDao) return ret0 @@ -991,11 +1178,13 @@ func (m *MockManager) ThirdPartySvcDiscoveryCfgDao() dao.ThirdPartySvcDiscoveryC // ThirdPartySvcDiscoveryCfgDao indicates an expected call of ThirdPartySvcDiscoveryCfgDao func (mr *MockManagerMockRecorder) ThirdPartySvcDiscoveryCfgDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ThirdPartySvcDiscoveryCfgDao", reflect.TypeOf((*MockManager)(nil).ThirdPartySvcDiscoveryCfgDao)) } // ThirdPartySvcDiscoveryCfgDaoTransactions mocks base method func (m *MockManager) ThirdPartySvcDiscoveryCfgDaoTransactions(db *gorm.DB) dao.ThirdPartySvcDiscoveryCfgDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ThirdPartySvcDiscoveryCfgDaoTransactions", db) ret0, _ := ret[0].(dao.ThirdPartySvcDiscoveryCfgDao) return ret0 @@ -1003,11 +1192,13 @@ func (m *MockManager) ThirdPartySvcDiscoveryCfgDaoTransactions(db *gorm.DB) dao. // ThirdPartySvcDiscoveryCfgDaoTransactions indicates an expected call of ThirdPartySvcDiscoveryCfgDaoTransactions func (mr *MockManagerMockRecorder) ThirdPartySvcDiscoveryCfgDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ThirdPartySvcDiscoveryCfgDaoTransactions", reflect.TypeOf((*MockManager)(nil).ThirdPartySvcDiscoveryCfgDaoTransactions), db) } // TenantServceAutoscalerRulesDao mocks base method func (m *MockManager) TenantServceAutoscalerRulesDao() dao.TenantServceAutoscalerRulesDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServceAutoscalerRulesDao") ret0, _ := ret[0].(dao.TenantServceAutoscalerRulesDao) return ret0 @@ -1015,11 +1206,13 @@ func (m *MockManager) TenantServceAutoscalerRulesDao() dao.TenantServceAutoscale // TenantServceAutoscalerRulesDao indicates an expected call of TenantServceAutoscalerRulesDao func (mr *MockManagerMockRecorder) TenantServceAutoscalerRulesDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServceAutoscalerRulesDao", reflect.TypeOf((*MockManager)(nil).TenantServceAutoscalerRulesDao)) } // TenantServceAutoscalerRulesDaoTransactions mocks base method func (m *MockManager) TenantServceAutoscalerRulesDaoTransactions(db *gorm.DB) dao.TenantServceAutoscalerRulesDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServceAutoscalerRulesDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServceAutoscalerRulesDao) return ret0 @@ -1027,11 +1220,13 @@ func (m *MockManager) TenantServceAutoscalerRulesDaoTransactions(db *gorm.DB) da // TenantServceAutoscalerRulesDaoTransactions indicates an expected call of TenantServceAutoscalerRulesDaoTransactions func (mr *MockManagerMockRecorder) TenantServceAutoscalerRulesDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServceAutoscalerRulesDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServceAutoscalerRulesDaoTransactions), db) } // TenantServceAutoscalerRuleMetricsDao mocks base method func (m *MockManager) TenantServceAutoscalerRuleMetricsDao() dao.TenantServceAutoscalerRuleMetricsDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServceAutoscalerRuleMetricsDao") ret0, _ := ret[0].(dao.TenantServceAutoscalerRuleMetricsDao) return ret0 @@ -1039,11 +1234,13 @@ func (m *MockManager) TenantServceAutoscalerRuleMetricsDao() dao.TenantServceAut // TenantServceAutoscalerRuleMetricsDao indicates an expected call of TenantServceAutoscalerRuleMetricsDao func (mr *MockManagerMockRecorder) TenantServceAutoscalerRuleMetricsDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServceAutoscalerRuleMetricsDao", reflect.TypeOf((*MockManager)(nil).TenantServceAutoscalerRuleMetricsDao)) } // TenantServceAutoscalerRuleMetricsDaoTransactions mocks base method func (m *MockManager) TenantServceAutoscalerRuleMetricsDaoTransactions(db *gorm.DB) dao.TenantServceAutoscalerRuleMetricsDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServceAutoscalerRuleMetricsDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServceAutoscalerRuleMetricsDao) return ret0 @@ -1051,11 +1248,13 @@ func (m *MockManager) TenantServceAutoscalerRuleMetricsDaoTransactions(db *gorm. // TenantServceAutoscalerRuleMetricsDaoTransactions indicates an expected call of TenantServceAutoscalerRuleMetricsDaoTransactions func (mr *MockManagerMockRecorder) TenantServceAutoscalerRuleMetricsDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServceAutoscalerRuleMetricsDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServceAutoscalerRuleMetricsDaoTransactions), db) } // TenantServiceScalingRecordsDao mocks base method func (m *MockManager) TenantServiceScalingRecordsDao() dao.TenantServiceScalingRecordsDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceScalingRecordsDao") ret0, _ := ret[0].(dao.TenantServiceScalingRecordsDao) return ret0 @@ -1063,11 +1262,13 @@ func (m *MockManager) TenantServiceScalingRecordsDao() dao.TenantServiceScalingR // TenantServiceScalingRecordsDao indicates an expected call of TenantServiceScalingRecordsDao func (mr *MockManagerMockRecorder) TenantServiceScalingRecordsDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceScalingRecordsDao", reflect.TypeOf((*MockManager)(nil).TenantServiceScalingRecordsDao)) } // TenantServiceScalingRecordsDaoTransactions mocks base method func (m *MockManager) TenantServiceScalingRecordsDaoTransactions(db *gorm.DB) dao.TenantServiceScalingRecordsDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceScalingRecordsDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServiceScalingRecordsDao) return ret0 @@ -1075,11 +1276,13 @@ func (m *MockManager) TenantServiceScalingRecordsDaoTransactions(db *gorm.DB) da // TenantServiceScalingRecordsDaoTransactions indicates an expected call of TenantServiceScalingRecordsDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceScalingRecordsDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceScalingRecordsDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceScalingRecordsDaoTransactions), db) } // TenantServiceMonitorDao mocks base method func (m *MockManager) TenantServiceMonitorDao() dao.TenantServiceMonitorDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceMonitorDao") ret0, _ := ret[0].(dao.TenantServiceMonitorDao) return ret0 @@ -1087,11 +1290,13 @@ func (m *MockManager) TenantServiceMonitorDao() dao.TenantServiceMonitorDao { // TenantServiceMonitorDao indicates an expected call of TenantServiceMonitorDao func (mr *MockManagerMockRecorder) TenantServiceMonitorDao() *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceMonitorDao", reflect.TypeOf((*MockManager)(nil).TenantServiceMonitorDao)) } // TenantServiceMonitorDaoTransactions mocks base method func (m *MockManager) TenantServiceMonitorDaoTransactions(db *gorm.DB) dao.TenantServiceMonitorDao { + m.ctrl.T.Helper() ret := m.ctrl.Call(m, "TenantServiceMonitorDaoTransactions", db) ret0, _ := ret[0].(dao.TenantServiceMonitorDao) return ret0 @@ -1099,5 +1304,6 @@ func (m *MockManager) TenantServiceMonitorDaoTransactions(db *gorm.DB) dao.Tenan // TenantServiceMonitorDaoTransactions indicates an expected call of TenantServiceMonitorDaoTransactions func (mr *MockManagerMockRecorder) TenantServiceMonitorDaoTransactions(db interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TenantServiceMonitorDaoTransactions", reflect.TypeOf((*MockManager)(nil).TenantServiceMonitorDaoTransactions), db) } diff --git a/hack/k8s/codegen/boilerplate.go.txt b/hack/k8s/codegen/boilerplate.go.txt index 8749e10bf..fb135fcc1 100644 --- a/hack/k8s/codegen/boilerplate.go.txt +++ b/hack/k8s/codegen/boilerplate.go.txt @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/hack/k8s/codegen/update-generated.sh b/hack/k8s/codegen/update-generated.sh index 8293b0928..63548b59f 100755 --- a/hack/k8s/codegen/update-generated.sh +++ b/hack/k8s/codegen/update-generated.sh @@ -5,7 +5,7 @@ set -o nounset set -o pipefail vendor/k8s.io/code-generator/generate-groups.sh \ - "all" \ + "defaulter,client,lister,informer" \ "github.com/goodrain/rainbond/pkg/generated" \ "github.com/goodrain/rainbond/pkg/apis" \ "rainbond:v1alpha1" \ diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 6d2c66f4e..9ffd59e6b 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -117,22 +117,19 @@ type HelmAppSpec struct { PreStatus string `json:"preStatus,omitempty"` // The application name. - // TODO: validation TemplateName string `json:"appName"` // The application version. - // TODO: validation Version string `json:"version"` // The application revision. Revision int `json:"revision,omitempty"` - // The values.yaml of the helm app, encoded by base64. - Values string `json:"values,omitempty"` - // The helm app store. - // TODO: validation. not null AppStore *HelmAppStore `json:"appStore"` + + // Overrides will overrides the values in the chart. + Overrides []string `json:"overrides,omitempty"` } // FullName returns the full name of the app store. @@ -148,6 +145,7 @@ type HelmAppStore struct { // The verision of the helm app store. Version string `json:"version"` + // The name of app store. Name string `json:"name"` // The url of helm repo, sholud be a helm native repo url or a git url. @@ -156,8 +154,10 @@ type HelmAppStore struct { // The branch of a git repo. Branch string `json:"branch,omitempty"` + // The chart repository username where to locate the requested chart Username string `json:"username,omitempty"` + // The chart repository password where to locate the requested chart Password string `json:"password,omitempty"` } @@ -175,25 +175,26 @@ type HelmAppStatus struct { // Current state of helm app. Conditions []HelmAppCondition `json:"conditions,omitempty"` - // The base64 encoded string from the active values. - CurrentValues string `json:"currentValues,omitempty"` - // The actual revision of the helm app, as same as the revision from 'helm status' CurrentRevision int `json:"currentRevision,omitempty"` - // TargetRevision is the revision that used to rollbak the helm app. + // TargetRevision is the revision that used to rollback the helm app. // After executing command 'helm rollback [appName] [targetRevision]', the actual // revision of helm app is currentRevision, not targetRevision. // The new currentRevision is equals to the origin currentRevision plus one. TargetRevision int `json:"targetRevision,omitempty"` + // The version infect. CurrentVersion string `json:"currentVersion,omitempty"` // The base64 encoded string from values.yaml - ValuesTemplate string `json:"valuesTemplate,omitempty"` + Values string `json:"values,omitempty"` // The base64 encoded string from README.md Readme string `json:"readme,omitempty"` + + // Overrides in effect. + Overrides []string `json:"overrides,omitempty"` } // +genclient @@ -210,6 +211,26 @@ type HelmApp struct { Status HelmAppStatus `json:"status,omitempty"` } +// OverridesEqual tells whether overrides in spec and status contain the same elements. +func (in *HelmApp) OverridesEqual() bool { + if len(in.Spec.Overrides) != len(in.Status.Overrides) { + return false + } + + candidates := make(map[string]struct{}) + for _, o := range in.Spec.Overrides { + candidates[o] = struct{}{} + } + + for _, o := range in.Status.Overrides { + _, ok := candidates[o] + if !ok { + return false + } + } + return true +} + // +kubebuilder:object:root=true // HelmAppList contains a list of HelmApp diff --git a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index 3c86fc178..6006769c2 100644 --- a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 @@ -109,6 +109,11 @@ func (in *HelmAppSpec) DeepCopyInto(out *HelmAppSpec) { *out = new(HelmAppStore) **out = **in } + if in.Overrides != nil { + in, out := &in.Overrides, &out.Overrides + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmAppSpec. @@ -131,6 +136,11 @@ func (in *HelmAppStatus) DeepCopyInto(out *HelmAppStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Overrides != nil { + in, out := &in.Overrides, &out.Overrides + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmAppStatus. diff --git a/pkg/generated/clientset/versioned/clientset.go b/pkg/generated/clientset/versioned/clientset.go index b6cd74c83..924e7135c 100644 --- a/pkg/generated/clientset/versioned/clientset.go +++ b/pkg/generated/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/doc.go b/pkg/generated/clientset/versioned/doc.go index 334d68972..6e3e8377e 100644 --- a/pkg/generated/clientset/versioned/doc.go +++ b/pkg/generated/clientset/versioned/doc.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/fake/clientset_generated.go b/pkg/generated/clientset/versioned/fake/clientset_generated.go index 9d8b81848..fef573fa0 100644 --- a/pkg/generated/clientset/versioned/fake/clientset_generated.go +++ b/pkg/generated/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/fake/doc.go b/pkg/generated/clientset/versioned/fake/doc.go index 907759f32..ad8b3eaa4 100644 --- a/pkg/generated/clientset/versioned/fake/doc.go +++ b/pkg/generated/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/fake/register.go b/pkg/generated/clientset/versioned/fake/register.go index 14bc99f21..1587d32b8 100644 --- a/pkg/generated/clientset/versioned/fake/register.go +++ b/pkg/generated/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/scheme/doc.go b/pkg/generated/clientset/versioned/scheme/doc.go index 0392755e2..fbb451222 100644 --- a/pkg/generated/clientset/versioned/scheme/doc.go +++ b/pkg/generated/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/scheme/register.go b/pkg/generated/clientset/versioned/scheme/register.go index 79697de30..0460e71f6 100644 --- a/pkg/generated/clientset/versioned/scheme/register.go +++ b/pkg/generated/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/doc.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/doc.go index a9692d234..7ea268972 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/doc.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/doc.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/doc.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/doc.go index 07a9864cb..82c0bdcbd 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/doc.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go index b99a0797d..aa452a67c 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go index 7d3ea3d11..fd7134c54 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go index 88c8434e4..92ee79eb9 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go index fa4a6594b..feb8d653b 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/helmapp.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go index 329afb473..c580f85ec 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/informers/externalversions/factory.go b/pkg/generated/informers/externalversions/factory.go index 0d3893afa..7874f10b6 100644 --- a/pkg/generated/informers/externalversions/factory.go +++ b/pkg/generated/informers/externalversions/factory.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go index 0891b2693..b86930e2f 100644 --- a/pkg/generated/informers/externalversions/generic.go +++ b/pkg/generated/informers/externalversions/generic.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go index 681652c8e..e4e1da6aa 100644 --- a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/informers/externalversions/rainbond/interface.go b/pkg/generated/informers/externalversions/rainbond/interface.go index 6c11b25e9..9101106a9 100644 --- a/pkg/generated/informers/externalversions/rainbond/interface.go +++ b/pkg/generated/informers/externalversions/rainbond/interface.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go b/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go index 64a7a6789..010dfd1b9 100644 --- a/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go +++ b/pkg/generated/informers/externalversions/rainbond/v1alpha1/helmapp.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go b/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go index 03525a051..74c73e751 100644 --- a/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go +++ b/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go b/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go index 2fc93d2b9..f8e4a8e5b 100644 --- a/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go +++ b/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/pkg/generated/listers/rainbond/v1alpha1/helmapp.go b/pkg/generated/listers/rainbond/v1alpha1/helmapp.go index 03e5bfcf2..bf6ea9c52 100644 --- a/pkg/generated/listers/rainbond/v1alpha1/helmapp.go +++ b/pkg/generated/listers/rainbond/v1alpha1/helmapp.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2020 Goodrain Co., Ltd. +// Copyright (C) 2014-2021 Goodrain Co., Ltd. // 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 diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 3b7ce28d7..5d5621f6f 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -2,6 +2,7 @@ package helmapp import ( "context" + "errors" "strings" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" @@ -9,6 +10,7 @@ import ( k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/sirupsen/logrus" + "helm.sh/helm/v3/pkg/storage/driver" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/util/workqueue" @@ -17,7 +19,7 @@ import ( type ControlLoop struct { clientset versioned.Interface storer Storer - workqueue workqueue.Interface + workQueue workqueue.Interface repo *helm.Repo repoFile string repoCache string @@ -26,7 +28,7 @@ type ControlLoop struct { // NewControlLoop - func NewControlLoop(clientset versioned.Interface, storer Storer, - workqueue workqueue.Interface, + workQueue workqueue.Interface, repoFile string, repoCache string, ) *ControlLoop { @@ -35,7 +37,7 @@ func NewControlLoop(clientset versioned.Interface, return &ControlLoop{ clientset: clientset, storer: storer, - workqueue: workqueue, + workQueue: workQueue, repo: repo, repoFile: repoFile, repoCache: repoCache, @@ -44,7 +46,7 @@ func NewControlLoop(clientset versioned.Interface, func (c *ControlLoop) Run() { for { - obj, shutdown := c.workqueue.Get() + obj, shutdown := c.workQueue.Get() if shutdown { return } @@ -58,7 +60,7 @@ func (c *ControlLoop) run(obj interface{}) { if !ok { return } - defer c.workqueue.Done(obj) + defer c.workQueue.Done(obj) name, ns := nameNamespace(key) helmApp, err := c.storer.GetHelmApp(ns, name) @@ -79,7 +81,7 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { appStore := helmApp.Spec.AppStore app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, - helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Revision, helmApp.Spec.Values, + helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Revision, helmApp.Spec.Overrides, helmApp.Spec.FullName(), appStore.URL, c.repoFile, c.repoCache) if err != nil { @@ -92,7 +94,9 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { helmApp.Status = status.GetHelmAppStatus() appStatus, err := app.Status() if err != nil { - logrus.Warningf("get app status: %v", err) + if !errors.Is(err, driver.ErrReleaseNotFound) { + logrus.Warningf("get app status: %v", err) + } } else { helmApp.Status.Status = v1alpha1.HelmAppStatusStatus(appStatus.Info.Status) helmApp.Status.CurrentRevision = appStatus.Version @@ -121,8 +125,8 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { return err } status.UpdateConditionStatus(v1alpha1.HelmAppInstalled, corev1.ConditionTrue) - status.CurrentValues = helmApp.Spec.Values status.CurrentVersion = helmApp.Spec.Version + status.Overrides = helmApp.Spec.Overrides } if needRollback(helmApp) { @@ -138,8 +142,10 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { // check if the helmApp needed to be update func needUpdate(helmApp *v1alpha1.HelmApp) bool { - return helmApp.Spec.Values != helmApp.Status.CurrentValues || - helmApp.Spec.Version != helmApp.Status.CurrentVersion + if helmApp.Spec.PreStatus != "Configured" { + return false + } + return !helmApp.OverridesEqual() || helmApp.Spec.Version != helmApp.Status.CurrentVersion } // check if the helmApp needed to be rollback diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 28fd76ea6..5fced04d6 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -69,7 +69,7 @@ func (d *Detector) Detect() error { return err } d.status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionTrue) - d.status.ValuesTemplate = values + d.status.Values = values d.status.Readme = readme } diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go index c0630bdd8..d22dbdc10 100644 --- a/worker/controllers/helmapp/finilizer.go +++ b/worker/controllers/helmapp/finilizer.go @@ -58,7 +58,7 @@ func (c *Finalizer) run(obj interface{}) error { // TODO: too much args app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Revision, - helmApp.Spec.Values, + helmApp.Spec.Overrides, helmApp.Spec.FullName(), appStore.URL, c.repoFile, c.repoCache) if err != nil { return err diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go index b9e6a92dc..722bae0ec 100644 --- a/worker/controllers/helmapp/helm/app.go +++ b/worker/controllers/helmapp/helm/app.go @@ -8,16 +8,12 @@ import ( "path" "path/filepath" - "github.com/goodrain/rainbond/util/commonutil" "github.com/pkg/errors" "github.com/sirupsen/logrus" "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/kube" "helm.sh/helm/v3/pkg/release" "helm.sh/helm/v3/pkg/storage/driver" - "k8s.io/cli-runtime/pkg/genericclioptions" - "sigs.k8s.io/yaml" ) type App struct { @@ -29,8 +25,7 @@ type App struct { version string chartDir string revision int - - encodedValues string + overrides []string helm *Helm repo *Repo @@ -40,29 +35,25 @@ func (a *App) Chart() string { return a.repoName + "/" + a.templateName } -func NewApp(name, namespace, templateName, version string, revision int, values, repoName, repoURL, repoFile, repoCache string) (*App, error) { - configFlags := genericclioptions.NewConfigFlags(true) - configFlags.Namespace = commonutil.String(namespace) - kubeClient := kube.New(configFlags) - - helm, err := NewHelm(kubeClient, configFlags, namespace, repoFile, repoCache) +func NewApp(name, namespace, templateName, version string, revision int, overrides []string, repoName, repoURL, repoFile, repoCache string) (*App, error) { + helm, err := NewHelm(namespace, repoFile, repoCache) if err != nil { return nil, err } repo := NewRepo(repoFile, repoCache) return &App{ - name: name, - namespace: namespace, - templateName: templateName, - repoName: repoName, - repoURL: repoURL, - version: version, - revision: revision, - encodedValues: values, - helm: helm, - repo: repo, - chartDir: path.Join("/tmp/helm/chart", namespace, name, version), + name: name, + namespace: namespace, + templateName: templateName, + repoName: repoName, + repoURL: repoURL, + version: version, + revision: revision, + overrides: overrides, + helm: helm, + repo: repo, + chartDir: path.Join("/tmp/helm/chart", namespace, name, version), }, nil } @@ -110,11 +101,11 @@ func (a *App) PreInstall() error { } func (a *App) Status() (*release.Release, error) { - release, err := a.helm.Status(a.name) + rel, err := a.helm.Status(a.name) if err != nil { return nil, err } - return release, nil + return rel, nil } func (a *App) InstallOrUpdate() error { @@ -122,23 +113,14 @@ func (a *App) InstallOrUpdate() error { return err } - b, err := base64.StdEncoding.DecodeString(a.encodedValues) - if err != nil { - return errors.Wrap(err, "decode values") - } - values := map[string]interface{}{} - if err := yaml.Unmarshal(b, &values); err != nil { - return errors.Wrap(err, "parse values") - } - - _, err = a.helm.Status(a.name) + _, err := a.helm.Status(a.name) if err != nil && !errors.Is(err, driver.ErrReleaseNotFound) { return err } if errors.Is(err, driver.ErrReleaseNotFound) { logrus.Debugf("name: %s; namespace: %s; chart: %s; install helm app", a.name, a.namespace, a.Chart()) - if err := a.helm.Install(a.name, a.Chart(), a.version, values); err != nil { + if err := a.helm.Install(a.name, a.Chart(), a.version, a.overrides); err != nil { return err } @@ -146,7 +128,7 @@ func (a *App) InstallOrUpdate() error { } logrus.Debugf("name: %s; namespace: %s; chart: %s; upgrade helm app", a.name, a.namespace, a.Chart()) - return a.helm.Upgrade(a.name, a.chart(), a.version, values) + return a.helm.Upgrade(a.name, a.chart(), a.version, a.overrides) } func (a *App) ParseChart() (string, string, error) { @@ -191,5 +173,9 @@ func (a *App) Uninstall() error { } func (a *App) Rollback() error { + if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { + return err + } + return a.helm.Rollback(a.name, a.revision) } diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index 663f29be6..4d8831fc1 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "unsafe" + "github.com/goodrain/rainbond/util/commonutil" "github.com/pkg/errors" "github.com/sirupsen/logrus" "helm.sh/helm/v3/pkg/action" @@ -17,6 +18,7 @@ import ( "helm.sh/helm/v3/pkg/kube" "helm.sh/helm/v3/pkg/release" "helm.sh/helm/v3/pkg/releaseutil" + "helm.sh/helm/v3/pkg/strvals" helmtime "helm.sh/helm/v3/pkg/time" "k8s.io/cli-runtime/pkg/genericclioptions" ) @@ -42,7 +44,11 @@ type Helm struct { } // NewHelm creates a new helm. -func NewHelm(kubeClient kube.Interface, configFlags *genericclioptions.ConfigFlags, namespace, repoFile, repoCache string) (*Helm, error) { +func NewHelm(namespace, repoFile, repoCache string) (*Helm, error) { + configFlags := genericclioptions.NewConfigFlags(true) + configFlags.Namespace = commonutil.String(namespace) + kubeClient := kube.New(configFlags) + cfg := &action.Configuration{ KubeClient: kubeClient, Log: func(s string, i ...interface{}) { @@ -77,20 +83,20 @@ func (h *Helm) PreInstall(name, chart, version string, out io.Writer) error { return err } -func (h *Helm) Install(name, chart, version string, vals map[string]interface{}) error { - _, err := h.install(name, chart, version, vals, false, ioutil.Discard) +func (h *Helm) Install(name, chart, version string, overrides []string) error { + _, err := h.install(name, chart, version, overrides, false, ioutil.Discard) return err } -func (h *Helm) Manifests(name, chart, version string, vals map[string]interface{}, out io.Writer) (string, error) { - rel, err := h.install(name, chart, version, vals, true, out) +func (h *Helm) Manifests(name, chart, version string, overrides []string, out io.Writer) (string, error) { + rel, err := h.install(name, chart, version, overrides, true, out) if err != nil { return "", err } return rel.Manifest, nil } -func (h *Helm) install(name, chart, version string, vals map[string]interface{}, dryRun bool, out io.Writer) (*release.Release, error) { +func (h *Helm) install(name, chart, version string, overrides []string, dryRun bool, out io.Writer) (*release.Release, error) { client := action.NewInstall(h.cfg) client.ReleaseName = name client.Namespace = h.namespace @@ -105,6 +111,11 @@ func (h *Helm) install(name, chart, version string, vals map[string]interface{}, logrus.Debugf("CHART PATH: %s\n", cp) p := getter.All(h.settings) + // User specified a value via --set + vals, err := h.parseOverrides(overrides) + if err != nil { + return nil, err + } // Check chart dependencies to make sure all are present in /charts chartRequested, err := loader.Load(cp) @@ -152,7 +163,16 @@ func (h *Helm) install(name, chart, version string, vals map[string]interface{}, return client.Run(chartRequested, vals) } -func (h *Helm) Upgrade(name string, chart, version string, vals map[string]interface{}) error { +func (h *Helm) parseOverrides(overrides []string) (map[string]interface{}, error) { + vals := make(map[string]interface{}) + for _, value := range overrides { + if err := strvals.ParseInto(value, vals); err != nil { + return nil, errors.Wrap(err, "failed parsing --set data") + } + } + return vals, nil +} +func (h *Helm) Upgrade(name string, chart, version string, overrides []string) error { client := action.NewUpgrade(h.cfg) client.Namespace = h.namespace client.Version = version @@ -162,6 +182,12 @@ func (h *Helm) Upgrade(name string, chart, version string, vals map[string]inter return err } + // User specified a value via --set + vals, err := h.parseOverrides(overrides) + if err != nil { + return err + } + // Check chart dependencies to make sure all are present in /charts ch, err := loader.Load(chartPath) if err != nil { diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index 41cbde926..996413eb8 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -6,8 +6,9 @@ import ( ) type Status struct { + helmApp *v1alpha1.HelmApp v1alpha1.HelmAppStatus - values string + overrides []string } // NewStatus creates a new helm app status. @@ -30,7 +31,7 @@ func NewStatus(app *v1alpha1.HelmApp) (*Status, bool) { } return &Status{ HelmAppStatus: app.Status, - values: app.Spec.Values, + helmApp: app, }, continu3 } @@ -47,10 +48,11 @@ func (s *Status) getPhase() v1alpha1.HelmAppStatusPhase { if s.isDetected() { phase = v1alpha1.HelmAppStatusPhaseConfiguring } - if s.values != "" { + if s.helmApp.Spec.PreStatus == "Configured" { phase = v1alpha1.HelmAppStatusPhaseInstalling } - if s.values != "" && s.values == s.CurrentValues { + idx, condition := s.helmApp.Status.GetCondition(v1alpha1.HelmAppInstalled) + if idx != -1 && condition.Status == corev1.ConditionTrue { phase = v1alpha1.HelmAppStatusPhaseInstalled } return phase diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index d554f3b69..76c2a018d 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -1944,6 +1944,7 @@ type AppStatus struct { Values string `protobuf:"bytes,9,opt,name=values,proto3" json:"values,omitempty"` Version string `protobuf:"bytes,10,opt,name=version,proto3" json:"version,omitempty"` Revision int32 `protobuf:"varint,11,opt,name=revision,proto3" json:"revision,omitempty"` + Overrides []string `protobuf:"bytes,12,rep,name=overrides,proto3" json:"overrides,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2051,6 +2052,13 @@ func (m *AppStatus) GetRevision() int32 { return 0 } +func (m *AppStatus) GetOverrides() []string { + if m != nil { + return m.Overrides + } + return nil +} + type AppDetectCondition struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready,omitempty"` @@ -2302,53 +2310,6 @@ func (m *AppServices) GetServices() []*AppService { return nil } -type ParseAppServicesReq struct { - AppID string `protobuf:"bytes,1,opt,name=appID,proto3" json:"appID,omitempty"` - Values string `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ParseAppServicesReq) Reset() { *m = ParseAppServicesReq{} } -func (m *ParseAppServicesReq) String() string { return proto.CompactTextString(m) } -func (*ParseAppServicesReq) ProtoMessage() {} -func (*ParseAppServicesReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{36} -} - -func (m *ParseAppServicesReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ParseAppServicesReq.Unmarshal(m, b) -} -func (m *ParseAppServicesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ParseAppServicesReq.Marshal(b, m, deterministic) -} -func (m *ParseAppServicesReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParseAppServicesReq.Merge(m, src) -} -func (m *ParseAppServicesReq) XXX_Size() int { - return xxx_messageInfo_ParseAppServicesReq.Size(m) -} -func (m *ParseAppServicesReq) XXX_DiscardUnknown() { - xxx_messageInfo_ParseAppServicesReq.DiscardUnknown(m) -} - -var xxx_messageInfo_ParseAppServicesReq proto.InternalMessageInfo - -func (m *ParseAppServicesReq) GetAppID() string { - if m != nil { - return m.AppID - } - return "" -} - -func (m *ParseAppServicesReq) GetValues() string { - if m != nil { - return m.Values - } - return "" -} - type HelmAppReleases struct { HelmAppRelease []*HelmAppRelease `protobuf:"bytes,1,rep,name=helmAppRelease,proto3" json:"helmAppRelease,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -2360,7 +2321,7 @@ func (m *HelmAppReleases) Reset() { *m = HelmAppReleases{} } func (m *HelmAppReleases) String() string { return proto.CompactTextString(m) } func (*HelmAppReleases) ProtoMessage() {} func (*HelmAppReleases) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{37} + return fileDescriptor_f94cf1a886c479d6, []int{36} } func (m *HelmAppReleases) XXX_Unmarshal(b []byte) error { @@ -2404,7 +2365,7 @@ func (m *HelmAppRelease) Reset() { *m = HelmAppRelease{} } func (m *HelmAppRelease) String() string { return proto.CompactTextString(m) } func (*HelmAppRelease) ProtoMessage() {} func (*HelmAppRelease) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{38} + return fileDescriptor_f94cf1a886c479d6, []int{37} } func (m *HelmAppRelease) XXX_Unmarshal(b []byte) error { @@ -2521,7 +2482,6 @@ func init() { proto.RegisterType((*AppService)(nil), "pb.AppService") proto.RegisterType((*AppService_Pod)(nil), "pb.AppService.Pod") proto.RegisterType((*AppServices)(nil), "pb.AppServices") - proto.RegisterType((*ParseAppServicesReq)(nil), "pb.ParseAppServicesReq") proto.RegisterType((*HelmAppReleases)(nil), "pb.HelmAppReleases") proto.RegisterType((*HelmAppRelease)(nil), "pb.HelmAppRelease") } @@ -2529,171 +2489,170 @@ func init() { func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2615 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x19, 0x5d, 0x6f, 0xdb, 0xc8, - 0xd1, 0x92, 0xac, 0xaf, 0x91, 0x2d, 0xcb, 0xeb, 0x2f, 0x9d, 0xee, 0xf2, 0x71, 0x6c, 0x12, 0x04, - 0xc9, 0xd5, 0x97, 0xb8, 0x97, 0xe6, 0xe3, 0xd2, 0x14, 0x8a, 0xa4, 0x73, 0xd4, 0xda, 0xb2, 0x40, - 0xcb, 0x57, 0x1c, 0x50, 0x40, 0xa0, 0xc5, 0x3d, 0x87, 0x0d, 0x3f, 0xf6, 0x48, 0xca, 0x57, 0x3d, - 0xb6, 0x7f, 0xa1, 0x3f, 0xa1, 0x0f, 0x7d, 0x68, 0x1f, 0x8b, 0x3e, 0xde, 0x3f, 0x28, 0xfa, 0x53, - 0xee, 0xa5, 0x4f, 0x05, 0x0a, 0x14, 0xb3, 0xbb, 0x24, 0x97, 0x14, 0x9d, 0x34, 0x45, 0x8b, 0xbe, - 0x71, 0x66, 0x67, 0x76, 0x66, 0x67, 0x66, 0x67, 0x66, 0x87, 0xd0, 0x36, 0x18, 0x9b, 0xfa, 0x73, + // 2593 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x19, 0xcb, 0x72, 0xdb, 0xc8, + 0x51, 0x24, 0xc5, 0x57, 0x53, 0xa2, 0xa8, 0xd1, 0x8b, 0x4b, 0xaf, 0x1f, 0x8b, 0xd8, 0x2e, 0x97, + 0xbd, 0xd1, 0xda, 0xca, 0x3a, 0x7e, 0xac, 0xb3, 0x29, 0x5a, 0xe4, 0xca, 0x4c, 0x24, 0x8a, 0x05, + 0x52, 0x9b, 0xda, 0xaa, 0x54, 0xb1, 0x20, 0x62, 0x56, 0x46, 0x8c, 0xc7, 0x2c, 0x00, 0x6a, 0xc3, + 0x63, 0xf2, 0x0b, 0x39, 0xe6, 0x98, 0x43, 0x0e, 0xc9, 0x31, 0x95, 0x43, 0x0e, 0xfb, 0x07, 0xa9, + 0x7c, 0xca, 0x5e, 0xf2, 0x01, 0xa9, 0x9e, 0x19, 0x00, 0x03, 0x10, 0xb2, 0xe3, 0x54, 0x52, 0xb9, + 0xa1, 0x7b, 0xba, 0xa7, 0x7b, 0xba, 0x7b, 0xba, 0x7b, 0x1a, 0xd0, 0x36, 0x18, 0x9b, 0xfa, 0x73, 0x37, 0xb4, 0x1c, 0x3a, 0x0d, 0xa8, 0x7f, 0x49, 0xfd, 0x7d, 0xe6, 0x7b, 0xa1, 0x47, 0x8a, 0xec, - 0x5c, 0xab, 0x42, 0x79, 0xe0, 0xb0, 0x70, 0xa1, 0xdd, 0x80, 0x4a, 0x97, 0x31, 0x9d, 0x7e, 0x43, - 0x76, 0xa0, 0x82, 0x2c, 0x96, 0xd9, 0x2e, 0xdc, 0x2c, 0xdc, 0xad, 0xeb, 0x65, 0x83, 0xb1, 0xa1, - 0xa9, 0xdd, 0x86, 0xb5, 0x2e, 0x63, 0xa7, 0xa1, 0x11, 0xce, 0x83, 0xb7, 0x90, 0x7d, 0x0a, 0xcd, - 0x53, 0xea, 0x5f, 0x5a, 0x33, 0xaa, 0xd3, 0x6f, 0xe6, 0x34, 0x08, 0xc9, 0x35, 0x80, 0x40, 0x60, - 0x12, 0xe2, 0xba, 0xc4, 0x0c, 0x4d, 0xed, 0x00, 0x36, 0x24, 0x43, 0x10, 0x71, 0xdc, 0x80, 0x46, - 0xc2, 0x11, 0x48, 0x16, 0x88, 0x59, 0x02, 0xed, 0x13, 0x58, 0x9f, 0x50, 0xd7, 0x70, 0xc3, 0x88, - 0xe3, 0x43, 0xa8, 0x87, 0x1c, 0x91, 0x88, 0xa8, 0x09, 0xc4, 0xd0, 0xd4, 0x7e, 0x53, 0x80, 0x75, - 0xa1, 0xf7, 0x31, 0x0d, 0x02, 0xe3, 0x82, 0x92, 0x47, 0x50, 0x09, 0x38, 0xa2, 0x5d, 0xb8, 0x59, - 0xba, 0xdb, 0x38, 0xb8, 0xb6, 0xcf, 0xce, 0xf7, 0x53, 0x24, 0x12, 0x1a, 0xb8, 0xa1, 0xbf, 0xd0, - 0x25, 0x71, 0xe7, 0x29, 0x34, 0x14, 0x34, 0x69, 0x41, 0xe9, 0x0d, 0x5d, 0x48, 0x71, 0xf8, 0x49, - 0xb6, 0xa1, 0x7c, 0x69, 0xd8, 0x73, 0xda, 0x2e, 0x0a, 0x93, 0x70, 0xe0, 0x59, 0xf1, 0x49, 0x41, - 0x5b, 0x40, 0xa3, 0x6f, 0x05, 0x6f, 0x22, 0x05, 0x1e, 0x40, 0xd9, 0xb4, 0x82, 0x37, 0x91, 0xfc, - 0x0e, 0xca, 0x57, 0xd6, 0xf9, 0xb7, 0x14, 0x2e, 0x08, 0x3b, 0x4f, 0x00, 0x12, 0xe4, 0xbb, 0x44, - 0x17, 0x54, 0xd1, 0x0e, 0x6c, 0x4a, 0x03, 0x77, 0x19, 0x1b, 0x7b, 0xe6, 0x91, 0x15, 0x84, 0xe4, - 0x3e, 0x54, 0x3d, 0xdb, 0x1c, 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x73, 0xac, 0x46, 0xb2, 0x0c, 0x45, 0x3b, 0x54, 0x45, 0xef, - 0x2a, 0xb1, 0x72, 0x8f, 0x1b, 0xd8, 0xce, 0x08, 0x32, 0xdc, 0xa5, 0x26, 0xfa, 0x44, 0x89, 0xea, - 0xb1, 0xb9, 0xf6, 0x37, 0x11, 0x37, 0x22, 0xb2, 0x31, 0x3a, 0x95, 0x3e, 0x98, 0x7f, 0x73, 0x9c, - 0x67, 0x46, 0x07, 0xe6, 0xdf, 0x99, 0xee, 0xb2, 0x94, 0xed, 0x2e, 0x6f, 0xc7, 0x97, 0x79, 0x35, - 0xe9, 0xc7, 0xe3, 0x00, 0x8c, 0xef, 0xb6, 0xc8, 0x0b, 0xe5, 0x38, 0x2f, 0xec, 0x41, 0x15, 0x77, - 0xc7, 0x57, 0x88, 0x38, 0x6e, 0x05, 0xc1, 0x21, 0x43, 0x33, 0x5e, 0x52, 0x3f, 0xb0, 0x3c, 0x57, - 0x9e, 0x32, 0x02, 0xc9, 0x53, 0xd8, 0xb0, 0x5c, 0x34, 0x51, 0xf2, 0x0c, 0x11, 0xad, 0x62, 0x4b, - 0x8a, 0x4c, 0x5e, 0x01, 0x4d, 0x24, 0x4c, 0x9e, 0x12, 0xe4, 0x41, 0xea, 0xf1, 0x52, 0xbf, 0x82, - 0x4b, 0x7d, 0xab, 0xdc, 0x82, 0x0a, 0xc5, 0x4b, 0x1c, 0xc8, 0xb6, 0x70, 0x4d, 0x52, 0xf3, 0x9b, - 0xad, 0xcb, 0x35, 0xed, 0x39, 0x34, 0x4f, 0x43, 0xcf, 0x37, 0x2e, 0x68, 0xcf, 0x36, 0x78, 0x4f, - 0x79, 0x0f, 0x56, 0x6d, 0x8b, 0x37, 0x1c, 0x71, 0x42, 0x52, 0x29, 0x64, 0x56, 0xe1, 0x34, 0xda, - 0x1f, 0x4a, 0x40, 0x96, 0x17, 0x73, 0x1d, 0x73, 0x13, 0x1a, 0xcc, 0xf7, 0x2e, 0x2d, 0x34, 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x8c, 0xea, 0xf4, 0x9b, 0x39, 0x0d, 0x42, 0x72, 0x1d, 0x20, 0x10, 0x98, + 0x84, 0xb8, 0x2e, 0x31, 0x03, 0x53, 0x3b, 0x80, 0x0d, 0xc9, 0x10, 0x44, 0x1c, 0x37, 0xa1, 0x91, + 0x70, 0x04, 0x92, 0x05, 0x62, 0x96, 0x40, 0xfb, 0x18, 0xd6, 0x27, 0xd4, 0x35, 0xdc, 0x30, 0xe2, + 0xb8, 0x06, 0xf5, 0x90, 0x23, 0x12, 0x11, 0x35, 0x81, 0x18, 0x98, 0xda, 0x6f, 0x0a, 0xb0, 0x2e, + 0xf4, 0x3e, 0xa1, 0x41, 0x60, 0x5c, 0x50, 0xf2, 0x18, 0x2a, 0x01, 0x47, 0xb4, 0x0b, 0xb7, 0x4a, + 0xf7, 0x1a, 0x07, 0xd7, 0xf7, 0xd9, 0xf9, 0x7e, 0x8a, 0x44, 0x42, 0x7d, 0x37, 0xf4, 0x17, 0xba, + 0x24, 0xee, 0x3c, 0x83, 0x86, 0x82, 0x26, 0x2d, 0x28, 0xbd, 0xa1, 0x0b, 0x29, 0x0e, 0x3f, 0xc9, + 0x36, 0x94, 0x2f, 0x0d, 0x7b, 0x4e, 0xdb, 0x45, 0x61, 0x12, 0x0e, 0x3c, 0x2f, 0x3e, 0x2d, 0x68, + 0x0b, 0x68, 0xf4, 0xac, 0xe0, 0x4d, 0xa4, 0xc0, 0x43, 0x28, 0x9b, 0x56, 0xf0, 0x26, 0x92, 0xdf, + 0x41, 0xf9, 0xca, 0x3a, 0xff, 0x96, 0xc2, 0x05, 0x61, 0xe7, 0x29, 0x40, 0x82, 0x7c, 0x97, 0xe8, + 0x82, 0x2a, 0xda, 0x81, 0x4d, 0x69, 0xe0, 0x2e, 0x63, 0x23, 0xcf, 0x3c, 0xb6, 0x82, 0x90, 0x3c, + 0x80, 0xaa, 0x67, 0x9b, 0x23, 0xcf, 0x8c, 0x54, 0xd8, 0xe4, 0x26, 0x50, 0xe9, 0xf4, 0x88, 0x02, + 0x89, 0x5d, 0xfa, 0x2d, 0x27, 0x2e, 0x5e, 0x49, 0x2c, 0x29, 0xb4, 0xef, 0x0a, 0xb0, 0x7b, 0x32, + 0xb7, 0x43, 0x6b, 0x59, 0xe8, 0x49, 0xec, 0x57, 0x45, 0xf0, 0x03, 0xdc, 0x2b, 0x9f, 0x21, 0x12, + 0x81, 0xd4, 0xc2, 0x18, 0x2a, 0x7f, 0xe7, 0x0c, 0x5a, 0x59, 0x82, 0x1c, 0xc3, 0x3c, 0x50, 0x0d, + 0xd3, 0x38, 0xd8, 0x59, 0x52, 0x1d, 0x25, 0xa9, 0xf6, 0xfa, 0xbe, 0x08, 0xeb, 0x29, 0x82, 0x77, + 0x44, 0x30, 0x06, 0x9f, 0x49, 0x99, 0xed, 0x2d, 0x70, 0x55, 0x78, 0xbe, 0x26, 0x10, 0x03, 0x13, + 0x63, 0x59, 0x2e, 0x86, 0x0b, 0x46, 0xdb, 0x25, 0x11, 0xcb, 0x02, 0x35, 0x59, 0x30, 0x4a, 0x3e, + 0x80, 0x1a, 0xf3, 0xcc, 0xa9, 0x6b, 0x38, 0xb4, 0xbd, 0xca, 0x57, 0xab, 0xcc, 0x33, 0x87, 0x86, + 0x43, 0xf1, 0x8a, 0xe1, 0x92, 0xc5, 0xda, 0x65, 0x11, 0x4f, 0xcc, 0x33, 0x07, 0x0c, 0xd5, 0x41, + 0xb4, 0x8c, 0xe0, 0x8a, 0x50, 0x87, 0x79, 0xa6, 0x88, 0x4d, 0xd2, 0x05, 0x98, 0x79, 0x6e, 0x68, + 0x58, 0x2e, 0xf5, 0x83, 0x76, 0x95, 0x1b, 0xf9, 0xa3, 0xa5, 0x53, 0xef, 0x1f, 0xc6, 0x34, 0xc2, + 0xb4, 0x0a, 0x13, 0x2a, 0x8d, 0x12, 0x2e, 0x3d, 0x7b, 0xee, 0xd0, 0xa0, 0x5d, 0xbb, 0x55, 0x42, + 0xa5, 0x99, 0x67, 0x7e, 0x29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xee, 0xbf, 0x2e, 0x63, 0xa9, 0xfb, 0x96, 0x67, 0xff, 0x1b, 0x6f, 0x6f, 0x3c, 0x78, 0x18, 0x5f, + 0x43, 0x87, 0xca, 0xc4, 0xb3, 0x54, 0x26, 0x40, 0xde, 0x18, 0xd4, 0x7e, 0x2f, 0xbf, 0x3c, 0xa0, + 0x46, 0x0f, 0x61, 0x03, 0x77, 0x51, 0x33, 0xa9, 0xca, 0xb9, 0x91, 0xce, 0xa1, 0xc8, 0xf1, 0x04, + 0x88, 0x22, 0x37, 0x4a, 0x78, 0x2a, 0xd3, 0xd6, 0x72, 0xce, 0x0c, 0xb4, 0x95, 0xf3, 0x0a, 0xff, + 0x33, 0xfa, 0xa3, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xec, 0x8f, 0xf1, 0x1c, 0x35, 0x1d, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2725,7 +2684,6 @@ type AppRuntimeSyncClient interface { GetAppVolumeStatus(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceVolumeStatusMessage, error) ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) - ParseAppServices(ctx context.Context, in *ParseAppServicesReq, opts ...grpc.CallOption) (*AppServices, error) ListHelmAppRelease(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*HelmAppReleases, error) } @@ -2881,15 +2839,6 @@ func (c *appRuntimeSyncClient) ListAppServices(ctx context.Context, in *AppReq, return out, nil } -func (c *appRuntimeSyncClient) ParseAppServices(ctx context.Context, in *ParseAppServicesReq, opts ...grpc.CallOption) (*AppServices, error) { - out := new(AppServices) - err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ParseAppServices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *appRuntimeSyncClient) ListHelmAppRelease(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*HelmAppReleases, error) { out := new(HelmAppReleases) err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListHelmAppRelease", in, out, opts...) @@ -2918,7 +2867,6 @@ type AppRuntimeSyncServer interface { GetAppVolumeStatus(context.Context, *ServiceRequest) (*ServiceVolumeStatusMessage, error) ListHelmAppDetectConditions(context.Context, *AppReq) (*AppDetectConditions, error) ListAppServices(context.Context, *AppReq) (*AppServices, error) - ParseAppServices(context.Context, *ParseAppServicesReq) (*AppServices, error) ListHelmAppRelease(context.Context, *AppReq) (*HelmAppReleases, error) } @@ -3214,24 +3162,6 @@ func _AppRuntimeSync_ListAppServices_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _AppRuntimeSync_ParseAppServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseAppServicesReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppRuntimeSyncServer).ParseAppServices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.AppRuntimeSync/ParseAppServices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppRuntimeSyncServer).ParseAppServices(ctx, req.(*ParseAppServicesReq)) - } - return interceptor(ctx, in, info, handler) -} - func _AppRuntimeSync_ListHelmAppRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AppReq) if err := dec(in); err != nil { @@ -3318,10 +3248,6 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ MethodName: "ListAppServices", Handler: _AppRuntimeSync_ListAppServices_Handler, }, - { - MethodName: "ParseAppServices", - Handler: _AppRuntimeSync_ParseAppServices_Handler, - }, { MethodName: "ListHelmAppRelease", Handler: _AppRuntimeSync_ListHelmAppRelease_Handler, diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 01aec68b8..36d93e909 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -19,7 +19,6 @@ service AppRuntimeSync { rpc GetAppVolumeStatus(ServiceRequest) returns(ServiceVolumeStatusMessage){} rpc ListHelmAppDetectConditions(AppReq) returns(AppDetectConditions){} rpc ListAppServices(AppReq) returns(AppServices){} - rpc ParseAppServices(ParseAppServicesReq) returns(AppServices){} rpc ListHelmAppRelease(AppReq) returns(HelmAppReleases){} } @@ -267,6 +266,7 @@ message AppStatus { string values = 9; string version = 10; int32 revision = 11; + repeated string overrides = 12; } message AppDetectCondition { @@ -296,11 +296,6 @@ message AppServices { repeated AppService services=1; } -message ParseAppServicesReq { - string appID=1; - string values=2; -} - message HelmAppReleases { repeated HelmAppRelease helmAppRelease=1; } diff --git a/worker/server/server.go b/worker/server/server.go index 8a0cad8c5..b8b027170 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -19,24 +19,12 @@ package server import ( - "bytes" "context" - "encoding/base64" "fmt" - "io/ioutil" "net" "strings" "time" - "github.com/goodrain/rainbond/util/commonutil" - "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" - "github.com/pkg/errors" - "helm.sh/helm/v3/pkg/kube" - "k8s.io/cli-runtime/pkg/genericclioptions" - "k8s.io/cli-runtime/pkg/resource" - "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/yaml" - "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/db" @@ -50,6 +38,7 @@ import ( "github.com/goodrain/rainbond/worker/appm/store" "github.com/goodrain/rainbond/worker/appm/thirdparty/discovery" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/goodrain/rainbond/worker/server/pb" wutil "github.com/goodrain/rainbond/worker/util" "github.com/sirupsen/logrus" @@ -190,17 +179,17 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, } return &pb.AppStatus{ - Status: string(helmApp.Status.Status), - Phase: phase, - ValuesTemplate: helmApp.Status.ValuesTemplate, - Cpu: cpu, - SetCPU: cpu > 0, - Memory: memory, - SetMemory: memory > 0, - Readme: helmApp.Status.Readme, - Values: helmApp.Status.CurrentValues, - Version: helmApp.Status.CurrentVersion, - Revision: int32(helmApp.Status.CurrentRevision), + Status: string(helmApp.Status.Status), + Phase: phase, + Cpu: cpu, + SetCPU: cpu > 0, + Memory: memory, + SetMemory: memory > 0, + Readme: helmApp.Status.Readme, + Version: helmApp.Status.CurrentVersion, + Revision: int32(helmApp.Status.CurrentRevision), + Values: helmApp.Status.Values, + Overrides: helmApp.Status.Overrides, }, nil } @@ -772,97 +761,13 @@ func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppSer return appServices } -func (r *RuntimeServer) ParseAppServices(ctx context.Context, req *pb.ParseAppServicesReq) (*pb.AppServices, error) { - app, err := db.GetManager().ApplicationDao().GetAppByID(req.AppID) - if err != nil { - return nil, err - } - - b, err := base64.StdEncoding.DecodeString(req.Values) - if err != nil { - return nil, errors.Wrap(err, "decode values") - } - - vals := map[string]interface{}{} - if err := yaml.Unmarshal(b, &vals); err != nil { - return nil, errors.Wrap(err, "parse values") - } - - configFlags := genericclioptions.NewConfigFlags(true) - configFlags.Namespace = commonutil.String(app.TenantID) - kubeClient := kube.New(configFlags) - - h, err := helm.NewHelm(kubeClient, configFlags, app.TenantID, r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) - if err != nil { - return nil, err - } - - repo := helm.NewRepo(r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) - if err := repo.Add(app.AppStoreName, app.AppStoreURL, "", ""); err != nil { - logrus.Warningf("add repo: %v", err) - } - - manifests, err := h.Manifests(app.AppName, app.AppStoreName+"/"+app.AppTemplateName, app.Version, vals, ioutil.Discard) - if err != nil { - return nil, err - } - - // Create a local builder... - builder := resource.NewLocalBuilder(). - // Configure with a scheme to get typed objects in the versions registered with the scheme. - // As an alternative, could call Unstructured() to get unstructured objects. - WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). - // Provide input via a Reader. - // As an alternative, could call Path(false, "/path/to/file") to read from a file. - Stream(bytes.NewBufferString(manifests), "input"). - // Flatten items contained in List objects - Flatten(). - // Accumulate as many items as possible - ContinueOnError() - - // Run the builder - logrus.Debugf("start parse manifests: %s", manifests) - result := builder.Do() - - if result.Err() != nil { - logrus.Warningf("parse manifests: %v", err) - } - - items, err := result.Infos() - if err != nil { - return nil, errors.WithMessage(err, "resource infos") - } - - var services []*corev1.Service - for _, item := range items { - if item.Object.GetObjectKind().GroupVersionKind().Kind != "Service" { - continue - } - svc, ok := item.Object.(*corev1.Service) - if !ok { - continue - } - services = append(services, svc) - } - - appServices := r.convertServices(services) - - return &pb.AppServices{ - Services: appServices, - }, nil -} - func (r *RuntimeServer) ListHelmAppRelease(ctx context.Context, req *pb.AppReq) (*pb.HelmAppReleases, error) { app, err := db.GetManager().ApplicationDao().GetAppByID(req.AppId) if err != nil { return nil, err } - configFlags := genericclioptions.NewConfigFlags(true) - configFlags.Namespace = commonutil.String(app.TenantID) - kubeClient := kube.New(configFlags) - - h, err := helm.NewHelm(kubeClient, configFlags, app.TenantID, r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) + h, err := helm.NewHelm(app.TenantID, r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) if err != nil { return nil, err } From 9d736110c2e80a928e65c5c37f3219e721052c70 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 6 May 2021 09:34:15 +0800 Subject: [PATCH 30/65] suite test for helm app installation --- Makefile | 6 +- api/handler/application_handler.go | 2 +- cmd/helmappcontroller/main.go | 64 ---- cmd/worker/server/server.go | 14 +- config/crd/rainbond.goodrain.io_helmapps.yaml | 14 +- go.mod | 4 +- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 13 +- util/k8s/k8s.go | 15 + worker/controllers/helmapp/app.go | 331 ++++++++++++++++++ worker/controllers/helmapp/controller.go | 10 +- worker/controllers/helmapp/controlloop.go | 163 +++------ .../controllers/helmapp/controlloop_test.go | 189 ++++++++++ worker/controllers/helmapp/detector.go | 36 +- worker/controllers/helmapp/finilizer.go | 37 +- worker/controllers/helmapp/helm/app.go | 181 ---------- worker/controllers/helmapp/helm/helm.go | 27 +- worker/controllers/helmapp/status.go | 58 +-- worker/controllers/helmapp/suite_test.go | 88 +++++ 18 files changed, 809 insertions(+), 443 deletions(-) delete mode 100644 cmd/helmappcontroller/main.go create mode 100644 worker/controllers/helmapp/app.go create mode 100644 worker/controllers/helmapp/controlloop_test.go delete mode 100644 worker/controllers/helmapp/helm/app.go create mode 100644 worker/controllers/helmapp/suite_test.go diff --git a/Makefile b/Makefile index d333481b3..22d7daa92 100644 --- a/Makefile +++ b/Makefile @@ -77,4 +77,8 @@ ifeq (, $(shell which controller-gen)) CONTROLLER_GEN=$(GOBIN)/controller-gen else CONTROLLER_GEN=$(shell which controller-gen) -endif \ No newline at end of file +endif + +.PHONY: test +test: + KUBE_CONFIG=~/.kube/config PROJECT_HOME=${shell pwd} ginkgo -v worker/controllers/helmapp diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 1d8999d2e..78722281b 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -468,7 +468,7 @@ func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Applicatio ctx3, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() helmApp.Spec.Overrides = overrides - helmApp.Spec.PreStatus = "Configured" + helmApp.Spec.PreStatus = v1alpha1.HelmAppPreStatusConfigured _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(app.TenantID).Update(ctx3, helmApp, metav1.UpdateOptions{}) if err != nil { return err diff --git a/cmd/helmappcontroller/main.go b/cmd/helmappcontroller/main.go deleted file mode 100644 index 62b63aeb3..000000000 --- a/cmd/helmappcontroller/main.go +++ /dev/null @@ -1,64 +0,0 @@ -package main - -import "C" -import ( - "os" - "time" - - "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - k8sutil "github.com/goodrain/rainbond/util/k8s" - "github.com/goodrain/rainbond/worker/controllers/helmapp" - "github.com/sirupsen/logrus" -) - -func init() { - logrus.SetOutput(os.Stdout) - logrus.SetLevel(logrus.DebugLevel) -} - -func main() { - restcfg, err := k8sutil.NewRestConfig("/Users/abewang/.kube/config") - if err != nil { - logrus.Fatalf("create kube rest config error: %s", err.Error()) - } - - stopCh := make(chan struct{}) - defer close(stopCh) - - //clientset := versioned.NewForConfigOrDie(restcfg) - - //helmApp := &rainbondv1alpha1.HelmApp{ - // ObjectMeta: metav1.ObjectMeta{ - // Name: "foo", - // Namespace: "rbd-system", - // }, - // Spec: rainbondv1alpha1.HelmAppSpec{ - // PreStatus: "", - // Version: "1.3.0", - // Revision: Int32(0), - // Values: "", - // AppStore: &rainbondv1alpha1.HelmAppStore{ - // Version: "1111111", - // Name: "rainbond", - // URL: "https://openchart.goodrain.com/goodrain/rainbond", - // }, - // }, - //} - //if _, err := clientset.RainbondV1alpha1().HelmApps("rbd-system").Create(context.Background(), - // helmApp, metav1.CreateOptions{}); err != nil { - // if !k8sErrors.IsAlreadyExists(err) { - // logrus.Fatal(err) - // } - //} - rainbondClient := versioned.NewForConfigOrDie(restcfg) - - ctrl := helmapp.NewController(stopCh, rainbondClient, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") - ctrl.Start() - - select {} -} - -// Int32 returns a pointer to the int32 value passed in. -func Int32(v int32) *int32 { - return &v -} diff --git a/cmd/worker/server/server.go b/cmd/worker/server/server.go index 8149158fc..773002176 100644 --- a/cmd/worker/server/server.go +++ b/cmd/worker/server/server.go @@ -19,6 +19,12 @@ package server import ( + "context" + "os" + "os/signal" + "syscall" + "time" + "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/db" @@ -38,14 +44,12 @@ import ( "github.com/goodrain/rainbond/worker/server" "github.com/sirupsen/logrus" "k8s.io/client-go/kubernetes" - "os" - "os/signal" - "syscall" - "time" ) //Run start run func Run(s *option.Worker) error { + ctx := context.Background() + errChan := make(chan error, 2) dbconfig := config.Config{ DBType: s.Config.DBType, @@ -135,7 +139,7 @@ func Run(s *option.Worker) error { defer exporterManager.Stop() stopCh := make(chan struct{}) - ctrl := helmapp.NewController(stopCh, rainbondClient, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + ctrl := helmapp.NewController(ctx, stopCh, rainbondClient, 5*time.Second, s.Helm.RepoFile, s.Helm.RepoCache) go ctrl.Start() defer close(stopCh) diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml index d4384bd60..67f179db1 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -36,9 +36,6 @@ spec: spec: description: HelmAppSpec defines the desired state of HelmApp properties: - appName: - description: The application name. - type: string appStore: description: The helm app store. properties: @@ -84,13 +81,16 @@ spec: revision: description: The application revision. type: integer + templateName: + description: The application name. + type: string version: description: The application version. type: string required: - - appName - appStore - eid + - templateName - version type: object status: @@ -135,10 +135,10 @@ spec: description: The version infect. type: string overrides: - additionalProperties: - type: string description: Overrides in effect. - type: object + items: + type: string + type: array phase: description: The phase of the helm app. type: string diff --git a/go.mod b/go.mod index ac9db69b2..cf2cb26ec 100644 --- a/go.mod +++ b/go.mod @@ -62,6 +62,8 @@ require ( github.com/mitchellh/go-wordwrap v1.0.0 github.com/mitchellh/mapstructure v1.3.3 github.com/ncabatoff/process-exporter v0.7.1 + github.com/onsi/ginkgo v1.14.1 + github.com/onsi/gomega v1.10.2 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/runc v1.0.0-rc91.0.20200707015106-819fcc687efb // indirect github.com/pborman/uuid v1.2.1 @@ -96,7 +98,7 @@ require ( golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 golang.org/x/tools v0.0.0-20201228162255-34cd474b9958 // indirect - google.golang.org/appengine v1.6.7 // indirect + google.golang.org/appengine v1.6.7 google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e // indirect google.golang.org/grpc v1.33.2 gopkg.in/alecthomas/kingpin.v2 v2.2.6 diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index 9ffd59e6b..dd75cc604 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -86,6 +86,15 @@ const ( HelmAppInstalled HelmAppConditionType = "HelmAppInstalled" ) +// HelmAppPreStatus is a valid value for the PreStatus of HelmApp. +type HelmAppPreStatus string + +// HelmAppPreStatus +const ( + HelmAppPreStatusNotConfigured HelmAppPreStatus = "NotConfigured" + HelmAppPreStatusConfigured HelmAppPreStatus = "Configured" +) + // HelmAppCondition contains details for the current condition of this helm application. type HelmAppCondition struct { // Type is the type of the condition. @@ -114,10 +123,10 @@ type HelmAppSpec struct { // The prerequisite status. // +kubebuilder:validation:Enum=NotConfigured;Configured - PreStatus string `json:"preStatus,omitempty"` + PreStatus HelmAppPreStatus `json:"preStatus,omitempty"` // The application name. - TemplateName string `json:"appName"` + TemplateName string `json:"templateName"` // The application version. Version string `json:"version"` diff --git a/util/k8s/k8s.go b/util/k8s/k8s.go index 52af85767..840a27669 100644 --- a/util/k8s/k8s.go +++ b/util/k8s/k8s.go @@ -1,6 +1,7 @@ package k8s import ( + "encoding/json" "net" "os" @@ -8,6 +9,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" @@ -104,3 +106,16 @@ func DefListEventsByPod(clientset kubernetes.Interface, pod *corev1.Pod) *corev1 func ObjKey(obj metav1.Object) string { return obj.GetName() + "/" + obj.GetNamespace() } + +// CreatePatch - +func CreatePatch(o, n, datastruct interface{}) ([]byte, error) { + oldData, err := json.Marshal(o) + if err != nil { + return nil, err + } + newData, err := json.Marshal(n) + if err != nil { + return nil, err + } + return strategicpatch.CreateTwoWayMergePatch(oldData, newData, datastruct) +} diff --git a/worker/controllers/helmapp/app.go b/worker/controllers/helmapp/app.go new file mode 100644 index 000000000..72e3de5f6 --- /dev/null +++ b/worker/controllers/helmapp/app.go @@ -0,0 +1,331 @@ +package helmapp + +import ( + "context" + "encoding/base64" + "io/ioutil" + "os" + "path" + "path/filepath" + + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v3/pkg/storage/driver" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/record" + "k8s.io/client-go/util/retry" +) + +type App struct { + ctx context.Context + log *logrus.Entry + rainbondClient versioned.Interface + recorder record.EventRecorder + + helmApp *v1alpha1.HelmApp + originalHelmApp *v1alpha1.HelmApp + + name string + namespace string + templateName string + version string + repoName string + repoURL string + overrides []string + revision int + chartDir string + + helmCmd *helm.Helm + repo *helm.Repo +} + +func (a *App) Chart() string { + return a.repoName + "/" + a.templateName +} + +func NewApp(ctx context.Context, kubeClient clientset.Interface, rainbondClient versioned.Interface, helmApp *v1alpha1.HelmApp, repoFile, repoCache string) (*App, error) { + helmCmd, err := helm.NewHelm(helmApp.GetNamespace(), repoFile, repoCache) + if err != nil { + return nil, err + } + repo := helm.NewRepo(repoFile, repoCache) + log := logrus.WithField("HelmAppController", "Reconcile").WithField("Namespace", helmApp.GetNamespace()).WithField("Name", helmApp.GetName()) + + return &App{ + ctx: ctx, + log: log, + recorder: createRecorder(kubeClient, helmApp.Name, helmApp.Namespace), + rainbondClient: rainbondClient, + helmApp: helmApp.DeepCopy(), + originalHelmApp: helmApp, + name: helmApp.GetName(), + namespace: helmApp.GetNamespace(), + templateName: helmApp.Spec.TemplateName, + repoName: helmApp.Spec.AppStore.Name, + repoURL: helmApp.Spec.AppStore.URL, + version: helmApp.Spec.Version, + revision: helmApp.Spec.Revision, + overrides: helmApp.Spec.Overrides, + helmCmd: helmCmd, + repo: repo, + chartDir: path.Join("/tmp/helm/chart", helmApp.Namespace, helmApp.Name, helmApp.Spec.Version), + }, nil +} + +func createRecorder(kubeClient clientset.Interface, name, namespace string) record.EventRecorder { + eventBroadcaster := record.NewBroadcaster() + eventBroadcaster.StartLogging(logrus.Infof) + + eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{ + Interface: v1core.New(kubeClient.CoreV1().RESTClient()).Events(namespace)}) + return eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: name}) +} + +// NeedSetup checks if necessary to setup default values for the helm app. +func (a *App) NeedSetup() bool { + if a.helmApp.Spec.PreStatus == "" { + return true + } + + if a.helmApp.Status.Phase == "" { + return true + } + + for _, typ3 := range defaultConditionTypes { + idx, _ := a.helmApp.Status.GetCondition(typ3) + if idx == -1 { + return true + } + } + + return false +} + +// NeedDetect checks if necessary to detect the helm app. +func (a *App) NeedDetect() bool { + conditionTypes := []v1alpha1.HelmAppConditionType{ + v1alpha1.HelmAppChartReady, + v1alpha1.HelmAppPreInstalled, + v1alpha1.HelmAppChartParsed, + } + for _, t := range conditionTypes { + if !a.helmApp.Status.IsConditionTrue(t) { + return true + } + } + return false +} + +// NeedUpdate check if the helmApp needed to update. +func (a *App) NeedUpdate() bool { + if a.helmApp.Spec.PreStatus != v1alpha1.HelmAppPreStatusConfigured { + return false + } + return !a.helmApp.OverridesEqual() || a.helmApp.Spec.Version != a.helmApp.Status.CurrentVersion +} + +// NeedRollback checks if the helmApp needed to be rollback +func (a *App) NeedRollback() bool { + return a.helmApp.Spec.Revision != 0 && a.helmApp.Spec.Revision != a.helmApp.Status.TargetRevision +} + +func (a *App) Setup() error { + a.log.Info("setup the helm app") + // setup default PreStatus + if a.helmApp.Spec.PreStatus == "" { + a.helmApp.Spec.PreStatus = v1alpha1.HelmAppPreStatusNotConfigured + } + + // default phase is detecting + if a.helmApp.Status.Phase == "" { + a.helmApp.Status.Phase = v1alpha1.HelmAppStatusPhaseDetecting + } + + // setup default conditions + for _, typ3 := range defaultConditionTypes { + _, condition := a.helmApp.Status.GetCondition(typ3) + if condition == nil { + a.helmApp.Status.UpdateConditionStatus(typ3, corev1.ConditionFalse) + } + } + + return a.Update() +} + +// Update updates the helm app. +func (a *App) Update() error { + // update status + if err := a.UpdateStatus(); err != nil { + return err + } + // use patch instead of update to void resource version conflict. + return a.UpdateSpec() +} + +// UpdateStatus updates the status of the helm app. +func (a *App) UpdateStatus() error { + status := NewStatus(a.ctx, a.helmApp, a.rainbondClient) + return status.Update() +} + +// UpdateSpec updates the helm app spec. +func (a *App) UpdateSpec() error { + return retry.RetryOnConflict(retry.DefaultBackoff, func() error { + ctx, cancel := context.WithTimeout(a.ctx, defaultTimeout) + defer cancel() + + helmApp, err := a.rainbondClient.RainbondV1alpha1().HelmApps(a.helmApp.Namespace).Get(ctx, a.helmApp.Name, metav1.GetOptions{}) + if err != nil { + return errors.Wrap(err, "get helm app before update") + } + + a.helmApp.ResourceVersion = helmApp.ResourceVersion + if _, err := a.rainbondClient.RainbondV1alpha1().HelmApps(a.helmApp.Namespace).Update(ctx, a.helmApp, metav1.UpdateOptions{}); err != nil { + return errors.Wrap(err, "update helm app spec") + } + + return nil + }) +} + +// Detect detect the helm app. +func (a *App) Detect() error { + detector := NewDetector(a.helmApp, a, a.repo) + if err := detector.Detect(); err != nil { + return errors.WithMessage(err, "detect helm app") + } + return a.UpdateStatus() +} + +func (a *App) Pull() error { + if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { + return err + } + + return a.helmCmd.Pull(a.chart(), a.version, a.chartDir) +} + +func (a *App) chart() string { + return a.repoName + "/" + a.templateName +} + +func (a *App) PreInstall() error { + if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { + return err + } + + if err := a.helmCmd.PreInstall(a.name, a.Chart(), a.version); err != nil { + return err + } + return nil +} + +func (a *App) Status() (*release.Release, error) { + rel, err := a.helmCmd.Status(a.name) + if err != nil { + return nil, err + } + return rel, nil +} + +func (a *App) InstallOrUpdate() error { + if err := a.installOrUpdate(); err != nil { + a.helmApp.Status.SetCondition(*v1alpha1.NewHelmAppCondition( + v1alpha1.HelmAppInstalled, corev1.ConditionFalse, "InstallFailed", err.Error())) + return a.UpdateStatus() + } + + a.helmApp.Status.UpdateConditionStatus(v1alpha1.HelmAppInstalled, corev1.ConditionTrue) + a.helmApp.Status.CurrentVersion = a.helmApp.Spec.Version + a.helmApp.Status.Overrides = a.helmApp.Spec.Overrides + return a.UpdateStatus() +} + +func (a *App) installOrUpdate() error { + if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { + return err + } + + _, err := a.helmCmd.Status(a.name) + if err != nil && !errors.Is(err, driver.ErrReleaseNotFound) { + return err + } + + if errors.Is(err, driver.ErrReleaseNotFound) { + logrus.Debugf("name: %s; namespace: %s; chart: %s; install helm app", a.name, a.namespace, a.Chart()) + if err := a.helmCmd.Install(a.name, a.Chart(), a.version, a.overrides); err != nil { + return err + } + + return nil + } + + logrus.Debugf("name: %s; namespace: %s; chart: %s; upgrade helm app", a.name, a.namespace, a.Chart()) + return a.helmCmd.Upgrade(a.name, a.chart(), a.version, a.overrides) +} + +func (a *App) ParseChart() (string, string, error) { + var values string + var readme string + err := filepath.Walk(a.chartDir, func(p string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if p == a.chartDir { + return nil + } + if values != "" || readme != "" { + return filepath.SkipDir + } + if !info.IsDir() { + return nil + } + + valuesFile := path.Join(p, "values.yaml") + valuesBytes, err := ioutil.ReadFile(valuesFile) + if err != nil { + return err + } + values = base64.StdEncoding.EncodeToString(valuesBytes) + + readmeFile := path.Join(p, "README.md") + readmeBytes, err := ioutil.ReadFile(readmeFile) + if err != nil { + return err + } + readme = base64.StdEncoding.EncodeToString(readmeBytes) + + return nil + }) + + return values, readme, err +} + +func (a *App) Uninstall() error { + return a.helmCmd.Uninstall(a.name) +} + +func (a *App) Rollback() error { + if err := a.rollback(); err != nil { + a.recorder.Event(a.helmApp, corev1.EventTypeWarning, "RollBackFailed", err.Error()) + return a.UpdateStatus() + } + + a.helmApp.Status.TargetRevision = a.helmApp.Spec.Revision + return a.UpdateStatus() +} + +func (a *App) rollback() error { + if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { + return err + } + return a.helmCmd.Rollback(a.name, a.revision) +} diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index 945f8ac78..cc76623fb 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -1,10 +1,12 @@ package helmapp import ( + "context" "time" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/sirupsen/logrus" + clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/workqueue" ) @@ -16,14 +18,14 @@ type Controller struct { finalizer *Finalizer } -func NewController(stopCh chan struct{}, clientset versioned.Interface, resyncPeriod time.Duration, +func NewController(ctx context.Context, stopCh chan struct{}, kubeClient clientset.Interface, clientset versioned.Interface, resyncPeriod time.Duration, repoFile, repoCache string) *Controller { workQueue := workqueue.New() finalizerQueue := workqueue.New() storer := NewStorer(clientset, resyncPeriod, workQueue, finalizerQueue) - controlLoop := NewControlLoop(clientset, storer, workQueue, repoFile, repoCache) - finalizer := NewFinalizer(clientset, finalizerQueue, repoFile, repoCache) + controlLoop := NewControlLoop(ctx, kubeClient, clientset, storer, workQueue, repoFile, repoCache) + finalizer := NewFinalizer(ctx, kubeClient, clientset, finalizerQueue, repoFile, repoCache) return &Controller{ storer: storer, @@ -35,7 +37,7 @@ func NewController(stopCh chan struct{}, clientset versioned.Interface, resyncPe func (c *Controller) Start() { logrus.Info("start helm app controller") - go c.storer.Run(c.stopCh) + c.storer.Run(c.stopCh) go c.controlLoop.Run() c.finalizer.Run() } diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 5d5621f6f..d3cde3e84 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -2,31 +2,43 @@ package helmapp import ( "context" - "errors" "strings" + "time" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/sirupsen/logrus" - "helm.sh/helm/v3/pkg/storage/driver" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/workqueue" ) +const ( + defaultTimeout = 3 * time.Second +) + +var defaultConditionTypes = []v1alpha1.HelmAppConditionType{ + v1alpha1.HelmAppChartReady, + v1alpha1.HelmAppChartParsed, + v1alpha1.HelmAppPreInstalled, + v1alpha1.HelmAppInstalled, +} + type ControlLoop struct { - clientset versioned.Interface - storer Storer - workQueue workqueue.Interface - repo *helm.Repo - repoFile string - repoCache string + ctx context.Context + kubeClient clientset.Interface + clientset versioned.Interface + storer Storer + workQueue workqueue.Interface + repo *helm.Repo + repoFile string + repoCache string } // NewControlLoop - -func NewControlLoop(clientset versioned.Interface, +func NewControlLoop(ctx context.Context, + kubeClient clientset.Interface, + clientset versioned.Interface, storer Storer, workQueue workqueue.Interface, repoFile string, @@ -35,12 +47,14 @@ func NewControlLoop(clientset versioned.Interface, repo := helm.NewRepo(repoFile, repoCache) return &ControlLoop{ - clientset: clientset, - storer: storer, - workQueue: workQueue, - repo: repo, - repoFile: repoFile, - repoCache: repoCache, + ctx: ctx, + kubeClient: kubeClient, + clientset: clientset, + storer: storer, + workQueue: workQueue, + repo: repo, + repoFile: repoFile, + repoCache: repoCache, } } @@ -76,96 +90,33 @@ func (c *ControlLoop) run(obj interface{}) { } } -func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { - logrus.Debugf("HelmApp Received: %s; phase: %s", k8sutil.ObjKey(helmApp), helmApp.Status.Phase) - - appStore := helmApp.Spec.AppStore - app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, - helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Revision, helmApp.Spec.Overrides, - helmApp.Spec.FullName(), appStore.URL, c.repoFile, c.repoCache) - - if err != nil { - return err - } - - status, continu3 := NewStatus(helmApp) - - defer func() { - helmApp.Status = status.GetHelmAppStatus() - appStatus, err := app.Status() - if err != nil { - if !errors.Is(err, driver.ErrReleaseNotFound) { - logrus.Warningf("get app status: %v", err) - } - } else { - helmApp.Status.Status = v1alpha1.HelmAppStatusStatus(appStatus.Info.Status) - helmApp.Status.CurrentRevision = appStatus.Version - } - // TODO: handle the error - if err := c.updateStatus(helmApp); err != nil { - logrus.Warningf("update app status: %v", err) - } - }() - - // update condition quickly - if !continu3 { - return nil - } - - detector := NewDetector(helmApp, status, app, c.repo) - if err := detector.Detect(); err != nil { - // TODO: create event - return err - } - - if needUpdate(helmApp) { - if err := app.InstallOrUpdate(); err != nil { - status.SetCondition(*v1alpha1.NewHelmAppCondition( - v1alpha1.HelmAppInstalled, corev1.ConditionFalse, "InstallFailed", err.Error())) - return err - } - status.UpdateConditionStatus(v1alpha1.HelmAppInstalled, corev1.ConditionTrue) - status.CurrentVersion = helmApp.Spec.Version - status.Overrides = helmApp.Spec.Overrides - } - - if needRollback(helmApp) { - if err := app.Rollback(); err != nil { - logrus.Warningf("app: %s; namespace: %s; rollback helm app: %v", helmApp.Name, helmApp.Namespace, err) - } else { - status.TargetRevision = helmApp.Spec.Revision - } - } - - return nil -} - -// check if the helmApp needed to be update -func needUpdate(helmApp *v1alpha1.HelmApp) bool { - if helmApp.Spec.PreStatus != "Configured" { - return false - } - return !helmApp.OverridesEqual() || helmApp.Spec.Version != helmApp.Status.CurrentVersion -} - -// check if the helmApp needed to be rollback -func needRollback(helmApp *v1alpha1.HelmApp) bool { - return helmApp.Spec.Revision != 0 && - helmApp.Spec.Revision != helmApp.Status.TargetRevision -} - -func (c *ControlLoop) updateStatus(helmApp *v1alpha1.HelmApp) error { - // TODO: context - if _, err := c.clientset.RainbondV1alpha1().HelmApps(helmApp.Namespace). - UpdateStatus(context.Background(), helmApp, metav1.UpdateOptions{}); err != nil { - // TODO: create event - return err - } - return nil -} - // nameNamespace - func nameNamespace(key string) (string, string) { strs := strings.Split(key, "/") return strs[0], strs[1] } + +func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { + app, err := NewApp(c.ctx, c.kubeClient, c.clientset, helmApp, c.repoFile, c.repoCache) + if err != nil { + return err + } + + if app.NeedSetup() { + return app.Setup() + } + + if app.NeedDetect() { + return app.Detect() + } + + if app.NeedUpdate() { + return app.InstallOrUpdate() + } + + if app.NeedRollback() { + return app.Rollback() + } + + return nil +} diff --git a/worker/controllers/helmapp/controlloop_test.go b/worker/controllers/helmapp/controlloop_test.go new file mode 100644 index 000000000..473fde16c --- /dev/null +++ b/worker/controllers/helmapp/controlloop_test.go @@ -0,0 +1,189 @@ +package helmapp + +import ( + "context" + + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/util" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var _ = Describe("ControlLoop", func() { + var namespace string + var helmApp *rainbondv1alpha1.HelmApp + BeforeEach(func() { + // create namespace + ns := &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: util.NewUUID(), + }, + } + namespace = ns.Name + By("create namespace: " + namespace) + _, err := kubeClient.CoreV1().Namespaces().Create(context.Background(), ns, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + helmApp = &rainbondv1alpha1.HelmApp{ + ObjectMeta: metav1.ObjectMeta{ + Name: "phpmyadmin", + Namespace: namespace, + Labels: map[string]string{ + "app": "phpmyadmin", + }, + }, + Spec: rainbondv1alpha1.HelmAppSpec{ + EID: "5bfba91b0ead72f612732535ef802217", + TemplateName: "phpmyadmin", + Version: "8.2.0", + AppStore: &rainbondv1alpha1.HelmAppStore{ + Name: "bitnami", + URL: "https://charts.bitnami.com/bitnami", + }, + }, + } + By("create helm app: " + helmApp.Name) + _, err = rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Create(context.Background(), helmApp, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + }) + + AfterEach(func() { + By("delete namespace: " + namespace) + err := kubeClient.CoreV1().Namespaces().Delete(context.Background(), namespace, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + }) + + Describe("Reconcile", func() { + Context("HelmApp created", func() { + It("should fulfill default values", func() { + watch, err := rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Watch(context.Background(), metav1.ListOptions{ + LabelSelector: "app=phpmyadmin", + Watch: true, + }) + Expect(err).NotTo(HaveOccurred()) + + By("wait until the default values of the helm app were setup") + for event := range watch.ResultChan() { + newHelmApp := event.Object.(*rainbondv1alpha1.HelmApp) + // wait status + for _, conditionType := range defaultConditionTypes { + _, condition := newHelmApp.Status.GetCondition(conditionType) + if condition == nil { + break + } + } + if newHelmApp.Status.Phase == "" { + continue + } + + // wait spec + if newHelmApp.Spec.PreStatus == "" { + continue + } + + break + } + }) + + It("should start detecting", func() { + newHelmApp, err := rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Get(context.Background(), helmApp.Name, metav1.GetOptions{}) + Expect(err).NotTo(HaveOccurred()) + + Expect(newHelmApp.Status.Phase).NotTo(Equal(rainbondv1alpha1.HelmAppStatusPhaseDetecting)) + + By("wait until condition detecting conditions become true") + watch, err := rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Watch(context.Background(), metav1.ListOptions{ + LabelSelector: "app=phpmyadmin", + Watch: true, + }) + Expect(err).NotTo(HaveOccurred()) + + conditionTypes := []rainbondv1alpha1.HelmAppConditionType{ + rainbondv1alpha1.HelmAppChartReady, + rainbondv1alpha1.HelmAppChartParsed, + rainbondv1alpha1.HelmAppPreInstalled, + } + + for event := range watch.ResultChan() { + newHelmApp = event.Object.(*rainbondv1alpha1.HelmApp) + isFinished := true + for _, conditionType := range conditionTypes { + _, condition := newHelmApp.Status.GetCondition(conditionType) + if condition == nil || condition.Status == corev1.ConditionFalse { + isFinished = false + break + } + } + if isFinished { + break + } + } + }) + + It("should start configuring", func() { + By("wait until phase become configuring") + err := waitUntilConfiguring(helmApp) + Expect(err).NotTo(HaveOccurred()) + }) + }) + + Context("Install HelmApp", func() { + It("should ok", func() { + err := waitUntilConfiguring(helmApp) + Expect(err).NotTo(HaveOccurred()) + + newHelmApp, err := rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Get(context.Background(), helmApp.Name, metav1.GetOptions{}) + Expect(err).NotTo(HaveOccurred()) + + By("install helm app: " + helmApp.Name) + newHelmApp.Spec.PreStatus = rainbondv1alpha1.HelmAppPreStatusConfigured + _, err = rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Update(context.Background(), newHelmApp, metav1.UpdateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + err = waitUntilInstalled(helmApp) + Expect(err).NotTo(HaveOccurred()) + }) + }) + }) +}) + +func waitUntilConfiguring(helmApp *rainbondv1alpha1.HelmApp) error { + newHelmApp, err := waitPhaseUntil(helmApp, rainbondv1alpha1.HelmAppStatusPhaseConfiguring) + if err != nil { + return err + } + + if newHelmApp.Status.Readme == "" || + newHelmApp.Status.Values == "" { + return errors.New("phase is configuring, but readme and values are empty") + } + return nil +} + +func waitUntilInstalled(helmApp *rainbondv1alpha1.HelmApp) error { + _, err := waitPhaseUntil(helmApp, rainbondv1alpha1.HelmAppStatusPhaseInstalled) + return err +} + +func waitPhaseUntil(helmApp *rainbondv1alpha1.HelmApp, phase rainbondv1alpha1.HelmAppStatusPhase) (*rainbondv1alpha1.HelmApp, error) { + watch, err := rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Watch(context.Background(), metav1.ListOptions{ + LabelSelector: "app=phpmyadmin", + Watch: true, + }) + if err != nil { + return nil, err + } + + // TODO: timeout + for event := range watch.ResultChan() { + newHelmApp := event.Object.(*rainbondv1alpha1.HelmApp) + if newHelmApp.Status.Phase == phase { + return newHelmApp, nil + } + } + + return nil, nil +} diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 5fced04d6..8d297a33b 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -8,69 +8,63 @@ import ( type Detector struct { helmApp *v1alpha1.HelmApp - status *Status repo *helm.Repo - app *helm.App + app *App } -func NewDetector(helmApp *v1alpha1.HelmApp, status *Status, app *helm.App, repo *helm.Repo) *Detector { +func NewDetector(helmApp *v1alpha1.HelmApp, app *App, repo *helm.Repo) *Detector { return &Detector{ helmApp: helmApp, - status: status, repo: repo, app: app, } } func (d *Detector) Detect() error { - if d.status.isDetected() { - return nil - } - // add repo - if !d.status.IsConditionTrue(v1alpha1.HelmAppChartReady) { + if !d.helmApp.Status.IsConditionTrue(v1alpha1.HelmAppChartReady) { appStore := d.helmApp.Spec.AppStore if err := d.repo.Add(appStore.Name, appStore.URL, "", ""); err != nil { - d.status.SetCondition(*v1alpha1.NewHelmAppCondition( + d.helmApp.Status.SetCondition(*v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppChartReady, corev1.ConditionFalse, "RepoFailed", err.Error())) return err } } // pull chart - if !d.status.IsConditionTrue(v1alpha1.HelmAppChartReady) { + if !d.helmApp.Status.IsConditionTrue(v1alpha1.HelmAppChartReady) { err := d.app.Pull() if err != nil { - d.status.UpdateCondition(v1alpha1.NewHelmAppCondition( + d.helmApp.Status.UpdateCondition(v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppChartReady, corev1.ConditionFalse, "ChartFailed", err.Error())) return err } - d.status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionTrue) + d.helmApp.Status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionTrue) return nil } // check if the chart is valid - if !d.status.IsConditionTrue(v1alpha1.HelmAppPreInstalled) { + if !d.helmApp.Status.IsConditionTrue(v1alpha1.HelmAppPreInstalled) { if err := d.app.PreInstall(); err != nil { - d.status.UpdateCondition(v1alpha1.NewHelmAppCondition( + d.helmApp.Status.UpdateCondition(v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppPreInstalled, corev1.ConditionFalse, "PreInstallFailed", err.Error())) return err } - d.status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionTrue) + d.helmApp.Status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionTrue) return nil } // parse chart - if !d.status.IsConditionTrue(v1alpha1.HelmAppChartParsed) { + if !d.helmApp.Status.IsConditionTrue(v1alpha1.HelmAppChartParsed) { values, readme, err := d.app.ParseChart() if err != nil { - d.status.UpdateCondition(v1alpha1.NewHelmAppCondition( + d.helmApp.Status.UpdateCondition(v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppChartParsed, corev1.ConditionFalse, "ChartParsed", err.Error())) return err } - d.status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionTrue) - d.status.Values = values - d.status.Readme = readme + d.helmApp.Status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionTrue) + d.helmApp.Status.Values = values + d.helmApp.Status.Readme = readme } return nil diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go index d22dbdc10..d6795b2ae 100644 --- a/worker/controllers/helmapp/finilizer.go +++ b/worker/controllers/helmapp/finilizer.go @@ -1,32 +1,40 @@ package helmapp import ( + "context" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/sirupsen/logrus" + clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/workqueue" ) type Finalizer struct { - clientset versioned.Interface - queue workqueue.Interface - repoFile string - repoCache string + ctx context.Context + kubeClient clientset.Interface + clientset versioned.Interface + queue workqueue.Interface + repoFile string + repoCache string } // NewControlLoop - -func NewFinalizer(clientset versioned.Interface, - workqueue workqueue.Interface, +func NewFinalizer(ctx context.Context, + kubeClient clientset.Interface, + clientset versioned.Interface, + workQueue workqueue.Interface, repoFile string, repoCache string, ) *Finalizer { return &Finalizer{ - clientset: clientset, - queue: workqueue, - repoFile: repoFile, - repoCache: repoCache, + ctx: ctx, + kubeClient: kubeClient, + clientset: clientset, + queue: workQueue, + repoFile: repoFile, + repoCache: repoCache, } } @@ -54,12 +62,7 @@ func (c *Finalizer) run(obj interface{}) error { logrus.Infof("start uninstall helm app: %s/%s", helmApp.Name, helmApp.Namespace) - appStore := helmApp.Spec.AppStore - // TODO: too much args - app, err := helm.NewApp(helmApp.Name, helmApp.Namespace, - helmApp.Spec.TemplateName, helmApp.Spec.Version, helmApp.Spec.Revision, - helmApp.Spec.Overrides, - helmApp.Spec.FullName(), appStore.URL, c.repoFile, c.repoCache) + app, err := NewApp(c.ctx, c.kubeClient, c.clientset, helmApp, c.repoFile, c.repoCache) if err != nil { return err } diff --git a/worker/controllers/helmapp/helm/app.go b/worker/controllers/helmapp/helm/app.go deleted file mode 100644 index 722bae0ec..000000000 --- a/worker/controllers/helmapp/helm/app.go +++ /dev/null @@ -1,181 +0,0 @@ -package helm - -import ( - "bytes" - "encoding/base64" - "io/ioutil" - "os" - "path" - "path/filepath" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/cli" - "helm.sh/helm/v3/pkg/release" - "helm.sh/helm/v3/pkg/storage/driver" -) - -type App struct { - templateName string - repoName string - repoURL string - name string - namespace string - version string - chartDir string - revision int - overrides []string - - helm *Helm - repo *Repo -} - -func (a *App) Chart() string { - return a.repoName + "/" + a.templateName -} - -func NewApp(name, namespace, templateName, version string, revision int, overrides []string, repoName, repoURL, repoFile, repoCache string) (*App, error) { - helm, err := NewHelm(namespace, repoFile, repoCache) - if err != nil { - return nil, err - } - repo := NewRepo(repoFile, repoCache) - - return &App{ - name: name, - namespace: namespace, - templateName: templateName, - repoName: repoName, - repoURL: repoURL, - version: version, - revision: revision, - overrides: overrides, - helm: helm, - repo: repo, - chartDir: path.Join("/tmp/helm/chart", namespace, name, version), - }, nil -} - -func (a *App) Pull() error { - if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { - return err - } - - client := action.NewPull() - settings := cli.New() - settings.RepositoryConfig = a.helm.repoFile - settings.RepositoryCache = a.helm.repoCache - client.Settings = settings - client.DestDir = a.chartDir - client.Version = a.version - client.Untar = true - - if err := os.RemoveAll(a.chartDir); err != nil { - return errors.WithMessage(err, "clean up chart dir") - } - - output, err := client.Run(a.chart()) - if err != nil { - return err - } - logrus.Info(output) - return nil -} - -func (a *App) chart() string { - return a.repoName + "/" + a.templateName -} - -func (a *App) PreInstall() error { - if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { - return err - } - - var buf bytes.Buffer - if err := a.helm.PreInstall(a.name, a.Chart(), a.version, &buf); err != nil { - return err - } - logrus.Infof("pre install: %s", buf.String()) - return nil -} - -func (a *App) Status() (*release.Release, error) { - rel, err := a.helm.Status(a.name) - if err != nil { - return nil, err - } - return rel, nil -} - -func (a *App) InstallOrUpdate() error { - if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { - return err - } - - _, err := a.helm.Status(a.name) - if err != nil && !errors.Is(err, driver.ErrReleaseNotFound) { - return err - } - - if errors.Is(err, driver.ErrReleaseNotFound) { - logrus.Debugf("name: %s; namespace: %s; chart: %s; install helm app", a.name, a.namespace, a.Chart()) - if err := a.helm.Install(a.name, a.Chart(), a.version, a.overrides); err != nil { - return err - } - - return nil - } - - logrus.Debugf("name: %s; namespace: %s; chart: %s; upgrade helm app", a.name, a.namespace, a.Chart()) - return a.helm.Upgrade(a.name, a.chart(), a.version, a.overrides) -} - -func (a *App) ParseChart() (string, string, error) { - var values string - var readme string - err := filepath.Walk(a.chartDir, func(p string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if p == a.chartDir { - return nil - } - if values != "" || readme != "" { - return filepath.SkipDir - } - if !info.IsDir() { - return nil - } - - valuesFile := path.Join(p, "values.yaml") - valuesBytes, err := ioutil.ReadFile(valuesFile) - if err != nil { - return err - } - values = base64.StdEncoding.EncodeToString(valuesBytes) - - readmeFile := path.Join(p, "README.md") - readmeBytes, err := ioutil.ReadFile(readmeFile) - if err != nil { - return err - } - readme = base64.StdEncoding.EncodeToString(readmeBytes) - - return nil - }) - - return values, readme, err -} - -func (a *App) Uninstall() error { - return a.helm.Uninstall(a.name) -} - -func (a *App) Rollback() error { - if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { - return err - } - - return a.helm.Rollback(a.name, a.revision) -} diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index 4d8831fc1..2ff56726c 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -4,6 +4,7 @@ import ( "fmt" "io" "io/ioutil" + "os" "unsafe" "github.com/goodrain/rainbond/util/commonutil" @@ -78,8 +79,8 @@ func NewHelm(namespace, repoFile, repoCache string) (*Helm, error) { }, nil } -func (h *Helm) PreInstall(name, chart, version string, out io.Writer) error { - _, err := h.install(name, chart, version, nil, true, out) +func (h *Helm) PreInstall(name, chart, version string) error { + _, err := h.install(name, chart, version, nil, true, ioutil.Discard) return err } @@ -260,6 +261,24 @@ func (h *Helm) History(name string) (ReleaseHistory, error) { return releaseHistory, nil } +func (h *Helm) Pull(chart, version, chartDir string) error { + client := action.NewPull() + settings := cli.New() + settings.RepositoryConfig = h.repoFile + settings.RepositoryCache = h.repoCache + client.Settings = settings + client.DestDir = chartDir + client.Version = version + client.Untar = true + + if err := os.RemoveAll(chartDir); err != nil { + return errors.WithMessage(err, "clean up chart dir") + } + + _, err := client.Run(chart) + return err +} + // checkIfInstallable validates if a chart can be installed // // Application chart type is only installable @@ -281,7 +300,7 @@ func min(x, y int) int { func getReleaseHistory(rls []*release.Release) (history ReleaseHistory) { for i := len(rls) - 1; i >= 0; i-- { r := rls[i] - c := formatChartname(r.Chart) + c := formatChartName(r.Chart) s := r.Info.Status.String() v := r.Version d := r.Info.Description @@ -303,7 +322,7 @@ func getReleaseHistory(rls []*release.Release) (history ReleaseHistory) { return history } -func formatChartname(c *chart.Chart) string { +func formatChartName(c *chart.Chart) string { if c == nil || c.Metadata == nil { // This is an edge case that has happened in prod, though we don't // know how: https://github.com/helm/helm/issues/1347 diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index 996413eb8..d25a82a96 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -1,46 +1,46 @@ package helmapp import ( + "context" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/util/retry" ) type Status struct { - helmApp *v1alpha1.HelmApp - v1alpha1.HelmAppStatus - overrides []string + ctx context.Context + rainbondClient versioned.Interface + helmApp *v1alpha1.HelmApp } // NewStatus creates a new helm app status. -func NewStatus(app *v1alpha1.HelmApp) (*Status, bool) { - continu3 := true - idx, _ := app.Status.GetCondition(v1alpha1.HelmAppChartReady) - if idx == -1 { - app.Status.UpdateConditionStatus(v1alpha1.HelmAppChartReady, corev1.ConditionFalse) - continu3 = false - } - idx, _ = app.Status.GetCondition(v1alpha1.HelmAppPreInstalled) - if idx == -1 { - app.Status.UpdateConditionStatus(v1alpha1.HelmAppPreInstalled, corev1.ConditionFalse) - continu3 = false - } - idx, _ = app.Status.GetCondition(v1alpha1.HelmAppChartParsed) - if idx == -1 { - app.Status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionFalse) - continu3 = false - } +func NewStatus(ctx context.Context, app *v1alpha1.HelmApp, rainbondClient versioned.Interface) *Status { return &Status{ - HelmAppStatus: app.Status, - helmApp: app, - }, continu3 + ctx: ctx, + helmApp: app, + rainbondClient: rainbondClient, + } } -func (s *Status) GetHelmAppStatus() v1alpha1.HelmAppStatus { - status := s.HelmAppStatus +func (s *Status) Update() error { + return retry.RetryOnConflict(retry.DefaultRetry, func() error { + ctx, cancel := context.WithTimeout(s.ctx, defaultTimeout) + defer cancel() - status.Phase = s.getPhase() + helmApp, err := s.rainbondClient.RainbondV1alpha1().HelmApps(s.helmApp.Namespace).Get(ctx, s.helmApp.Name, metav1.GetOptions{}) + if err != nil { + return errors.Wrap(err, "get helm app before update") + } - return status + s.helmApp.Status.Phase = s.getPhase() + s.helmApp.ResourceVersion = helmApp.ResourceVersion + _, err = s.rainbondClient.RainbondV1alpha1().HelmApps(s.helmApp.Namespace).UpdateStatus(ctx, s.helmApp, metav1.UpdateOptions{}) + return err + }) } func (s *Status) getPhase() v1alpha1.HelmAppStatusPhase { @@ -48,7 +48,7 @@ func (s *Status) getPhase() v1alpha1.HelmAppStatusPhase { if s.isDetected() { phase = v1alpha1.HelmAppStatusPhaseConfiguring } - if s.helmApp.Spec.PreStatus == "Configured" { + if s.helmApp.Spec.PreStatus == v1alpha1.HelmAppPreStatusConfigured { phase = v1alpha1.HelmAppStatusPhaseInstalling } idx, condition := s.helmApp.Status.GetCondition(v1alpha1.HelmAppInstalled) @@ -65,7 +65,7 @@ func (s *Status) isDetected() bool { v1alpha1.HelmAppChartParsed, } for _, t := range types { - if !s.IsConditionTrue(t) { + if !s.helmApp.Status.IsConditionTrue(t) { return false } } diff --git a/worker/controllers/helmapp/suite_test.go b/worker/controllers/helmapp/suite_test.go new file mode 100644 index 000000000..1b93d0fa6 --- /dev/null +++ b/worker/controllers/helmapp/suite_test.go @@ -0,0 +1,88 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package helmapp + +import ( + "context" + "github.com/goodrain/rainbond/util" + clientset "k8s.io/client-go/kubernetes" + "os" + "path/filepath" + "testing" + "time" + + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + k8sutil "github.com/goodrain/rainbond/util/k8s" + . "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" +) + +var ctx = context.Background() +var kubeClient clientset.Interface +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))) + + projectHome := os.Getenv("PROJECT_HOME") + kubeconfig := os.Getenv("KUBE_CONFIG") + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join(projectHome, "config", "crd")}, + ErrorIfCRDPathMissing: true, + UseExistingCluster: util.Bool(true), + } + + _, err := testEnv.Start() + Expect(err).NotTo(HaveOccurred()) + + restConfig, err := k8sutil.NewRestConfig(kubeconfig) + Expect(err).NotTo(HaveOccurred()) + + rainbondClient = versioned.NewForConfigOrDie(restConfig) + kubeClient = clientset.NewForConfigOrDie(restConfig) + + ctrl := NewController(ctx, stopCh, kubeClient, rainbondClient, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + go ctrl.Start() + + // create namespace + +}, 60) + +var _ = AfterSuite(func() { + By("tearing down the helmCmd app controller") + close(stopCh) + + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).NotTo(HaveOccurred()) +}) From c0046bf04c32c5688fabfba794fc53278d2d3346 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 6 May 2021 17:43:04 +0800 Subject: [PATCH 31/65] list helm values --- api/api/api_interface.go | 1 + api/api_routers/version2/v2Routers.go | 1 + api/controller/application.go | 14 + api/handler/application_handler.go | 23 + api/model/app.go | 20 +- cmd/worker/server/server.go | 2 +- config/crd/rainbond.goodrain.io_helmapps.yaml | 4 +- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 2 +- .../v1alpha1/zz_generated.deepcopy.go | 7 + worker/controllers/helmapp/app.go | 54 +- .../controllers/helmapp/controlloop_test.go | 2 +- worker/server/pb/app_runtime_server.pb.go | 529 +++++++++++------- worker/server/pb/app_runtime_server.proto | 18 +- worker/server/server.go | 54 +- 14 files changed, 502 insertions(+), 229 deletions(-) diff --git a/api/api/api_interface.go b/api/api/api_interface.go index 74df6b001..afb0e5aab 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -170,6 +170,7 @@ type ApplicationInterface interface { ListServices(w http.ResponseWriter, r *http.Request) EnsureAppName(w http.ResponseWriter, r *http.Request) ListHelmAppReleases(w http.ResponseWriter, r *http.Request) + ListHelmAppValues(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) ListConfigGroups(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index f815ea09f..a07b6bb8f 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -321,6 +321,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Get("/detect-process", controller.GetManager().GetDetectProcess) r.Post("/install", controller.GetManager().Install) r.Get("/helm-releases", controller.GetManager().ListHelmAppReleases) + r.Get("/helm-values", controller.GetManager().ListHelmAppValues) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) r.Get("/configgroups", controller.GetManager().ListConfigGroups) diff --git a/api/controller/application.go b/api/controller/application.go index 77839c544..bc3a96f80 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -278,3 +278,17 @@ func (a *ApplicationController) ListHelmAppReleases(w http.ResponseWriter, r *ht httputil.ReturnSuccess(r, w, releases) } + +func (a *ApplicationController) ListHelmAppValues(w http.ResponseWriter, r *http.Request) { + app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) + + version := chi.URLParam(r, "version") + + values, err := handler.GetApplicationHandler().ListHelmAppValues(r.Context(), app, version) + if err != nil { + httputil.ReturnBcodeError(r, w, err) + return + } + + httputil.ReturnSuccess(r, w, values) +} \ No newline at end of file diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 78722281b..20822fea0 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -56,6 +56,7 @@ type ApplicationHandler interface { ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) EnsureAppName(ctx context.Context, namespace, appName string) (*model.EnsureAppNameResp, error) ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error) + ListHelmAppValues(ctx context.Context, app *dbmodel.Application, version string) (map[string]string, error) DeleteConfigGroup(appID, configGroupName string) error ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error) @@ -587,3 +588,25 @@ func (a *ApplicationAction) ListHelmAppReleases(ctx context.Context, app *dbmode } return result, nil } + +func (a *ApplicationAction) ListHelmAppValues(ctx context.Context, app *dbmodel.Application, version string) (map[string]string, error) { + // only for helm app + if app.AppType != model.AppTypeHelm { + return nil, nil + } + + nctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + res, err := a.statusCli.ListHelmAppValues(nctx, &pb.HelmAppValuesReq{ + TemplateName: app.AppTemplateName, + Version: version, + RepoName: app.AppStoreName, + Eid: app.EID, + RepoURL: app.AppStoreURL, + }) + if err != nil { + return nil, err + } + return res.Values, nil +} diff --git a/api/model/app.go b/api/model/app.go index 2fb78f5b8..f4e4a7e41 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -10,16 +10,16 @@ type AppPort struct { // AppStatus - type AppStatus struct { - Status string `json:"status"` - Cpu *int64 `json:"cpu"` - Memory *int64 `json:"memory"` - Disk int64 `json:"disk"` - Phase string `json:"phase"` - Values string `json:"values"` - Readme string `json:"readme"` - Version string `json:"version"` - Revision int `json:"revision"` - Overrides []string `json:"overrides"` + Status string `json:"status"` + Cpu *int64 `json:"cpu"` + Memory *int64 `json:"memory"` + Disk int64 `json:"disk"` + Phase string `json:"phase"` + Values map[string]string `json:"values"` + Readme string `json:"readme"` + Version string `json:"version"` + Revision int `json:"revision"` + Overrides []string `json:"overrides"` } // AppDetectProcess - diff --git a/cmd/worker/server/server.go b/cmd/worker/server/server.go index 773002176..b034a386c 100644 --- a/cmd/worker/server/server.go +++ b/cmd/worker/server/server.go @@ -139,7 +139,7 @@ func Run(s *option.Worker) error { defer exporterManager.Stop() stopCh := make(chan struct{}) - ctrl := helmapp.NewController(ctx, stopCh, rainbondClient, 5*time.Second, s.Helm.RepoFile, s.Helm.RepoCache) + ctrl := helmapp.NewController(ctx, stopCh, clientset, rainbondClient, 5*time.Second, s.Helm.RepoFile, s.Helm.RepoCache) go ctrl.Start() defer close(stopCh) diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml index 67f179db1..ffc45b87c 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -156,8 +156,10 @@ spec: one. type: integer values: + additionalProperties: + type: string description: The base64 encoded string from values.yaml - type: string + type: object required: - phase - status diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index dd75cc604..e4b41b828 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -197,7 +197,7 @@ type HelmAppStatus struct { CurrentVersion string `json:"currentVersion,omitempty"` // The base64 encoded string from values.yaml - Values string `json:"values,omitempty"` + Values map[string]string `json:"values,omitempty"` // The base64 encoded string from README.md Readme string `json:"readme,omitempty"` diff --git a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index 6006769c2..e0e46b348 100644 --- a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -136,6 +136,13 @@ func (in *HelmAppStatus) DeepCopyInto(out *HelmAppStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.Overrides != nil { in, out := &in.Overrides, &out.Overrides *out = make([]string, len(*in)) diff --git a/worker/controllers/helmapp/app.go b/worker/controllers/helmapp/app.go index 72e3de5f6..477d94b37 100644 --- a/worker/controllers/helmapp/app.go +++ b/worker/controllers/helmapp/app.go @@ -7,6 +7,7 @@ import ( "os" "path" "path/filepath" + "strings" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" @@ -272,8 +273,46 @@ func (a *App) installOrUpdate() error { return a.helmCmd.Upgrade(a.name, a.chart(), a.version, a.overrides) } -func (a *App) ParseChart() (string, string, error) { - var values string +func (a *App) ParseChart() (map[string]string, string, error) { + readme, err := a.getReadme() + if err != nil { + return nil, "", err + } + + files, err := a.getValues() + if err != nil { + return nil, "", err + } + + return files, readme, nil +} + +func (a *App) getValues() (map[string]string, error) { + files := make(map[string]string) + err := filepath.Walk(a.chartDir, func(p string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if info.IsDir() { + return nil + } + if !strings.HasSuffix(p, "values.yaml") { + return nil + } + + valuesBytes, err := ioutil.ReadFile(p) + if err != nil { + return err + } + files[strings.Replace(p, a.chartDir, "", 1)] = base64.StdEncoding.EncodeToString(valuesBytes) + + return nil + }) + + return files, err +} + +func (a *App) getReadme() (string, error) { var readme string err := filepath.Walk(a.chartDir, func(p string, info os.FileInfo, err error) error { if err != nil { @@ -282,20 +321,13 @@ func (a *App) ParseChart() (string, string, error) { if p == a.chartDir { return nil } - if values != "" || readme != "" { + if readme != "" { return filepath.SkipDir } if !info.IsDir() { return nil } - valuesFile := path.Join(p, "values.yaml") - valuesBytes, err := ioutil.ReadFile(valuesFile) - if err != nil { - return err - } - values = base64.StdEncoding.EncodeToString(valuesBytes) - readmeFile := path.Join(p, "README.md") readmeBytes, err := ioutil.ReadFile(readmeFile) if err != nil { @@ -306,7 +338,7 @@ func (a *App) ParseChart() (string, string, error) { return nil }) - return values, readme, err + return readme, err } func (a *App) Uninstall() error { diff --git a/worker/controllers/helmapp/controlloop_test.go b/worker/controllers/helmapp/controlloop_test.go index 473fde16c..b56a242c6 100644 --- a/worker/controllers/helmapp/controlloop_test.go +++ b/worker/controllers/helmapp/controlloop_test.go @@ -157,7 +157,7 @@ func waitUntilConfiguring(helmApp *rainbondv1alpha1.HelmApp) error { } if newHelmApp.Status.Readme == "" || - newHelmApp.Status.Values == "" { + len(newHelmApp.Status.Values) == 0 { return errors.New("phase is configuring, but readme and values are empty") } return nil diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 76c2a018d..728ed95e9 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -1933,21 +1933,20 @@ func (m *ServiceVolumeStatusMessage) GetStatus() map[string]ServiceVolumeStatus } type AppStatus struct { - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Cpu int64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` - Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` - Phase string `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` - ValuesTemplate string `protobuf:"bytes,5,opt,name=valuesTemplate,proto3" json:"valuesTemplate,omitempty"` - Readme string `protobuf:"bytes,6,opt,name=readme,proto3" json:"readme,omitempty"` - SetCPU bool `protobuf:"varint,7,opt,name=setCPU,proto3" json:"setCPU,omitempty"` - SetMemory bool `protobuf:"varint,8,opt,name=setMemory,proto3" json:"setMemory,omitempty"` - Values string `protobuf:"bytes,9,opt,name=values,proto3" json:"values,omitempty"` - Version string `protobuf:"bytes,10,opt,name=version,proto3" json:"version,omitempty"` - Revision int32 `protobuf:"varint,11,opt,name=revision,proto3" json:"revision,omitempty"` - Overrides []string `protobuf:"bytes,12,rep,name=overrides,proto3" json:"overrides,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Cpu int64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` + Phase string `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` + Values map[string]string `protobuf:"bytes,5,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Readme string `protobuf:"bytes,6,opt,name=readme,proto3" json:"readme,omitempty"` + SetCPU bool `protobuf:"varint,7,opt,name=setCPU,proto3" json:"setCPU,omitempty"` + SetMemory bool `protobuf:"varint,8,opt,name=setMemory,proto3" json:"setMemory,omitempty"` + Overrides []string `protobuf:"bytes,9,rep,name=overrides,proto3" json:"overrides,omitempty"` + Version string `protobuf:"bytes,10,opt,name=version,proto3" json:"version,omitempty"` + Revision int32 `protobuf:"varint,11,opt,name=revision,proto3" json:"revision,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AppStatus) Reset() { *m = AppStatus{} } @@ -2003,11 +2002,11 @@ func (m *AppStatus) GetPhase() string { return "" } -func (m *AppStatus) GetValuesTemplate() string { +func (m *AppStatus) GetValues() map[string]string { if m != nil { - return m.ValuesTemplate + return m.Values } - return "" + return nil } func (m *AppStatus) GetReadme() string { @@ -2031,11 +2030,11 @@ func (m *AppStatus) GetSetMemory() bool { return false } -func (m *AppStatus) GetValues() string { +func (m *AppStatus) GetOverrides() []string { if m != nil { - return m.Values + return m.Overrides } - return "" + return nil } func (m *AppStatus) GetVersion() string { @@ -2052,13 +2051,6 @@ func (m *AppStatus) GetRevision() int32 { return 0 } -func (m *AppStatus) GetOverrides() []string { - if m != nil { - return m.Overrides - } - return nil -} - type AppDetectCondition struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready,omitempty"` @@ -2428,6 +2420,116 @@ func (m *HelmAppRelease) GetDescription() string { return "" } +type HelmAppValuesReq struct { + TemplateName string `protobuf:"bytes,1,opt,name=templateName,proto3" json:"templateName,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + RepoName string `protobuf:"bytes,3,opt,name=repoName,proto3" json:"repoName,omitempty"` + Eid string `protobuf:"bytes,4,opt,name=eid,proto3" json:"eid,omitempty"` + RepoURL string `protobuf:"bytes,5,opt,name=repoURL,proto3" json:"repoURL,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HelmAppValuesReq) Reset() { *m = HelmAppValuesReq{} } +func (m *HelmAppValuesReq) String() string { return proto.CompactTextString(m) } +func (*HelmAppValuesReq) ProtoMessage() {} +func (*HelmAppValuesReq) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{38} +} + +func (m *HelmAppValuesReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HelmAppValuesReq.Unmarshal(m, b) +} +func (m *HelmAppValuesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HelmAppValuesReq.Marshal(b, m, deterministic) +} +func (m *HelmAppValuesReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_HelmAppValuesReq.Merge(m, src) +} +func (m *HelmAppValuesReq) XXX_Size() int { + return xxx_messageInfo_HelmAppValuesReq.Size(m) +} +func (m *HelmAppValuesReq) XXX_DiscardUnknown() { + xxx_messageInfo_HelmAppValuesReq.DiscardUnknown(m) +} + +var xxx_messageInfo_HelmAppValuesReq proto.InternalMessageInfo + +func (m *HelmAppValuesReq) GetTemplateName() string { + if m != nil { + return m.TemplateName + } + return "" +} + +func (m *HelmAppValuesReq) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *HelmAppValuesReq) GetRepoName() string { + if m != nil { + return m.RepoName + } + return "" +} + +func (m *HelmAppValuesReq) GetEid() string { + if m != nil { + return m.Eid + } + return "" +} + +func (m *HelmAppValuesReq) GetRepoURL() string { + if m != nil { + return m.RepoURL + } + return "" +} + +type HelmAppValuesResp struct { + Values map[string]string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HelmAppValuesResp) Reset() { *m = HelmAppValuesResp{} } +func (m *HelmAppValuesResp) String() string { return proto.CompactTextString(m) } +func (*HelmAppValuesResp) ProtoMessage() {} +func (*HelmAppValuesResp) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{39} +} + +func (m *HelmAppValuesResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HelmAppValuesResp.Unmarshal(m, b) +} +func (m *HelmAppValuesResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HelmAppValuesResp.Marshal(b, m, deterministic) +} +func (m *HelmAppValuesResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_HelmAppValuesResp.Merge(m, src) +} +func (m *HelmAppValuesResp) XXX_Size() int { + return xxx_messageInfo_HelmAppValuesResp.Size(m) +} +func (m *HelmAppValuesResp) XXX_DiscardUnknown() { + xxx_messageInfo_HelmAppValuesResp.DiscardUnknown(m) +} + +var xxx_messageInfo_HelmAppValuesResp proto.InternalMessageInfo + +func (m *HelmAppValuesResp) GetValues() map[string]string { + if m != nil { + return m.Values + } + return nil +} + func init() { proto.RegisterEnum("pb.ServiceVolumeStatus", ServiceVolumeStatus_name, ServiceVolumeStatus_value) proto.RegisterEnum("pb.PodStatus_Type", PodStatus_Type_name, PodStatus_Type_value) @@ -2477,6 +2579,7 @@ func init() { proto.RegisterType((*ServiceVolumeStatusMessage)(nil), "pb.ServiceVolumeStatusMessage") proto.RegisterMapType((map[string]ServiceVolumeStatus)(nil), "pb.ServiceVolumeStatusMessage.StatusEntry") proto.RegisterType((*AppStatus)(nil), "pb.AppStatus") + proto.RegisterMapType((map[string]string)(nil), "pb.AppStatus.ValuesEntry") proto.RegisterType((*AppDetectCondition)(nil), "pb.AppDetectCondition") proto.RegisterType((*AppDetectConditions)(nil), "pb.AppDetectConditions") proto.RegisterType((*AppService)(nil), "pb.AppService") @@ -2484,175 +2587,184 @@ func init() { proto.RegisterType((*AppServices)(nil), "pb.AppServices") proto.RegisterType((*HelmAppReleases)(nil), "pb.HelmAppReleases") proto.RegisterType((*HelmAppRelease)(nil), "pb.HelmAppRelease") + proto.RegisterType((*HelmAppValuesReq)(nil), "pb.HelmAppValuesReq") + proto.RegisterType((*HelmAppValuesResp)(nil), "pb.HelmAppValuesResp") + proto.RegisterMapType((map[string]string)(nil), "pb.HelmAppValuesResp.ValuesEntry") } func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2593 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x19, 0xcb, 0x72, 0xdb, 0xc8, - 0x51, 0x24, 0xc5, 0x57, 0x53, 0xa2, 0xa8, 0xd1, 0x8b, 0x4b, 0xaf, 0x1f, 0x8b, 0xd8, 0x2e, 0x97, - 0xbd, 0xd1, 0xda, 0xca, 0x3a, 0x7e, 0xac, 0xb3, 0x29, 0x5a, 0xe4, 0xca, 0x4c, 0x24, 0x8a, 0x05, - 0x52, 0x9b, 0xda, 0xaa, 0x54, 0xb1, 0x20, 0x62, 0x56, 0x46, 0x8c, 0xc7, 0x2c, 0x00, 0x6a, 0xc3, - 0x63, 0xf2, 0x0b, 0x39, 0xe6, 0x98, 0x43, 0x0e, 0xc9, 0x31, 0x95, 0x43, 0x0e, 0xfb, 0x07, 0xa9, - 0x7c, 0xca, 0x5e, 0xf2, 0x01, 0xa9, 0x9e, 0x19, 0x00, 0x03, 0x10, 0xb2, 0xe3, 0x54, 0x52, 0xb9, - 0xa1, 0x7b, 0xba, 0xa7, 0x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b, 0x29, 0x0e, 0x3f, 0xc9, - 0x36, 0x94, 0x2f, 0x0d, 0x7b, 0x4e, 0xdb, 0x45, 0x61, 0x12, 0x0e, 0x3c, 0x2f, 0x3e, 0x2d, 0x68, - 0x0b, 0x68, 0xf4, 0xac, 0xe0, 0x4d, 0xa4, 0xc0, 0x43, 0x28, 0x9b, 0x56, 0xf0, 0x26, 0x92, 0xdf, - 0x41, 0xf9, 0xca, 0x3a, 0xff, 0x96, 0xc2, 0x05, 0x61, 0xe7, 0x29, 0x40, 0x82, 0x7c, 0x97, 0xe8, - 0x82, 0x2a, 0xda, 0x81, 0x4d, 0x69, 0xe0, 0x2e, 0x63, 0x23, 0xcf, 0x3c, 0xb6, 0x82, 0x90, 0x3c, - 0x80, 0xaa, 0x67, 0x9b, 0x23, 0xcf, 0x8c, 0x54, 0xd8, 0xe4, 0x26, 0x50, 0xe9, 0xf4, 0x88, 0x02, - 0x89, 0x5d, 0xfa, 0x2d, 0x27, 0x2e, 0x5e, 0x49, 0x2c, 0x29, 0xb4, 0xef, 0x0a, 0xb0, 0x7b, 0x32, - 0xb7, 0x43, 0x6b, 0x59, 0xe8, 0x49, 0xec, 0x57, 0x45, 0xf0, 0x03, 0xdc, 0x2b, 0x9f, 0x21, 0x12, - 0x81, 0xd4, 0xc2, 0x18, 0x2a, 0x7f, 0xe7, 0x0c, 0x5a, 0x59, 0x82, 0x1c, 0xc3, 0x3c, 0x50, 0x0d, - 0xd3, 0x38, 0xd8, 0x59, 0x52, 0x1d, 0x25, 0xa9, 0xf6, 0xfa, 0xbe, 0x08, 0xeb, 0x29, 0x82, 0x77, - 0x44, 0x30, 0x06, 0x9f, 0x49, 0x99, 0xed, 0x2d, 0x70, 0x55, 0x78, 0xbe, 0x26, 0x10, 0x03, 0x13, - 0x63, 0x59, 0x2e, 0x86, 0x0b, 0x46, 0xdb, 0x25, 0x11, 0xcb, 0x02, 0x35, 0x59, 0x30, 0x4a, 0x3e, - 0x80, 0x1a, 0xf3, 0xc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7d, 0xd5, 0x02, 0xed, 0x9f, 0x05, 0x58, 0x1b, 0x79, 0x66, 0xd2, 0x1d, 0x6e, 0x43, 0xd9, - 0x72, 0xd0, 0x02, 0xf2, 0xd1, 0xc9, 0x01, 0xc4, 0xf2, 0x3e, 0x2c, 0x2a, 0x38, 0x1c, 0x50, 0xec, - 0x58, 0xca, 0xda, 0x91, 0xf7, 0x5c, 0xd4, 0x8c, 0x1a, 0x6e, 0x09, 0x62, 0x99, 0xe0, 0xf5, 0x61, - 0x2a, 0x0a, 0x83, 0xb4, 0x59, 0x83, 0xe3, 0x4e, 0x38, 0x0a, 0x43, 0x5f, 0x90, 0xcc, 0xd8, 0x5c, - 0xf6, 0xde, 0x35, 0x8e, 0x38, 0x64, 0x73, 0xac, 0x46, 0xb2, 0x0c, 0x45, 0x3b, 0x54, 0x45, 0xef, - 0x2a, 0xb1, 0x72, 0x8f, 0x9b, 0xd8, 0xce, 0x08, 0x32, 0xdc, 0xa5, 0x26, 0xfa, 0x44, 0x89, 0x3a, - 0x64, 0x73, 0xed, 0x1f, 0x22, 0x6e, 0x44, 0x64, 0x63, 0x74, 0x2a, 0x7d, 0x30, 0xff, 0xe6, 0x38, - 0xcf, 0x8c, 0x0e, 0xcc, 0xbf, 0x33, 0xdd, 0x65, 0x29, 0xdb, 0x5d, 0xde, 0x89, 0x2f, 0xf3, 0x6a, - 0xd2, 0x8f, 0xc7, 0x01, 0x18, 0xdf, 0x6d, 0x91, 0x17, 0xca, 0x71, 0x5e, 0xd8, 0x83, 0x2a, 0xee, - 0x8e, 0xaf, 0x10, 0x71, 0xdc, 0x0a, 0x82, 0x03, 0x86, 0x66, 0xbc, 0xa4, 0x7e, 0x60, 0x79, 0xae, - 0x3c, 0x65, 0x04, 0x92, 0x67, 0xb0, 0x61, 0xb9, 0x68, 0xa2, 0xe4, 0x19, 0x22, 0x5a, 0xc5, 0x96, - 0x14, 0x99, 0xbc, 0x02, 0x9a, 0x48, 0x98, 0x3c, 0x25, 0xc8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 0x6a, 0xe8, 0x24, 0x88, - 0x16, 0x0f, 0x67, 0x6c, 0xe4, 0xf9, 0xa1, 0xc8, 0xaa, 0x65, 0x3d, 0x86, 0x71, 0x6d, 0x6e, 0xca, - 0xb5, 0x55, 0xb1, 0x16, 0xc1, 0xd8, 0x96, 0x29, 0x53, 0x17, 0x22, 0xd5, 0x94, 0x3a, 0x60, 0x25, - 0x11, 0xf3, 0x96, 0xce, 0x23, 0x28, 0x8d, 0x3c, 0x33, 0x57, 0xa9, 0x24, 0xd8, 0x8b, 0x6a, 0xb0, - 0x6b, 0xcf, 0xa0, 0x91, 0x6c, 0x85, 0x25, 0x27, 0x99, 0xd8, 0x08, 0xa3, 0x34, 0xd3, 0xd2, 0x92, - 0x19, 0x8d, 0x76, 0x02, 0x1b, 0xaf, 0xa8, 0xed, 0xf0, 0x99, 0xbc, 0x4d, 0x0d, 0xac, 0x58, 0xcf, - 0xa1, 0xf9, 0x3a, 0x85, 0x92, 0x9b, 0x70, 0x95, 0xd3, 0xc4, 0x7a, 0x86, 0x52, 0xfb, 0x6b, 0x01, - 0x9a, 0x69, 0x92, 0x54, 0x84, 0x16, 0x32, 0x11, 0xda, 0x86, 0xea, 0x9c, 0x99, 0x06, 0xb6, 0x48, - 0xd2, 0xca, 0x12, 0x54, 0x8e, 0x5a, 0x4a, 0xdd, 0xeb, 0x6d, 0x28, 0xcf, 0x5e, 0x1b, 0xf2, 0xfd, - 0x50, 0xd7, 0x05, 0x40, 0x6e, 0x00, 0x18, 0x8c, 0x7d, 0x29, 0xaf, 0x88, 0xb8, 0xa9, 0x0a, 0x06, - 0xab, 0xa5, 0x49, 0x83, 0x99, 0x6f, 0x31, 0x0c, 0x00, 0x79, 0x55, 0x55, 0xd4, 0xfd, 0x4f, 0x60, - 0x2b, 0x27, 0xef, 0x90, 0x3a, 0x94, 0x45, 0xcb, 0xb8, 0x82, 0x2d, 0xe3, 0xf0, 0x74, 0x32, 0x15, - 0x60, 0xe1, 0xe0, 0x6f, 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0xa7, 0x9f, 0xf6, 0xbf, 0xb3, - 0xc9, 0xa7, 0x3c, 0xf8, 0x92, 0x17, 0x01, 0x8f, 0x85, 0xcc, 0xeb, 0xb7, 0x13, 0xf5, 0xf3, 0x02, - 0xc3, 0xb9, 0xd0, 0x8f, 0x99, 0xb6, 0x57, 0x71, 0x04, 0xc9, 0x36, 0x9d, 0x14, 0x4d, 0xf7, 0x33, - 0xee, 0xbf, 0x2e, 0x63, 0xa9, 0xfb, 0x96, 0x67, 0xff, 0x1b, 0x6f, 0x6f, 0x3c, 0x78, 0x18, 0x5f, - 0x43, 0x87, 0xca, 0xc4, 0xb3, 0x54, 0x26, 0x40, 0xde, 0x18, 0xd4, 0x7e, 0x2f, 0xbf, 0x3c, 0xa0, - 0x46, 0x0f, 0x61, 0x03, 0x77, 0x51, 0x33, 0xa9, 0xca, 0xb9, 0x91, 0xce, 0xa1, 0xc8, 0xf1, 0x04, - 0x88, 0x22, 0x37, 0x4a, 0x78, 0x2a, 0xd3, 0xd6, 0x72, 0xce, 0x0c, 0xb4, 0x95, 0xf3, 0x0a, 0xff, - 0x33, 0xfa, 0xa3, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xec, 0x8f, 0xf1, 0x1c, 0x35, 0x1d, 0x00, - 0x00, + // 2694 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x39, 0x4b, 0x73, 0xdb, 0xc8, + 0xd1, 0x22, 0x29, 0xbe, 0x9a, 0x12, 0x45, 0x8d, 0x5e, 0x34, 0x77, 0xd7, 0xf6, 0xe2, 0xb3, 0x5d, + 0x2e, 0x7b, 0x3f, 0xad, 0xad, 0xac, 0x63, 0xcb, 0xeb, 0x6c, 0x8a, 0x12, 0xb9, 0x32, 0x13, 0x8a, + 0x62, 0x41, 0x94, 0x53, 0x5b, 0x95, 0x2a, 0x16, 0x44, 0xcc, 0xca, 0x88, 0xf1, 0x18, 0x03, 0xa0, + 0x36, 0x3c, 0x26, 0xb7, 0x9c, 0x73, 0xc9, 0x3d, 0x87, 0x1c, 0x92, 0x63, 0x2a, 0xc7, 0xbd, 0xe7, + 0x90, 0xca, 0x4f, 0xd9, 0x4b, 0xce, 0xa9, 0x54, 0xcf, 0x0c, 0x80, 0x01, 0x09, 0xd9, 0x51, 0x1e, + 0x95, 0x1b, 0xba, 0xa7, 0x7b, 0xba, 0xa7, 0xa7, 0x5f, 0xd3, 0x80, 0xa6, 0xc1, 0xd8, 0xd8, 0x9f, + 0xba, 0xa1, 0xe5, 0xd0, 0x71, 0x40, 0xfd, 0x4b, 0xea, 0xef, 0x32, 0xdf, 0x0b, 0x3d, 0x92, 0x67, + 0xe7, 0x5a, 0x19, 0x8a, 0x5d, 0x87, 0x85, 0x33, 0xed, 0x16, 0x94, 0xda, 0x8c, 0xe9, 0xf4, 0x2d, + 0xd9, 0x82, 0x12, 0xb2, 0x58, 0x66, 0x33, 0x77, 0x3b, 0x77, 0xbf, 0xaa, 0x17, 0x0d, 0xc6, 0x7a, + 0xa6, 0x76, 0x17, 0x56, 0xda, 0x8c, 0x9d, 0x86, 0x46, 0x38, 0x0d, 0xde, 0x41, 0xf6, 0x29, 0xd4, + 0x4f, 0xa9, 0x7f, 0x69, 0x4d, 0xa8, 0x4e, 0xdf, 0x4e, 0x69, 0x10, 0x92, 0x8f, 0x00, 0x02, 0x81, + 0x49, 0x88, 0xab, 0x12, 0xd3, 0x33, 0xb5, 0x3d, 0x58, 0x93, 0x0c, 0x41, 0xc4, 0x71, 0x0b, 0x6a, + 0x09, 0x47, 0x20, 0x59, 0x20, 0x66, 0x09, 0xb4, 0x4f, 0x60, 0x75, 0x44, 0x5d, 0xc3, 0x0d, 0x23, + 0x8e, 0x0f, 0xa0, 0x1a, 0x72, 0x44, 0x22, 0xa2, 0x22, 0x10, 0x3d, 0x53, 0xfb, 0x45, 0x0e, 0x56, + 0x85, 0xde, 0xc7, 0x34, 0x08, 0x8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 0x9e, 0x2f, 0xab, 0x90, 0x00, 0xb4, 0x63, 0xd8, + 0x58, 0xdc, 0x35, 0x20, 0xdf, 0xe7, 0x39, 0x5f, 0x42, 0x6a, 0x3e, 0x5e, 0x24, 0xd6, 0x15, 0x4a, + 0xed, 0x2f, 0x39, 0x00, 0xbc, 0x79, 0xe1, 0x96, 0x99, 0xd9, 0xb8, 0x09, 0x65, 0xc3, 0x34, 0x31, + 0x4e, 0xa3, 0xf6, 0x4f, 0x82, 0x78, 0x1d, 0xe1, 0x84, 0x0d, 0x3d, 0x3f, 0x14, 0x39, 0xb8, 0xa8, + 0xc7, 0x30, 0xae, 0x4d, 0x4d, 0xb9, 0xb6, 0x2c, 0xd6, 0x22, 0x18, 0x9b, 0x38, 0x65, 0x46, 0x43, + 0x22, 0xef, 0x13, 0x3a, 0x60, 0xdd, 0x11, 0xd3, 0x99, 0xd6, 0x63, 0x28, 0x0c, 0x3d, 0x33, 0x53, + 0xa9, 0x24, 0x34, 0xf2, 0x6a, 0x68, 0x68, 0xfb, 0x50, 0x4b, 0xb6, 0xc2, 0x02, 0x95, 0xcc, 0x77, + 0x84, 0x51, 0xea, 0x69, 0x69, 0xc9, 0x44, 0x47, 0x3b, 0x86, 0xb5, 0x97, 0xd4, 0x76, 0xf8, 0x04, + 0xdf, 0xa6, 0x06, 0xd6, 0xb7, 0xe7, 0x50, 0x7f, 0x9d, 0x42, 0xc9, 0x4d, 0xb8, 0xca, 0x69, 0x62, + 0x7d, 0x8e, 0x52, 0xfb, 0x53, 0x0e, 0xea, 0x69, 0x92, 0x94, 0xfb, 0xe6, 0xd2, 0xee, 0x8b, 0x56, + 0x9e, 0x32, 0xd3, 0xc0, 0x86, 0x4a, 0x5a, 0x59, 0x82, 0xca, 0x51, 0x0b, 0xa9, 0x2c, 0xb0, 0x09, + 0xc5, 0xc9, 0x6b, 0x43, 0xbe, 0x36, 0xaa, 0xba, 0x00, 0xc8, 0x4d, 0x00, 0x83, 0xb1, 0x57, 0x32, +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41, 0xed, 0x77, + 0xb2, 0xab, 0x28, 0x6a, 0xf4, 0x08, 0xd6, 0x70, 0x17, 0xb5, 0xe0, 0xa8, 0x9c, 0x6b, 0xe9, 0x52, + 0x83, 0x1c, 0x4f, 0x81, 0x28, 0x72, 0xa3, 0xba, 0xa0, 0x32, 0x6d, 0x2c, 0x96, 0x16, 0x64, 0x3c, + 0x80, 0x75, 0x85, 0x51, 0xe4, 0x2c, 0xb2, 0x99, 0x91, 0xe8, 0xde, 0x8a, 0xd8, 0x5d, 0x48, 0x7f, + 0xda, 0xd2, 0x79, 0x89, 0xff, 0xb2, 0xfe, 0xde, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x86, + 0xe6, 0xcc, 0xce, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2685,6 +2797,7 @@ type AppRuntimeSyncClient interface { ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) ListHelmAppRelease(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*HelmAppReleases, error) + ListHelmAppValues(ctx context.Context, in *HelmAppValuesReq, opts ...grpc.CallOption) (*HelmAppValuesResp, error) } type appRuntimeSyncClient struct { @@ -2848,6 +2961,15 @@ func (c *appRuntimeSyncClient) ListHelmAppRelease(ctx context.Context, in *AppRe return out, nil } +func (c *appRuntimeSyncClient) ListHelmAppValues(ctx context.Context, in *HelmAppValuesReq, opts ...grpc.CallOption) (*HelmAppValuesResp, error) { + out := new(HelmAppValuesResp) + err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListHelmAppValues", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AppRuntimeSyncServer is the server API for AppRuntimeSync service. type AppRuntimeSyncServer interface { // Deprecated: - @@ -2868,6 +2990,7 @@ type AppRuntimeSyncServer interface { ListHelmAppDetectConditions(context.Context, *AppReq) (*AppDetectConditions, error) ListAppServices(context.Context, *AppReq) (*AppServices, error) ListHelmAppRelease(context.Context, *AppReq) (*HelmAppReleases, error) + ListHelmAppValues(context.Context, *HelmAppValuesReq) (*HelmAppValuesResp, error) } func RegisterAppRuntimeSyncServer(s *grpc.Server, srv AppRuntimeSyncServer) { @@ -3180,6 +3303,24 @@ func _AppRuntimeSync_ListHelmAppRelease_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } +func _AppRuntimeSync_ListHelmAppValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HelmAppValuesReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AppRuntimeSyncServer).ListHelmAppValues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AppRuntimeSync/ListHelmAppValues", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AppRuntimeSyncServer).ListHelmAppValues(ctx, req.(*HelmAppValuesReq)) + } + return interceptor(ctx, in, info, handler) +} + var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AppRuntimeSync", HandlerType: (*AppRuntimeSyncServer)(nil), @@ -3252,6 +3393,10 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ MethodName: "ListHelmAppRelease", Handler: _AppRuntimeSync_ListHelmAppRelease_Handler, }, + { + MethodName: "ListHelmAppValues", + Handler: _AppRuntimeSync_ListHelmAppValues_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "app_runtime_server.proto", diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 36d93e909..e368bc0a5 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -20,6 +20,7 @@ service AppRuntimeSync { rpc ListHelmAppDetectConditions(AppReq) returns(AppDetectConditions){} rpc ListAppServices(AppReq) returns(AppServices){} rpc ListHelmAppRelease(AppReq) returns(HelmAppReleases){} + rpc ListHelmAppValues(HelmAppValuesReq) returns(HelmAppValuesResp){} } message Empty {} @@ -259,14 +260,13 @@ message AppStatus { int64 cpu = 2; int64 memory = 3; string phase = 4; - string valuesTemplate = 5; + map values = 5; string readme = 6; bool setCPU = 7; bool setMemory = 8; - string values = 9; + repeated string overrides = 9; string version = 10; int32 revision = 11; - repeated string overrides = 12; } message AppDetectCondition { @@ -308,3 +308,15 @@ message HelmAppRelease { string appVersion=5; string description=6; } + +message HelmAppValuesReq { + string templateName=1; + string version=2; + string repoName=3; + string eid=4; + string repoURL=5; +} + +message HelmAppValuesResp { + map values=1; +} \ No newline at end of file diff --git a/worker/server/server.go b/worker/server/server.go index b8b027170..8bd246cfa 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -31,6 +31,7 @@ import ( "github.com/goodrain/rainbond/db/model" discover "github.com/goodrain/rainbond/discover.v2" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/goodrain/rainbond/util" etcdutil "github.com/goodrain/rainbond/util/etcd" "github.com/goodrain/rainbond/util/k8s" @@ -38,9 +39,11 @@ import ( "github.com/goodrain/rainbond/worker/appm/store" "github.com/goodrain/rainbond/worker/appm/thirdparty/discovery" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/goodrain/rainbond/worker/server/pb" wutil "github.com/goodrain/rainbond/worker/util" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/reflection" @@ -54,15 +57,16 @@ import ( //RuntimeServer app runtime grpc server type RuntimeServer struct { - ctx context.Context - cancel context.CancelFunc - store store.Storer - conf option.Config - server *grpc.Server - hostIP string - keepalive *discover.KeepAlive - clientset kubernetes.Interface - updateCh *channels.RingChannel + ctx context.Context + cancel context.CancelFunc + store store.Storer + conf option.Config + server *grpc.Server + hostIP string + keepalive *discover.KeepAlive + clientset kubernetes.Interface + rainbondClient versioned.Interface + updateCh *channels.RingChannel } //CreaterRuntimeServer create a runtime grpc server @@ -336,6 +340,38 @@ func (r *RuntimeServer) GetMultiAppPods(ctx context.Context, re *pb.ServicesRequ return &res, nil } +func (r *RuntimeServer) ListHelmAppValues(ctx context.Context, req *pb.HelmAppValuesReq) (*pb.HelmAppValuesResp, error) { + helmApp := &v1alpha1.HelmApp{ + Spec: v1alpha1.HelmAppSpec{ + EID: req.Eid, + TemplateName: req.TemplateName, + Version: req.Version, + AppStore: &v1alpha1.HelmAppStore{ + Name: req.RepoName, + URL: req.RepoURL, + }, + }, + } + + app, err := helmapp.NewApp(ctx, r.clientset, r.rainbondClient, helmApp, r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) + if err != nil { + return nil, err + } + + if err := app.Pull(); err != nil { + return nil, errors.WithMessage(err, "pull chart") + } + + values, _, err := app.ParseChart() + if err != nil { + return nil, err + } + + return &pb.HelmAppValuesResp{ + Values: values, + }, nil +} + // translateTimestampSince returns the elapsed time since timestamp in // human-readable approximation. func translateTimestampSince(timestamp metav1.Time) string { From ebd3d9f040c008db1a3609ef5e40a268db4fd037 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 7 May 2021 21:41:09 +0800 Subject: [PATCH 32/65] check resource name --- api/api/api_interface.go | 4 +- api/api_routers/version2/v2Routers.go | 8 +- api/controller/application.go | 43 -- api/controller/resources.go | 18 + api/handler/application_handler.go | 70 +-- api/handler/handler.go | 4 +- api/handler/tenant.go | 49 +- api/handler/tenant_handler.go | 2 + api/model/app.go | 8 +- api/model/model.go | 13 +- cmd/api/server/server.go | 21 +- cmd/worker/server/server.go | 12 +- go.mod | 2 +- hack/k8s/codegen/tools.go | 4 +- pkg/apis/rainbond/v1alpha1/helmapp_types.go | 3 + worker/appm/controller/upgrade_test.go | 105 ---- worker/controllers/helmapp/app.go | 61 ++- worker/controllers/helmapp/controlloop.go | 5 + worker/controllers/helmapp/detector.go | 3 +- worker/controllers/helmapp/helm/helm.go | 1 + worker/discover/manager.go | 3 +- worker/master/master.go | 34 +- worker/server/pb/app_runtime_server.pb.go | 548 +++++++++----------- worker/server/pb/app_runtime_server.proto | 13 +- worker/server/server.go | 38 +- 25 files changed, 445 insertions(+), 627 deletions(-) delete mode 100644 worker/appm/controller/upgrade_test.go diff --git a/api/api/api_interface.go b/api/api/api_interface.go index afb0e5aab..cf7fa9bde 100644 --- a/api/api/api_interface.go +++ b/api/api/api_interface.go @@ -52,6 +52,7 @@ type TenantInterface interface { GetManyDeployVersion(w http.ResponseWriter, r *http.Request) LimitTenantMemory(w http.ResponseWriter, r *http.Request) TenantResourcesStatus(w http.ResponseWriter, r *http.Request) + CheckResourceName(w http.ResponseWriter, r *http.Request) } //ServiceInterface ServiceInterface @@ -165,12 +166,9 @@ type ApplicationInterface interface { BatchUpdateComponentPorts(w http.ResponseWriter, r *http.Request) GetAppStatus(w http.ResponseWriter, r *http.Request) - GetDetectProcess(w http.ResponseWriter, r *http.Request) Install(w http.ResponseWriter, r *http.Request) ListServices(w http.ResponseWriter, r *http.Request) - EnsureAppName(w http.ResponseWriter, r *http.Request) ListHelmAppReleases(w http.ResponseWriter, r *http.Request) - ListHelmAppValues(w http.ResponseWriter, r *http.Request) DeleteConfigGroup(w http.ResponseWriter, r *http.Request) ListConfigGroups(w http.ResponseWriter, r *http.Request) diff --git a/api/api_routers/version2/v2Routers.go b/api/api_routers/version2/v2Routers.go index a07b6bb8f..98585f573 100644 --- a/api/api_routers/version2/v2Routers.go +++ b/api/api_routers/version2/v2Routers.go @@ -140,7 +140,7 @@ func (v2 *V2) tenantNameRouter() chi.Router { r.Post("/apps", controller.GetManager().CreateApp) r.Post("/batch_create_apps", controller.GetManager().BatchCreateApp) r.Get("/apps", controller.GetManager().ListApps) - r.Post("/ensure-app-name", controller.GetManager().EnsureAppName) + r.Post("/checkResourceName", controller.GetManager().CheckResourceName) r.Mount("/apps/{app_id}", v2.applicationRouter()) //get some service pod info r.Get("/pods", controller.Pods) @@ -311,6 +311,7 @@ func (v2 *V2) applicationRouter() chi.Router { r.Delete("/", controller.GetManager().DeleteApp) // Get services under application r.Get("/services", controller.GetManager().ListServices) + // bind components r.Put("/services", controller.GetManager().BatchBindService) // Application configuration group r.Post("/configgroups", controller.GetManager().AddConfigGroup) @@ -318,10 +319,9 @@ func (v2 *V2) applicationRouter() chi.Router { r.Put("/ports", controller.GetManager().BatchUpdateComponentPorts) r.Put("/status", controller.GetManager().GetAppStatus) - r.Get("/detect-process", controller.GetManager().GetDetectProcess) + // status r.Post("/install", controller.GetManager().Install) - r.Get("/helm-releases", controller.GetManager().ListHelmAppReleases) - r.Get("/helm-values", controller.GetManager().ListHelmAppValues) + r.Get("/releases", controller.GetManager().ListHelmAppReleases) r.Delete("/configgroups/{config_group_name}", controller.GetManager().DeleteConfigGroup) r.Get("/configgroups", controller.GetManager().ListConfigGroups) diff --git a/api/controller/application.go b/api/controller/application.go index bc3a96f80..4f1c019eb 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -195,18 +195,6 @@ func (a *ApplicationController) GetAppStatus(w http.ResponseWriter, r *http.Requ httputil.ReturnSuccess(r, w, res) } -func (a *ApplicationController) GetDetectProcess(w http.ResponseWriter, r *http.Request) { - app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) - - processes, err := handler.GetApplicationHandler().GetDetectProcess(r.Context(), app) - if err != nil { - httputil.ReturnBcodeError(r, w, err) - return - } - - httputil.ReturnSuccess(r, w, processes) -} - func (a *ApplicationController) Install(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) @@ -250,23 +238,6 @@ func (a *ApplicationController) BatchBindService(w http.ResponseWriter, r *http. httputil.ReturnSuccess(r, w, nil) } -func (a *ApplicationController) EnsureAppName(w http.ResponseWriter, r *http.Request) { - var req model.EnsureAppNameReq - if !httputil.ValidatorRequestStructAndErrorResponse(r, w, &req, nil) { - return - } - - tenant := r.Context().Value(middleware.ContextKey("tenant")).(*dbmodel.Tenants) - - res, err := handler.GetApplicationHandler().EnsureAppName(r.Context(), tenant.UUID, req.AppName) - if err != nil { - httputil.ReturnBcodeError(r, w, err) - return - } - - httputil.ReturnSuccess(r, w, res) -} - func (a *ApplicationController) ListHelmAppReleases(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) @@ -278,17 +249,3 @@ func (a *ApplicationController) ListHelmAppReleases(w http.ResponseWriter, r *ht httputil.ReturnSuccess(r, w, releases) } - -func (a *ApplicationController) ListHelmAppValues(w http.ResponseWriter, r *http.Request) { - app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) - - version := chi.URLParam(r, "version") - - values, err := handler.GetApplicationHandler().ListHelmAppValues(r.Context(), app, version) - if err != nil { - httputil.ReturnBcodeError(r, w, err) - return - } - - httputil.ReturnSuccess(r, w, values) -} \ No newline at end of file diff --git a/api/controller/resources.go b/api/controller/resources.go index 5b7caa5e5..249d45285 100644 --- a/api/controller/resources.go +++ b/api/controller/resources.go @@ -31,6 +31,7 @@ import ( "github.com/go-chi/chi" "github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/middleware" + "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/util/bcode" "github.com/goodrain/rainbond/cmd" @@ -1932,3 +1933,20 @@ func (t *TenantStruct) TransPlugins(w http.ResponseWriter, r *http.Request) { httputil.ReturnSuccess(r, w, rc) return } + +func (a *TenantStruct) CheckResourceName(w http.ResponseWriter, r *http.Request) { + var req model.CheckResourceNameReq + if !httputil.ValidatorRequestStructAndErrorResponse(r, w, &req, nil) { + return + } + + tenant := r.Context().Value(middleware.ContextKey("tenant")).(*dbmodel.Tenants) + + res, err := handler.GetTenantManager().CheckResourceName(r.Context(), tenant.UUID, &req) + if err != nil { + httputil.ReturnBcodeError(r, w, err) + return + } + + httputil.ReturnSuccess(r, w, res) +} diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 20822fea0..445db4e28 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -51,12 +51,9 @@ type ApplicationHandler interface { BatchUpdateComponentPorts(appID string, ports []*model.AppPort) error GetStatus(ctx context.Context, app *dbmodel.Application) (*model.AppStatus, error) - GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) Install(ctx context.Context, app *dbmodel.Application, overrides []string) error ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) - EnsureAppName(ctx context.Context, namespace, appName string) (*model.EnsureAppNameResp, error) ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error) - ListHelmAppValues(ctx context.Context, app *dbmodel.Application, version string) (map[string]string, error) DeleteConfigGroup(appID, configGroupName string) error ListConfigGroups(appID string, page, pageSize int) (*model.ListApplicationConfigGroupResp, error) @@ -427,33 +424,11 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat Readme: status.Readme, Version: status.Version, Revision: int(status.Revision), + Questions: status.Questions, } return res, nil } -func (a *ApplicationAction) GetDetectProcess(ctx context.Context, app *dbmodel.Application) ([]*model.AppDetectProcess, error) { - nctx, cancel := context.WithTimeout(ctx, 3*time.Second) - defer cancel() - - res, err := a.statusCli.ListHelmAppDetectConditions(nctx, &pb.AppReq{ - AppId: app.AppID, - }) - if err != nil { - return nil, err - } - - var conditions []*model.AppDetectProcess - for _, condition := range res.Conditions { - conditions = append(conditions, &model.AppDetectProcess{ - Type: condition.Type, - Ready: condition.Ready, - Error: condition.Error, - }) - } - - return conditions, nil -} - func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, overrides []string) error { ctx1, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() @@ -538,27 +513,6 @@ func (a *ApplicationAction) BatchBindService(appID string, req model.BindService return nil } -func (a *ApplicationAction) EnsureAppName(ctx context.Context, namespace, appName string) (*model.EnsureAppNameResp, error) { - nctx, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() - - retries := 3 - for i := 0; i < retries; i++ { - _, err := a.rainbondClient.RainbondV1alpha1().HelmApps(namespace).Get(nctx, appName, metav1.GetOptions{}) - if err != nil { - if k8sErrors.IsNotFound(err) { - break - } - return nil, errors.Wrap(err, "ensure app name") - } - appName += "-" + util.NewUUID()[:5] - } - - return &model.EnsureAppNameResp{ - AppName: appName, - }, nil -} - func (a *ApplicationAction) ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error) { // only for helm app if app.AppType != model.AppTypeHelm { @@ -588,25 +542,3 @@ func (a *ApplicationAction) ListHelmAppReleases(ctx context.Context, app *dbmode } return result, nil } - -func (a *ApplicationAction) ListHelmAppValues(ctx context.Context, app *dbmodel.Application, version string) (map[string]string, error) { - // only for helm app - if app.AppType != model.AppTypeHelm { - return nil, nil - } - - nctx, cancel := context.WithTimeout(ctx, 5*time.Second) - defer cancel() - - res, err := a.statusCli.ListHelmAppValues(nctx, &pb.HelmAppValuesReq{ - TemplateName: app.AppTemplateName, - Version: version, - RepoName: app.AppStoreName, - Eid: app.EID, - RepoURL: app.AppStoreURL, - }) - if err != nil { - return nil, err - } - return res.Values, nil -} diff --git a/api/handler/handler.go b/api/handler/handler.go index 7b701faad..a4ddb019b 100644 --- a/api/handler/handler.go +++ b/api/handler/handler.go @@ -31,6 +31,7 @@ import ( "github.com/goodrain/rainbond/worker/client" "github.com/sirupsen/logrus" "k8s.io/client-go/kubernetes" + k8sclient "sigs.k8s.io/controller-runtime/pkg/client" ) //InitHandle 初始化handle @@ -40,6 +41,7 @@ func InitHandle(conf option.Config, etcdcli *clientv3.Client, kubeClient *kubernetes.Clientset, rainbondClient versioned.Interface, + k8sClient k8sclient.Client, ) error { mq := api_db.MQManager{ EtcdClientArgs: etcdClientArgs, @@ -61,7 +63,7 @@ func InitHandle(conf option.Config, defaultServieHandler = CreateManager(conf, mqClient, etcdcli, statusCli, prometheusCli) defaultPluginHandler = CreatePluginManager(mqClient) defaultAppHandler = CreateAppManager(mqClient) - defaultTenantHandler = CreateTenManager(mqClient, statusCli, &conf, kubeClient, prometheusCli) + defaultTenantHandler = CreateTenManager(mqClient, statusCli, &conf, kubeClient, prometheusCli, k8sClient) defaultNetRulesHandler = CreateNetRulesManager(etcdcli) defaultCloudHandler = CreateCloudManager(conf) defaultAPPBackupHandler = group.CreateBackupHandle(mqClient, statusCli, etcdcli) diff --git a/api/handler/tenant.go b/api/handler/tenant.go index f0db303c5..9b3f9ec97 100644 --- a/api/handler/tenant.go +++ b/api/handler/tenant.go @@ -26,18 +26,27 @@ import ( "time" "github.com/goodrain/rainbond/api/client/prometheus" + "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/util" + "github.com/goodrain/rainbond/api/util/bcode" "github.com/goodrain/rainbond/cmd/api/option" "github.com/goodrain/rainbond/db" dbmodel "github.com/goodrain/rainbond/db/model" mqclient "github.com/goodrain/rainbond/mq/client" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + rutil "github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/server/pb" + "github.com/pkg/errors" "github.com/sirupsen/logrus" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" + k8sclient "sigs.k8s.io/controller-runtime/pkg/client" ) //TenantAction tenant act @@ -49,17 +58,30 @@ type TenantAction struct { cacheClusterResourceStats *ClusterResourceStats cacheTime time.Time prometheusCli prometheus.Interface + k8sClient k8sclient.Client + resources map[string]k8sclient.Object } //CreateTenManager create Manger func CreateTenManager(mqc mqclient.MQClient, statusCli *client.AppRuntimeSyncClient, - optCfg *option.Config, kubeClient *kubernetes.Clientset, prometheusCli prometheus.Interface) *TenantAction { + optCfg *option.Config, + kubeClient *kubernetes.Clientset, + prometheusCli prometheus.Interface, + k8sClient k8sclient.Client) *TenantAction { + + resources := map[string]k8sclient.Object{ + "helmApp": &v1alpha1.HelmApp{}, + "service": &corev1.Service{}, + } + return &TenantAction{ MQClient: mqc, statusCli: statusCli, OptCfg: optCfg, kubeClient: kubeClient, prometheusCli: prometheusCli, + k8sClient: k8sClient, + resources: resources, } } @@ -588,3 +610,28 @@ func (t *TenantAction) GetClusterResource(ctx context.Context) *ClusterResourceS } return t.cacheClusterResourceStats } + +func (a *TenantAction) CheckResourceName(ctx context.Context, namespace string, req *model.CheckResourceNameReq) (*model.CheckResourceNameResp, error) { + obj, ok := a.resources[req.Type] + if !ok { + return nil, bcode.NewBadRequest("unsupported resource: " + req.Type) + } + + nctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + retries := 3 + for i := 0; i < retries; i++ { + if err := a.k8sClient.Get(nctx, types.NamespacedName{Namespace: namespace, Name: req.Name}, obj); err != nil { + if k8sErrors.IsNotFound(err) { + break + } + return nil, errors.Wrap(err, "ensure app name") + } + req.Name += "-" + rutil.NewUUID()[:5] + } + + return &model.CheckResourceNameResp{ + Name: req.Name, + }, nil +} diff --git a/api/handler/tenant_handler.go b/api/handler/tenant_handler.go index 2d1c4d912..6c3918a5c 100644 --- a/api/handler/tenant_handler.go +++ b/api/handler/tenant_handler.go @@ -21,6 +21,7 @@ package handler import ( "context" + "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/util" dbmodel "github.com/goodrain/rainbond/db/model" @@ -48,4 +49,5 @@ type TenantHandler interface { UpdateTenant(*dbmodel.Tenants) error DeleteTenant(tenantID string) error GetClusterResource(ctx context.Context) *ClusterResourceStats + CheckResourceName(ctx context.Context, namespace string, req *model.CheckResourceNameReq) (*model.CheckResourceNameResp, error) } diff --git a/api/model/app.go b/api/model/app.go index f4e4a7e41..e976b1f72 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -20,13 +20,7 @@ type AppStatus struct { Version string `json:"version"` Revision int `json:"revision"` Overrides []string `json:"overrides"` -} - -// AppDetectProcess - -type AppDetectProcess struct { - Type string `json:"type"` - Ready bool `json:"ready"` - Error string `json:"error"` + Questions string `json:"questions"` } // AppService - diff --git a/api/model/model.go b/api/model/model.go index 4fec9fde3..e83725e65 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -1770,14 +1770,15 @@ type ListApplicationConfigGroupResp struct { PageSize int `json:"pageSize"` } -// EnsureAppNameReq - -type EnsureAppNameReq struct { - AppName string `json:"app_name"` +// CheckResourceNameReq - +type CheckResourceNameReq struct { + Name string `json:"name"` + Type string `json:"type"` } -// EnsureAppNameResp - -type EnsureAppNameResp struct { - AppName string `json:"app_name"` +// CheckResourceNameResp - +type CheckResourceNameResp struct { + Name string `json:"name"` } // HelmAppRelease - diff --git a/cmd/api/server/server.go b/cmd/api/server/server.go index 0feee6f03..88566e1cf 100644 --- a/cmd/api/server/server.go +++ b/cmd/api/server/server.go @@ -23,7 +23,9 @@ import ( "os" "os/signal" "syscall" - + + + rainbondscheme "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/scheme" "github.com/goodrain/rainbond/api/controller" "github.com/goodrain/rainbond/api/db" "github.com/goodrain/rainbond/api/discover" @@ -35,8 +37,12 @@ import ( etcdutil "github.com/goodrain/rainbond/util/etcd" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/client" + "github.com/pkg/errors" "github.com/sirupsen/logrus" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + k8sclient "sigs.k8s.io/controller-runtime/pkg/client" ) //Run start run @@ -75,6 +81,17 @@ func Run(s *option.APIServer) error { } rainbondClient := versioned.NewForConfigOrDie(config) + // k8s runtime client + scheme := runtime.NewScheme() + clientgoscheme.AddToScheme(scheme) + rainbondscheme.AddToScheme(scheme) + k8sClient, err := k8sclient.New(config, k8sclient.Options{ + Scheme: scheme, + }) + if err != nil { + return errors.WithMessage(err, "create k8s client") + } + if err := event.NewManager(event.EventConfig{ EventLogServers: s.Config.EventLogServers, DiscoverArgs: etcdClientArgs, @@ -104,7 +121,7 @@ func Run(s *option.APIServer) error { //初始化 middleware handler.InitProxy(s.Config) //创建handle - if err := handler.InitHandle(s.Config, etcdClientArgs, cli, etcdcli, clientset, rainbondClient); err != nil { + if err := handler.InitHandle(s.Config, etcdClientArgs, cli, etcdcli, clientset, rainbondClient, k8sClient); err != nil { logrus.Errorf("init all handle error, %v", err) return err } diff --git a/cmd/worker/server/server.go b/cmd/worker/server/server.go index b034a386c..662341f18 100644 --- a/cmd/worker/server/server.go +++ b/cmd/worker/server/server.go @@ -19,11 +19,9 @@ package server import ( - "context" "os" "os/signal" "syscall" - "time" "github.com/eapache/channels" "github.com/goodrain/rainbond/cmd/worker/option" @@ -36,7 +34,6 @@ import ( "github.com/goodrain/rainbond/worker/appm" "github.com/goodrain/rainbond/worker/appm/controller" "github.com/goodrain/rainbond/worker/appm/store" - "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/goodrain/rainbond/worker/discover" "github.com/goodrain/rainbond/worker/gc" "github.com/goodrain/rainbond/worker/master" @@ -48,8 +45,6 @@ import ( //Run start run func Run(s *option.Worker) error { - ctx := context.Background() - errChan := make(chan error, 2) dbconfig := config.Config{ DBType: s.Config.DBType, @@ -111,7 +106,7 @@ func Run(s *option.Worker) error { defer controllerManager.Stop() //step 5 : start runtime master - masterCon, err := master.NewMasterController(s.Config, cachestore) + masterCon, err := master.NewMasterController(s.Config, cachestore, clientset, rainbondClient) if err != nil { return err } @@ -138,11 +133,6 @@ func Run(s *option.Worker) error { } defer exporterManager.Stop() - stopCh := make(chan struct{}) - ctrl := helmapp.NewController(ctx, stopCh, clientset, rainbondClient, 5*time.Second, s.Helm.RepoFile, s.Helm.RepoCache) - go ctrl.Start() - defer close(stopCh) - logrus.Info("worker begin running...") //step finally: listen Signal diff --git a/go.mod b/go.mod index cf2cb26ec..63570be34 100644 --- a/go.mod +++ b/go.mod @@ -98,7 +98,7 @@ require ( golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 golang.org/x/tools v0.0.0-20201228162255-34cd474b9958 // indirect - google.golang.org/appengine v1.6.7 + google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e // indirect google.golang.org/grpc v1.33.2 gopkg.in/alecthomas/kingpin.v2 v2.2.6 diff --git a/hack/k8s/codegen/tools.go b/hack/k8s/codegen/tools.go index 0321d220d..68776828b 100644 --- a/hack/k8s/codegen/tools.go +++ b/hack/k8s/codegen/tools.go @@ -1,4 +1,4 @@ // +build tools package tools - -import _ "k8s.io/code-generator" \ No newline at end of file + +import _ "k8s.io/code-generator" diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index e4b41b828..b976d3756 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -202,6 +202,9 @@ type HelmAppStatus struct { // The base64 encoded string from README.md Readme string `json:"readme,omitempty"` + // The base64 encoded string from questions.yaml + Questions string `json:"questions,omitempty"` + // Overrides in effect. Overrides []string `json:"overrides,omitempty"` } diff --git a/worker/appm/controller/upgrade_test.go b/worker/appm/controller/upgrade_test.go deleted file mode 100644 index 0b254863c..000000000 --- a/worker/appm/controller/upgrade_test.go +++ /dev/null @@ -1,105 +0,0 @@ -// RAINBOND, Application Management Platform -// Copyright (C) 2014-2017 Goodrain Co., Ltd. - -// 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 controller - -import ( - "testing" - - "github.com/eapache/channels" - "github.com/goodrain/rainbond/worker/appm/store" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - - "github.com/goodrain/rainbond/cmd/worker/option" - "github.com/goodrain/rainbond/db" - "github.com/goodrain/rainbond/db/config" -) - -func Test_upgradeController_upgradeOne(t *testing.T) { - storer := getStoreForTest(t) - ocfg := option.Config{ - DBType: "mysql", - MysqlConnectionInfo: "oc6Poh:noot6Mea@tcp(192.168.2.203:3306)/region", - EtcdEndPoints: []string{"http://192.168.2.203:2379"}, - EtcdTimeout: 5, - KubeConfig: "/Users/fanyangyang/Documents/company/goodrain/admin.kubeconfig", - LeaderElectionNamespace: "rainbond", - } - c, err := clientcmd.BuildConfigFromFlags("", ocfg.KubeConfig) - if err != nil { - t.Fatalf("read kube config file error: %v", err) - } - clientset, err := kubernetes.NewForConfig(c) - if err != nil { - t.Fatalf("create kube api client error: %v", err) - } - manager := NewManager(storer, clientset) - controller := upgradeController{ - stopChan: make(chan struct{}), - controllerID: "", - appService: nil, - manager: manager, - } - appservice := storer.GetAppService("e7d895fde0ab49e0eeb20e81a8967878") - if appservice != nil { - controller.upgradeOne(*appservice) - } else { - t.Log("app is nil") - } - db.CloseManager() - -} - -func getStoreForTest(t *testing.T) store.Storer { - ocfg := option.Config{ - DBType: "mysql", - MysqlConnectionInfo: "oc6Poh:noot6Mea@tcp(192.168.2.203:3306)/region", - EtcdEndPoints: []string{"http://192.168.2.203:2379"}, - EtcdTimeout: 5, - KubeConfig: "/Users/fanyangyang/Documents/company/goodrain/admin.kubeconfig", - LeaderElectionNamespace: "rainbond", - } - - dbconfig := config.Config{ - DBType: ocfg.DBType, - MysqlConnectionInfo: ocfg.MysqlConnectionInfo, - EtcdEndPoints: ocfg.EtcdEndPoints, - EtcdTimeout: ocfg.EtcdTimeout, - } - //step 1:db manager init ,event log client init - if err := db.CreateManager(dbconfig); err != nil { - t.Fatalf("error creating db manager: %v", err) - } - - c, err := clientcmd.BuildConfigFromFlags("", ocfg.KubeConfig) - if err != nil { - t.Fatalf("read kube config file error: %v", err) - } - clientset, err := kubernetes.NewForConfig(c) - if err != nil { - t.Fatalf("create kube api client error: %v", err) - } - startCh := channels.NewRingChannel(1024) - probeCh := channels.NewRingChannel(1024) - storer := store.NewStore(c, clientset, db.GetManager(), option.Config{LeaderElectionNamespace: ocfg.LeaderElectionNamespace, KubeClient: clientset}, startCh, probeCh) - if err := storer.Start(); err != nil { - t.Fatalf("error starting store: %v", err) - } - return storer -} diff --git a/worker/controllers/helmapp/app.go b/worker/controllers/helmapp/app.go index 477d94b37..3db5e8892 100644 --- a/worker/controllers/helmapp/app.go +++ b/worker/controllers/helmapp/app.go @@ -171,6 +171,27 @@ func (a *App) Update() error { return a.UpdateSpec() } +// UpdateStatus updates the running status of the helm app. +func (a *App) UpdateRunningStatus() error { + rel, err := a.Status() + if err != nil { + if errors.Is(err, driver.ErrReleaseNotFound) { + return nil + } + return err + } + + newStatus := v1alpha1.HelmAppStatusStatus(rel.Info.Status) + if a.helmApp.Status.Status == newStatus { + // no change + return nil + } + + status := NewStatus(a.ctx, a.helmApp, a.rainbondClient) + + return status.Update() +} + // UpdateStatus updates the status of the helm app. func (a *App) UpdateStatus() error { status := NewStatus(a.ctx, a.helmApp, a.rainbondClient) @@ -230,11 +251,7 @@ func (a *App) PreInstall() error { } func (a *App) Status() (*release.Release, error) { - rel, err := a.helmCmd.Status(a.name) - if err != nil { - return nil, err - } - return rel, nil + return a.helmCmd.Status(a.name) } func (a *App) InstallOrUpdate() error { @@ -273,18 +290,23 @@ func (a *App) installOrUpdate() error { return a.helmCmd.Upgrade(a.name, a.chart(), a.version, a.overrides) } -func (a *App) ParseChart() (map[string]string, string, error) { +func (a *App) ParseChart() (map[string]string, string, string, error) { readme, err := a.getReadme() if err != nil { - return nil, "", err + return nil, "", "", err } files, err := a.getValues() if err != nil { - return nil, "", err + return nil, "", "", err } - return files, readme, nil + questions, err := a.getQuestions() + if err != nil { + return nil, "", "", err + } + + return files, readme, questions, nil } func (a *App) getValues() (map[string]string, error) { @@ -313,7 +335,15 @@ func (a *App) getValues() (map[string]string, error) { } func (a *App) getReadme() (string, error) { - var readme string + return a.fileInRootChart("README.md") +} + +func (a *App) getQuestions() (string, error) { + return a.fileInRootChart("questions.yaml") +} + +func (a *App) fileInRootChart(filename string) (string, error) { + var file string err := filepath.Walk(a.chartDir, func(p string, info os.FileInfo, err error) error { if err != nil { return err @@ -321,24 +351,27 @@ func (a *App) getReadme() (string, error) { if p == a.chartDir { return nil } - if readme != "" { + if file != "" { return filepath.SkipDir } if !info.IsDir() { return nil } - readmeFile := path.Join(p, "README.md") + readmeFile := path.Join(p, filename) readmeBytes, err := ioutil.ReadFile(readmeFile) if err != nil { + if os.IsNotExist(err) { + return nil + } return err } - readme = base64.StdEncoding.EncodeToString(readmeBytes) + file = base64.StdEncoding.EncodeToString(readmeBytes) return nil }) - return readme, err + return file, err } func (a *App) Uninstall() error { diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index d3cde3e84..0c2b9f86a 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -102,6 +102,11 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { return err } + app.log.Debug("start reconcile") + + // update running status + defer app.UpdateRunningStatus() + if app.NeedSetup() { return app.Setup() } diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 8d297a33b..d60fef500 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -56,7 +56,7 @@ func (d *Detector) Detect() error { // parse chart if !d.helmApp.Status.IsConditionTrue(v1alpha1.HelmAppChartParsed) { - values, readme, err := d.app.ParseChart() + values, readme, questions, err := d.app.ParseChart() if err != nil { d.helmApp.Status.UpdateCondition(v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppChartParsed, corev1.ConditionFalse, "ChartParsed", err.Error())) @@ -65,6 +65,7 @@ func (d *Detector) Detect() error { d.helmApp.Status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionTrue) d.helmApp.Status.Values = values d.helmApp.Status.Readme = readme + d.helmApp.Status.Questions = questions } return nil diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index 2ff56726c..3ab3b2160 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -218,6 +218,7 @@ func (h *Helm) Status(name string) (*release.Release, error) { } func (h *Helm) Uninstall(name string) error { + logrus.Infof("uninstall helm app(%s/%s)", h.namespace, name) uninstall := action.NewUninstall(h.cfg) _, err := uninstall.Run(name) return err diff --git a/worker/discover/manager.go b/worker/discover/manager.go index 4f61aa089..97109f169 100644 --- a/worker/discover/manager.go +++ b/worker/discover/manager.go @@ -105,8 +105,9 @@ func (t *TaskManager) Do() { return default: ctx, cancel := context.WithCancel(t.ctx) + defer cancel() + data, err := t.client.Dequeue(ctx, &pb.DequeueRequest{Topic: client.WorkerTopic, ClientHost: hostname + "-worker"}) - cancel() if err != nil { if grpc1.ErrorDesc(err) == context.DeadlineExceeded.Error() { continue diff --git a/worker/master/master.go b/worker/master/master.go index cb3e577ef..733ca66a8 100644 --- a/worker/master/master.go +++ b/worker/master/master.go @@ -24,21 +24,22 @@ import ( "strings" "time" - "github.com/prometheus/client_golang/prometheus" - "github.com/sirupsen/logrus" - - corev1 "k8s.io/api/core/v1" - "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db/model" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/goodrain/rainbond/util/leader" "github.com/goodrain/rainbond/worker/appm/store" + "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/goodrain/rainbond/worker/master/podevent" "github.com/goodrain/rainbond/worker/master/volumes/provider" "github.com/goodrain/rainbond/worker/master/volumes/provider/lib/controller" "github.com/goodrain/rainbond/worker/master/volumes/statistical" "github.com/goodrain/rainbond/worker/master/volumes/sync" + "github.com/prometheus/client_golang/prometheus" + "github.com/sirupsen/logrus" + corev1 "k8s.io/api/core/v1" + "k8s.io/client-go/kubernetes" ) //Controller app runtime master controller @@ -57,6 +58,7 @@ type Controller struct { namespaceCPURequest *prometheus.GaugeVec namespaceCPULimit *prometheus.GaugeVec pc *controller.ProvisionController + helmAppController *helmapp.Controller isLeader bool stopCh chan struct{} @@ -66,7 +68,7 @@ type Controller struct { } //NewMasterController new master controller -func NewMasterController(conf option.Config, store store.Storer) (*Controller, error) { +func NewMasterController(conf option.Config, store store.Storer, kubeClient kubernetes.Interface, rainbondClient versioned.Interface) (*Controller, error) { ctx, cancel := context.WithCancel(context.Background()) // The controller needs to know what the server version is because out-of-tree // provisioners aren't officially supported until 1.5 @@ -91,14 +93,17 @@ func NewMasterController(conf option.Config, store store.Storer) (*Controller, e }, serverVersion.GitVersion) stopCh := make(chan struct{}) + helmAppController := helmapp.NewController(ctx, stopCh, kubeClient, rainbondClient, 5*time.Second, conf.Helm.RepoFile, conf.Helm.RepoCache) + return &Controller{ - conf: conf, - pc: pc, - store: store, - stopCh: stopCh, - cancel: cancel, - ctx: ctx, - dbmanager: db.GetManager(), + conf: conf, + pc: pc, + helmAppController: helmAppController, + store: store, + stopCh: stopCh, + cancel: cancel, + ctx: ctx, + dbmanager: db.GetManager(), memoryUse: prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "app_resource", Name: "appmemory", @@ -164,6 +169,9 @@ func (m *Controller) Start() error { defer m.store.UnRegisterVolumeTypeListener("volumeTypeEvent") go m.volumeTypeEvent.Handle() + // helm app controller + go m.helmAppController.Start() + select { case <-ctx.Done(): case <-m.ctx.Done(): diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 728ed95e9..adf15b798 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -1944,6 +1944,7 @@ type AppStatus struct { Overrides []string `protobuf:"bytes,9,rep,name=overrides,proto3" json:"overrides,omitempty"` Version string `protobuf:"bytes,10,opt,name=version,proto3" json:"version,omitempty"` Revision int32 `protobuf:"varint,11,opt,name=revision,proto3" json:"revision,omitempty"` + Questions string `protobuf:"bytes,12,opt,name=questions,proto3" json:"questions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2051,6 +2052,13 @@ func (m *AppStatus) GetRevision() int32 { return 0 } +func (m *AppStatus) GetQuestions() string { + if m != nil { + return m.Questions + } + return "" +} + type AppDetectCondition struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready,omitempty"` @@ -2106,45 +2114,6 @@ func (m *AppDetectCondition) GetError() string { return "" } -type AppDetectConditions struct { - Conditions []*AppDetectCondition `protobuf:"bytes,1,rep,name=conditions,proto3" json:"conditions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AppDetectConditions) Reset() { *m = AppDetectConditions{} } -func (m *AppDetectConditions) String() string { return proto.CompactTextString(m) } -func (*AppDetectConditions) ProtoMessage() {} -func (*AppDetectConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{33} -} - -func (m *AppDetectConditions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppDetectConditions.Unmarshal(m, b) -} -func (m *AppDetectConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppDetectConditions.Marshal(b, m, deterministic) -} -func (m *AppDetectConditions) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppDetectConditions.Merge(m, src) -} -func (m *AppDetectConditions) XXX_Size() int { - return xxx_messageInfo_AppDetectConditions.Size(m) -} -func (m *AppDetectConditions) XXX_DiscardUnknown() { - xxx_messageInfo_AppDetectConditions.DiscardUnknown(m) -} - -var xxx_messageInfo_AppDetectConditions proto.InternalMessageInfo - -func (m *AppDetectConditions) GetConditions() []*AppDetectCondition { - if m != nil { - return m.Conditions - } - return nil -} - type AppService struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` @@ -2160,7 +2129,7 @@ func (m *AppService) Reset() { *m = AppService{} } func (m *AppService) String() string { return proto.CompactTextString(m) } func (*AppService) ProtoMessage() {} func (*AppService) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{34} + return fileDescriptor_f94cf1a886c479d6, []int{33} } func (m *AppService) XXX_Unmarshal(b []byte) error { @@ -2228,7 +2197,7 @@ func (m *AppService_Pod) Reset() { *m = AppService_Pod{} } func (m *AppService_Pod) String() string { return proto.CompactTextString(m) } func (*AppService_Pod) ProtoMessage() {} func (*AppService_Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{34, 0} + return fileDescriptor_f94cf1a886c479d6, []int{33, 0} } func (m *AppService_Pod) XXX_Unmarshal(b []byte) error { @@ -2274,7 +2243,7 @@ func (m *AppServices) Reset() { *m = AppServices{} } func (m *AppServices) String() string { return proto.CompactTextString(m) } func (*AppServices) ProtoMessage() {} func (*AppServices) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{35} + return fileDescriptor_f94cf1a886c479d6, []int{34} } func (m *AppServices) XXX_Unmarshal(b []byte) error { @@ -2313,7 +2282,7 @@ func (m *HelmAppReleases) Reset() { *m = HelmAppReleases{} } func (m *HelmAppReleases) String() string { return proto.CompactTextString(m) } func (*HelmAppReleases) ProtoMessage() {} func (*HelmAppReleases) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{36} + return fileDescriptor_f94cf1a886c479d6, []int{35} } func (m *HelmAppReleases) XXX_Unmarshal(b []byte) error { @@ -2357,7 +2326,7 @@ func (m *HelmAppRelease) Reset() { *m = HelmAppRelease{} } func (m *HelmAppRelease) String() string { return proto.CompactTextString(m) } func (*HelmAppRelease) ProtoMessage() {} func (*HelmAppRelease) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{37} + return fileDescriptor_f94cf1a886c479d6, []int{36} } func (m *HelmAppRelease) XXX_Unmarshal(b []byte) error { @@ -2420,7 +2389,7 @@ func (m *HelmAppRelease) GetDescription() string { return "" } -type HelmAppValuesReq struct { +type ParseHelmAppReq struct { TemplateName string `protobuf:"bytes,1,opt,name=templateName,proto3" json:"templateName,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` RepoName string `protobuf:"bytes,3,opt,name=repoName,proto3" json:"repoName,omitempty"` @@ -2431,105 +2400,113 @@ type HelmAppValuesReq struct { XXX_sizecache int32 `json:"-"` } -func (m *HelmAppValuesReq) Reset() { *m = HelmAppValuesReq{} } -func (m *HelmAppValuesReq) String() string { return proto.CompactTextString(m) } -func (*HelmAppValuesReq) ProtoMessage() {} -func (*HelmAppValuesReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{38} +func (m *ParseHelmAppReq) Reset() { *m = ParseHelmAppReq{} } +func (m *ParseHelmAppReq) String() string { return proto.CompactTextString(m) } +func (*ParseHelmAppReq) ProtoMessage() {} +func (*ParseHelmAppReq) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{37} } -func (m *HelmAppValuesReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HelmAppValuesReq.Unmarshal(m, b) +func (m *ParseHelmAppReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ParseHelmAppReq.Unmarshal(m, b) } -func (m *HelmAppValuesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HelmAppValuesReq.Marshal(b, m, deterministic) +func (m *ParseHelmAppReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ParseHelmAppReq.Marshal(b, m, deterministic) } -func (m *HelmAppValuesReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_HelmAppValuesReq.Merge(m, src) +func (m *ParseHelmAppReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParseHelmAppReq.Merge(m, src) } -func (m *HelmAppValuesReq) XXX_Size() int { - return xxx_messageInfo_HelmAppValuesReq.Size(m) +func (m *ParseHelmAppReq) XXX_Size() int { + return xxx_messageInfo_ParseHelmAppReq.Size(m) } -func (m *HelmAppValuesReq) XXX_DiscardUnknown() { - xxx_messageInfo_HelmAppValuesReq.DiscardUnknown(m) +func (m *ParseHelmAppReq) XXX_DiscardUnknown() { + xxx_messageInfo_ParseHelmAppReq.DiscardUnknown(m) } -var xxx_messageInfo_HelmAppValuesReq proto.InternalMessageInfo +var xxx_messageInfo_ParseHelmAppReq proto.InternalMessageInfo -func (m *HelmAppValuesReq) GetTemplateName() string { +func (m *ParseHelmAppReq) GetTemplateName() string { if m != nil { return m.TemplateName } return "" } -func (m *HelmAppValuesReq) GetVersion() string { +func (m *ParseHelmAppReq) GetVersion() string { if m != nil { return m.Version } return "" } -func (m *HelmAppValuesReq) GetRepoName() string { +func (m *ParseHelmAppReq) GetRepoName() string { if m != nil { return m.RepoName } return "" } -func (m *HelmAppValuesReq) GetEid() string { +func (m *ParseHelmAppReq) GetEid() string { if m != nil { return m.Eid } return "" } -func (m *HelmAppValuesReq) GetRepoURL() string { +func (m *ParseHelmAppReq) GetRepoURL() string { if m != nil { return m.RepoURL } return "" } -type HelmAppValuesResp struct { +type ParseHelmAppResp struct { Values map[string]string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Questions string `protobuf:"bytes,2,opt,name=questions,proto3" json:"questions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *HelmAppValuesResp) Reset() { *m = HelmAppValuesResp{} } -func (m *HelmAppValuesResp) String() string { return proto.CompactTextString(m) } -func (*HelmAppValuesResp) ProtoMessage() {} -func (*HelmAppValuesResp) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{39} +func (m *ParseHelmAppResp) Reset() { *m = ParseHelmAppResp{} } +func (m *ParseHelmAppResp) String() string { return proto.CompactTextString(m) } +func (*ParseHelmAppResp) ProtoMessage() {} +func (*ParseHelmAppResp) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{38} } -func (m *HelmAppValuesResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HelmAppValuesResp.Unmarshal(m, b) +func (m *ParseHelmAppResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ParseHelmAppResp.Unmarshal(m, b) } -func (m *HelmAppValuesResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HelmAppValuesResp.Marshal(b, m, deterministic) +func (m *ParseHelmAppResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ParseHelmAppResp.Marshal(b, m, deterministic) } -func (m *HelmAppValuesResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_HelmAppValuesResp.Merge(m, src) +func (m *ParseHelmAppResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParseHelmAppResp.Merge(m, src) } -func (m *HelmAppValuesResp) XXX_Size() int { - return xxx_messageInfo_HelmAppValuesResp.Size(m) +func (m *ParseHelmAppResp) XXX_Size() int { + return xxx_messageInfo_ParseHelmAppResp.Size(m) } -func (m *HelmAppValuesResp) XXX_DiscardUnknown() { - xxx_messageInfo_HelmAppValuesResp.DiscardUnknown(m) +func (m *ParseHelmAppResp) XXX_DiscardUnknown() { + xxx_messageInfo_ParseHelmAppResp.DiscardUnknown(m) } -var xxx_messageInfo_HelmAppValuesResp proto.InternalMessageInfo +var xxx_messageInfo_ParseHelmAppResp proto.InternalMessageInfo -func (m *HelmAppValuesResp) GetValues() map[string]string { +func (m *ParseHelmAppResp) GetValues() map[string]string { if m != nil { return m.Values } return nil } +func (m *ParseHelmAppResp) GetQuestions() string { + if m != nil { + return m.Questions + } + return "" +} + func init() { proto.RegisterEnum("pb.ServiceVolumeStatus", ServiceVolumeStatus_name, ServiceVolumeStatus_value) proto.RegisterEnum("pb.PodStatus_Type", PodStatus_Type_name, PodStatus_Type_value) @@ -2581,190 +2558,188 @@ func init() { proto.RegisterType((*AppStatus)(nil), "pb.AppStatus") proto.RegisterMapType((map[string]string)(nil), "pb.AppStatus.ValuesEntry") proto.RegisterType((*AppDetectCondition)(nil), "pb.AppDetectCondition") - proto.RegisterType((*AppDetectConditions)(nil), "pb.AppDetectConditions") proto.RegisterType((*AppService)(nil), "pb.AppService") proto.RegisterType((*AppService_Pod)(nil), "pb.AppService.Pod") proto.RegisterType((*AppServices)(nil), "pb.AppServices") proto.RegisterType((*HelmAppReleases)(nil), "pb.HelmAppReleases") proto.RegisterType((*HelmAppRelease)(nil), "pb.HelmAppRelease") - proto.RegisterType((*HelmAppValuesReq)(nil), "pb.HelmAppValuesReq") - proto.RegisterType((*HelmAppValuesResp)(nil), "pb.HelmAppValuesResp") - proto.RegisterMapType((map[string]string)(nil), "pb.HelmAppValuesResp.ValuesEntry") + proto.RegisterType((*ParseHelmAppReq)(nil), "pb.ParseHelmAppReq") + proto.RegisterType((*ParseHelmAppResp)(nil), "pb.ParseHelmAppResp") + proto.RegisterMapType((map[string]string)(nil), "pb.ParseHelmAppResp.ValuesEntry") } func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2694 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x39, 0x4b, 0x73, 0xdb, 0xc8, - 0xd1, 0x22, 0x29, 0xbe, 0x9a, 0x12, 0x45, 0x8d, 0x5e, 0x34, 0x77, 0xd7, 0xf6, 0xe2, 0xb3, 0x5d, - 0x2e, 0x7b, 0x3f, 0xad, 0xad, 0xac, 0x63, 0xcb, 0xeb, 0x6c, 0x8a, 0x12, 0xb9, 0x32, 0x13, 0x8a, - 0x62, 0x41, 0x94, 0x53, 0x5b, 0x95, 0x2a, 0x16, 0x44, 0xcc, 0xca, 0x88, 0xf1, 0x18, 0x03, 0xa0, - 0x36, 0x3c, 0x26, 0xb7, 0x9c, 0x73, 0xc9, 0x3d, 0x87, 0x1c, 0x92, 0x63, 0x2a, 0xc7, 0xbd, 0xe7, - 0x90, 0xca, 0x4f, 0xd9, 0x4b, 0xce, 0xa9, 0x54, 0xcf, 0x0c, 0x80, 0x01, 0x09, 0xd9, 0x51, 0x1e, - 0x95, 0x1b, 0xba, 0xa7, 0x7b, 0xba, 0xa7, 0xa7, 0x5f, 0xd3, 0x80, 0xa6, 0xc1, 0xd8, 0xd8, 0x9f, - 0xba, 0xa1, 0xe5, 0xd0, 0x71, 0x40, 0xfd, 0x4b, 0xea, 0xef, 0x32, 0xdf, 0x0b, 0x3d, 0x92, 0x67, - 0xe7, 0x5a, 0x19, 0x8a, 0x5d, 0x87, 0x85, 0x33, 0xed, 0x16, 0x94, 0xda, 0x8c, 0xe9, 0xf4, 0x2d, - 0xd9, 0x82, 0x12, 0xb2, 0x58, 0x66, 0x33, 0x77, 0x3b, 0x77, 0xbf, 0xaa, 0x17, 0x0d, 0xc6, 0x7a, - 0xa6, 0x76, 0x17, 0x56, 0xda, 0x8c, 0x9d, 0x86, 0x46, 0x38, 0x0d, 0xde, 0x41, 0xf6, 0x29, 0xd4, - 0x4f, 0xa9, 0x7f, 0x69, 0x4d, 0xa8, 0x4e, 0xdf, 0x4e, 0x69, 0x10, 0x92, 0x8f, 0x00, 0x02, 0x81, - 0x49, 0x88, 0xab, 0x12, 0xd3, 0x33, 0xb5, 0x3d, 0x58, 0x93, 0x0c, 0x41, 0xc4, 0x71, 0x0b, 0x6a, - 0x09, 0x47, 0x20, 0x59, 0x20, 0x66, 0x09, 0xb4, 0x4f, 0x60, 0x75, 0x44, 0x5d, 0xc3, 0x0d, 0x23, - 0x8e, 0x0f, 0xa0, 0x1a, 0x72, 0x44, 0x22, 0xa2, 0x22, 0x10, 0x3d, 0x53, 0xfb, 0x45, 0x0e, 0x56, - 0x85, 0xde, 0xc7, 0x34, 0x08, 0x8c, 0x0b, 0x4a, 0x9e, 0x40, 0x29, 0xe0, 0x88, 0x66, 0xee, 0x76, - 0xe1, 0x7e, 0x6d, 0xef, 0xa3, 0x5d, 0x76, 0xbe, 0x9b, 0x22, 0x91, 0x50, 0xd7, 0x0d, 0xfd, 0x99, - 0x2e, 0x89, 0x5b, 0xfb, 0x50, 0x53, 0xd0, 0xa4, 0x01, 0x85, 0x37, 0x74, 0x26, 0xc5, 0xe1, 0x27, - 0xd9, 0x84, 0xe2, 0xa5, 0x61, 0x4f, 0x69, 0x33, 0x2f, 0x4c, 0xc2, 0x81, 0xe7, 0xf9, 0x67, 0x39, - 0x6d, 0x06, 0xb5, 0x8e, 0x15, 0xbc, 0x89, 0x14, 0x78, 0x04, 0x45, 0xd3, 0x0a, 0xde, 0x44, 0xf2, - 0x5b, 0x28, 0x5f, 0x59, 0xe7, 0xdf, 0x52, 0xb8, 0x20, 0x6c, 0x3d, 0x03, 0x48, 0x90, 0xef, 0x13, - 0x9d, 0x53, 0x45, 0x3b, 0xb0, 0x2e, 0x0d, 0xdc, 0x66, 0x6c, 0xe8, 0x99, 0x7d, 0x2b, 0x08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 0x17, 0xb3, 0xc5, 0x3d, 0x58, 0xf3, 0xa7, 0xae, 0x6b, 0xb9, 0x17, 0x63, 0xec, 0x6b, - 0xdc, 0xa9, 0xc3, 0xb3, 0x6e, 0x41, 0x5f, 0x95, 0xe8, 0x36, 0x63, 0x83, 0xa9, 0x43, 0x1e, 0xc3, - 0x96, 0x4a, 0x17, 0xbe, 0xb6, 0x7c, 0x93, 0x53, 0x03, 0xa7, 0x26, 0x09, 0xf5, 0x08, 0x97, 0x90, - 0xe5, 0x29, 0x34, 0x55, 0x16, 0xcb, 0x0d, 0xa9, 0xef, 0x1a, 0x36, 0xe7, 0xaa, 0x71, 0xae, 0xad, - 0x84, 0xab, 0x27, 0x57, 0x07, 0x53, 0x47, 0xfb, 0x7d, 0x0e, 0x48, 0xda, 0x5c, 0xbc, 0x8e, 0x1e, - 0x42, 0xd5, 0x97, 0x70, 0x54, 0x45, 0xef, 0x62, 0x30, 0x2c, 0x92, 0xee, 0x46, 0x40, 0x14, 0x53, - 0x31, 0x5f, 0x6b, 0x08, 0xf5, 0xf4, 0x62, 0xc6, 0x45, 0xde, 0x4f, 0x67, 0x70, 0xb2, 0x28, 0x44, - 0xbd, 0xdc, 0x5f, 0xe6, 0xe0, 0x46, 0xdb, 0x34, 0xf9, 0xb1, 0x87, 0x86, 0x1f, 0xce, 0x62, 0x17, - 0xc7, 0x7e, 0x91, 0xc0, 0xf2, 0x74, 0x1a, 0x97, 0x4f, 0xfe, 0x8d, 0x12, 0x83, 0xb8, 0x66, 0xe2, - 0x27, 0xa9, 0x43, 0xde, 0x62, 0x32, 0x73, 0xe6, 0x2d, 0x86, 0x5c, 0xcc, 0xf3, 0xc5, 0x85, 0x15, - 0x75, 0xfe, 0x8d, 0x0e, 0x61, 0x05, 0x63, 0xcf, 0xb5, 0x2d, 0x97, 0xf2, 0x3b, 0xaa, 0xe8, 0x15, - 0x2b, 0x38, 0xe1, 0x30, 0x57, 0xe2, 0x8c, 0xfd, 0x8f, 0x95, 0xa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xf5, 0x18, 0x6e, 0xed, 0x43, 0x4d, 0x51, - 0xfc, 0x5a, 0x0e, 0x3f, 0x82, 0x92, 0xb4, 0x78, 0x19, 0x0a, 0x83, 0x5e, 0x7f, 0xbe, 0x88, 0x03, - 0x94, 0x0e, 0xfb, 0x27, 0xa7, 0xbc, 0x82, 0xab, 0x85, 0xb9, 0x80, 0xd0, 0xe9, 0xa8, 0xad, 0xf3, - 0xb2, 0xbc, 0x2c, 0xa0, 0x93, 0xe1, 0x90, 0x97, 0x70, 0x6d, 0x04, 0xa4, 0xcd, 0x58, 0x87, 0x86, - 0x74, 0x82, 0xd9, 0xd9, 0xb4, 0x42, 0x3c, 0x42, 0x56, 0x9b, 0xb4, 0x09, 0x45, 0x34, 0xe7, 0x8c, - 0x6b, 0x56, 0xd1, 0x05, 0x80, 0x58, 0xea, 0xfb, 0x9e, 0x2f, 0xab, 0x90, 0x00, 0xb4, 0x63, 0xd8, - 0x58, 0xdc, 0x35, 0x20, 0xdf, 0xe7, 0x39, 0x5f, 0x42, 0x6a, 0x3e, 0x5e, 0x24, 0xd6, 0x15, 0x4a, - 0xed, 0x2f, 0x39, 0x00, 0xbc, 0x79, 0xe1, 0x96, 0x99, 0xd9, 0xb8, 0x09, 0x65, 0xc3, 0x34, 0x31, - 0x4e, 0xa3, 0xf6, 0x4f, 0x82, 0x78, 0x1d, 0xe1, 0x84, 0x0d, 0x3d, 0x3f, 0x14, 0x39, 0xb8, 0xa8, - 0xc7, 0x30, 0xae, 0x4d, 0x4d, 0xb9, 0xb6, 0x2c, 0xd6, 0x22, 0x18, 0x9b, 0x38, 0x65, 0x46, 0x43, - 0x22, 0xef, 0x13, 0x3a, 0x60, 0xdd, 0x11, 0xd3, 0x99, 0xd6, 0x63, 0x28, 0x0c, 0x3d, 0x33, 0x53, - 0xa9, 0x24, 0x34, 0xf2, 0x6a, 0x68, 0x68, 0xfb, 0x50, 0x4b, 0xb6, 0xc2, 0x02, 0x95, 0xcc, 0x77, - 0x84, 0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0x73, 0x3c, 0x23, 0x36, 0xb9, 0x72, 0x72, 0xb3, 0xb0, 0x49, 0xe6, 0x7c, 0x85, 0xc8, 0x91, 0xb2, - 0xfd, 0xcf, 0x6c, 0xf2, 0x19, 0x77, 0xbe, 0xe4, 0x99, 0xc5, 0x7d, 0x61, 0x6e, 0xa4, 0xd0, 0x8a, - 0x1e, 0x49, 0x02, 0xc3, 0xb9, 0xf0, 0x1e, 0xe7, 0xde, 0x12, 0xca, 0x45, 0x90, 0xf9, 0x4e, 0x9e, - 0xa2, 0xe9, 0x7e, 0xc4, 0xef, 0x0f, 0x63, 0x5a, 0x8d, 0xb7, 0x2c, 0xfb, 0xdf, 0x7c, 0x77, 0x37, - 0xc7, 0xdd, 0xf8, 0x03, 0xbc, 0x50, 0x99, 0x24, 0x16, 0xaa, 0x29, 0xc8, 0x88, 0x41, 0xed, 0x77, - 0xb2, 0xab, 0x28, 0x6a, 0xf4, 0x08, 0xd6, 0x70, 0x17, 0xb5, 0xe0, 0xa8, 0x9c, 0x6b, 0xe9, 0x52, - 0x83, 0x1c, 0x4f, 0x81, 0x28, 0x72, 0xa3, 0xba, 0xa0, 0x32, 0x6d, 0x2c, 0x96, 0x16, 0x64, 0x3c, - 0x80, 0x75, 0x85, 0x51, 0xe4, 0x2c, 0xb2, 0x99, 0x91, 0xe8, 0xde, 0x8a, 0xd8, 0x5d, 0x48, 0x7f, - 0xda, 0xd2, 0x79, 0x89, 0xff, 0xb2, 0xfe, 0xde, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x86, - 0xe6, 0xcc, 0xce, 0x1e, 0x00, 0x00, + // 2673 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x19, 0xcb, 0x6e, 0x1b, 0xc9, + 0x51, 0x24, 0xc5, 0x57, 0x51, 0xa2, 0xa8, 0xb6, 0x24, 0xd3, 0xdc, 0x87, 0xb5, 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xf5, 0x04, 0x97, 0x90, 0xe5, + 0x21, 0xb4, 0x55, 0x16, 0xcb, 0x0d, 0xa9, 0xef, 0x1a, 0x36, 0xe7, 0x6a, 0x70, 0xae, 0xed, 0x84, + 0x6b, 0x20, 0x57, 0x47, 0x73, 0x47, 0xfb, 0x53, 0x01, 0x48, 0xda, 0x5c, 0xbc, 0x8e, 0x1e, 0x40, + 0xdd, 0x97, 0x70, 0x54, 0x45, 0x6f, 0x61, 0x30, 0x2c, 0x93, 0xee, 0x45, 0x40, 0x14, 0x53, 0x31, + 0x5f, 0x67, 0x0c, 0xcd, 0xf4, 0x62, 0xce, 0x45, 0xde, 0x4e, 0x67, 0x70, 0xb2, 0x2c, 0x44, 0xbd, + 0xdc, 0xdf, 0x14, 0xe0, 0x46, 0xd7, 0x34, 0xf9, 0xb1, 0xc7, 0x86, 0x1f, 0x2e, 0x62, 0x17, 0xc7, + 0x7e, 0x91, 0xc0, 0xea, 0x7c, 0x1e, 0x97, 0x4f, 0xfe, 0x8d, 0x12, 0x83, 0xb8, 0x66, 0xe2, 0x27, + 0x69, 0x42, 0xd1, 0x62, 0x32, 0x73, 0x16, 0x2d, 0x86, 0x5c, 0xcc, 0xf3, 0xc5, 0x85, 0x95, 0x75, + 0xfe, 0x8d, 0x0e, 0x61, 0x05, 0x53, 0xcf, 0xb5, 0x2d, 0x97, 0xf2, 0x3b, 0xaa, 0xe9, 0x35, 0x2b, + 0x38, 0xe6, 0x30, 0x57, 0xe2, 0x94, 0xfd, 0x9f, 0x95, 0xa0, 0x70, 0xa3, 0x47, 0xed, 0xff, 0xb5, + 0x0e, 0xda, 0x6f, 0xd1, 0x3d, 0x96, 0x84, 0x7c, 0x8f, 0x87, 0x4c, 0x92, 0x66, 0x59, 0x4d, 0x9a, + 0xe9, 0xc3, 0x57, 0x32, 0x87, 0xff, 0x09, 0x5c, 0xcb, 0x39, 0x39, 0xb9, 0x0d, 0x25, 0xef, 0xec, + 0x97, 0xd2, 0x5d, 0x77, 0x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d5, 0xb2, 0x5d, 0x42, 0xe8, 0x64, 0xd2, 0xd5, 0x79, 0xd1, 0x5e, 0x15, 0xd0, 0xf1, + 0x78, 0xcc, 0x0b, 0xbc, 0x36, 0x01, 0xd2, 0x65, 0xac, 0x47, 0x43, 0x3a, 0xc3, 0xdc, 0x6d, 0x5a, + 0xa8, 0x67, 0x6e, 0x13, 0xb5, 0x05, 0x65, 0x34, 0xf6, 0x82, 0x6b, 0x56, 0xd3, 0x05, 0x80, 0x58, + 0xea, 0xfb, 0x9e, 0x2f, 0x6b, 0x94, 0x00, 0xb4, 0xbf, 0x17, 0x00, 0xf0, 0x22, 0x85, 0x97, 0xe5, + 0x26, 0xd7, 0x36, 0x54, 0x0d, 0xd3, 0xc4, 0xb0, 0x8b, 0xba, 0x39, 0x09, 0xa2, 0x75, 0xc3, 0x19, + 0x1b, 0x7b, 0x7e, 0x28, 0x52, 0x6a, 0x59, 0x8f, 0x61, 0x5c, 0x9b, 0x9b, 0x72, 0x6d, 0x55, 0xac, + 0x45, 0x30, 0xf6, 0x64, 0xca, 0xc8, 0x85, 0x44, 0xce, 0x24, 0x74, 0xc0, 0x32, 0x22, 0x86, 0x2d, + 0x9d, 0xfb, 0x50, 0x1a, 0x7b, 0x66, 0xae, 0x52, 0x89, 0xa7, 0x17, 0x55, 0x4f, 0xd7, 0x1e, 0x43, + 0x23, 0xd9, 0x0a, 0xeb, 0x4d, 0x32, 0xae, 0x11, 0x81, 0xdb, 0x4c, 0x4b, 0x4b, 0x06, 0x34, 0xda, + 0x11, 0x6c, 0xbc, 0xa0, 0xb6, 0xc3, 0x07, 0xf2, 0x36, 0x35, 0xb0, 0x5c, 0x3d, 0x81, 0xe6, 0xab, + 0x14, 0x4a, 0x6e, 0xc2, 0x55, 0x4e, 0x13, 0xeb, 0x19, 0x4a, 0xed, 0x6f, 0x05, 0x68, 0xa6, 0x49, + 0x52, 0xde, 0x58, 0xc8, 0x78, 0x63, 0x1b, 0xaa, 0x73, 0x66, 0x1a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0, 0x5c, 0x04, 0xc9, 0xf6, 0xec, 0x14, 0x4d, 0xf7, 0x53, + 0x7e, 0x7f, 0x5d, 0xc6, 0x52, 0xf1, 0x96, 0x67, 0xff, 0x0f, 0xdf, 0xde, 0xb7, 0x69, 0x2b, 0xe4, + 0x1e, 0x6c, 0xe0, 0x85, 0xaa, 0x55, 0x04, 0x64, 0x94, 0xa0, 0xc6, 0x1b, 0xe9, 0xfa, 0x81, 0xd2, + 0x1f, 0x02, 0x41, 0x8e, 0x4c, 0xb2, 0x57, 0x99, 0xae, 0x2d, 0xd7, 0x0b, 0x64, 0x7c, 0x0a, 0x6b, + 0x6a, 0xa2, 0x12, 0x26, 0xca, 0xa4, 0xde, 0xce, 0x56, 0x5e, 0x3e, 0xd3, 0x56, 0xce, 0x2a, 0xfc, + 0x7f, 0xf2, 0x8f, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xab, 0xf6, 0xbd, 0xe0, 0x6b, 0x1e, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2794,10 +2769,9 @@ type AppRuntimeSyncClient interface { GetPodDetail(ctx context.Context, in *GetPodDetailReq, opts ...grpc.CallOption) (*PodDetail, error) GetStorageClasses(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StorageClasses, error) GetAppVolumeStatus(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceVolumeStatusMessage, error) - ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) ListHelmAppRelease(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*HelmAppReleases, error) - ListHelmAppValues(ctx context.Context, in *HelmAppValuesReq, opts ...grpc.CallOption) (*HelmAppValuesResp, error) + ParseHelmApp(ctx context.Context, in *ParseHelmAppReq, opts ...grpc.CallOption) (*ParseHelmAppResp, error) } type appRuntimeSyncClient struct { @@ -2934,15 +2908,6 @@ func (c *appRuntimeSyncClient) GetAppVolumeStatus(ctx context.Context, in *Servi return out, nil } -func (c *appRuntimeSyncClient) ListHelmAppDetectConditions(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppDetectConditions, error) { - out := new(AppDetectConditions) - err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListHelmAppDetectConditions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *appRuntimeSyncClient) ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) { out := new(AppServices) err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListAppServices", in, out, opts...) @@ -2961,9 +2926,9 @@ func (c *appRuntimeSyncClient) ListHelmAppRelease(ctx context.Context, in *AppRe return out, nil } -func (c *appRuntimeSyncClient) ListHelmAppValues(ctx context.Context, in *HelmAppValuesReq, opts ...grpc.CallOption) (*HelmAppValuesResp, error) { - out := new(HelmAppValuesResp) - err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ListHelmAppValues", in, out, opts...) +func (c *appRuntimeSyncClient) ParseHelmApp(ctx context.Context, in *ParseHelmAppReq, opts ...grpc.CallOption) (*ParseHelmAppResp, error) { + out := new(ParseHelmAppResp) + err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ParseHelmApp", in, out, opts...) if err != nil { return nil, err } @@ -2987,10 +2952,9 @@ type AppRuntimeSyncServer interface { GetPodDetail(context.Context, *GetPodDetailReq) (*PodDetail, error) GetStorageClasses(context.Context, *Empty) (*StorageClasses, error) GetAppVolumeStatus(context.Context, *ServiceRequest) (*ServiceVolumeStatusMessage, error) - ListHelmAppDetectConditions(context.Context, *AppReq) (*AppDetectConditions, error) ListAppServices(context.Context, *AppReq) (*AppServices, error) ListHelmAppRelease(context.Context, *AppReq) (*HelmAppReleases, error) - ListHelmAppValues(context.Context, *HelmAppValuesReq) (*HelmAppValuesResp, error) + ParseHelmApp(context.Context, *ParseHelmAppReq) (*ParseHelmAppResp, error) } func RegisterAppRuntimeSyncServer(s *grpc.Server, srv AppRuntimeSyncServer) { @@ -3249,24 +3213,6 @@ func _AppRuntimeSync_GetAppVolumeStatus_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } -func _AppRuntimeSync_ListHelmAppDetectConditions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AppReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppRuntimeSyncServer).ListHelmAppDetectConditions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.AppRuntimeSync/ListHelmAppDetectConditions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppRuntimeSyncServer).ListHelmAppDetectConditions(ctx, req.(*AppReq)) - } - return interceptor(ctx, in, info, handler) -} - func _AppRuntimeSync_ListAppServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AppReq) if err := dec(in); err != nil { @@ -3303,20 +3249,20 @@ func _AppRuntimeSync_ListHelmAppRelease_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } -func _AppRuntimeSync_ListHelmAppValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HelmAppValuesReq) +func _AppRuntimeSync_ParseHelmApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParseHelmAppReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AppRuntimeSyncServer).ListHelmAppValues(ctx, in) + return srv.(AppRuntimeSyncServer).ParseHelmApp(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.AppRuntimeSync/ListHelmAppValues", + FullMethod: "/pb.AppRuntimeSync/ParseHelmApp", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppRuntimeSyncServer).ListHelmAppValues(ctx, req.(*HelmAppValuesReq)) + return srv.(AppRuntimeSyncServer).ParseHelmApp(ctx, req.(*ParseHelmAppReq)) } return interceptor(ctx, in, info, handler) } @@ -3381,10 +3327,6 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ MethodName: "GetAppVolumeStatus", Handler: _AppRuntimeSync_GetAppVolumeStatus_Handler, }, - { - MethodName: "ListHelmAppDetectConditions", - Handler: _AppRuntimeSync_ListHelmAppDetectConditions_Handler, - }, { MethodName: "ListAppServices", Handler: _AppRuntimeSync_ListAppServices_Handler, @@ -3394,8 +3336,8 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ Handler: _AppRuntimeSync_ListHelmAppRelease_Handler, }, { - MethodName: "ListHelmAppValues", - Handler: _AppRuntimeSync_ListHelmAppValues_Handler, + MethodName: "ParseHelmApp", + Handler: _AppRuntimeSync_ParseHelmApp_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index e368bc0a5..c362c6159 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -17,10 +17,9 @@ service AppRuntimeSync { rpc GetPodDetail(GetPodDetailReq) returns (PodDetail) {} rpc GetStorageClasses(Empty) returns (StorageClasses) {} rpc GetAppVolumeStatus(ServiceRequest) returns(ServiceVolumeStatusMessage){} - rpc ListHelmAppDetectConditions(AppReq) returns(AppDetectConditions){} rpc ListAppServices(AppReq) returns(AppServices){} rpc ListHelmAppRelease(AppReq) returns(HelmAppReleases){} - rpc ListHelmAppValues(HelmAppValuesReq) returns(HelmAppValuesResp){} + rpc ParseHelmApp(ParseHelmAppReq) returns(ParseHelmAppResp){} } message Empty {} @@ -267,6 +266,7 @@ message AppStatus { repeated string overrides = 9; string version = 10; int32 revision = 11; + string questions = 12; } message AppDetectCondition { @@ -275,10 +275,6 @@ message AppDetectCondition { string error = 3; } -message AppDetectConditions { - repeated AppDetectCondition conditions = 1; -} - message AppService { message Pod { string name=1; @@ -309,7 +305,7 @@ message HelmAppRelease { string description=6; } -message HelmAppValuesReq { +message ParseHelmAppReq { string templateName=1; string version=2; string repoName=3; @@ -317,6 +313,7 @@ message HelmAppValuesReq { string repoURL=5; } -message HelmAppValuesResp { +message ParseHelmAppResp { map values=1; + string questions=2; } \ No newline at end of file diff --git a/worker/server/server.go b/worker/server/server.go index 8bd246cfa..71456e9d4 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -194,34 +194,7 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, Revision: int32(helmApp.Status.CurrentRevision), Values: helmApp.Status.Values, Overrides: helmApp.Status.Overrides, - }, nil -} - -func (r *RuntimeServer) ListHelmAppDetectConditions(ctx context.Context, appReq *pb.AppReq) (*pb.AppDetectConditions, error) { - app, err := db.GetManager().ApplicationDao().GetAppByID(appReq.AppId) - if err != nil { - return nil, err - } - - helmApp, err := r.store.GetHelmApp(app.TenantID, app.AppName) - if err != nil { - return nil, err - } - - var conditions []*pb.AppDetectCondition - for _, condition := range helmApp.Status.Conditions { - if condition.Type == v1alpha1.HelmAppInstalled { - continue - } - conditions = append(conditions, &pb.AppDetectCondition{ - Type: string(condition.Type), - Ready: condition.Status == corev1.ConditionTrue, - Error: condition.Message, - }) - } - - return &pb.AppDetectConditions{ - Conditions: conditions, + Questions: helmApp.Status.Questions, }, nil } @@ -340,7 +313,7 @@ func (r *RuntimeServer) GetMultiAppPods(ctx context.Context, re *pb.ServicesRequ return &res, nil } -func (r *RuntimeServer) ListHelmAppValues(ctx context.Context, req *pb.HelmAppValuesReq) (*pb.HelmAppValuesResp, error) { +func (r *RuntimeServer) ParseHelmApp(ctx context.Context, req *pb.ParseHelmAppReq) (*pb.ParseHelmAppResp, error) { helmApp := &v1alpha1.HelmApp{ Spec: v1alpha1.HelmAppSpec{ EID: req.Eid, @@ -362,13 +335,14 @@ func (r *RuntimeServer) ListHelmAppValues(ctx context.Context, req *pb.HelmAppVa return nil, errors.WithMessage(err, "pull chart") } - values, _, err := app.ParseChart() + values, _, questions, err := app.ParseChart() if err != nil { return nil, err } - return &pb.HelmAppValuesResp{ - Values: values, + return &pb.ParseHelmAppResp{ + Values: values, + Questions: questions, }, nil } From aa3423f3bd1603d9ed400cc401922fd315f2ff6c Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Sat, 8 May 2021 14:05:00 +0800 Subject: [PATCH 33/65] load chart --- api/handler/application_handler.go | 4 - api/model/app.go | 18 +- config/crd/rainbond.goodrain.io_helmapps.yaml | 19 - pkg/apis/rainbond/v1alpha1/helmapp_types.go | 20 - .../v1alpha1/zz_generated.deepcopy.go | 7 - worker/controllers/helmapp/app.go | 35 +- worker/controllers/helmapp/controlloop.go | 5 - .../controllers/helmapp/controlloop_test.go | 14 +- worker/controllers/helmapp/detector.go | 18 +- worker/controllers/helmapp/helm/helm.go | 82 ++- worker/controllers/helmapp/status.go | 1 - worker/server/pb/app_runtime_server.pb.go | 551 ++++++------------ worker/server/pb/app_runtime_server.proto | 28 +- worker/server/server.go | 68 +-- 14 files changed, 269 insertions(+), 601 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 445db4e28..5b1b89ba8 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -420,11 +420,7 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat Disk: int64(diskUsage), Phase: status.Phase, Overrides: status.Overrides, - Values: status.Values, - Readme: status.Readme, Version: status.Version, - Revision: int(status.Revision), - Questions: status.Questions, } return res, nil } diff --git a/api/model/app.go b/api/model/app.go index e976b1f72..edb881f29 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -10,17 +10,13 @@ type AppPort struct { // AppStatus - type AppStatus struct { - Status string `json:"status"` - Cpu *int64 `json:"cpu"` - Memory *int64 `json:"memory"` - Disk int64 `json:"disk"` - Phase string `json:"phase"` - Values map[string]string `json:"values"` - Readme string `json:"readme"` - Version string `json:"version"` - Revision int `json:"revision"` - Overrides []string `json:"overrides"` - Questions string `json:"questions"` + Status string `json:"status"` + Cpu *int64 `json:"cpu"` + Memory *int64 `json:"memory"` + Disk int64 `json:"disk"` + Phase string `json:"phase"` + Version string `json:"version"` + Overrides []string `json:"overrides"` } // AppService - diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.goodrain.io_helmapps.yaml index ffc45b87c..c5916be41 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.goodrain.io_helmapps.yaml @@ -127,10 +127,6 @@ spec: - type type: object type: array - currentRevision: - description: The actual revision of the helm app, as same as the revision - from 'helm status' - type: integer currentVersion: description: The version infect. type: string @@ -142,24 +138,9 @@ spec: phase: description: The phase of the helm app. type: string - readme: - description: The base64 encoded string from README.md - type: string status: description: The status of helm app. type: string - targetRevision: - description: TargetRevision is the revision that used to rollback the - helm app. After executing command 'helm rollback [appName] [targetRevision]', - the actual revision of helm app is currentRevision, not targetRevision. - The new currentRevision is equals to the origin currentRevision plus - one. - type: integer - values: - additionalProperties: - type: string - description: The base64 encoded string from values.yaml - type: object required: - phase - status diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index b976d3756..ea0bf979a 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -80,8 +80,6 @@ const ( HelmAppChartReady HelmAppConditionType = "ChartReady" // HelmAppPreInstalled indicates whether the helm app has been pre installed. HelmAppPreInstalled HelmAppConditionType = "PreInstalled" - // HelmAppPreInstalled indicates whether the chart has been parsed. - HelmAppChartParsed HelmAppConditionType = "ChartParsed" // HelmAppInstalled indicates whether the helm app has been installed. HelmAppInstalled HelmAppConditionType = "HelmAppInstalled" ) @@ -184,27 +182,9 @@ type HelmAppStatus struct { // Current state of helm app. Conditions []HelmAppCondition `json:"conditions,omitempty"` - // The actual revision of the helm app, as same as the revision from 'helm status' - CurrentRevision int `json:"currentRevision,omitempty"` - - // TargetRevision is the revision that used to rollback the helm app. - // After executing command 'helm rollback [appName] [targetRevision]', the actual - // revision of helm app is currentRevision, not targetRevision. - // The new currentRevision is equals to the origin currentRevision plus one. - TargetRevision int `json:"targetRevision,omitempty"` - // The version infect. CurrentVersion string `json:"currentVersion,omitempty"` - // The base64 encoded string from values.yaml - Values map[string]string `json:"values,omitempty"` - - // The base64 encoded string from README.md - Readme string `json:"readme,omitempty"` - - // The base64 encoded string from questions.yaml - Questions string `json:"questions,omitempty"` - // Overrides in effect. Overrides []string `json:"overrides,omitempty"` } diff --git a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index e0e46b348..6006769c2 100644 --- a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -136,13 +136,6 @@ func (in *HelmAppStatus) DeepCopyInto(out *HelmAppStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } if in.Overrides != nil { in, out := &in.Overrides, &out.Overrides *out = make([]string, len(*in)) diff --git a/worker/controllers/helmapp/app.go b/worker/controllers/helmapp/app.go index 3db5e8892..bcec37025 100644 --- a/worker/controllers/helmapp/app.go +++ b/worker/controllers/helmapp/app.go @@ -52,6 +52,7 @@ func (a *App) Chart() string { return a.repoName + "/" + a.templateName } +// NewApp creates a new app. func NewApp(ctx context.Context, kubeClient clientset.Interface, rainbondClient versioned.Interface, helmApp *v1alpha1.HelmApp, repoFile, repoCache string) (*App, error) { helmCmd, err := helm.NewHelm(helmApp.GetNamespace(), repoFile, repoCache) if err != nil { @@ -115,7 +116,6 @@ func (a *App) NeedDetect() bool { conditionTypes := []v1alpha1.HelmAppConditionType{ v1alpha1.HelmAppChartReady, v1alpha1.HelmAppPreInstalled, - v1alpha1.HelmAppChartParsed, } for _, t := range conditionTypes { if !a.helmApp.Status.IsConditionTrue(t) { @@ -133,11 +133,6 @@ func (a *App) NeedUpdate() bool { return !a.helmApp.OverridesEqual() || a.helmApp.Spec.Version != a.helmApp.Status.CurrentVersion } -// NeedRollback checks if the helmApp needed to be rollback -func (a *App) NeedRollback() bool { - return a.helmApp.Spec.Revision != 0 && a.helmApp.Spec.Revision != a.helmApp.Status.TargetRevision -} - func (a *App) Setup() error { a.log.Info("setup the helm app") // setup default PreStatus @@ -227,12 +222,14 @@ func (a *App) Detect() error { return a.UpdateStatus() } -func (a *App) Pull() error { +// LoadChart loads the chart from repository. +func (a *App) LoadChart() error { if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { return err } - return a.helmCmd.Pull(a.chart(), a.version, a.chartDir) + _, err := a.helmCmd.Load(a.chart(), a.version) + return err } func (a *App) chart() string { @@ -244,10 +241,7 @@ func (a *App) PreInstall() error { return err } - if err := a.helmCmd.PreInstall(a.name, a.Chart(), a.version); err != nil { - return err - } - return nil + return a.helmCmd.PreInstall(a.name, a.Chart(), a.version) } func (a *App) Status() (*release.Release, error) { @@ -377,20 +371,3 @@ func (a *App) fileInRootChart(filename string) (string, error) { func (a *App) Uninstall() error { return a.helmCmd.Uninstall(a.name) } - -func (a *App) Rollback() error { - if err := a.rollback(); err != nil { - a.recorder.Event(a.helmApp, corev1.EventTypeWarning, "RollBackFailed", err.Error()) - return a.UpdateStatus() - } - - a.helmApp.Status.TargetRevision = a.helmApp.Spec.Revision - return a.UpdateStatus() -} - -func (a *App) rollback() error { - if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { - return err - } - return a.helmCmd.Rollback(a.name, a.revision) -} diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 0c2b9f86a..af36946d2 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -19,7 +19,6 @@ const ( var defaultConditionTypes = []v1alpha1.HelmAppConditionType{ v1alpha1.HelmAppChartReady, - v1alpha1.HelmAppChartParsed, v1alpha1.HelmAppPreInstalled, v1alpha1.HelmAppInstalled, } @@ -119,9 +118,5 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { return app.InstallOrUpdate() } - if app.NeedRollback() { - return app.Rollback() - } - return nil } diff --git a/worker/controllers/helmapp/controlloop_test.go b/worker/controllers/helmapp/controlloop_test.go index b56a242c6..f21a0e2ec 100644 --- a/worker/controllers/helmapp/controlloop_test.go +++ b/worker/controllers/helmapp/controlloop_test.go @@ -7,7 +7,6 @@ import ( "github.com/goodrain/rainbond/util" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -103,7 +102,6 @@ var _ = Describe("ControlLoop", func() { conditionTypes := []rainbondv1alpha1.HelmAppConditionType{ rainbondv1alpha1.HelmAppChartReady, - rainbondv1alpha1.HelmAppChartParsed, rainbondv1alpha1.HelmAppPreInstalled, } @@ -151,16 +149,8 @@ var _ = Describe("ControlLoop", func() { }) func waitUntilConfiguring(helmApp *rainbondv1alpha1.HelmApp) error { - newHelmApp, err := waitPhaseUntil(helmApp, rainbondv1alpha1.HelmAppStatusPhaseConfiguring) - if err != nil { - return err - } - - if newHelmApp.Status.Readme == "" || - len(newHelmApp.Status.Values) == 0 { - return errors.New("phase is configuring, but readme and values are empty") - } - return nil + _, err := waitPhaseUntil(helmApp, rainbondv1alpha1.HelmAppStatusPhaseConfiguring) + return err } func waitUntilInstalled(helmApp *rainbondv1alpha1.HelmApp) error { diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index d60fef500..509d10526 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -31,9 +31,9 @@ func (d *Detector) Detect() error { } } - // pull chart + // load chart if !d.helmApp.Status.IsConditionTrue(v1alpha1.HelmAppChartReady) { - err := d.app.Pull() + err := d.app.LoadChart() if err != nil { d.helmApp.Status.UpdateCondition(v1alpha1.NewHelmAppCondition( v1alpha1.HelmAppChartReady, corev1.ConditionFalse, "ChartFailed", err.Error())) @@ -54,19 +54,5 @@ func (d *Detector) Detect() error { return nil } - // parse chart - if !d.helmApp.Status.IsConditionTrue(v1alpha1.HelmAppChartParsed) { - values, readme, questions, err := d.app.ParseChart() - if err != nil { - d.helmApp.Status.UpdateCondition(v1alpha1.NewHelmAppCondition( - v1alpha1.HelmAppChartParsed, corev1.ConditionFalse, "ChartParsed", err.Error())) - return err - } - d.helmApp.Status.UpdateConditionStatus(v1alpha1.HelmAppChartParsed, corev1.ConditionTrue) - d.helmApp.Status.Values = values - d.helmApp.Status.Readme = readme - d.helmApp.Status.Questions = questions - } - return nil } diff --git a/worker/controllers/helmapp/helm/helm.go b/worker/controllers/helmapp/helm/helm.go index 3ab3b2160..238409644 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/worker/controllers/helmapp/helm/helm.go @@ -5,6 +5,8 @@ import ( "io" "io/ioutil" "os" + "path" + "strings" "unsafe" "github.com/goodrain/rainbond/util/commonutil" @@ -17,8 +19,10 @@ import ( "helm.sh/helm/v3/pkg/downloader" "helm.sh/helm/v3/pkg/getter" "helm.sh/helm/v3/pkg/kube" + "helm.sh/helm/v3/pkg/provenance" "helm.sh/helm/v3/pkg/release" "helm.sh/helm/v3/pkg/releaseutil" + "helm.sh/helm/v3/pkg/repo" "helm.sh/helm/v3/pkg/strvals" helmtime "helm.sh/helm/v3/pkg/time" "k8s.io/cli-runtime/pkg/genericclioptions" @@ -89,12 +93,61 @@ func (h *Helm) Install(name, chart, version string, overrides []string) error { return err } -func (h *Helm) Manifests(name, chart, version string, overrides []string, out io.Writer) (string, error) { - rel, err := h.install(name, chart, version, overrides, true, out) +func (h *Helm) locateChart(chart, version string) (string, error) { + cp := path.Join(h.settings.RepositoryCache, chart, version) + if f, err := os.Open(cp); err == nil { + defer f.Close() + + // check if the chart file is up to date. + hash, err := provenance.Digest(f) + if err != nil { + return "", errors.Wrap(err, "digist chart file") + } + + // get digiest from repo index. + digest, err := h.getDigest(chart, version) + if err != nil { + return "", err + } + + if hash == digest { + return cp, nil + } + } + + cpo := &action.ChartPathOptions{} + cp, err := cpo.LocateChart(chart, h.settings) if err != nil { return "", err } - return rel.Manifest, nil + + return cp, err +} + +func (h *Helm) getDigest(chart, version string) (string, error) { + repoAndApp := strings.Split(chart, "/") + if len(repoAndApp) != 2 { + return "", errors.New("wrong chart format, expect repo/name, but got " + chart) + } + repoName, appName := repoAndApp[0], repoAndApp[1] + + indexFile, err := repo.LoadIndexFile(path.Join(h.repoCache, repoName+"-index.yaml")) + if err != nil { + return "", errors.Wrap(err, "load index file") + } + + entries, ok := indexFile.Entries[appName] + if !ok { + return "", errors.New(fmt.Sprintf("chart(%s) not found", chart)) + } + + for _, entry := range entries { + if entry.Version == version { + return entry.Digest, nil + } + } + + return "", errors.New(fmt.Sprintf("chart(%s) version(%s) not found", chart, version)) } func (h *Helm) install(name, chart, version string, overrides []string, dryRun bool, out io.Writer) (*release.Release, error) { @@ -104,7 +157,7 @@ func (h *Helm) install(name, chart, version string, overrides []string, dryRun b client.Version = version client.DryRun = dryRun - cp, err := client.ChartPathOptions.LocateChart(chart, h.settings) + cp, err := h.locateChart(chart, version) if err != nil { return nil, err } @@ -178,7 +231,7 @@ func (h *Helm) Upgrade(name string, chart, version string, overrides []string) e client.Namespace = h.namespace client.Version = version - chartPath, err := client.ChartPathOptions.LocateChart(chart, h.settings) + chartPath, err := h.locateChart(chart, version) if err != nil { return err } @@ -262,22 +315,9 @@ func (h *Helm) History(name string) (ReleaseHistory, error) { return releaseHistory, nil } -func (h *Helm) Pull(chart, version, chartDir string) error { - client := action.NewPull() - settings := cli.New() - settings.RepositoryConfig = h.repoFile - settings.RepositoryCache = h.repoCache - client.Settings = settings - client.DestDir = chartDir - client.Version = version - client.Untar = true - - if err := os.RemoveAll(chartDir); err != nil { - return errors.WithMessage(err, "clean up chart dir") - } - - _, err := client.Run(chart) - return err +// Load loads the chart from the repository. +func (h *Helm) Load(chart, version string) (string, error) { + return h.locateChart(chart, version) } // checkIfInstallable validates if a chart can be installed diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index d25a82a96..e889938bc 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -62,7 +62,6 @@ func (s *Status) isDetected() bool { types := []v1alpha1.HelmAppConditionType{ v1alpha1.HelmAppChartReady, v1alpha1.HelmAppPreInstalled, - v1alpha1.HelmAppChartParsed, } for _, t := range types { if !s.helmApp.Status.IsConditionTrue(t) { diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index adf15b798..59efa3bb0 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -1933,21 +1933,17 @@ func (m *ServiceVolumeStatusMessage) GetStatus() map[string]ServiceVolumeStatus } type AppStatus struct { - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Cpu int64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` - Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` - Phase string `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` - Values map[string]string `protobuf:"bytes,5,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Readme string `protobuf:"bytes,6,opt,name=readme,proto3" json:"readme,omitempty"` - SetCPU bool `protobuf:"varint,7,opt,name=setCPU,proto3" json:"setCPU,omitempty"` - SetMemory bool `protobuf:"varint,8,opt,name=setMemory,proto3" json:"setMemory,omitempty"` - Overrides []string `protobuf:"bytes,9,rep,name=overrides,proto3" json:"overrides,omitempty"` - Version string `protobuf:"bytes,10,opt,name=version,proto3" json:"version,omitempty"` - Revision int32 `protobuf:"varint,11,opt,name=revision,proto3" json:"revision,omitempty"` - Questions string `protobuf:"bytes,12,opt,name=questions,proto3" json:"questions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Cpu int64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` + SetCPU bool `protobuf:"varint,4,opt,name=setCPU,proto3" json:"setCPU,omitempty"` + SetMemory bool `protobuf:"varint,5,opt,name=setMemory,proto3" json:"setMemory,omitempty"` + Phase string `protobuf:"bytes,6,opt,name=phase,proto3" json:"phase,omitempty"` + Overrides []string `protobuf:"bytes,7,rep,name=overrides,proto3" json:"overrides,omitempty"` + Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AppStatus) Reset() { *m = AppStatus{} } @@ -1996,27 +1992,6 @@ func (m *AppStatus) GetMemory() int64 { return 0 } -func (m *AppStatus) GetPhase() string { - if m != nil { - return m.Phase - } - return "" -} - -func (m *AppStatus) GetValues() map[string]string { - if m != nil { - return m.Values - } - return nil -} - -func (m *AppStatus) GetReadme() string { - if m != nil { - return m.Readme - } - return "" -} - func (m *AppStatus) GetSetCPU() bool { if m != nil { return m.SetCPU @@ -2031,6 +2006,13 @@ func (m *AppStatus) GetSetMemory() bool { return false } +func (m *AppStatus) GetPhase() string { + if m != nil { + return m.Phase + } + return "" +} + func (m *AppStatus) GetOverrides() []string { if m != nil { return m.Overrides @@ -2045,20 +2027,6 @@ func (m *AppStatus) GetVersion() string { return "" } -func (m *AppStatus) GetRevision() int32 { - if m != nil { - return m.Revision - } - return 0 -} - -func (m *AppStatus) GetQuestions() string { - if m != nil { - return m.Questions - } - return "" -} - type AppDetectCondition struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready,omitempty"` @@ -2389,124 +2357,6 @@ func (m *HelmAppRelease) GetDescription() string { return "" } -type ParseHelmAppReq struct { - TemplateName string `protobuf:"bytes,1,opt,name=templateName,proto3" json:"templateName,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - RepoName string `protobuf:"bytes,3,opt,name=repoName,proto3" json:"repoName,omitempty"` - Eid string `protobuf:"bytes,4,opt,name=eid,proto3" json:"eid,omitempty"` - RepoURL string `protobuf:"bytes,5,opt,name=repoURL,proto3" json:"repoURL,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ParseHelmAppReq) Reset() { *m = ParseHelmAppReq{} } -func (m *ParseHelmAppReq) String() string { return proto.CompactTextString(m) } -func (*ParseHelmAppReq) ProtoMessage() {} -func (*ParseHelmAppReq) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{37} -} - -func (m *ParseHelmAppReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ParseHelmAppReq.Unmarshal(m, b) -} -func (m *ParseHelmAppReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ParseHelmAppReq.Marshal(b, m, deterministic) -} -func (m *ParseHelmAppReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParseHelmAppReq.Merge(m, src) -} -func (m *ParseHelmAppReq) XXX_Size() int { - return xxx_messageInfo_ParseHelmAppReq.Size(m) -} -func (m *ParseHelmAppReq) XXX_DiscardUnknown() { - xxx_messageInfo_ParseHelmAppReq.DiscardUnknown(m) -} - -var xxx_messageInfo_ParseHelmAppReq proto.InternalMessageInfo - -func (m *ParseHelmAppReq) GetTemplateName() string { - if m != nil { - return m.TemplateName - } - return "" -} - -func (m *ParseHelmAppReq) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *ParseHelmAppReq) GetRepoName() string { - if m != nil { - return m.RepoName - } - return "" -} - -func (m *ParseHelmAppReq) GetEid() string { - if m != nil { - return m.Eid - } - return "" -} - -func (m *ParseHelmAppReq) GetRepoURL() string { - if m != nil { - return m.RepoURL - } - return "" -} - -type ParseHelmAppResp struct { - Values map[string]string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Questions string `protobuf:"bytes,2,opt,name=questions,proto3" json:"questions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ParseHelmAppResp) Reset() { *m = ParseHelmAppResp{} } -func (m *ParseHelmAppResp) String() string { return proto.CompactTextString(m) } -func (*ParseHelmAppResp) ProtoMessage() {} -func (*ParseHelmAppResp) Descriptor() ([]byte, []int) { - return fileDescriptor_f94cf1a886c479d6, []int{38} -} - -func (m *ParseHelmAppResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ParseHelmAppResp.Unmarshal(m, b) -} -func (m *ParseHelmAppResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ParseHelmAppResp.Marshal(b, m, deterministic) -} -func (m *ParseHelmAppResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParseHelmAppResp.Merge(m, src) -} -func (m *ParseHelmAppResp) XXX_Size() int { - return xxx_messageInfo_ParseHelmAppResp.Size(m) -} -func (m *ParseHelmAppResp) XXX_DiscardUnknown() { - xxx_messageInfo_ParseHelmAppResp.DiscardUnknown(m) -} - -var xxx_messageInfo_ParseHelmAppResp proto.InternalMessageInfo - -func (m *ParseHelmAppResp) GetValues() map[string]string { - if m != nil { - return m.Values - } - return nil -} - -func (m *ParseHelmAppResp) GetQuestions() string { - if m != nil { - return m.Questions - } - return "" -} - func init() { proto.RegisterEnum("pb.ServiceVolumeStatus", ServiceVolumeStatus_name, ServiceVolumeStatus_value) proto.RegisterEnum("pb.PodStatus_Type", PodStatus_Type_name, PodStatus_Type_value) @@ -2556,190 +2406,176 @@ func init() { proto.RegisterType((*ServiceVolumeStatusMessage)(nil), "pb.ServiceVolumeStatusMessage") proto.RegisterMapType((map[string]ServiceVolumeStatus)(nil), "pb.ServiceVolumeStatusMessage.StatusEntry") proto.RegisterType((*AppStatus)(nil), "pb.AppStatus") - proto.RegisterMapType((map[string]string)(nil), "pb.AppStatus.ValuesEntry") proto.RegisterType((*AppDetectCondition)(nil), "pb.AppDetectCondition") proto.RegisterType((*AppService)(nil), "pb.AppService") proto.RegisterType((*AppService_Pod)(nil), "pb.AppService.Pod") proto.RegisterType((*AppServices)(nil), "pb.AppServices") proto.RegisterType((*HelmAppReleases)(nil), "pb.HelmAppReleases") proto.RegisterType((*HelmAppRelease)(nil), "pb.HelmAppRelease") - proto.RegisterType((*ParseHelmAppReq)(nil), "pb.ParseHelmAppReq") - proto.RegisterType((*ParseHelmAppResp)(nil), "pb.ParseHelmAppResp") - proto.RegisterMapType((map[string]string)(nil), "pb.ParseHelmAppResp.ValuesEntry") } func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x19, 0xcb, 0x6e, 0x1b, 0xc9, - 0x51, 0x24, 0xc5, 0x57, 0x51, 0xa2, 0xa8, 0xb6, 0x24, 0xd3, 0xdc, 0x87, 0xb5, 0x93, 0xf5, 0xc2, - 0x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0xe5, - 0x21, 0xb4, 0x55, 0x16, 0xcb, 0x0d, 0xa9, 0xef, 0x1a, 0x36, 0xe7, 0x6a, 0x70, 0xae, 0xed, 0x84, - 0x6b, 0x20, 0x57, 0x47, 0x73, 0x47, 0xfb, 0x53, 0x01, 0x48, 0xda, 0x5c, 0xbc, 0x8e, 0x1e, 0x40, - 0xdd, 0x97, 0x70, 0x54, 0x45, 0x6f, 0x61, 0x30, 0x2c, 0x93, 0xee, 0x45, 0x40, 0x14, 0x53, 0x31, - 0x5f, 0x67, 0x0c, 0xcd, 0xf4, 0x62, 0xce, 0x45, 0xde, 0x4e, 0x67, 0x70, 0xb2, 0x2c, 0x44, 0xbd, - 0xdc, 0xdf, 0x14, 0xe0, 0x46, 0xd7, 0x34, 0xf9, 0xb1, 0xc7, 0x86, 0x1f, 0x2e, 0x62, 0x17, 0xc7, - 0x7e, 0x91, 0xc0, 0xea, 0x7c, 0x1e, 0x97, 0x4f, 0xfe, 0x8d, 0x12, 0x83, 0xb8, 0x66, 0xe2, 0x27, - 0x69, 0x42, 0xd1, 0x62, 0x32, 0x73, 0x16, 0x2d, 0x86, 0x5c, 0xcc, 0xf3, 0xc5, 0x85, 0x95, 0x75, - 0xfe, 0x8d, 0x0e, 0x61, 0x05, 0x53, 0xcf, 0xb5, 0x2d, 0x97, 0xf2, 0x3b, 0xaa, 0xe9, 0x35, 0x2b, - 0x38, 0xe6, 0x30, 0x57, 0xe2, 0x94, 0xfd, 0x9f, 0x95, 0xa0, 0x70, 0xa3, 0x47, 0xed, 0xff, 0xb5, - 0x0e, 0xda, 0x6f, 0xd1, 0x3d, 0x96, 0x84, 0x7c, 0x8f, 0x87, 0x4c, 0x92, 0x66, 0x59, 0x4d, 0x9a, - 0xe9, 0xc3, 0x57, 0x32, 0x87, 0xff, 0x09, 0x5c, 0xcb, 0x39, 0x39, 0xb9, 0x0d, 0x25, 0xef, 0xec, - 0x97, 0xd2, 0x5d, 0x77, 0xb8, 0x27, 0x2d, 0x51, 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 0xe8, 0x64, 0xd2, 0xd5, 0x79, 0xd1, 0x5e, 0x15, 0xd0, 0xf1, - 0x78, 0xcc, 0x0b, 0xbc, 0x36, 0x01, 0xd2, 0x65, 0xac, 0x47, 0x43, 0x3a, 0xc3, 0xdc, 0x6d, 0x5a, - 0xa8, 0x67, 0x6e, 0x13, 0xb5, 0x05, 0x65, 0x34, 0xf6, 0x82, 0x6b, 0x56, 0xd3, 0x05, 0x80, 0x58, - 0xea, 0xfb, 0x9e, 0x2f, 0x6b, 0x94, 0x00, 0xb4, 0xbf, 0x17, 0x00, 0xf0, 0x22, 0x85, 0x97, 0xe5, - 0x26, 0xd7, 0x36, 0x54, 0x0d, 0xd3, 0xc4, 0xb0, 0x8b, 0xba, 0x39, 0x09, 0xa2, 0x75, 0xc3, 0x19, - 0x1b, 0x7b, 0x7e, 0x28, 0x52, 0x6a, 0x59, 0x8f, 0x61, 0x5c, 0x9b, 0x9b, 0x72, 0x6d, 0x55, 0xac, - 0x45, 0x30, 0xf6, 0x64, 0xca, 0xc8, 0x85, 0x44, 0xce, 0x24, 0x74, 0xc0, 0x32, 0x22, 0x86, 0x2d, - 0x9d, 0xfb, 0x50, 0x1a, 0x7b, 0x66, 0xae, 0x52, 0x89, 0xa7, 0x17, 0x55, 0x4f, 0xd7, 0x1e, 0x43, - 0x23, 0xd9, 0x0a, 0xeb, 0x4d, 0x32, 0xae, 0x11, 0x81, 0xdb, 0x4c, 0x4b, 0x4b, 0x06, 0x34, 0xda, - 0x11, 0x6c, 0xbc, 0xa0, 0xb6, 0xc3, 0x07, 0xf2, 0x36, 0x35, 0xb0, 0x5c, 0x3d, 0x81, 0xe6, 0xab, - 0x14, 0x4a, 0x6e, 0xc2, 0x55, 0x4e, 0x13, 0xeb, 0x19, 0x4a, 0xed, 0x6f, 0x05, 0x68, 0xa6, 0x49, - 0x52, 0xde, 0x58, 0xc8, 0x78, 0x63, 0x1b, 0xaa, 0x73, 0x66, 0x1a, 0xd8, 0x1f, 0x49, 0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0xf6, 0xec, 0x14, 0x4d, 0xf7, 0x53, - 0x7e, 0x7f, 0x5d, 0xc6, 0x52, 0xf1, 0x96, 0x67, 0xff, 0x0f, 0xdf, 0xde, 0xb7, 0x69, 0x2b, 0xe4, - 0x1e, 0x6c, 0xe0, 0x85, 0xaa, 0x55, 0x04, 0x64, 0x94, 0xa0, 0xc6, 0x1b, 0xe9, 0xfa, 0x81, 0xd2, - 0x1f, 0x02, 0x41, 0x8e, 0x4c, 0xb2, 0x57, 0x99, 0xae, 0x2d, 0xd7, 0x0b, 0x64, 0x7c, 0x0a, 0x6b, - 0x6a, 0xa2, 0x12, 0x26, 0xca, 0xa4, 0xde, 0xce, 0x56, 0x5e, 0x3e, 0xd3, 0x56, 0xce, 0x2a, 0xfc, - 0x7f, 0xf2, 0x8f, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xab, 0xf6, 0xbd, 0xe0, 0x6b, 0x1e, 0x00, - 0x00, + // 2519 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x73, 0x1b, 0xc7, + 0x11, 0x26, 0x00, 0xe2, 0xd5, 0x20, 0x40, 0x70, 0x44, 0x52, 0x10, 0x6c, 0x3d, 0xbc, 0x91, 0x54, + 0x2a, 0xc9, 0xa1, 0x25, 0xc6, 0x2a, 0x3d, 0xac, 0x38, 0x05, 0x01, 0x30, 0x85, 0x04, 0x04, 0x51, + 0x0b, 0xd0, 0x29, 0x57, 0xa5, 0x0a, 0xb5, 0xc4, 0x8e, 0xa9, 0x8d, 0xf6, 0x31, 0xde, 0x07, 0x1d, + 0x1c, 0x93, 0xbf, 0x90, 0x9f, 0x90, 0x83, 0x0f, 0xc9, 0x31, 0x95, 0xa3, 0xff, 0x41, 0x2a, 0x3f, + 0xc5, 0x17, 0xff, 0x80, 0x54, 0xcf, 0xcc, 0x3e, 0xb1, 0x94, 0xa2, 0x54, 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 0xc5, 0xff, 0xc6, 0xdb, 0x6f, + 0x6d, 0x65, 0x83, 0x3c, 0x84, 0x6d, 0xdc, 0xd0, 0x64, 0x0d, 0x04, 0x79, 0x4a, 0xd0, 0xe3, 0xed, + 0x74, 0xf5, 0x43, 0xeb, 0x4f, 0x80, 0xa0, 0x46, 0xa6, 0x54, 0x25, 0x95, 0xae, 0xac, 0x57, 0x3b, + 0x4f, 0xd9, 0x38, 0xab, 0xf0, 0x1f, 0x82, 0xbf, 0xf8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, + 0xb4, 0x2d, 0x83, 0x2c, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2771,7 +2607,6 @@ type AppRuntimeSyncClient interface { GetAppVolumeStatus(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceVolumeStatusMessage, error) ListAppServices(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*AppServices, error) ListHelmAppRelease(ctx context.Context, in *AppReq, opts ...grpc.CallOption) (*HelmAppReleases, error) - ParseHelmApp(ctx context.Context, in *ParseHelmAppReq, opts ...grpc.CallOption) (*ParseHelmAppResp, error) } type appRuntimeSyncClient struct { @@ -2926,15 +2761,6 @@ func (c *appRuntimeSyncClient) ListHelmAppRelease(ctx context.Context, in *AppRe return out, nil } -func (c *appRuntimeSyncClient) ParseHelmApp(ctx context.Context, in *ParseHelmAppReq, opts ...grpc.CallOption) (*ParseHelmAppResp, error) { - out := new(ParseHelmAppResp) - err := c.cc.Invoke(ctx, "/pb.AppRuntimeSync/ParseHelmApp", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // AppRuntimeSyncServer is the server API for AppRuntimeSync service. type AppRuntimeSyncServer interface { // Deprecated: - @@ -2954,7 +2780,6 @@ type AppRuntimeSyncServer interface { GetAppVolumeStatus(context.Context, *ServiceRequest) (*ServiceVolumeStatusMessage, error) ListAppServices(context.Context, *AppReq) (*AppServices, error) ListHelmAppRelease(context.Context, *AppReq) (*HelmAppReleases, error) - ParseHelmApp(context.Context, *ParseHelmAppReq) (*ParseHelmAppResp, error) } func RegisterAppRuntimeSyncServer(s *grpc.Server, srv AppRuntimeSyncServer) { @@ -3249,24 +3074,6 @@ func _AppRuntimeSync_ListHelmAppRelease_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } -func _AppRuntimeSync_ParseHelmApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseHelmAppReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppRuntimeSyncServer).ParseHelmApp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.AppRuntimeSync/ParseHelmApp", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppRuntimeSyncServer).ParseHelmApp(ctx, req.(*ParseHelmAppReq)) - } - return interceptor(ctx, in, info, handler) -} - var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AppRuntimeSync", HandlerType: (*AppRuntimeSyncServer)(nil), @@ -3335,10 +3142,6 @@ var _AppRuntimeSync_serviceDesc = grpc.ServiceDesc{ MethodName: "ListHelmAppRelease", Handler: _AppRuntimeSync_ListHelmAppRelease_Handler, }, - { - MethodName: "ParseHelmApp", - Handler: _AppRuntimeSync_ParseHelmApp_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "app_runtime_server.proto", diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index c362c6159..2474a90f0 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -19,7 +19,6 @@ service AppRuntimeSync { rpc GetAppVolumeStatus(ServiceRequest) returns(ServiceVolumeStatusMessage){} rpc ListAppServices(AppReq) returns(AppServices){} rpc ListHelmAppRelease(AppReq) returns(HelmAppReleases){} - rpc ParseHelmApp(ParseHelmAppReq) returns(ParseHelmAppResp){} } message Empty {} @@ -258,15 +257,11 @@ message AppStatus { string status = 1; int64 cpu = 2; int64 memory = 3; - string phase = 4; - map values = 5; - string readme = 6; - bool setCPU = 7; - bool setMemory = 8; - repeated string overrides = 9; - string version = 10; - int32 revision = 11; - string questions = 12; + bool setCPU = 4; + bool setMemory = 5; + string phase = 6; + repeated string overrides = 7; + string version = 8; } message AppDetectCondition { @@ -304,16 +299,3 @@ message HelmAppRelease { string appVersion=5; string description=6; } - -message ParseHelmAppReq { - string templateName=1; - string version=2; - string repoName=3; - string eid=4; - string repoURL=5; -} - -message ParseHelmAppResp { - map values=1; - string questions=2; -} \ No newline at end of file diff --git a/worker/server/server.go b/worker/server/server.go index 71456e9d4..41148a47b 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -31,7 +31,6 @@ import ( "github.com/goodrain/rainbond/db/model" discover "github.com/goodrain/rainbond/discover.v2" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" - "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/goodrain/rainbond/util" etcdutil "github.com/goodrain/rainbond/util/etcd" "github.com/goodrain/rainbond/util/k8s" @@ -39,11 +38,9 @@ import ( "github.com/goodrain/rainbond/worker/appm/store" "github.com/goodrain/rainbond/worker/appm/thirdparty/discovery" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" - "github.com/goodrain/rainbond/worker/controllers/helmapp" "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/goodrain/rainbond/worker/server/pb" wutil "github.com/goodrain/rainbond/worker/util" - "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/reflection" @@ -57,16 +54,15 @@ import ( //RuntimeServer app runtime grpc server type RuntimeServer struct { - ctx context.Context - cancel context.CancelFunc - store store.Storer - conf option.Config - server *grpc.Server - hostIP string - keepalive *discover.KeepAlive - clientset kubernetes.Interface - rainbondClient versioned.Interface - updateCh *channels.RingChannel + ctx context.Context + cancel context.CancelFunc + store store.Storer + conf option.Config + server *grpc.Server + hostIP string + keepalive *discover.KeepAlive + clientset kubernetes.Interface + updateCh *channels.RingChannel } //CreaterRuntimeServer create a runtime grpc server @@ -189,12 +185,8 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, SetCPU: cpu > 0, Memory: memory, SetMemory: memory > 0, - Readme: helmApp.Status.Readme, Version: helmApp.Status.CurrentVersion, - Revision: int32(helmApp.Status.CurrentRevision), - Values: helmApp.Status.Values, Overrides: helmApp.Status.Overrides, - Questions: helmApp.Status.Questions, }, nil } @@ -313,39 +305,6 @@ func (r *RuntimeServer) GetMultiAppPods(ctx context.Context, re *pb.ServicesRequ return &res, nil } -func (r *RuntimeServer) ParseHelmApp(ctx context.Context, req *pb.ParseHelmAppReq) (*pb.ParseHelmAppResp, error) { - helmApp := &v1alpha1.HelmApp{ - Spec: v1alpha1.HelmAppSpec{ - EID: req.Eid, - TemplateName: req.TemplateName, - Version: req.Version, - AppStore: &v1alpha1.HelmAppStore{ - Name: req.RepoName, - URL: req.RepoURL, - }, - }, - } - - app, err := helmapp.NewApp(ctx, r.clientset, r.rainbondClient, helmApp, r.conf.Helm.RepoFile, r.conf.Helm.RepoCache) - if err != nil { - return nil, err - } - - if err := app.Pull(); err != nil { - return nil, errors.WithMessage(err, "pull chart") - } - - values, _, questions, err := app.ParseChart() - if err != nil { - return nil, err - } - - return &pb.ParseHelmAppResp{ - Values: values, - Questions: questions, - }, nil -} - // translateTimestampSince returns the elapsed time since timestamp in // human-readable approximation. func translateTimestampSince(timestamp metav1.Time) string { @@ -356,15 +315,6 @@ func translateTimestampSince(timestamp metav1.Time) string { return duration.HumanDuration(time.Since(timestamp.Time)) } -// formatEventSource formats EventSource as a comma separated string excluding Host when empty -func formatEventSource(es corev1.EventSource) string { - EventSourceString := []string{es.Component} - if len(es.Host) > 0 { - EventSourceString = append(EventSourceString, es.Host) - } - return strings.Join(EventSourceString, ", ") -} - // DescribeEvents - func DescribeEvents(el *corev1.EventList) []*pb.PodEvent { if len(el.Items) == 0 { From 0cb54518ba11312e9485c1888cf3e05bb13cd2f1 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Sat, 8 May 2021 16:21:52 +0800 Subject: [PATCH 34/65] mv helm to pkg --- .../helmapp => pkg}/helm/config.go | 0 .../controllers/helmapp => pkg}/helm/helm.go | 85 ++++++++++++++++++- .../controllers/helmapp => pkg}/helm/repo.go | 0 .../helmapp => pkg}/helm/repo_test.go | 0 worker/controllers/helmapp/app.go | 2 +- worker/controllers/helmapp/controlloop.go | 2 +- worker/controllers/helmapp/detector.go | 2 +- worker/server/server.go | 2 +- 8 files changed, 86 insertions(+), 7 deletions(-) rename {worker/controllers/helmapp => pkg}/helm/config.go (100%) rename {worker/controllers/helmapp => pkg}/helm/helm.go (80%) rename {worker/controllers/helmapp => pkg}/helm/repo.go (100%) rename {worker/controllers/helmapp => pkg}/helm/repo_test.go (100%) diff --git a/worker/controllers/helmapp/helm/config.go b/pkg/helm/config.go similarity index 100% rename from worker/controllers/helmapp/helm/config.go rename to pkg/helm/config.go diff --git a/worker/controllers/helmapp/helm/helm.go b/pkg/helm/helm.go similarity index 80% rename from worker/controllers/helmapp/helm/helm.go rename to pkg/helm/helm.go index 238409644..f61f503cc 100644 --- a/worker/controllers/helmapp/helm/helm.go +++ b/pkg/helm/helm.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "os" "path" + "path/filepath" "strings" "unsafe" @@ -94,7 +95,13 @@ func (h *Helm) Install(name, chart, version string, overrides []string) error { } func (h *Helm) locateChart(chart, version string) (string, error) { - cp := path.Join(h.settings.RepositoryCache, chart, version) + repoAndName := strings.Split(chart, "/") + if len(repoAndName) != 2 { + return "", errors.New("invalid chart. expect repo/name, but got " + chart) + } + + chartCache := path.Join(h.settings.RepositoryCache, chart, version) + cp := path.Join(chartCache, repoAndName[1]+"-"+version+".tgz") if f, err := os.Open(cp); err == nil { defer f.Close() @@ -115,8 +122,9 @@ func (h *Helm) locateChart(chart, version string) (string, error) { } } - cpo := &action.ChartPathOptions{} - cp, err := cpo.LocateChart(chart, h.settings) + cpo := &ChartPathOptions{} + settings := h.settings + cp, err := cpo.LocateChart(chart, chartCache, settings) if err != nil { return "", err } @@ -320,6 +328,77 @@ func (h *Helm) Load(chart, version string) (string, error) { return h.locateChart(chart, version) } +type ChartPathOptions struct { + action.ChartPathOptions +} + +// LocateChart looks for a chart directory in known places, and returns either the full path or an error. +func (c *ChartPathOptions) LocateChart(name, dest string, settings *cli.EnvSettings) (string, error) { + name = strings.TrimSpace(name) + version := strings.TrimSpace(c.Version) + + if _, err := os.Stat(name); err == nil { + abs, err := filepath.Abs(name) + if err != nil { + return abs, err + } + if c.Verify { + if _, err := downloader.VerifyChart(abs, c.Keyring); err != nil { + return "", err + } + } + return abs, nil + } + if filepath.IsAbs(name) || strings.HasPrefix(name, ".") { + return name, errors.Errorf("path %q not found", name) + } + + dl := downloader.ChartDownloader{ + Out: os.Stdout, + Keyring: c.Keyring, + Getters: getter.All(settings), + Options: []getter.Option{ + getter.WithBasicAuth(c.Username, c.Password), + getter.WithTLSClientConfig(c.CertFile, c.KeyFile, c.CaFile), + getter.WithInsecureSkipVerifyTLS(c.InsecureSkipTLSverify), + }, + RepositoryConfig: settings.RepositoryConfig, + RepositoryCache: settings.RepositoryCache, + } + if c.Verify { + dl.Verify = downloader.VerifyAlways + } + if c.RepoURL != "" { + chartURL, err := repo.FindChartInAuthAndTLSRepoURL(c.RepoURL, c.Username, c.Password, name, version, + c.CertFile, c.KeyFile, c.CaFile, c.InsecureSkipTLSverify, getter.All(settings)) + if err != nil { + return "", err + } + name = chartURL + } + + if err := os.MkdirAll(dest, 0755); err != nil { + return "", err + } + + filename, _, err := dl.DownloadTo(name, version, dest) + if err == nil { + lname, err := filepath.Abs(filename) + if err != nil { + return filename, err + } + return lname, nil + } else if settings.Debug { + return filename, err + } + + atVersion := "" + if version != "" { + atVersion = fmt.Sprintf(" at version %q", version) + } + return filename, errors.Errorf("failed to download %q%s (hint: running `helm repo update` may help)", name, atVersion) +} + // checkIfInstallable validates if a chart can be installed // // Application chart type is only installable diff --git a/worker/controllers/helmapp/helm/repo.go b/pkg/helm/repo.go similarity index 100% rename from worker/controllers/helmapp/helm/repo.go rename to pkg/helm/repo.go diff --git a/worker/controllers/helmapp/helm/repo_test.go b/pkg/helm/repo_test.go similarity index 100% rename from worker/controllers/helmapp/helm/repo_test.go rename to pkg/helm/repo_test.go diff --git a/worker/controllers/helmapp/app.go b/worker/controllers/helmapp/app.go index bcec37025..42e622f96 100644 --- a/worker/controllers/helmapp/app.go +++ b/worker/controllers/helmapp/app.go @@ -11,7 +11,7 @@ import ( "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" + "github.com/goodrain/rainbond/pkg/helm" "github.com/pkg/errors" "github.com/sirupsen/logrus" "helm.sh/helm/v3/pkg/release" diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index af36946d2..8962e6ed1 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -7,7 +7,7 @@ import ( "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" + "github.com/goodrain/rainbond/pkg/helm" "github.com/sirupsen/logrus" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/workqueue" diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index 509d10526..c5640a8d8 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -2,7 +2,7 @@ package helmapp import ( "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" - "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" + "github.com/goodrain/rainbond/pkg/helm" corev1 "k8s.io/api/core/v1" ) diff --git a/worker/server/server.go b/worker/server/server.go index 41148a47b..7cb6406ee 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -31,6 +31,7 @@ import ( "github.com/goodrain/rainbond/db/model" discover "github.com/goodrain/rainbond/discover.v2" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/goodrain/rainbond/pkg/helm" "github.com/goodrain/rainbond/util" etcdutil "github.com/goodrain/rainbond/util/etcd" "github.com/goodrain/rainbond/util/k8s" @@ -38,7 +39,6 @@ import ( "github.com/goodrain/rainbond/worker/appm/store" "github.com/goodrain/rainbond/worker/appm/thirdparty/discovery" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" - "github.com/goodrain/rainbond/worker/controllers/helmapp/helm" "github.com/goodrain/rainbond/worker/server/pb" wutil "github.com/goodrain/rainbond/worker/util" "github.com/sirupsen/logrus" From 5d37bb0288f7e59560a074e65ae4857d11b3af8c Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Sat, 8 May 2021 19:09:48 +0800 Subject: [PATCH 35/65] version and debug --- pkg/helm/helm.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/helm/helm.go b/pkg/helm/helm.go index f61f503cc..01dfef1f3 100644 --- a/pkg/helm/helm.go +++ b/pkg/helm/helm.go @@ -64,6 +64,7 @@ func NewHelm(namespace, repoFile, repoCache string) (*Helm, error) { } helmDriver := "" settings := cli.New() + settings.Debug = true // set namespace namespacePtr := (*string)(unsafe.Pointer(settings)) *namespacePtr = namespace @@ -123,6 +124,7 @@ func (h *Helm) locateChart(chart, version string) (string, error) { } cpo := &ChartPathOptions{} + cpo.Version = version settings := h.settings cp, err := cpo.LocateChart(chart, chartCache, settings) if err != nil { From 324c03818212d61c502a3ec69a64bf7b47684bef Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Mon, 10 May 2021 19:32:27 +0800 Subject: [PATCH 36/65] temp --- worker/appm/store/lister.go | 1 + worker/appm/store/store.go | 16 +- worker/server/pb/app_runtime_server.pb.go | 325 +++++++++++----------- worker/server/pb/app_runtime_server.proto | 1 + worker/server/server.go | 42 ++- 5 files changed, 216 insertions(+), 169 deletions(-) diff --git a/worker/appm/store/lister.go b/worker/appm/store/lister.go index a37e3aeca..916557391 100644 --- a/worker/appm/store/lister.go +++ b/worker/appm/store/lister.go @@ -36,6 +36,7 @@ type Lister struct { StatefulSet appsv1.StatefulSetLister Deployment appsv1.DeploymentLister Pod corev1.PodLister + ReplicaSets appsv1.ReplicaSetLister ConfigMap corev1.ConfigMapLister Endpoints corev1.EndpointsLister Nodes corev1.NodeLister diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index 12043bbf4..e52e62327 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -21,17 +21,16 @@ package store import ( "context" "fmt" - "github.com/goodrain/rainbond/api/util/bcode" - "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" - "github.com/pkg/errors" "os" "sync" "time" "github.com/eapache/channels" + "github.com/goodrain/rainbond/api/util/bcode" "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db/model" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" rainbondversioned "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/goodrain/rainbond/pkg/generated/informers/externalversions" "github.com/goodrain/rainbond/util/constants" @@ -42,6 +41,7 @@ import ( "github.com/goodrain/rainbond/worker/server/pb" workerutil "github.com/goodrain/rainbond/worker/util" "github.com/jinzhu/gorm" + "github.com/pkg/errors" monitorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned" "github.com/sirupsen/logrus" @@ -98,6 +98,7 @@ type Storer interface { GetAppResources(appID string) (int64, int64, error) GetHelmApp(namespace, name string) (*v1alpha1.HelmApp, error) ListPods(namespace string, selector labels.Selector) ([]*corev1.Pod, error) + ListReplicaSets(namespace string, selector labels.Selector) ([]*appsv1.ReplicaSet, error) ListServices(namespace string, selector labels.Selector) ([]*corev1.Service, error) } @@ -138,6 +139,7 @@ type appRuntimeStore struct { cancel context.CancelFunc informers *Informer listers *Lister + replicaSets *Lister appServices sync.Map appCount int32 dbmanager db.Manager @@ -221,6 +223,7 @@ func NewStore( store.listers.Ingress = infFactory.Extensions().V1beta1().Ingresses().Lister() store.informers.ReplicaSet = infFactory.Apps().V1().ReplicaSets().Informer() + store.listers.ReplicaSets = infFactory.Apps().V1().ReplicaSets().Lister() store.informers.Endpoints = infFactory.Core().V1().Endpoints().Informer() store.listers.Endpoints = infFactory.Core().V1().Endpoints().Lister() @@ -508,8 +511,7 @@ func (a *appRuntimeStore) checkReplicasetWhetherDelete(app *v1.AppService, rs *a //delete old version if v1.GetReplicaSetVersion(current) > v1.GetReplicaSetVersion(rs) { if rs.Status.Replicas == 0 && rs.Status.ReadyReplicas == 0 && rs.Status.AvailableReplicas == 0 { - if err := a.conf.KubeClient.AppsV1().ReplicaSets(rs.Namespace).Delete(context.Background(), rs.Name, metav1.DeleteOptions{}); - err != nil && k8sErrors.IsNotFound(err) { + if err := a.conf.KubeClient.AppsV1().ReplicaSets(rs.Namespace).Delete(context.Background(), rs.Name, metav1.DeleteOptions{}); err != nil && k8sErrors.IsNotFound(err) { logrus.Errorf("delete old version replicaset failure %s", err.Error()) } } @@ -1556,6 +1558,10 @@ func (a *appRuntimeStore) ListPods(namespace string, selector labels.Selector) ( return a.listers.Pod.Pods(namespace).List(selector) } +func (a *appRuntimeStore) ListReplicaSets(namespace string, selector labels.Selector) ([]*appsv1.ReplicaSet, error) { + return a.listers.ReplicaSets.ReplicaSets(namespace).List(selector) +} + func (a *appRuntimeStore) ListServices(namespace string, selector labels.Selector) ([]*corev1.Service, error) { return a.listers.Service.Services(namespace).List(selector) } diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 59efa3bb0..4d8555948 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -2088,6 +2088,7 @@ type AppService struct { TcpPorts []int32 `protobuf:"varint,3,rep,packed,name=tcpPorts,proto3" json:"tcpPorts,omitempty"` UdpPorts []int32 `protobuf:"varint,4,rep,packed,name=udpPorts,proto3" json:"udpPorts,omitempty"` Pods []*AppService_Pod `protobuf:"bytes,5,rep,name=pods,proto3" json:"pods,omitempty"` + OldPods []*AppService_Pod `protobuf:"bytes,6,rep,name=oldPods,proto3" json:"oldPods,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2153,6 +2154,13 @@ func (m *AppService) GetPods() []*AppService_Pod { return nil } +func (m *AppService) GetOldPods() []*AppService_Pod { + if m != nil { + return m.OldPods + } + return nil +} + type AppService_Pod struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` @@ -2417,165 +2425,166 @@ func init() { func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2519 bytes of a gzipped FileDescriptorProto + // 2529 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x73, 0x1b, 0xc7, - 0x11, 0x26, 0x00, 0xe2, 0xd5, 0x20, 0x40, 0x70, 0x44, 0x52, 0x10, 0x6c, 0x3d, 0xbc, 0x91, 0x54, - 0x2a, 0xc9, 0xa1, 0x25, 0xc6, 0x2a, 0x3d, 0xac, 0x38, 0x05, 0x01, 0x30, 0x85, 0x04, 0x04, 0x51, - 0x0b, 0xd0, 0x29, 0x57, 0xa5, 0x0a, 0xb5, 0xc4, 0x8e, 0xa9, 0x8d, 0xf6, 0x31, 0xde, 0x07, 0x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x61, 0xa1, 0x07, 0x64, 0xd3, + 0xc9, 0x09, 0xe4, 0xf2, 0x3a, 0x2c, 0xbc, 0x70, 0x38, 0x91, 0xf0, 0x63, 0x29, 0xeb, 0x47, 0x5e, + 0x73, 0x51, 0x3d, 0x2c, 0xb8, 0x25, 0x89, 0xd7, 0x04, 0xbf, 0x1f, 0x16, 0xe2, 0x62, 0x90, 0x3e, + 0x6b, 0x70, 0xde, 0x31, 0x67, 0x61, 0xe8, 0x0b, 0xc8, 0x92, 0x05, 0xb2, 0xf6, 0xae, 0x71, 0x46, + 0x9f, 0x05, 0x78, 0x1b, 0xc9, 0x6b, 0x28, 0x9c, 0xa1, 0x2a, 0x6a, 0x57, 0xc9, 0x95, 0x73, 0xdc, + 0xc4, 0x72, 0x46, 0xc0, 0x70, 0x96, 0x9a, 0xa8, 0x13, 0x25, 0xab, 0xcf, 0x02, 0xe5, 0xef, 0x22, + 0x6e, 0x44, 0x64, 0x63, 0x74, 0x26, 0xea, 0x60, 0xfe, 0xcd, 0x79, 0x8e, 0x1e, 0x2e, 0x98, 0x7f, + 0x67, 0xaa, 0xcb, 0x52, 0xb6, 0xba, 0xbc, 0x13, 0x1d, 0xe6, 0xcd, 0xb8, 0x1e, 0x8f, 0x02, 0x30, + 0x3a, 0xdb, 0x22, 0x2f, 0x94, 0xa3, 0xbc, 0x70, 0x15, 0xaa, 0x38, 0x3b, 0x76, 0x21, 0x62, 0xb9, + 0x15, 0x24, 0x47, 0x0c, 0xdd, 0x78, 0x41, 0x5d, 0xcf, 0x70, 0x6c, 0xb9, 0xca, 0x90, 0x24, 0xcf, + 0x61, 0xdb, 0xb0, 0xd1, 0x45, 0x71, 0x1b, 0x22, 0x4a, 0xc5, 0xb6, 0x54, 0x19, 0x77, 0x01, 0x2d, + 0x04, 0xc6, 0xad, 0x04, 0x79, 0x94, 0x6a, 0x5e, 0xea, 0x97, 0x48, 0x25, 0x7b, 0x95, 0xdb, 0x50, + 0xa1, 0x78, 0x88, 0x3d, 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, 0x41, 0x9e, 0x12, 0xb4, 0x78, 0x3b, 0x9d, 0xfd, 0x50, 0xfb, 0x53, + 0x20, 0x28, 0x91, 0x49, 0x55, 0x49, 0xa1, 0x2b, 0xeb, 0xd9, 0xce, 0x53, 0x36, 0xce, 0x2a, 0xfc, + 0xf7, 0xe1, 0xcf, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x26, 0xa2, 0xd2, 0x31, 0x5a, 0x1c, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 2474a90f0..b29e1d77b 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -281,6 +281,7 @@ message AppService { repeated int32 tcpPorts=3; repeated int32 udpPorts=4; repeated Pod pods=5; + repeated Pod oldPods=6; } message AppServices { diff --git a/worker/server/server.go b/worker/server/server.go index 7cb6406ee..785d714d6 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -34,7 +34,6 @@ import ( "github.com/goodrain/rainbond/pkg/helm" "github.com/goodrain/rainbond/util" etcdutil "github.com/goodrain/rainbond/util/etcd" - "github.com/goodrain/rainbond/util/k8s" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/appm/store" "github.com/goodrain/rainbond/worker/appm/thirdparty/discovery" @@ -44,6 +43,7 @@ import ( "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/reflection" + appv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -527,7 +527,7 @@ func (r *RuntimeServer) UpdThirdPartyEndpoint(ctx context.Context, re *pb.UpdThi Port: int(re.Port), IsOnline: re.IsOnline, } - if re.IsOnline == false { + if !re.IsOnline { r.updateCh.In() <- discovery.Event{ Type: discovery.DeleteEvent, Obj: rbdep, @@ -690,7 +690,7 @@ func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppSer selector = selector.Add(*req) } - var spods []*pb.AppService_Pod + var oldPods, newPods []*pb.AppService_Pod pods, err := r.store.ListPods(svc.Namespace, selector) if err != nil { logrus.Warningf("parse services: %v", err) @@ -698,10 +698,21 @@ func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppSer for _, pod := range pods { podStatus := &pb.PodStatus{} wutil.DescribePodStatus(r.clientset, pod, podStatus, k8sutil.DefListEventsByPod) - spods = append(spods, &pb.AppService_Pod{ + po := &pb.AppService_Pod{ Name: pod.Name, Status: podStatus.TypeStr, - }) + } + + rss, err := r.store.ListReplicaSets(svc.Namespace, selector) + if err != nil { + logrus.Warningf("[RuntimeServer] convert services: list replica sets: %v", err) + } + + if isOldPod(pod, rss) { + oldPods = append(oldPods, po) + } else { + newPods = append(newPods, po) + } } } @@ -715,7 +726,8 @@ func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppSer Address: address, TcpPorts: tcpPorts, UdpPorts: udpPorts, - Pods: spods, + OldPods: oldPods, + Pods: newPods, }) } return appServices @@ -755,3 +767,21 @@ func (r *RuntimeServer) ListHelmAppRelease(ctx context.Context, req *pb.AppReq) HelmAppRelease: releases, }, nil } + +func isOldPod(pod *corev1.Pod, rss []*appv1.ReplicaSet) bool { + if len(rss) == 0 { + return false + } + + var newrs *appv1.ReplicaSet + for _, rs := range rss { + if newrs == nil { + newrs = rs + continue + } + if newrs.ObjectMeta.CreationTimestamp.Before(&rs.ObjectMeta.CreationTimestamp) { + newrs = rs + } + } + return pod.ObjectMeta.CreationTimestamp.Before(&newrs.ObjectMeta.CreationTimestamp) +} From bb05e1a269fdfedd9af0073aaed4d99f450514c8 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Tue, 11 May 2021 10:32:55 +0800 Subject: [PATCH 37/65] distinguish old and new pods --- api/handler/app_restore_action.go | 2 +- api/handler/application_config_group.go | 14 +- api/handler/application_handler.go | 70 ++- api/handler/cloud.go | 2 +- api/model/app.go | 24 +- worker/controllers/helmapp/app.go | 109 +---- .../controllers/helmapp/controlloop_test.go | 27 ++ worker/controllers/helmapp/finilizer.go | 4 +- worker/server/pb/app_runtime_server.pb.go | 404 +++++++++--------- worker/server/pb/app_runtime_server.proto | 8 +- worker/server/server.go | 31 +- 11 files changed, 337 insertions(+), 358 deletions(-) diff --git a/api/handler/app_restore_action.go b/api/handler/app_restore_action.go index b33a884e4..8b99339ba 100644 --- a/api/handler/app_restore_action.go +++ b/api/handler/app_restore_action.go @@ -240,7 +240,7 @@ func (a *AppRestoreAction) RestoreDepVols(tenantID, serviceID string, req *apimo if err != nil { // err contains gorm.ErrRecordNotFound tx.Rollback() - return fmt.Errorf("Dep service id: %s; error getting dep volume: %s", item.DepServiceID, err) + return fmt.Errorf("dep service id: %s; error getting dep volume: %s", item.DepServiceID, err) } mr := &model.TenantServiceMountRelation{ diff --git a/api/handler/application_config_group.go b/api/handler/application_config_group.go index 899530a17..2d8a133af 100644 --- a/api/handler/application_config_group.go +++ b/api/handler/application_config_group.go @@ -86,8 +86,8 @@ func (a *ApplicationAction) AddConfigGroup(appID string, req *model.ApplicationC if err != nil { return nil, err } - var resp *model.ApplicationConfigGroupResp - resp = &model.ApplicationConfigGroupResp{ + + return &model.ApplicationConfigGroupResp{ CreateTime: appconfig.CreatedAt, AppID: appID, ConfigGroupName: appconfig.ConfigGroupName, @@ -95,8 +95,7 @@ func (a *ApplicationAction) AddConfigGroup(appID string, req *model.ApplicationC ConfigItems: configGroupItems, Services: configGroupServices, Enable: appconfig.Enable, - } - return resp, nil + }, nil } // UpdateConfigGroup - @@ -171,9 +170,7 @@ func (a *ApplicationAction) UpdateConfigGroup(appID, configGroupName string, req return nil, err } - // Build return data - var resp *model.ApplicationConfigGroupResp - resp = &model.ApplicationConfigGroupResp{ + return &model.ApplicationConfigGroupResp{ CreateTime: appconfig.CreatedAt, AppID: appconfig.AppID, ConfigGroupName: appconfig.ConfigGroupName, @@ -181,8 +178,7 @@ func (a *ApplicationAction) UpdateConfigGroup(appID, configGroupName string, req ConfigItems: configGroupItems, Services: configGroupServices, Enable: appconfig.Enable, - } - return resp, nil + }, nil } // DeleteConfigGroup - diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 5b1b89ba8..c51ab4ce5 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -2,7 +2,6 @@ package handler import ( "context" - "encoding/base64" "fmt" "sort" "strconv" @@ -25,7 +24,6 @@ import ( k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientset "k8s.io/client-go/kubernetes" - "sigs.k8s.io/yaml" ) // ApplicationAction - @@ -203,20 +201,6 @@ func (a *ApplicationAction) updateHelmApp(ctx context.Context, app *dbmodel.Appl return err } -func (a *ApplicationAction) validateValues(encodedValues string) error { - values, err := base64.StdEncoding.DecodeString(encodedValues) - if err != nil { - return errors.Wrap(bcode.ErrInvalidHelmAppValues, err.Error()) - } - - obj := make(map[string]interface{}) - if err = yaml.Unmarshal(values, obj); err != nil { - return errors.Wrap(bcode.ErrInvalidHelmAppValues, err.Error()) - } - - return nil -} - // ListApps - func (a *ApplicationAction) ListApps(tenantID, appName string, page, pageSize int) (*model.ListAppResponse, error) { var resp model.ListAppResponse @@ -402,6 +386,16 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat return nil, errors.Wrap(err, "get app status") } + var conditions []*model.AppStatusCondition + for _, cdt := range status.Conditions { + conditions = append(conditions, &model.AppStatusCondition{ + Type: string(cdt.Type), + Status: cdt.Status, + Reason: cdt.Reason, + Message: cdt.Message, + }) + } + diskUsage := a.getDiskUsage(app.AppID) var cpu *int64 @@ -414,13 +408,14 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat } res := &model.AppStatus{ - Status: status.Status, - Cpu: cpu, - Memory: memory, - Disk: int64(diskUsage), - Phase: status.Phase, - Overrides: status.Overrides, - Version: status.Version, + Status: status.Status, + Cpu: cpu, + Memory: memory, + Disk: int64(diskUsage), + Phase: status.Phase, + Overrides: status.Overrides, + Version: status.Version, + Conditions: conditions, } return res, nil } @@ -464,20 +459,9 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli Address: service.Address, } - var pods []*model.AppPod - for _, pod := range service.Pods { - pods = append(pods, &model.AppPod{ - PodName: pod.Name, - PodStatus: pod.Status, - }) - } - sort.Sort(model.ByPodName(pods)) - svc.Pods = pods - - for _, port := range service.TcpPorts { - svc.TCPPorts = append(svc.TCPPorts, port) - } - + svc.Pods = a.convertPods(service.Pods) + svc.OldPods = a.convertPods(service.OldPods) + svc.TCPPorts = append(svc.TCPPorts, service.TcpPorts...) services = append(services, svc) } @@ -486,6 +470,18 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli return services, nil } +func (a *ApplicationAction) convertPods(pods []*pb.AppService_Pod) []*model.AppPod { + var res []*model.AppPod + for _, pod := range pods { + res = append(res, &model.AppPod{ + PodName: pod.Name, + PodStatus: pod.Status, + }) + } + sort.Sort(model.ByPodName(res)) + return res +} + func (a *ApplicationAction) getDiskUsage(appID string) float64 { var result float64 query := fmt.Sprintf(`sum(max(app_resource_appfs{app_id=~"%s"}) by(app_id))`, appID) diff --git a/api/handler/cloud.go b/api/handler/cloud.go index baecc8823..aba325500 100644 --- a/api/handler/cloud.go +++ b/api/handler/cloud.go @@ -159,7 +159,7 @@ func (c *CloudAction) CertDispatcher(gt *api_model.GetUserToken) ([]byte, []byte SerialNumber: big.NewInt(1), //证书序列号 Subject: pkix.Name{ CommonName: fmt.Sprintf("%s@%d", gt.Body.EID, time.Now().Unix()), - Locality: []string{fmt.Sprintf("%s", c.RegionTag)}, + Locality: []string{c.RegionTag}, }, NotBefore: time.Now(), //证书有效期开始时间 NotAfter: time.Now().Add(time.Second * time.Duration(validHourTime)), //证书有效期结束时间 diff --git a/api/model/app.go b/api/model/app.go index edb881f29..f455b43d4 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -10,13 +10,22 @@ type AppPort struct { // AppStatus - type AppStatus struct { - Status string `json:"status"` - Cpu *int64 `json:"cpu"` - Memory *int64 `json:"memory"` - Disk int64 `json:"disk"` - Phase string `json:"phase"` - Version string `json:"version"` - Overrides []string `json:"overrides"` + Status string `json:"status"` + Cpu *int64 `json:"cpu"` + Memory *int64 `json:"memory"` + Disk int64 `json:"disk"` + Phase string `json:"phase"` + Version string `json:"version"` + Overrides []string `json:"overrides"` + Conditions []*AppStatusCondition `json:"conditions"` +} + +// AppStatusCondition is the conditon of app status. +type AppStatusCondition struct { + Type string `json:"type"` + Status bool `json:"status"` + Reason string `json:"reason"` + Message string `json:"message"` } // AppService - @@ -24,6 +33,7 @@ type AppService struct { ServiceName string `json:"service_name"` Address string `json:"address"` TCPPorts []int32 `json:"tcp_ports"` + OldPods []*AppPod `json:"oldPods"` Pods []*AppPod `json:"pods"` } diff --git a/worker/controllers/helmapp/app.go b/worker/controllers/helmapp/app.go index 42e622f96..d797e7243 100644 --- a/worker/controllers/helmapp/app.go +++ b/worker/controllers/helmapp/app.go @@ -2,12 +2,7 @@ package helmapp import ( "context" - "encoding/base64" - "io/ioutil" - "os" "path" - "path/filepath" - "strings" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" @@ -167,24 +162,32 @@ func (a *App) Update() error { } // UpdateStatus updates the running status of the helm app. -func (a *App) UpdateRunningStatus() error { +func (a *App) UpdateRunningStatus() { + if a.helmApp.Status.Phase != v1alpha1.HelmAppStatusPhaseInstalled { + return + } + rel, err := a.Status() if err != nil { if errors.Is(err, driver.ErrReleaseNotFound) { - return nil + a.log.Warningf("get running status: %v", err) + return } - return err + a.log.Errorf("get running status: %v", err) + return } newStatus := v1alpha1.HelmAppStatusStatus(rel.Info.Status) if a.helmApp.Status.Status == newStatus { // no change - return nil + return } + a.helmApp.Status.Status = newStatus status := NewStatus(a.ctx, a.helmApp, a.rainbondClient) - - return status.Update() + if err := status.Update(); err != nil { + a.log.Warningf("update running status: %v", err) + } } // UpdateStatus updates the status of the helm app. @@ -284,90 +287,6 @@ func (a *App) installOrUpdate() error { return a.helmCmd.Upgrade(a.name, a.chart(), a.version, a.overrides) } -func (a *App) ParseChart() (map[string]string, string, string, error) { - readme, err := a.getReadme() - if err != nil { - return nil, "", "", err - } - - files, err := a.getValues() - if err != nil { - return nil, "", "", err - } - - questions, err := a.getQuestions() - if err != nil { - return nil, "", "", err - } - - return files, readme, questions, nil -} - -func (a *App) getValues() (map[string]string, error) { - files := make(map[string]string) - err := filepath.Walk(a.chartDir, func(p string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if info.IsDir() { - return nil - } - if !strings.HasSuffix(p, "values.yaml") { - return nil - } - - valuesBytes, err := ioutil.ReadFile(p) - if err != nil { - return err - } - files[strings.Replace(p, a.chartDir, "", 1)] = base64.StdEncoding.EncodeToString(valuesBytes) - - return nil - }) - - return files, err -} - -func (a *App) getReadme() (string, error) { - return a.fileInRootChart("README.md") -} - -func (a *App) getQuestions() (string, error) { - return a.fileInRootChart("questions.yaml") -} - -func (a *App) fileInRootChart(filename string) (string, error) { - var file string - err := filepath.Walk(a.chartDir, func(p string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if p == a.chartDir { - return nil - } - if file != "" { - return filepath.SkipDir - } - if !info.IsDir() { - return nil - } - - readmeFile := path.Join(p, filename) - readmeBytes, err := ioutil.ReadFile(readmeFile) - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - file = base64.StdEncoding.EncodeToString(readmeBytes) - - return nil - }) - - return file, err -} - func (a *App) Uninstall() error { return a.helmCmd.Uninstall(a.name) } diff --git a/worker/controllers/helmapp/controlloop_test.go b/worker/controllers/helmapp/controlloop_test.go index f21a0e2ec..e070766ba 100644 --- a/worker/controllers/helmapp/controlloop_test.go +++ b/worker/controllers/helmapp/controlloop_test.go @@ -143,6 +143,9 @@ var _ = Describe("ControlLoop", func() { err = waitUntilInstalled(helmApp) Expect(err).NotTo(HaveOccurred()) + + err = waitUntilDeployed(helmApp) + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -177,3 +180,27 @@ func waitPhaseUntil(helmApp *rainbondv1alpha1.HelmApp, phase rainbondv1alpha1.He return nil, nil } + +func waitUntilDeployed(helmApp *rainbondv1alpha1.HelmApp) error { + return waitStatusUntil(helmApp, rainbondv1alpha1.HelmAppStatusDeployed) +} + +func waitStatusUntil(helmApp *rainbondv1alpha1.HelmApp, status rainbondv1alpha1.HelmAppStatusStatus) error { + watch, err := rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Watch(context.Background(), metav1.ListOptions{ + LabelSelector: "app=phpmyadmin", + Watch: true, + }) + if err != nil { + return err + } + + // TODO: timeout + for event := range watch.ResultChan() { + newHelmApp := event.Object.(*rainbondv1alpha1.HelmApp) + if newHelmApp.Status.Status == status { + return nil + } + } + + return nil +} diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go index d6795b2ae..913274352 100644 --- a/worker/controllers/helmapp/finilizer.go +++ b/worker/controllers/helmapp/finilizer.go @@ -12,6 +12,7 @@ import ( type Finalizer struct { ctx context.Context + log *logrus.Entry kubeClient clientset.Interface clientset versioned.Interface queue workqueue.Interface @@ -30,6 +31,7 @@ func NewFinalizer(ctx context.Context, return &Finalizer{ ctx: ctx, + log: logrus.WithField("WHO", "Finalizer"), kubeClient: kubeClient, clientset: clientset, queue: workQueue, @@ -47,7 +49,7 @@ func (c *Finalizer) Run() { err := c.run(obj) if err != nil { - logrus.Warningf("[HelmAppFinalizer] run finalizer: %v", err) + c.log.Warningf("run: %v", err) continue } c.queue.Done(obj) diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 4d8555948..96d24fb55 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -1933,17 +1933,18 @@ func (m *ServiceVolumeStatusMessage) GetStatus() map[string]ServiceVolumeStatus } type AppStatus struct { - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Cpu int64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` - Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` - SetCPU bool `protobuf:"varint,4,opt,name=setCPU,proto3" json:"setCPU,omitempty"` - SetMemory bool `protobuf:"varint,5,opt,name=setMemory,proto3" json:"setMemory,omitempty"` - Phase string `protobuf:"bytes,6,opt,name=phase,proto3" json:"phase,omitempty"` - Overrides []string `protobuf:"bytes,7,rep,name=overrides,proto3" json:"overrides,omitempty"` - Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Cpu int64 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` + SetCPU bool `protobuf:"varint,4,opt,name=setCPU,proto3" json:"setCPU,omitempty"` + SetMemory bool `protobuf:"varint,5,opt,name=setMemory,proto3" json:"setMemory,omitempty"` + Phase string `protobuf:"bytes,6,opt,name=phase,proto3" json:"phase,omitempty"` + Overrides []string `protobuf:"bytes,7,rep,name=overrides,proto3" json:"overrides,omitempty"` + Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"` + Conditions []*AppStatusCondition `protobuf:"bytes,9,rep,name=conditions,proto3" json:"conditions,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AppStatus) Reset() { *m = AppStatus{} } @@ -2027,57 +2028,72 @@ func (m *AppStatus) GetVersion() string { return "" } -type AppDetectCondition struct { +func (m *AppStatus) GetConditions() []*AppStatusCondition { + if m != nil { + return m.Conditions + } + return nil +} + +type AppStatusCondition struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *AppDetectCondition) Reset() { *m = AppDetectCondition{} } -func (m *AppDetectCondition) String() string { return proto.CompactTextString(m) } -func (*AppDetectCondition) ProtoMessage() {} -func (*AppDetectCondition) Descriptor() ([]byte, []int) { +func (m *AppStatusCondition) Reset() { *m = AppStatusCondition{} } +func (m *AppStatusCondition) String() string { return proto.CompactTextString(m) } +func (*AppStatusCondition) ProtoMessage() {} +func (*AppStatusCondition) Descriptor() ([]byte, []int) { return fileDescriptor_f94cf1a886c479d6, []int{32} } -func (m *AppDetectCondition) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppDetectCondition.Unmarshal(m, b) +func (m *AppStatusCondition) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppStatusCondition.Unmarshal(m, b) } -func (m *AppDetectCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppDetectCondition.Marshal(b, m, deterministic) +func (m *AppStatusCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppStatusCondition.Marshal(b, m, deterministic) } -func (m *AppDetectCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppDetectCondition.Merge(m, src) +func (m *AppStatusCondition) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppStatusCondition.Merge(m, src) } -func (m *AppDetectCondition) XXX_Size() int { - return xxx_messageInfo_AppDetectCondition.Size(m) +func (m *AppStatusCondition) XXX_Size() int { + return xxx_messageInfo_AppStatusCondition.Size(m) } -func (m *AppDetectCondition) XXX_DiscardUnknown() { - xxx_messageInfo_AppDetectCondition.DiscardUnknown(m) +func (m *AppStatusCondition) XXX_DiscardUnknown() { + xxx_messageInfo_AppStatusCondition.DiscardUnknown(m) } -var xxx_messageInfo_AppDetectCondition proto.InternalMessageInfo +var xxx_messageInfo_AppStatusCondition proto.InternalMessageInfo -func (m *AppDetectCondition) GetType() string { +func (m *AppStatusCondition) GetType() string { if m != nil { return m.Type } return "" } -func (m *AppDetectCondition) GetReady() bool { +func (m *AppStatusCondition) GetStatus() bool { if m != nil { - return m.Ready + return m.Status } return false } -func (m *AppDetectCondition) GetError() string { +func (m *AppStatusCondition) GetReason() string { if m != nil { - return m.Error + return m.Reason + } + return "" +} + +func (m *AppStatusCondition) GetMessage() string { + if m != nil { + return m.Message } return "" } @@ -2414,7 +2430,7 @@ func init() { proto.RegisterType((*ServiceVolumeStatusMessage)(nil), "pb.ServiceVolumeStatusMessage") proto.RegisterMapType((map[string]ServiceVolumeStatus)(nil), "pb.ServiceVolumeStatusMessage.StatusEntry") proto.RegisterType((*AppStatus)(nil), "pb.AppStatus") - proto.RegisterType((*AppDetectCondition)(nil), "pb.AppDetectCondition") + proto.RegisterType((*AppStatusCondition)(nil), "pb.AppStatusCondition") proto.RegisterType((*AppService)(nil), "pb.AppService") proto.RegisterType((*AppService_Pod)(nil), "pb.AppService.Pod") proto.RegisterType((*AppServices)(nil), "pb.AppServices") @@ -2425,166 +2441,166 @@ func init() { func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2529 bytes of a gzipped FileDescriptorProto + // 2534 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,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0xe5, 0xef, 0x22, - 0x6e, 0x44, 0x64, 0x63, 0x74, 0x26, 0xea, 0x60, 0xfe, 0xcd, 0x79, 0x8e, 0x1e, 0x2e, 0x98, 0x7f, - 0x67, 0xaa, 0xcb, 0x52, 0xb6, 0xba, 0xbc, 0x13, 0x1d, 0xe6, 0xcd, 0xb8, 0x1e, 0x8f, 0x02, 0x30, - 0x3a, 0xdb, 0x22, 0x2f, 0x94, 0xa3, 0xbc, 0x70, 0x15, 0xaa, 0x38, 0x3b, 0x76, 0x21, 0x62, 0xb9, - 0x15, 0x24, 0x47, 0x0c, 0xdd, 0x78, 0x41, 0x5d, 0xcf, 0x70, 0x6c, 0xb9, 0xca, 0x90, 0x24, 0xcf, - 0x61, 0xdb, 0xb0, 0xd1, 0x45, 0x71, 0x1b, 0x22, 0x4a, 0xc5, 0xb6, 0x54, 0x19, 0x77, 0x01, 0x2d, - 0x04, 0xc6, 0xad, 0x04, 0x79, 0x94, 0x6a, 0x5e, 0xea, 0x97, 0x48, 0x25, 0x7b, 0x95, 0xdb, 0x50, - 0xa1, 0x78, 0x88, 0x3d, 0x59, 0x16, 0x6e, 0x49, 0x34, 0x3f, 0xd9, 0xaa, 0x1c, 0x53, 0x5e, 0x42, - 0x6b, 0xe6, 0x3b, 0xae, 0x76, 0x4e, 0xfb, 0xa6, 0xc6, 0x6b, 0xca, 0xfb, 0xb0, 0x69, 0x1a, 0xbc, - 0xe0, 0x88, 0x12, 0x52, 0x12, 0x21, 0xb3, 0x0a, 0xc7, 0x28, 0xdf, 0x97, 0x80, 0xac, 0x0f, 0xe6, - 0x6e, 0xcc, 0x2d, 0x68, 0x30, 0xd7, 0xb9, 0x30, 0xd0, 0x11, 0xd4, 0x95, 0xfb, 0x93, 0x64, 0x91, - 0x2f, 0x01, 0x98, 0xe6, 0x6a, 0x16, 0xf5, 0x71, 0x89, 0x25, 0xae, 0xfe, 0x6e, 0xbe, 0xfa, 0x83, - 0x69, 0x04, 0x94, 0x4d, 0x5a, 0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, 0xfa, 0x22, 0xd1, 0x95, 0xd5, + 0x88, 0xc6, 0xb1, 0x40, 0x97, 0x63, 0x9b, 0x62, 0x2c, 0xa4, 0xb1, 0x52, 0x4a, 0x34, 0x42, 0x48, + 0xe8, 0x70, 0x61, 0x03, 0x26, 0x77, 0xd9, 0x02, 0x79, 0x10, 0x77, 0x31, 0x2b, 0x17, 0x42, 0x43, + 0x48, 0xf7, 0x11, 0x94, 0xa6, 0x8e, 0x9e, 0xbb, 0x84, 0xb4, 0xbf, 0xa2, 0x68, 0x55, 0x9e, 0x41, + 0x23, 0x9e, 0x0d, 0xef, 0x8c, 0xb8, 0xe5, 0x22, 0x0e, 0x5f, 0x2b, 0xad, 0x30, 0x6e, 0xb2, 0x28, + 0x47, 0xb0, 0xfd, 0x8a, 0x9a, 0x16, 0x6f, 0xaa, 0x9b, 0x54, 0xc3, 0x2b, 0xe7, 0x39, 0xb4, 0x5e, + 0xa7, 0x58, 0x72, 0x12, 0x6e, 0x75, 0x1a, 0xac, 0x66, 0x90, 0xca, 0xdf, 0x0a, 0xd0, 0x4a, 0x43, + 0xd0, 0x83, 0x2e, 0x15, 0xd7, 0x0a, 0x5f, 0x4c, 0x59, 0x8d, 0x68, 0xdc, 0x93, 0x80, 0xe9, 0x1a, + 0xd6, 0x38, 0x72, 0x4f, 0x24, 0x99, 0x58, 0x6a, 0x29, 0x75, 0x30, 0x2f, 0x43, 0x79, 0xf9, 0x5a, + 0x93, 0x0f, 0x80, 0xba, 0x2a, 0x08, 0x72, 0x1d, 0x40, 0x63, 0xec, 0x2b, 0x79, 0x3a, 0x44, 0x55, + 0x90, 0xe0, 0xe0, 0x75, 0xa7, 0x53, 0x6f, 0xe9, 0x1a, 0x0c, 0x63, 0x51, 0x1e, 0xba, 0x24, 0xeb, + 0xde, 0xa7, 0x70, 0x29, 0x27, 0x71, 0x90, 0x3a, 0x94, 0x45, 0xcd, 0xb7, 0x81, 0x35, 0xdf, 0xe4, + 0x78, 0xbe, 0x10, 0x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x6f, 0x79, 0x22, 0xdb, 0x97, + 0xe6, 0xbf, 0x33, 0xc9, 0x67, 0x3c, 0xf8, 0xe2, 0x92, 0x9e, 0xc7, 0x42, 0xe6, 0xf9, 0xda, 0x0d, + 0x0b, 0x72, 0xc1, 0xe1, 0x52, 0xb8, 0x8f, 0x99, 0xba, 0x35, 0xb1, 0x11, 0x24, 0x5b, 0x35, 0x52, + 0x74, 0xdd, 0x2f, 0xf8, 0xfe, 0xf5, 0x18, 0x4b, 0x9d, 0xb7, 0x3c, 0xff, 0x5f, 0x7f, 0x77, 0xe5, + 0xa0, 0x6c, 0x90, 0x87, 0xb0, 0x8d, 0x1b, 0x9a, 0xcc, 0x81, 0x20, 0x4f, 0x09, 0x5a, 0xbc, 0x9d, + 0xce, 0x7e, 0xa8, 0xfd, 0x09, 0x10, 0x94, 0xc8, 0xa4, 0xaa, 0xa4, 0xd0, 0xa5, 0xf5, 0x6c, 0xe7, + 0x29, 0x1b, 0xa7, 0x15, 0xfe, 0x53, 0xf2, 0x27, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x23, + 0x5f, 0xdb, 0xb0, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index b29e1d77b..a040265b4 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -262,12 +262,14 @@ message AppStatus { string phase = 6; repeated string overrides = 7; string version = 8; + repeated AppStatusCondition conditions=9; } -message AppDetectCondition { +message AppStatusCondition { string type = 1; - bool ready = 2; - string error = 3; + bool status = 2; + string reason = 3; + string message = 4; } message AppService { diff --git a/worker/server/server.go b/worker/server/server.go index 785d714d6..ba2812798 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -160,6 +160,16 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, phase = string(helmApp.Status.Phase) } + var conditions []*pb.AppStatusCondition + for _, cdt := range helmApp.Status.Conditions { + conditions = append(conditions, &pb.AppStatusCondition{ + Type: string(cdt.Type), + Status: cdt.Status == corev1.ConditionTrue, + Reason: cdt.Reason, + Message: cdt.Message, + }) + } + selector := labels.NewSelector() instanceReq, _ := labels.NewRequirement("app.kubernetes.io/instance", selection.Equals, []string{app.AppName}) selector = selector.Add(*instanceReq) @@ -179,14 +189,15 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, } return &pb.AppStatus{ - Status: string(helmApp.Status.Status), - Phase: phase, - Cpu: cpu, - SetCPU: cpu > 0, - Memory: memory, - SetMemory: memory > 0, - Version: helmApp.Status.CurrentVersion, - Overrides: helmApp.Status.Overrides, + Status: string(helmApp.Status.Status), + Phase: phase, + Cpu: cpu, + SetCPU: cpu > 0, + Memory: memory, + SetMemory: memory > 0, + Version: helmApp.Status.CurrentVersion, + Overrides: helmApp.Status.Overrides, + Conditions: conditions, }, nil } @@ -272,7 +283,7 @@ func (r *RuntimeServer) GetAppPods(ctx context.Context, re *pb.ServiceRequest) ( PodVolumes: volumes, } podStatus := &pb.PodStatus{} - wutil.DescribePodStatus(r.clientset, pod, podStatus, k8s.DefListEventsByPod) + wutil.DescribePodStatus(r.clientset, pod, podStatus, k8sutil.DefListEventsByPod) sapod.PodStatus = podStatus.Type.String() if app.DistinguishPod(pod) { newpods = append(newpods, sapod) @@ -617,7 +628,7 @@ func (r *RuntimeServer) GetAppVolumeStatus(ctx context.Context, re *pb.ServiceRe } podStatus := &pb.PodStatus{} - wutil.DescribePodStatus(r.clientset, pod, podStatus, k8s.DefListEventsByPod) + wutil.DescribePodStatus(r.clientset, pod, podStatus, k8sutil.DefListEventsByPod) for _, volume := range pod.Spec.Volumes { volumeName := volume.Name From a9c32c553a7f95da1a82fe72c255cb43f23324ac Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Tue, 11 May 2021 12:43:29 +0800 Subject: [PATCH 38/65] add copyright file header --- worker/controllers/helmapp/app.go | 18 ++++++++++++++++++ worker/controllers/helmapp/controller.go | 18 ++++++++++++++++++ worker/controllers/helmapp/controlloop.go | 18 ++++++++++++++++++ worker/controllers/helmapp/controlloop_test.go | 18 ++++++++++++++++++ worker/controllers/helmapp/detector.go | 18 ++++++++++++++++++ worker/controllers/helmapp/finilizer.go | 18 ++++++++++++++++++ worker/controllers/helmapp/status.go | 18 ++++++++++++++++++ worker/controllers/helmapp/store.go | 18 ++++++++++++++++++ worker/controllers/helmapp/suite_test.go | 18 ++++++++++++++++++ 9 files changed, 162 insertions(+) diff --git a/worker/controllers/helmapp/app.go b/worker/controllers/helmapp/app.go index d797e7243..7d77d07ed 100644 --- a/worker/controllers/helmapp/app.go +++ b/worker/controllers/helmapp/app.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 helmapp import ( diff --git a/worker/controllers/helmapp/controller.go b/worker/controllers/helmapp/controller.go index cc76623fb..36cd9f446 100644 --- a/worker/controllers/helmapp/controller.go +++ b/worker/controllers/helmapp/controller.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 helmapp import ( diff --git a/worker/controllers/helmapp/controlloop.go b/worker/controllers/helmapp/controlloop.go index 8962e6ed1..b24ba8f8b 100644 --- a/worker/controllers/helmapp/controlloop.go +++ b/worker/controllers/helmapp/controlloop.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 helmapp import ( diff --git a/worker/controllers/helmapp/controlloop_test.go b/worker/controllers/helmapp/controlloop_test.go index e070766ba..7ecee86c1 100644 --- a/worker/controllers/helmapp/controlloop_test.go +++ b/worker/controllers/helmapp/controlloop_test.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 helmapp import ( diff --git a/worker/controllers/helmapp/detector.go b/worker/controllers/helmapp/detector.go index c5640a8d8..ad6602083 100644 --- a/worker/controllers/helmapp/detector.go +++ b/worker/controllers/helmapp/detector.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 helmapp import ( diff --git a/worker/controllers/helmapp/finilizer.go b/worker/controllers/helmapp/finilizer.go index 913274352..6aa97da7e 100644 --- a/worker/controllers/helmapp/finilizer.go +++ b/worker/controllers/helmapp/finilizer.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 helmapp import ( diff --git a/worker/controllers/helmapp/status.go b/worker/controllers/helmapp/status.go index e889938bc..1da4f6d6b 100644 --- a/worker/controllers/helmapp/status.go +++ b/worker/controllers/helmapp/status.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 helmapp import ( diff --git a/worker/controllers/helmapp/store.go b/worker/controllers/helmapp/store.go index f4f716c2e..89333cad3 100644 --- a/worker/controllers/helmapp/store.go +++ b/worker/controllers/helmapp/store.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 helmapp import ( diff --git a/worker/controllers/helmapp/suite_test.go b/worker/controllers/helmapp/suite_test.go index 1b93d0fa6..3552dab25 100644 --- a/worker/controllers/helmapp/suite_test.go +++ b/worker/controllers/helmapp/suite_test.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + /* Copyright 2021. From 7a309a5c472e6f24c2665a84914ada04f8078561 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Tue, 11 May 2021 12:48:41 +0800 Subject: [PATCH 39/65] move helmapp to master dir --- worker/{controllers => master}/helmapp/app.go | 0 .../helmapp/controller.go | 0 .../helmapp/controlloop.go | 0 .../helmapp/controlloop_test.go | 0 .../{controllers => master}/helmapp/detector.go | 0 .../{controllers => master}/helmapp/finilizer.go | 0 worker/{controllers => master}/helmapp/status.go | 0 worker/{controllers => master}/helmapp/store.go | 0 .../helmapp/suite_test.go | 16 ---------------- worker/master/master.go | 2 +- 10 files changed, 1 insertion(+), 17 deletions(-) rename worker/{controllers => master}/helmapp/app.go (100%) rename worker/{controllers => master}/helmapp/controller.go (100%) rename worker/{controllers => master}/helmapp/controlloop.go (100%) rename worker/{controllers => master}/helmapp/controlloop_test.go (100%) rename worker/{controllers => master}/helmapp/detector.go (100%) rename worker/{controllers => master}/helmapp/finilizer.go (100%) rename worker/{controllers => master}/helmapp/status.go (100%) rename worker/{controllers => master}/helmapp/store.go (100%) rename worker/{controllers => master}/helmapp/suite_test.go (83%) diff --git a/worker/controllers/helmapp/app.go b/worker/master/helmapp/app.go similarity index 100% rename from worker/controllers/helmapp/app.go rename to worker/master/helmapp/app.go diff --git a/worker/controllers/helmapp/controller.go b/worker/master/helmapp/controller.go similarity index 100% rename from worker/controllers/helmapp/controller.go rename to worker/master/helmapp/controller.go diff --git a/worker/controllers/helmapp/controlloop.go b/worker/master/helmapp/controlloop.go similarity index 100% rename from worker/controllers/helmapp/controlloop.go rename to worker/master/helmapp/controlloop.go diff --git a/worker/controllers/helmapp/controlloop_test.go b/worker/master/helmapp/controlloop_test.go similarity index 100% rename from worker/controllers/helmapp/controlloop_test.go rename to worker/master/helmapp/controlloop_test.go diff --git a/worker/controllers/helmapp/detector.go b/worker/master/helmapp/detector.go similarity index 100% rename from worker/controllers/helmapp/detector.go rename to worker/master/helmapp/detector.go diff --git a/worker/controllers/helmapp/finilizer.go b/worker/master/helmapp/finilizer.go similarity index 100% rename from worker/controllers/helmapp/finilizer.go rename to worker/master/helmapp/finilizer.go diff --git a/worker/controllers/helmapp/status.go b/worker/master/helmapp/status.go similarity index 100% rename from worker/controllers/helmapp/status.go rename to worker/master/helmapp/status.go diff --git a/worker/controllers/helmapp/store.go b/worker/master/helmapp/store.go similarity index 100% rename from worker/controllers/helmapp/store.go rename to worker/master/helmapp/store.go diff --git a/worker/controllers/helmapp/suite_test.go b/worker/master/helmapp/suite_test.go similarity index 83% rename from worker/controllers/helmapp/suite_test.go rename to worker/master/helmapp/suite_test.go index 3552dab25..81b039c13 100644 --- a/worker/controllers/helmapp/suite_test.go +++ b/worker/master/helmapp/suite_test.go @@ -16,22 +16,6 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -/* -Copyright 2021. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package helmapp import ( diff --git a/worker/master/master.go b/worker/master/master.go index 733ca66a8..35fe7f9a6 100644 --- a/worker/master/master.go +++ b/worker/master/master.go @@ -30,7 +30,7 @@ import ( "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/goodrain/rainbond/util/leader" "github.com/goodrain/rainbond/worker/appm/store" - "github.com/goodrain/rainbond/worker/controllers/helmapp" + "github.com/goodrain/rainbond/worker/master/helmapp" "github.com/goodrain/rainbond/worker/master/podevent" "github.com/goodrain/rainbond/worker/master/volumes/provider" "github.com/goodrain/rainbond/worker/master/volumes/provider/lib/controller" From a06672528636d9062fff798565f91635edb17337 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 12 May 2021 10:49:26 +0800 Subject: [PATCH 40/65] stop controller --- worker/master/helmapp/app.go | 7 +++++++ worker/master/helmapp/controller.go | 8 ++++++++ worker/master/helmapp/controlloop.go | 15 ++++++++++++++- worker/master/helmapp/finilizer.go | 13 ++++++++++--- worker/master/master.go | 3 +-- 5 files changed, 40 insertions(+), 6 deletions(-) diff --git a/worker/master/helmapp/app.go b/worker/master/helmapp/app.go index 7d77d07ed..2b3ee8013 100644 --- a/worker/master/helmapp/app.go +++ b/worker/master/helmapp/app.go @@ -38,6 +38,7 @@ import ( "k8s.io/client-go/util/retry" ) +// App represents a helm app. type App struct { ctx context.Context log *logrus.Entry @@ -61,6 +62,7 @@ type App struct { repo *helm.Repo } +// Chart returns the chart. func (a *App) Chart() string { return a.repoName + "/" + a.templateName } @@ -146,6 +148,7 @@ func (a *App) NeedUpdate() bool { return !a.helmApp.OverridesEqual() || a.helmApp.Spec.Version != a.helmApp.Status.CurrentVersion } +// Setup setups the default values of the helm app. func (a *App) Setup() error { a.log.Info("setup the helm app") // setup default PreStatus @@ -257,6 +260,7 @@ func (a *App) chart() string { return a.repoName + "/" + a.templateName } +// PreInstall will check if we can intall the helm app. func (a *App) PreInstall() error { if err := a.repo.Add(a.repoName, a.repoURL, "", ""); err != nil { return err @@ -265,10 +269,12 @@ func (a *App) PreInstall() error { return a.helmCmd.PreInstall(a.name, a.Chart(), a.version) } +// Status returns the status. func (a *App) Status() (*release.Release, error) { return a.helmCmd.Status(a.name) } +// InstallOrUpdate will install or update the helm app. func (a *App) InstallOrUpdate() error { if err := a.installOrUpdate(); err != nil { a.helmApp.Status.SetCondition(*v1alpha1.NewHelmAppCondition( @@ -305,6 +311,7 @@ func (a *App) installOrUpdate() error { return a.helmCmd.Upgrade(a.name, a.chart(), a.version, a.overrides) } +// Uninstall uninstalls the helm app. func (a *App) Uninstall() error { return a.helmCmd.Uninstall(a.name) } diff --git a/worker/master/helmapp/controller.go b/worker/master/helmapp/controller.go index 36cd9f446..1d5c123d6 100644 --- a/worker/master/helmapp/controller.go +++ b/worker/master/helmapp/controller.go @@ -36,6 +36,7 @@ type Controller struct { finalizer *Finalizer } +// NewController creates a new helm app controller. func NewController(ctx context.Context, stopCh chan struct{}, kubeClient clientset.Interface, clientset versioned.Interface, resyncPeriod time.Duration, repoFile, repoCache string) *Controller { workQueue := workqueue.New() @@ -53,9 +54,16 @@ func NewController(ctx context.Context, stopCh chan struct{}, kubeClient clients } } +// Start starts the controller. func (c *Controller) Start() { logrus.Info("start helm app controller") c.storer.Run(c.stopCh) go c.controlLoop.Run() c.finalizer.Run() } + +// Stop stops the controller. +func (c *Controller) Stop() { + c.controlLoop.Stop() + c.finalizer.Stop() +} diff --git a/worker/master/helmapp/controlloop.go b/worker/master/helmapp/controlloop.go index b24ba8f8b..b28ad166f 100644 --- a/worker/master/helmapp/controlloop.go +++ b/worker/master/helmapp/controlloop.go @@ -41,8 +41,10 @@ var defaultConditionTypes = []v1alpha1.HelmAppConditionType{ v1alpha1.HelmAppInstalled, } +// ControlLoop is a control loop to get helm app and reconcile it. type ControlLoop struct { ctx context.Context + log *logrus.Entry kubeClient clientset.Interface clientset versioned.Interface storer Storer @@ -62,9 +64,9 @@ func NewControlLoop(ctx context.Context, repoCache string, ) *ControlLoop { repo := helm.NewRepo(repoFile, repoCache) - return &ControlLoop{ ctx: ctx, + log: logrus.WithField("WHO", "Helm App ControlLoop"), kubeClient: kubeClient, clientset: clientset, storer: storer, @@ -75,6 +77,7 @@ func NewControlLoop(ctx context.Context, } } +// Run runs the control loop. func (c *ControlLoop) Run() { for { obj, shutdown := c.workQueue.Get() @@ -86,6 +89,12 @@ func (c *ControlLoop) Run() { } } +// Stop stops the control loop. +func (c *ControlLoop) Stop() { + c.log.Info("stopping...") + c.workQueue.ShutDown() +} + func (c *ControlLoop) run(obj interface{}) { key, ok := obj.(string) if !ok { @@ -113,6 +122,7 @@ func nameNamespace(key string) (string, string) { return strs[0], strs[1] } +// Reconcile - func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { app, err := NewApp(c.ctx, c.kubeClient, c.clientset, helmApp, c.repoFile, c.repoCache) if err != nil { @@ -124,14 +134,17 @@ func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { // update running status defer app.UpdateRunningStatus() + // setups the default values of the helm app. if app.NeedSetup() { return app.Setup() } + // detect the helm app. if app.NeedDetect() { return app.Detect() } + // install or update the helm app. if app.NeedUpdate() { return app.InstallOrUpdate() } diff --git a/worker/master/helmapp/finilizer.go b/worker/master/helmapp/finilizer.go index 6aa97da7e..b65c95c46 100644 --- a/worker/master/helmapp/finilizer.go +++ b/worker/master/helmapp/finilizer.go @@ -28,6 +28,7 @@ import ( "k8s.io/client-go/util/workqueue" ) +// Finalizer does some cleanup work when helmApp is deleted type Finalizer struct { ctx context.Context log *logrus.Entry @@ -38,7 +39,7 @@ type Finalizer struct { repoCache string } -// NewControlLoop - +// NewFinalizer creates a new finalizer. func NewFinalizer(ctx context.Context, kubeClient clientset.Interface, clientset versioned.Interface, @@ -46,10 +47,9 @@ func NewFinalizer(ctx context.Context, repoFile string, repoCache string, ) *Finalizer { - return &Finalizer{ ctx: ctx, - log: logrus.WithField("WHO", "Finalizer"), + log: logrus.WithField("WHO", "Helm App Finalizer"), kubeClient: kubeClient, clientset: clientset, queue: workQueue, @@ -58,6 +58,7 @@ func NewFinalizer(ctx context.Context, } } +// Run runs the finalizer. func (c *Finalizer) Run() { for { obj, shutdown := c.queue.Get() @@ -74,6 +75,12 @@ func (c *Finalizer) Run() { } } +// Stop stops the finalizer. +func (c *Finalizer) Stop() { + c.log.Info("stopping...") + c.queue.ShutDown() +} + func (c *Finalizer) run(obj interface{}) error { helmApp, ok := obj.(*v1alpha1.HelmApp) if !ok { diff --git a/worker/master/master.go b/worker/master/master.go index 35fe7f9a6..c7a4e85e0 100644 --- a/worker/master/master.go +++ b/worker/master/master.go @@ -38,7 +38,6 @@ import ( "github.com/goodrain/rainbond/worker/master/volumes/sync" "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes" ) @@ -62,7 +61,6 @@ type Controller struct { isLeader bool stopCh chan struct{} - podEventChs []chan *corev1.Pod podEvent *podevent.PodEvent volumeTypeEvent *sync.VolumeTypeEvent } @@ -171,6 +169,7 @@ func (m *Controller) Start() error { // helm app controller go m.helmAppController.Start() + defer m.helmAppController.Stop() select { case <-ctx.Done(): From 13592379b6e293631bf3920bcde32321e07f5edd Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 12 May 2021 11:13:36 +0800 Subject: [PATCH 41/65] make sure namespace exists --- api/handler/application_handler.go | 37 ++++++++++++++++++++++-------- util/constants/constants.go | 9 ++++++++ worker/server/server.go | 9 ++++---- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 3bb9e0427..8df6f0343 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -16,11 +16,13 @@ import ( "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" util "github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util/commonutil" + "github.com/goodrain/rainbond/util/constants" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/server/pb" "github.com/jinzhu/gorm" "github.com/pkg/errors" "github.com/sirupsen/logrus" + corev1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientset "k8s.io/client-go/kubernetes" @@ -103,30 +105,47 @@ func (a *ApplicationAction) CreateApp(ctx context.Context, req *model.Applicatio } func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Application) error { + labels := map[string]string{ + constants.ResourceManagedByLabel: constants.Rainbond, + } helmApp := &v1alpha1.HelmApp{ ObjectMeta: metav1.ObjectMeta{ Name: app.AppName, Namespace: app.TenantID, - // TODO: rainbond labels. + Labels: labels, }, Spec: v1alpha1.HelmAppSpec{ EID: app.EID, TemplateName: app.AppTemplateName, Version: app.Version, AppStore: &v1alpha1.HelmAppStore{ - Version: "", // TODO: setup version. - Name: app.AppStoreName, - URL: app.AppStoreURL, + Name: app.AppStoreName, + URL: app.AppStoreURL, }, }} - ctx, cancel := context.WithTimeout(ctx, 3*time.Second) + ctx1, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() - _, err := a.rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Create(ctx, helmApp, metav1.CreateOptions{}) - if k8sErrors.IsAlreadyExists(err) { - return errors.Wrap(bcode.ErrApplicationExist, "create helm app") + _, err := a.kubeClient.CoreV1().Namespaces().Create(ctx1, &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: app.AppName, + Labels: labels, + }, + }, metav1.CreateOptions{}) + if err != nil && !k8sErrors.IsAlreadyExists(err) { + return errors.Wrap(err, "create namespace for helm app") } - return err + + ctx2, cancel := context.WithTimeout(ctx, 3*time.Second) + defer cancel() + _, err = a.rainbondClient.RainbondV1alpha1().HelmApps(helmApp.Namespace).Create(ctx2, helmApp, metav1.CreateOptions{}) + if err != nil { + if k8sErrors.IsAlreadyExists(err) { + return errors.Wrap(bcode.ErrApplicationExist, "create helm app") + } + return errors.Wrap(err, "create helm app") + } + return nil } // BatchCreateApp - diff --git a/util/constants/constants.go b/util/constants/constants.go index 79d0da437..b10a0fd44 100644 --- a/util/constants/constants.go +++ b/util/constants/constants.go @@ -1,6 +1,8 @@ package constants const ( + // Rainbond - + Rainbond = "rainbond" // DefImageRepository default private image repository DefImageRepository = "goodrain.me" // GrdataLogPath - @@ -8,3 +10,10 @@ const ( // ImagePullSecretKey the key of environment IMAGE_PULL_SECRET ImagePullSecretKey = "IMAGE_PULL_SECRET" ) + +// Kubernetes recommended Labels +// Refer to: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +const ( + ResourceManagedByLabel = "app.kubernetes.io/managed-by" + ResourceInstanceLabel = "app.kubernetes.io/instance" +) diff --git a/worker/server/server.go b/worker/server/server.go index ba2812798..031e7c35e 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -33,6 +33,7 @@ import ( "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/goodrain/rainbond/pkg/helm" "github.com/goodrain/rainbond/util" + "github.com/goodrain/rainbond/util/constants" etcdutil "github.com/goodrain/rainbond/util/etcd" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/appm/store" @@ -171,9 +172,9 @@ func (r *RuntimeServer) getHelmAppStatus(app *model.Application) (*pb.AppStatus, } selector := labels.NewSelector() - instanceReq, _ := labels.NewRequirement("app.kubernetes.io/instance", selection.Equals, []string{app.AppName}) + instanceReq, _ := labels.NewRequirement(constants.ResourceInstanceLabel, selection.Equals, []string{app.AppName}) selector = selector.Add(*instanceReq) - managedReq, _ := labels.NewRequirement("app.kubernetes.io/managed-by", selection.Equals, []string{"Helm"}) + managedReq, _ := labels.NewRequirement(constants.ResourceManagedByLabel, selection.Equals, []string{"Helm"}) selector = selector.Add(*managedReq) pods, err := r.store.ListPods(app.TenantID, selector) if err != nil { @@ -666,9 +667,9 @@ func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb } selector := labels.NewSelector() - instanceReq, _ := labels.NewRequirement("app.kubernetes.io/instance", selection.Equals, []string{app.AppName}) + instanceReq, _ := labels.NewRequirement(constants.ResourceInstanceLabel, selection.Equals, []string{app.AppName}) selector = selector.Add(*instanceReq) - managedReq, _ := labels.NewRequirement("app.kubernetes.io/managed-by", selection.Equals, []string{"Helm"}) + managedReq, _ := labels.NewRequirement(constants.ResourceManagedByLabel, selection.Equals, []string{"Helm"}) selector = selector.Add(*managedReq) services, err := r.store.ListServices(app.TenantID, selector) if err != nil { From 26e312b341ca5d67a486cb96c3a38308076d7183 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 12 May 2021 11:39:38 +0800 Subject: [PATCH 42/65] make lint happy --- api/controller/application.go | 5 +++++ api/controller/resources.go | 4 ++-- api/handler/application_handler.go | 5 ++++- api/handler/etcd_handler.go | 1 + api/handler/gateway_action.go | 2 +- api/handler/service.go | 1 + api/handler/tenant.go | 7 ++++--- api/model/app.go | 3 ++- api/region/monitor.go | 2 +- cmd/worker/option/option.go | 1 + worker/master/helmapp/app.go | 2 +- worker/master/helmapp/detector.go | 3 +++ worker/master/helmapp/status.go | 2 ++ worker/master/helmapp/store.go | 1 + worker/types.go | 23 ----------------------- 15 files changed, 29 insertions(+), 33 deletions(-) delete mode 100644 worker/types.go diff --git a/api/controller/application.go b/api/controller/application.go index 4f1c019eb..e6e039a40 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -160,6 +160,7 @@ func (a *ApplicationController) DeleteApp(w http.ResponseWriter, r *http.Request httputil.ReturnSuccess(r, w, nil) } +// BatchUpdateComponentPorts update component ports in batch. func (a *ApplicationController) BatchUpdateComponentPorts(w http.ResponseWriter, r *http.Request) { var appPorts []*model.AppPort if err := httputil.ReadEntity(r, &appPorts); err != nil { @@ -183,6 +184,7 @@ func (a *ApplicationController) BatchUpdateComponentPorts(w http.ResponseWriter, httputil.ReturnSuccess(r, w, nil) } +// GetAppStatus returns the status of the application. func (a *ApplicationController) GetAppStatus(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) @@ -195,6 +197,7 @@ func (a *ApplicationController) GetAppStatus(w http.ResponseWriter, r *http.Requ httputil.ReturnSuccess(r, w, res) } +// Install installs the application. func (a *ApplicationController) Install(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) @@ -209,6 +212,7 @@ func (a *ApplicationController) Install(w http.ResponseWriter, r *http.Request) } } +// ListServices returns the list fo the application. func (a *ApplicationController) ListServices(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) @@ -238,6 +242,7 @@ func (a *ApplicationController) BatchBindService(w http.ResponseWriter, r *http. httputil.ReturnSuccess(r, w, nil) } +// ListHelmAppReleases returns the list of helm releases. func (a *ApplicationController) ListHelmAppReleases(w http.ResponseWriter, r *http.Request) { app := r.Context().Value(middleware.ContextKey("application")).(*dbmodel.Application) diff --git a/api/controller/resources.go b/api/controller/resources.go index 249d45285..116429279 100644 --- a/api/controller/resources.go +++ b/api/controller/resources.go @@ -1931,10 +1931,10 @@ func (t *TenantStruct) TransPlugins(w http.ResponseWriter, r *http.Request) { } rc["result"] = "success" httputil.ReturnSuccess(r, w, rc) - return } -func (a *TenantStruct) CheckResourceName(w http.ResponseWriter, r *http.Request) { +// CheckResourceName checks the resource name. +func (t *TenantStruct) CheckResourceName(w http.ResponseWriter, r *http.Request) { var req model.CheckResourceNameReq if !httputil.ValidatorRequestStructAndErrorResponse(r, w, &req, nil) { return diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 8df6f0343..f7dfe608f 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -428,7 +428,7 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat res := &model.AppStatus{ Status: status.Status, - Cpu: cpu, + CPU: cpu, Memory: memory, Disk: int64(diskUsage), Phase: status.Phase, @@ -439,6 +439,7 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat return res, nil } +// Install installs the application. func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Application, overrides []string) error { ctx1, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() @@ -462,6 +463,7 @@ func (a *ApplicationAction) Install(ctx context.Context, app *dbmodel.Applicatio return errors.Wrap(err, "install app") } +// ListServices returns the list of the application. func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Application) ([]*model.AppService, error) { nctx, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() @@ -526,6 +528,7 @@ func (a *ApplicationAction) BatchBindService(appID string, req model.BindService return db.GetManager().TenantServiceDao().BindAppByServiceIDs(appID, serviceIDs) } +// ListHelmAppReleases returns the list of the helm app. func (a *ApplicationAction) ListHelmAppReleases(ctx context.Context, app *dbmodel.Application) ([]*model.HelmAppRelease, error) { // only for helm app if app.AppType != model.AppTypeHelm { diff --git a/api/handler/etcd_handler.go b/api/handler/etcd_handler.go index 0f07e150c..1860e8810 100644 --- a/api/handler/etcd_handler.go +++ b/api/handler/etcd_handler.go @@ -29,6 +29,7 @@ func NewEtcdHandler(etcdCli *clientv3.Client) *EtcdHandler { return &EtcdHandler{etcdCli} } +// CleanAllServiceData - func (h *EtcdHandler) CleanAllServiceData(keys []string) { for _, key := range keys { h.cleanEtcdByKey(key, ServiceCheckEtcdKey, ShareResultEtcdKey, BackupRestoreEtcdKey) diff --git a/api/handler/gateway_action.go b/api/handler/gateway_action.go index 032c294cf..f3ff18d9c 100644 --- a/api/handler/gateway_action.go +++ b/api/handler/gateway_action.go @@ -597,7 +597,7 @@ func (g *GatewayAction) TCPIPPortExists(host string, port int) bool { return false } -// SendTask sends apply rules task +// SendTaskDeprecated sends apply rules task func (g *GatewayAction) SendTaskDeprecated(in map[string]interface{}) error { sid := in["service_id"].(string) service, err := db.GetManager().TenantServiceDao().GetServiceByID(sid) diff --git a/api/handler/service.go b/api/handler/service.go index 939fe4e02..d13173a20 100644 --- a/api/handler/service.go +++ b/api/handler/service.go @@ -2062,6 +2062,7 @@ func (s *ServiceAction) isServiceClosed(serviceID string) error { return nil } +// DeleteComponentInBatch deletes components in batch. func (s *ServiceAction) DeleteComponentInBatch(tx *gorm.DB, components []*dbmodel.TenantServices) error { for _, cpt := range components { err := s.deleteComponent(tx, cpt) diff --git a/api/handler/tenant.go b/api/handler/tenant.go index 9b3f9ec97..b499f3178 100644 --- a/api/handler/tenant.go +++ b/api/handler/tenant.go @@ -611,8 +611,9 @@ func (t *TenantAction) GetClusterResource(ctx context.Context) *ClusterResourceS return t.cacheClusterResourceStats } -func (a *TenantAction) CheckResourceName(ctx context.Context, namespace string, req *model.CheckResourceNameReq) (*model.CheckResourceNameResp, error) { - obj, ok := a.resources[req.Type] +// CheckResourceName checks resource name. +func (t *TenantAction) CheckResourceName(ctx context.Context, namespace string, req *model.CheckResourceNameReq) (*model.CheckResourceNameResp, error) { + obj, ok := t.resources[req.Type] if !ok { return nil, bcode.NewBadRequest("unsupported resource: " + req.Type) } @@ -622,7 +623,7 @@ func (a *TenantAction) CheckResourceName(ctx context.Context, namespace string, retries := 3 for i := 0; i < retries; i++ { - if err := a.k8sClient.Get(nctx, types.NamespacedName{Namespace: namespace, Name: req.Name}, obj); err != nil { + if err := t.k8sClient.Get(nctx, types.NamespacedName{Namespace: namespace, Name: req.Name}, obj); err != nil { if k8sErrors.IsNotFound(err) { break } diff --git a/api/model/app.go b/api/model/app.go index f455b43d4..ab3795499 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -11,7 +11,7 @@ type AppPort struct { // AppStatus - type AppStatus struct { Status string `json:"status"` - Cpu *int64 `json:"cpu"` + CPU *int64 `json:"cpu"` Memory *int64 `json:"memory"` Disk int64 `json:"disk"` Phase string `json:"phase"` @@ -45,6 +45,7 @@ func (a ByServiceName) Len() int { return len(a) } func (a ByServiceName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } func (a ByServiceName) Less(i, j int) bool { return a[i].ServiceName < a[j].ServiceName } +// AppPod - type AppPod struct { PodName string `json:"pod_name"` PodStatus string `json:"pod_status"` diff --git a/api/region/monitor.go b/api/region/monitor.go index ee86c2875..cd27a42b4 100644 --- a/api/region/monitor.go +++ b/api/region/monitor.go @@ -32,7 +32,7 @@ import ( "os" ) -//ClusterInterface cluster api +// MonitorInterface cluster api type MonitorInterface interface { GetRule(name string) (*model.AlertingNameConfig, *util.APIHandleError) GetAllRule() (*model.AlertingRulesConfig, *util.APIHandleError) diff --git a/cmd/worker/option/option.go b/cmd/worker/option/option.go index f48de35b9..69957ca43 100644 --- a/cmd/worker/option/option.go +++ b/cmd/worker/option/option.go @@ -56,6 +56,7 @@ type Config struct { Helm Helm } +// Helm helm configuration. type Helm struct { DataDir string RepoFile string diff --git a/worker/master/helmapp/app.go b/worker/master/helmapp/app.go index 2b3ee8013..8525abde6 100644 --- a/worker/master/helmapp/app.go +++ b/worker/master/helmapp/app.go @@ -182,7 +182,7 @@ func (a *App) Update() error { return a.UpdateSpec() } -// UpdateStatus updates the running status of the helm app. +// UpdateRunningStatus updates the running status of the helm app. func (a *App) UpdateRunningStatus() { if a.helmApp.Status.Phase != v1alpha1.HelmAppStatusPhaseInstalled { return diff --git a/worker/master/helmapp/detector.go b/worker/master/helmapp/detector.go index ad6602083..7c563e364 100644 --- a/worker/master/helmapp/detector.go +++ b/worker/master/helmapp/detector.go @@ -24,12 +24,14 @@ import ( corev1 "k8s.io/api/core/v1" ) +// Detector is responsible for detecting the helm app. type Detector struct { helmApp *v1alpha1.HelmApp repo *helm.Repo app *App } +// NewDetector creates a new Detector. func NewDetector(helmApp *v1alpha1.HelmApp, app *App, repo *helm.Repo) *Detector { return &Detector{ helmApp: helmApp, @@ -38,6 +40,7 @@ func NewDetector(helmApp *v1alpha1.HelmApp, app *App, repo *helm.Repo) *Detector } } +// Detect detects the helm app. func (d *Detector) Detect() error { // add repo if !d.helmApp.Status.IsConditionTrue(v1alpha1.HelmAppChartReady) { diff --git a/worker/master/helmapp/status.go b/worker/master/helmapp/status.go index 1da4f6d6b..5d5cf1c65 100644 --- a/worker/master/helmapp/status.go +++ b/worker/master/helmapp/status.go @@ -29,6 +29,7 @@ import ( "k8s.io/client-go/util/retry" ) +// Status represents the status of helm app. type Status struct { ctx context.Context rainbondClient versioned.Interface @@ -44,6 +45,7 @@ func NewStatus(ctx context.Context, app *v1alpha1.HelmApp, rainbondClient versio } } +// Update updates helm app status. func (s *Status) Update() error { return retry.RetryOnConflict(retry.DefaultRetry, func() error { ctx, cancel := context.WithTimeout(s.ctx, defaultTimeout) diff --git a/worker/master/helmapp/store.go b/worker/master/helmapp/store.go index 89333cad3..e4b6cb2e4 100644 --- a/worker/master/helmapp/store.go +++ b/worker/master/helmapp/store.go @@ -44,6 +44,7 @@ type store struct { lister v1alpha1.HelmAppLister } +// NewStorer creates a new storer. func NewStorer(clientset versioned.Interface, resyncPeriod time.Duration, workqueue workqueue.Interface, diff --git a/worker/types.go b/worker/types.go deleted file mode 100644 index b9c56e72b..000000000 --- a/worker/types.go +++ /dev/null @@ -1,23 +0,0 @@ -// RAINBOND, Application Management Platform -// Copyright (C) 2014-2017 Goodrain Co., Ltd. - -// 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 worker - -// MaintainStatus -type MaintainStatus struct { -} From 53219eeed1fe8da24e8dc7ca3c06b22f20bb046f Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 12 May 2021 19:45:47 +0800 Subject: [PATCH 43/65] update godbus/bus to v5 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 63570be34..07e8b90d7 100644 --- a/go.mod +++ b/go.mod @@ -129,5 +129,5 @@ replace ( k8s.io/client-go => k8s.io/client-go v0.20.0 k8s.io/code-generator => k8s.io/code-generator v0.20.0 k8s.io/component-base => k8s.io/component-base v0.20.0 - + github.com/godbus/dbus => github.com/godbus/dbus/v5 v5.0.4 ) diff --git a/go.sum b/go.sum index 4ec3cfa45..3bf4c157e 100644 --- a/go.sum +++ b/go.sum @@ -416,6 +416,8 @@ github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblf github.com/godbus/dbus v4.1.0+incompatible h1:WqqLRTsQic3apZUK9qC5sGNfXthmPXzUZ7nQPrNITa4= github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg= github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= From 253f8b96a3468e254739350d63481347149a8b71 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Mon, 21 Jun 2021 16:48:25 +0800 Subject: [PATCH 44/65] chart cache --- api/controller/application.go | 2 +- api/handler/service.go | 14 +------------- api/handler/service_handler.go | 2 -- cmd/worker/option/option.go | 8 +++++--- db/model/tenant.go | 7 +++++++ go.mod | 2 +- localcheck.sh | 10 ++++++++++ worker/master/helmapp/app.go | 4 ++-- worker/master/helmapp/controller.go | 6 +++--- worker/master/helmapp/controlloop.go | 5 ++++- worker/master/helmapp/finilizer.go | 5 ++++- worker/master/helmapp/suite_test.go | 2 +- worker/master/master.go | 2 +- 13 files changed, 40 insertions(+), 29 deletions(-) create mode 100755 localcheck.sh diff --git a/api/controller/application.go b/api/controller/application.go index e6e039a40..54ede4136 100644 --- a/api/controller/application.go +++ b/api/controller/application.go @@ -32,7 +32,7 @@ func (a *ApplicationController) CreateApp(w http.ResponseWriter, r *http.Request httputil.ReturnBcodeError(r, w, bcode.NewBadRequest("the field 'app_template_name' is required")) return } - if tenantReq.AppTemplateName == "" { + if tenantReq.AppName == "" { httputil.ReturnBcodeError(r, w, bcode.NewBadRequest("the field 'helm_app_name' is required")) return } diff --git a/api/handler/service.go b/api/handler/service.go index d13173a20..db1782908 100644 --- a/api/handler/service.go +++ b/api/handler/service.go @@ -40,7 +40,6 @@ import ( "github.com/goodrain/rainbond/cmd/api/option" "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/event" - "github.com/goodrain/rainbond/util/commonutil" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/discover/model" "github.com/goodrain/rainbond/worker/server" @@ -762,7 +761,7 @@ func (s *ServiceAction) ServiceCreate(sc *api_model.ServiceStruct) error { func (s *ServiceAction) openInnerPorts(componentID string, ports []dbmodel.TenantServicesPort) { // TODO: support open multiple ports in one task. for _, port := range ports { - if !commonutil.BoolValue(port.IsInnerService) { + if !port.IsOpen(){ continue } @@ -2062,17 +2061,6 @@ func (s *ServiceAction) isServiceClosed(serviceID string) error { return nil } -// DeleteComponentInBatch deletes components in batch. -func (s *ServiceAction) DeleteComponentInBatch(tx *gorm.DB, components []*dbmodel.TenantServices) error { - for _, cpt := range components { - err := s.deleteComponent(tx, cpt) - if err != nil { - return err - } - } - return nil -} - func (s *ServiceAction) deleteComponent(tx *gorm.DB, service *dbmodel.TenantServices) error { delService := service.ChangeDelete() delService.ID = 0 diff --git a/api/handler/service_handler.go b/api/handler/service_handler.go index bb7ffce26..716f63dfa 100644 --- a/api/handler/service_handler.go +++ b/api/handler/service_handler.go @@ -25,7 +25,6 @@ import ( dbmodel "github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/worker/discover/model" "github.com/goodrain/rainbond/worker/server/pb" - "github.com/jinzhu/gorm" ) //ServiceHandler service handler @@ -77,7 +76,6 @@ type ServiceHandler interface { GetServiceCheckInfo(uuid string) (*exector.ServiceCheckResult, *util.APIHandleError) GetServiceDeployInfo(tenantID, serviceID string) (*pb.DeployInfo, *util.APIHandleError) ListVersionInfo(serviceID string) (*api_model.BuildListRespVO, error) - DeleteComponentInBatch(tx *gorm.DB, components []*dbmodel.TenantServices) error AddAutoscalerRule(req *api_model.AutoscalerRuleReq) error UpdAutoscalerRule(req *api_model.AutoscalerRuleReq) error diff --git a/cmd/worker/option/option.go b/cmd/worker/option/option.go index 69957ca43..0c7fc752c 100644 --- a/cmd/worker/option/option.go +++ b/cmd/worker/option/option.go @@ -58,9 +58,10 @@ type Config struct { // Helm helm configuration. type Helm struct { - DataDir string - RepoFile string - RepoCache string + DataDir string + RepoFile string + RepoCache string + ChartCache string } //Worker worker server @@ -107,6 +108,7 @@ func (a *Worker) AddFlags(fs *pflag.FlagSet) { } a.Helm.RepoFile = path.Join(a.Helm.DataDir, "repo/repositories.yaml") a.Helm.RepoCache = path.Join(a.Helm.DataDir, "cache") + a.Helm.ChartCache = path.Join(a.Helm.DataDir, "chart") } //SetLog 设置log diff --git a/db/model/tenant.go b/db/model/tenant.go index 52b889ecf..57cc21599 100644 --- a/db/model/tenant.go +++ b/db/model/tenant.go @@ -23,6 +23,8 @@ import ( "os" "strings" "time" + + "github.com/goodrain/rainbond/util/commonutil" ) //Model 默认字段 @@ -324,6 +326,11 @@ func (t *TenantServicesPort) TableName() string { return "tenant_services_port" } +// IsOpen checks if the port is opened. +func (t *TenantServicesPort) IsOpen() bool { + return commonutil.BoolValue(t.IsOuterService) || commonutil.BoolValue(t.IsInnerService) +} + //TenantServiceLBMappingPort stream应用端口映射情况 type TenantServiceLBMappingPort struct { Model diff --git a/go.mod b/go.mod index 07e8b90d7..ca977164e 100644 --- a/go.mod +++ b/go.mod @@ -121,6 +121,7 @@ replace ( github.com/coreos/etcd => github.com/coreos/etcd v3.2.31+incompatible github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d github.com/docker/docker => github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible + github.com/godbus/dbus => github.com/godbus/dbus/v5 v5.0.4 google.golang.org/grpc => google.golang.org/grpc v1.29.0 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.20.0 k8s.io/apimachinery => k8s.io/apimachinery v0.20.0 @@ -129,5 +130,4 @@ replace ( k8s.io/client-go => k8s.io/client-go v0.20.0 k8s.io/code-generator => k8s.io/code-generator v0.20.0 k8s.io/component-base => k8s.io/component-base v0.20.0 - github.com/godbus/dbus => github.com/godbus/dbus/v5 v5.0.4 ) diff --git a/localcheck.sh b/localcheck.sh new file mode 100755 index 000000000..174c62bf3 --- /dev/null +++ b/localcheck.sh @@ -0,0 +1,10 @@ +#!/bin/sh +TARGET_BRANCH=${TARGET_BRANCH:-'master'} + +CHANGED_MARKDOWN_FILES=$(git diff --name-only ${TARGET_BRANCH} | grep .go) +for file in ${CHANGED_MARKDOWN_FILES}; do + echo "golint ${file}" + golint -set_exit_status=true ${file} || exit 1 +done + +echo "code golint check success" \ No newline at end of file diff --git a/worker/master/helmapp/app.go b/worker/master/helmapp/app.go index 8525abde6..e57b732a4 100644 --- a/worker/master/helmapp/app.go +++ b/worker/master/helmapp/app.go @@ -68,7 +68,7 @@ func (a *App) Chart() string { } // NewApp creates a new app. -func NewApp(ctx context.Context, kubeClient clientset.Interface, rainbondClient versioned.Interface, helmApp *v1alpha1.HelmApp, repoFile, repoCache string) (*App, error) { +func NewApp(ctx context.Context, kubeClient clientset.Interface, rainbondClient versioned.Interface, helmApp *v1alpha1.HelmApp, repoFile, repoCache, chartCache string) (*App, error) { helmCmd, err := helm.NewHelm(helmApp.GetNamespace(), repoFile, repoCache) if err != nil { return nil, err @@ -93,7 +93,7 @@ func NewApp(ctx context.Context, kubeClient clientset.Interface, rainbondClient overrides: helmApp.Spec.Overrides, helmCmd: helmCmd, repo: repo, - chartDir: path.Join("/tmp/helm/chart", helmApp.Namespace, helmApp.Name, helmApp.Spec.Version), + chartDir: path.Join(chartCache, helmApp.Namespace, helmApp.Name, helmApp.Spec.Version), }, nil } diff --git a/worker/master/helmapp/controller.go b/worker/master/helmapp/controller.go index 1d5c123d6..09a63ea09 100644 --- a/worker/master/helmapp/controller.go +++ b/worker/master/helmapp/controller.go @@ -38,13 +38,13 @@ type Controller struct { // NewController creates a new helm app controller. func NewController(ctx context.Context, stopCh chan struct{}, kubeClient clientset.Interface, clientset versioned.Interface, resyncPeriod time.Duration, - repoFile, repoCache string) *Controller { + repoFile, repoCache, chartCache string) *Controller { workQueue := workqueue.New() finalizerQueue := workqueue.New() storer := NewStorer(clientset, resyncPeriod, workQueue, finalizerQueue) - controlLoop := NewControlLoop(ctx, kubeClient, clientset, storer, workQueue, repoFile, repoCache) - finalizer := NewFinalizer(ctx, kubeClient, clientset, finalizerQueue, repoFile, repoCache) + controlLoop := NewControlLoop(ctx, kubeClient, clientset, storer, workQueue, repoFile, repoCache, chartCache) + finalizer := NewFinalizer(ctx, kubeClient, clientset, finalizerQueue, repoFile, repoCache, chartCache) return &Controller{ storer: storer, diff --git a/worker/master/helmapp/controlloop.go b/worker/master/helmapp/controlloop.go index b28ad166f..ca843315a 100644 --- a/worker/master/helmapp/controlloop.go +++ b/worker/master/helmapp/controlloop.go @@ -52,6 +52,7 @@ type ControlLoop struct { repo *helm.Repo repoFile string repoCache string + chartCache string } // NewControlLoop - @@ -62,6 +63,7 @@ func NewControlLoop(ctx context.Context, workQueue workqueue.Interface, repoFile string, repoCache string, + chartCache string, ) *ControlLoop { repo := helm.NewRepo(repoFile, repoCache) return &ControlLoop{ @@ -74,6 +76,7 @@ func NewControlLoop(ctx context.Context, repo: repo, repoFile: repoFile, repoCache: repoCache, + chartCache: chartCache, } } @@ -124,7 +127,7 @@ func nameNamespace(key string) (string, string) { // Reconcile - func (c *ControlLoop) Reconcile(helmApp *v1alpha1.HelmApp) error { - app, err := NewApp(c.ctx, c.kubeClient, c.clientset, helmApp, c.repoFile, c.repoCache) + app, err := NewApp(c.ctx, c.kubeClient, c.clientset, helmApp, c.repoFile, c.repoCache, c.chartCache) if err != nil { return err } diff --git a/worker/master/helmapp/finilizer.go b/worker/master/helmapp/finilizer.go index b65c95c46..26396dd97 100644 --- a/worker/master/helmapp/finilizer.go +++ b/worker/master/helmapp/finilizer.go @@ -37,6 +37,7 @@ type Finalizer struct { queue workqueue.Interface repoFile string repoCache string + chartCache string } // NewFinalizer creates a new finalizer. @@ -46,6 +47,7 @@ func NewFinalizer(ctx context.Context, workQueue workqueue.Interface, repoFile string, repoCache string, + chartCache string, ) *Finalizer { return &Finalizer{ ctx: ctx, @@ -55,6 +57,7 @@ func NewFinalizer(ctx context.Context, queue: workQueue, repoFile: repoFile, repoCache: repoCache, + chartCache: chartCache, } } @@ -89,7 +92,7 @@ func (c *Finalizer) run(obj interface{}) error { logrus.Infof("start uninstall helm app: %s/%s", helmApp.Name, helmApp.Namespace) - app, err := NewApp(c.ctx, c.kubeClient, c.clientset, helmApp, c.repoFile, c.repoCache) + app, err := NewApp(c.ctx, c.kubeClient, c.clientset, helmApp, c.repoFile, c.repoCache, c.chartCache) if err != nil { return err } diff --git a/worker/master/helmapp/suite_test.go b/worker/master/helmapp/suite_test.go index 81b039c13..c33bed1fd 100644 --- a/worker/master/helmapp/suite_test.go +++ b/worker/master/helmapp/suite_test.go @@ -73,7 +73,7 @@ var _ = BeforeSuite(func() { rainbondClient = versioned.NewForConfigOrDie(restConfig) kubeClient = clientset.NewForConfigOrDie(restConfig) - ctrl := NewController(ctx, stopCh, kubeClient, rainbondClient, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache") + ctrl := NewController(ctx, stopCh, kubeClient, rainbondClient, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache", "/tmp/helm/chart") go ctrl.Start() // create namespace diff --git a/worker/master/master.go b/worker/master/master.go index c7a4e85e0..3ba5a564e 100644 --- a/worker/master/master.go +++ b/worker/master/master.go @@ -91,7 +91,7 @@ func NewMasterController(conf option.Config, store store.Storer, kubeClient kube }, serverVersion.GitVersion) stopCh := make(chan struct{}) - helmAppController := helmapp.NewController(ctx, stopCh, kubeClient, rainbondClient, 5*time.Second, conf.Helm.RepoFile, conf.Helm.RepoCache) + helmAppController := helmapp.NewController(ctx, stopCh, kubeClient, rainbondClient, 5*time.Second, conf.Helm.RepoFile, conf.Helm.RepoCache, conf.Helm.RepoCache) return &Controller{ conf: conf, From f271583fbb1c4d650de8e7acd9387d1e2a1fec51 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 23 Jun 2021 17:23:46 +0800 Subject: [PATCH 45/65] dedup helm app informer --- api/handler/application_handler.go | 2 +- api/handler/gateway_action.go | 97 +++++++++++------------------ worker/appm/store/store.go | 11 ++++ worker/discover/manager.go | 5 +- worker/master/helmapp/controller.go | 13 ++-- worker/master/helmapp/store.go | 15 +---- worker/master/master.go | 3 +- 7 files changed, 61 insertions(+), 85 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 4ff6870f2..204414716 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -131,7 +131,7 @@ func (a *ApplicationAction) createHelmApp(ctx context.Context, app *dbmodel.Appl defer cancel() _, err := a.kubeClient.CoreV1().Namespaces().Create(ctx1, &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: app.AppName, + Name: app.TenantID, Labels: labels, }, }, metav1.CreateOptions{}) diff --git a/api/handler/gateway_action.go b/api/handler/gateway_action.go index 559c46d8f..6859d740e 100644 --- a/api/handler/gateway_action.go +++ b/api/handler/gateway_action.go @@ -59,21 +59,23 @@ func CreateGatewayManager(dbmanager db.Manager, mqclient client.MQClient, etcdCl // AddHTTPRule adds http rule to db if it doesn't exists. func (g *GatewayAction) AddHTTPRule(req *apimodel.AddHTTPRuleStruct) error { - if err := db.GetManager().DB().Transaction(func(tx *gorm.DB) error { - return g.CreateHTTPRule(tx, req) - }); err != nil { - return err - } + return db.GetManager().DB().Transaction(func(tx *gorm.DB) error { + if err := g.CreateHTTPRule(tx, req); err != nil { + return err + } - // Effective immediately - if err := g.SendTaskDeprecated(map[string]interface{}{ - "service_id": req.ServiceID, - "action": "add-http-rule", - "limit": map[string]string{"domain": req.Domain}, - }); err != nil { - logrus.Errorf("send runtime message about gateway failure %s", err.Error()) - } - return nil + // Effective immediately + err := g.SendTaskDeprecated(map[string]interface{}{ + "service_id": req.ServiceID, + "action": "add-http-rule", + "limit": map[string]string{"domain": req.Domain}, + }) + if err != nil { + return fmt.Errorf("send http rule task: %v", err) + } + + return nil + }) } // CreateHTTPRule Create http rules through transactions @@ -123,19 +125,6 @@ func (g *GatewayAction) CreateHTTPRule(tx *gorm.DB, req *apimodel.AddHTTPRuleStr } } - // end transaction - if err := tx.Commit().Error; err != nil { - tx.Rollback() - return fmt.Errorf("commit transaction: %v", err) - } - // Effective immediately - if err := g.SendTaskDeprecated(map[string]interface{}{ - "service_id": req.ServiceID, - "action": "add-http-rule", - "limit": map[string]string{"domain": req.Domain}, - }); err != nil { - logrus.Errorf("send runtime message about gateway failure %s", err.Error()) - } return nil } @@ -234,14 +223,6 @@ func (g *GatewayAction) UpdateHTTPRule(req *apimodel.UpdateHTTPRuleStruct) error return nil } -func (g *GatewayAction) isCertificateBeingUsed(certID string) (bool, error) { - rules, err := g.dbmanager.HTTPRuleDao().GetHTTPRulesByCertificateID(certID) - if err != nil { - return false, fmt.Errorf("list rules by certificate id: %v", err) - } - return len(rules) > 0, nil -} - // DeleteHTTPRule deletes http rule, including certificate and rule extensions func (g *GatewayAction) DeleteHTTPRule(req *apimodel.DeleteHTTPRuleStruct) error { // begin transaction @@ -328,7 +309,7 @@ func (g *GatewayAction) UpdateCertificate(req apimodel.AddHTTPRuleStruct, httpRu return err } if cert == nil { - return fmt.Errorf("Certificate doesn't exist based on certificateID(%s)", req.CertificateID) + return fmt.Errorf("certificate doesn't exist based on certificateID(%s)", req.CertificateID) } cert.CertificateName = fmt.Sprintf("cert-%s", util.NewUUID()[0:8]) @@ -339,19 +320,22 @@ func (g *GatewayAction) UpdateCertificate(req apimodel.AddHTTPRuleStruct, httpRu // AddTCPRule adds tcp rule. func (g *GatewayAction) AddTCPRule(req *apimodel.AddTCPRuleStruct) error { - if err := g.dbmanager.DB().Transaction(func(tx *gorm.DB) error { - return g.CreateTCPRule(tx, req) - }); err != nil { - return err - } - if err := g.SendTaskDeprecated(map[string]interface{}{ - "service_id": req.ServiceID, - "action": "add-tcp-rule", - "limit": map[string]string{"tcp-address": fmt.Sprintf("%s:%d", req.IP, req.Port)}, - }); err != nil { - logrus.Errorf("send runtime message about gateway failure %s", err.Error()) - } - return nil + return g.dbmanager.DB().Transaction(func(tx *gorm.DB) error { + if err := g.CreateTCPRule(tx, req); err != nil { + return err + } + + err := g.SendTaskDeprecated(map[string]interface{}{ + "service_id": req.ServiceID, + "action": "add-tcp-rule", + "limit": map[string]string{"tcp-address": fmt.Sprintf("%s:%d", req.IP, req.Port)}, + }) + if err != nil { + return fmt.Errorf("send tcp rule task: %v", err) + } + + return nil + }) } // CreateTCPRule Create tcp rules through transactions @@ -379,17 +363,6 @@ func (g *GatewayAction) CreateTCPRule(tx *gorm.DB, req *apimodel.AddTCPRuleStruc } } - // end transaction - if err := tx.Commit().Error; err != nil { - return err - } - if err := g.SendTaskDeprecated(map[string]interface{}{ - "service_id": tcpRule.ServiceID, - "action": "add-tcp-rule", - "limit": map[string]string{"tcp-address": fmt.Sprintf("%s:%d", tcpRule.IP, tcpRule.Port)}, - }); err != nil { - logrus.Errorf("send runtime message about gateway failure %s", err.Error()) - } return nil } @@ -630,7 +603,7 @@ func (g *GatewayAction) SendTaskDeprecated(in map[string]interface{}) error { sid := in["service_id"].(string) service, err := db.GetManager().TenantServiceDao().GetServiceByID(sid) if err != nil { - return fmt.Errorf("Unexpected error occurred while getting Service by ServiceID(%s): %v", sid, err) + return fmt.Errorf("unexpected error occurred while getting Service by ServiceID(%s): %v", sid, err) } body := make(map[string]interface{}) body["deploy_version"] = service.DeployVersion @@ -643,7 +616,7 @@ func (g *GatewayAction) SendTaskDeprecated(in map[string]interface{}) error { TaskBody: body, }) if err != nil { - return fmt.Errorf("Unexpected error occurred while sending task: %v", err) + return fmt.Errorf("unexpected error occurred while sending task: %v", err) } return nil } diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index 1993df284..f5dd01b6f 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -100,6 +100,9 @@ type Storer interface { ListPods(namespace string, selector labels.Selector) ([]*corev1.Pod, error) ListReplicaSets(namespace string, selector labels.Selector) ([]*appsv1.ReplicaSet, error) ListServices(namespace string, selector labels.Selector) ([]*corev1.Service, error) + + Informer() *Informer + Lister() *Lister } // EventType type of event associated with an informer @@ -342,6 +345,14 @@ func NewStore( return store } +func (a *appRuntimeStore) Informer() *Informer { + return a.informers +} + +func (a *appRuntimeStore) Lister() *Lister { + return a.listers +} + func listProbeInfos(ep *corev1.Endpoints, sid string) []*ProbeInfo { var probeInfos []*ProbeInfo addProbe := func(pi *ProbeInfo) { diff --git a/worker/discover/manager.go b/worker/discover/manager.go index 97109f169..35640f0ff 100644 --- a/worker/discover/manager.go +++ b/worker/discover/manager.go @@ -104,10 +104,7 @@ func (t *TaskManager) Do() { case <-t.ctx.Done(): return default: - ctx, cancel := context.WithCancel(t.ctx) - defer cancel() - - data, err := t.client.Dequeue(ctx, &pb.DequeueRequest{Topic: client.WorkerTopic, ClientHost: hostname + "-worker"}) + data, err := t.client.Dequeue(t.ctx, &pb.DequeueRequest{Topic: client.WorkerTopic, ClientHost: hostname + "-worker"}) if err != nil { if grpc1.ErrorDesc(err) == context.DeadlineExceeded.Error() { continue diff --git a/worker/master/helmapp/controller.go b/worker/master/helmapp/controller.go index 09a63ea09..6d757741c 100644 --- a/worker/master/helmapp/controller.go +++ b/worker/master/helmapp/controller.go @@ -20,11 +20,11 @@ package helmapp import ( "context" - "time" - "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/goodrain/rainbond/pkg/generated/listers/rainbond/v1alpha1" "github.com/sirupsen/logrus" clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" ) @@ -37,11 +37,16 @@ type Controller struct { } // NewController creates a new helm app controller. -func NewController(ctx context.Context, stopCh chan struct{}, kubeClient clientset.Interface, clientset versioned.Interface, resyncPeriod time.Duration, +func NewController(ctx context.Context, + stopCh chan struct{}, + kubeClient clientset.Interface, + clientset versioned.Interface, + informer cache.SharedIndexInformer, + lister v1alpha1.HelmAppLister, repoFile, repoCache, chartCache string) *Controller { workQueue := workqueue.New() finalizerQueue := workqueue.New() - storer := NewStorer(clientset, resyncPeriod, workQueue, finalizerQueue) + storer := NewStorer(informer, lister, workQueue, finalizerQueue) controlLoop := NewControlLoop(ctx, kubeClient, clientset, storer, workQueue, repoFile, repoCache, chartCache) finalizer := NewFinalizer(ctx, kubeClient, clientset, finalizerQueue, repoFile, repoCache, chartCache) diff --git a/worker/master/helmapp/store.go b/worker/master/helmapp/store.go index e4b6cb2e4..dfa39f29d 100644 --- a/worker/master/helmapp/store.go +++ b/worker/master/helmapp/store.go @@ -23,11 +23,8 @@ import ( "time" rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" - "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" - "github.com/goodrain/rainbond/pkg/generated/informers/externalversions" "github.com/goodrain/rainbond/pkg/generated/listers/rainbond/v1alpha1" k8sutil "github.com/goodrain/rainbond/util/k8s" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" @@ -45,17 +42,10 @@ type store struct { } // NewStorer creates a new storer. -func NewStorer(clientset versioned.Interface, - resyncPeriod time.Duration, +func NewStorer(informer cache.SharedIndexInformer, + lister v1alpha1.HelmAppLister, workqueue workqueue.Interface, finalizerQueue workqueue.Interface) Storer { - // create informers factory, enable and assign required informers - sharedInformer := externalversions.NewSharedInformerFactoryWithOptions(clientset, resyncPeriod, - externalversions.WithNamespace(corev1.NamespaceAll)) - - lister := sharedInformer.Rainbond().V1alpha1().HelmApps().Lister() - - informer := sharedInformer.Rainbond().V1alpha1().HelmApps().Informer() informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { helmApp := obj.(*rainbondv1alpha1.HelmApp) @@ -72,7 +62,6 @@ func NewStorer(clientset versioned.Interface, finalizerQueue.Add(obj) }, }) - return &store{ informer: informer, lister: lister, diff --git a/worker/master/master.go b/worker/master/master.go index 9a81ae6ca..55a9e0c73 100644 --- a/worker/master/master.go +++ b/worker/master/master.go @@ -99,7 +99,8 @@ func NewMasterController(conf option.Config, store store.Storer, kubeClient kube }, serverVersion.GitVersion) stopCh := make(chan struct{}) - helmAppController := helmapp.NewController(ctx, stopCh, kubeClient, rainbondClient, 5*time.Second, conf.Helm.RepoFile, conf.Helm.RepoCache, conf.Helm.RepoCache) + helmAppController := helmapp.NewController(ctx, stopCh, kubeClient, rainbondClient, + store.Informer().HelmApp, store.Lister().HelmApp, conf.Helm.RepoFile, conf.Helm.RepoCache, conf.Helm.RepoCache) return &Controller{ conf: conf, From 5a63dc5dd745ee6d1b0d834ec6b11e302c419ed5 Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Thu, 24 Jun 2021 10:05:49 +0800 Subject: [PATCH 46/65] add third component crd --- docs/Pain_points.md | 12 -- docs/Wechat.jpeg | Bin 55374 -> 0 bytes docs/pod-status.md | 50 ------ go.sum | 5 - pkg/apis/rainbond/v1alpha1/helmapp_status.go | 18 +++ pkg/apis/rainbond/v1alpha1/helmapp_types.go | 26 ++-- pkg/apis/rainbond/v1alpha1/third_component.go | 147 ++++++++++++++++++ 7 files changed, 179 insertions(+), 79 deletions(-) delete mode 100644 docs/Pain_points.md delete mode 100644 docs/Wechat.jpeg delete mode 100644 docs/pod-status.md create mode 100644 pkg/apis/rainbond/v1alpha1/third_component.go diff --git a/docs/Pain_points.md b/docs/Pain_points.md deleted file mode 100644 index 1438bd895..000000000 --- a/docs/Pain_points.md +++ /dev/null @@ -1,12 +0,0 @@ -# 云帮解决用户痛点 ---- -## 微服务架构落地 -“微服务架构”概念自提出以来,深受业界喜爱。各类历史架构纷纷转向微服务架构。企业如何快速解决传统应用服务化,服务治理,服务发现,服务监控等等难题从而获得微服务架构带来的种种优势?云帮,原生的微服务管理平台,无需任何设置,默认提供微服务高效管理服务。也可以通过云帮强大的应用插件体系带来丰富多彩的微服务治理扩展,使企业微服务架构落地完全无障碍。 -## 持续集成/持续交付落地 -云帮作为以应用为中心的交付平台,支持各类流行开发语言一键部署,自动部署。商业应用对接好雨云市平台,应用提供商可以快速交付生产级应用环境。对于企业自研应用,云帮助你持续构建应用,平滑升级应用,无需人工干预。 -## 复杂架构快速上云 -云帮平台运行各类应用(数据库,消息中间件,Web应用,大数据处理应用,人工智能应用等等),你的各类型复杂的架构经过简单得改造即可运行于云帮平台,即可实现云端扩展。 -## 高并发应用快速伸缩 -云帮借助Docker,Kubernetes等容器技术作为应用的运行载体,赋予能够应用快速伸缩得特性。云帮应用级实时性能分析系统提供数据参考,实现应用按需自动伸缩。或者用户指定伸缩策略(例如指定高峰时间段)实现半自动应用伸缩。 -## 海量应用高效便捷管理 -云帮作为以应用为中心的跨数据中心应用管理平台,一套平台,具有海量的计算能力。云帮智能化,自动化的资源管理系统,让用户无需投入时间精力关注物理资源。海量的应用,同一个管理方式。使用一个简单的操作UI,即可对海量的应用实现多元化的控制。 \ No newline at end of file diff --git a/docs/Wechat.jpeg b/docs/Wechat.jpeg deleted file mode 100644 index 1aa36e914e3f0ed41d75f2db906be86d78f8f9c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55374 zcmeFZ2|Seh+dqDfZAwXtNl`{c$&!Q?sTny)jx2?;mJ*UAWJ|Zwst|=zGEpJRBx{zY z#ZpSvOi{_cXWwV;`CmgZopZj=^L?J@|9kzP-|O{v&NTNu_wre;>v~`7=fnEM`i{)s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st zWzTP$o*!wFq;;l}n&9CE;gU#$w*HgeRbZQWXvGH+ZaAWxW9*7YARMFS~%pWTvalE@{C`cn6j+JmHnq} zD|YM1k>ql{5UxD`Y~5{ojNcfixw1LS?A8F)C-}4_l}yqlPNF)L-*87G*LBHOy`)yI z$F)G7M1dSBIR8Z}SxfQdwggP|1$Yw5p2(r0el8foKCL3wG=TIPb!P=fM|^!#lYKk% z$5zR#o>x;%!9Tb6l{{Y@fj&nCmggPtrz~ATXvFm2^vobZ+BC*Wvm7}f6!rhOLp+vO z=GFlQuQeS!*Bh*pTGv^bI#(`8ram{fISlq92!=V!H$N9^Mmd8q-5Dw=mt3P29EK?5 zA)kcV!=m1i{Kd)jHexS0Lo(S/service//pod//detail - -**响应** - -| 字段 | 类型 | 说明 | -|:-----------|:-------|:-----------------------------------------------------| -| name | string | 名字 | -| node | string | 所在节点 | -| start_time | string | 创建时间 | -| status | object | 实例状态, `status` | -| ip | string | 实例IP地址 | -| containers | array | 实例中的容器, `containers` | -| events | array | 事件 , `events` | - -podstatus - -| 字段 | 类型 | 说明 | -|:--------|:-------|:---------| -| status | string | 实例状态 | -| reason | string | 原因 | -| message | string | 说明 | -| advice | string | 建议 | - -containers - -| 字段 | 类型 | 说明 | -|:---------------|:-------|:--------------------------------------------------| -| image | string | 镜像名 | -| state | string | 状态 | -| reason | string | 原因, 对应上一个字段State, 异常状态的原因 | -| started | string | 原因, 对应上一个字段State, 容器开始正常运行的时间 | -| limit_memory | 待定 | 内存上限 | -| limit_cpu | 待定 | CPU上限 | -| request_memory | 待定 | 内存下限 | -| request_cpu | 待定 | CPU下限 | - -events - -| 字段 | 类型 | 说明 | -|:--------|:-------|:-----| -| type | string | 类型 | -| reason | string | 原因 | -| age | string | 时间 | -| Message | string | 说明 | \ No newline at end of file diff --git a/go.sum b/go.sum index 6f23c0964..6da5c6a30 100644 --- a/go.sum +++ b/go.sum @@ -416,9 +416,6 @@ github.com/gobuffalo/packr/v2 v2.7.1 h1:n3CIW5T17T8v4GGK5sWXLVWJhCz7b5aNLSxW6gYi github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v4.1.0+incompatible h1:WqqLRTsQic3apZUK9qC5sGNfXthmPXzUZ7nQPrNITa4= -github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -966,8 +963,6 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v2.20.8+incompatible h1:8c7Atn0FAUZJo+f4wYbN0iVpdWniCQk7IYwGtgdh1mY= -github.com/shirou/gopsutil v2.20.8+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.3+incompatible h1:uenXGGa8ESCQq+dbgtl916dmg6PSAz2cXov0uORQ9v8= github.com/shirou/gopsutil v3.21.3+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_status.go b/pkg/apis/rainbond/v1alpha1/helmapp_status.go index bb90f31dd..468f7e806 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_status.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_status.go @@ -1,3 +1,21 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 v1alpha1 import ( diff --git a/pkg/apis/rainbond/v1alpha1/helmapp_types.go b/pkg/apis/rainbond/v1alpha1/helmapp_types.go index ea0bf979a..86b80ff71 100644 --- a/pkg/apis/rainbond/v1alpha1/helmapp_types.go +++ b/pkg/apis/rainbond/v1alpha1/helmapp_types.go @@ -1,18 +1,20 @@ -/* +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. +// 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. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +// 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. - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . package v1alpha1 diff --git a/pkg/apis/rainbond/v1alpha1/third_component.go b/pkg/apis/rainbond/v1alpha1/third_component.go new file mode 100644 index 000000000..245ee803b --- /dev/null +++ b/pkg/apis/rainbond/v1alpha1/third_component.go @@ -0,0 +1,147 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 v1alpha1 + +// +genclient +// +kubebuilder:object:root=true + +// HelmApp - +// +kubebuilder:subresource:status +// +kubebuilder:resource:path=thirdcomponent,scope=Namespaced +type ThirdComponent struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ThirdComponentSpec `json:"spec,omitempty"` + Status ThirdComponentStatus `json:"status,omitempty"` +} + +type ThirdComponentSpec struct { + // health check probe + // +optional + HealthProbe *HealthProbe `json:"health_probe,omitempty"` + // component regist ports + Ports []*ComponentPort `json:"ports"` + // endpoint source config + EndpointSource ThirdComponentEndpointSource `json:"endpoint_source"` +} + +type ThirdComponentEndpointSource struct { + StaticEndpoints []*ThirdComponentEndpoint `json:"endpoints,omitempty"` + KubernetesService KubernetesServiceSource `json:"kubernetes_service,omitempty"` + //other source + // NacosSource + // EurekaSource + // ConsulSource + // CustomAPISource +} + +type ThirdComponentEndpoint struct { + // The address including the port number. + Address string `json:"address"` + // Address protocols, including: HTTP, TCP, UDP, HTTPS + // +optional + Protocol string `json:"protocol,omitempty"` + // Specify a private certificate when the protocol is HTTPS + // +optional + ClentSecret string `json:"client_secret,omitempty"` +} + +type KubernetesServiceSource struct { + // If not specified, the namespace is the namespace of the current resource + // +optional + Namespace string `json:"namespace,omitempty"` + Name string `json:"name"` +} + +type HealthProbe struct { + // HTTPGet specifies the http request to perform. + // +optional + HTTPGet *HTTPGetAction `json:"httpGet,omitempty"` + // TCPSocket specifies an action involving a TCP port. + // TCP hooks not yet supported + // TODO: implement a realistic TCP lifecycle hook + // +optional + TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"` +} + +type ComponentPort struct { +} + +//TCPSocketAction enable tcp check +type TCPSocketAction struct { +} + +//HTTPGetAction enable http check +type HTTPGetAction struct { + // Path to access on the HTTP server. + // +optional + Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + // Custom headers to set in the request. HTTP allows repeated headers. + // +optional + HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"` +} + +// HTTPHeader describes a custom header to be used in HTTP probes +type HTTPHeader struct { + // The header field name + Name string `json:"name"` + // The header field value + Value string `json:"value"` +} + +type ComponentPhase string + +// These are the valid statuses of pods. +const ( + // ComponentPending means the component has been accepted by the system, but one or more of the service or endpoint + // can not create success + ComponentPending ComponentPhase = "Pending" + // ComponentRunning means the the service and endpoints create success. + ComponentRunning ComponentPhase = "Running" + // ComponentFailed means that found endpoint from source failure + ComponentFailed ComponentPhase = "Failed" +) + +type ThirdComponentStatus struct { + Phase ComponentPhase `json:"phase"` + Endpoints []*ThirdComponentEndpointStatus `json:"endpoints"` +} + +type EndpointStatus string + +const ( + //EndpointReady If a probe is configured, it means the probe has passed. + EndpointReady EndpointStatus = "Ready" + //EndpointNotReady it means the probe not passed. + EndpointNotReady EndpointStatus = "NotReady" +) + +//ThirdComponentEndpointStatus endpoint status +type ThirdComponentEndpointStatus struct { + // The address including the port number. + Address string `json:"address"` + //PodName means endpoint come from kubernetes pod + // +optional + PodName string `json:"pod_name"` + //Status endpoint status + Status EndpointStatus `json:"status"` + //Reason probe not passed reason + Reason string `json:"reason"` +} From 0378cc3478ba7e6cd8f288207a8db8f3c2e3d27e Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 24 Jun 2021 13:30:59 +0800 Subject: [PATCH 47/65] replace tcpPorts and udpPorts with ports --- api/handler/application_handler.go | 6 +- api/model/app.go | 2 +- worker/server/pb/app_runtime_server.pb.go | 95 ++++++++++------------- worker/server/pb/app_runtime_server.proto | 7 +- worker/server/server.go | 21 ++--- 5 files changed, 56 insertions(+), 75 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 204414716..7dec9c1cf 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -210,9 +210,7 @@ func (a *ApplicationAction) updateHelmApp(ctx context.Context, app *dbmodel.Appl } return errors.Wrap(err, "update app") } - if len(req.Overrides) > 0 { - helmApp.Spec.Overrides = req.Overrides - } + helmApp.Spec.Overrides = req.Overrides if req.Version != "" { helmApp.Spec.Version = req.Version } @@ -485,7 +483,7 @@ func (a *ApplicationAction) ListServices(ctx context.Context, app *dbmodel.Appli svc.Pods = a.convertPods(service.Pods) svc.OldPods = a.convertPods(service.OldPods) - svc.TCPPorts = append(svc.TCPPorts, service.TcpPorts...) + svc.Ports = append(svc.Ports, service.Ports...) services = append(services, svc) } diff --git a/api/model/app.go b/api/model/app.go index ab3795499..15cb8a6cd 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -32,7 +32,7 @@ type AppStatusCondition struct { type AppService struct { ServiceName string `json:"service_name"` Address string `json:"address"` - TCPPorts []int32 `json:"tcp_ports"` + Ports []int32 `json:"tcp_ports"` OldPods []*AppPod `json:"oldPods"` Pods []*AppPod `json:"pods"` } diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index 3eb32bff3..a288e3c63 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -2140,10 +2140,9 @@ func (m *AppStatusCondition) GetMessage() string { type AppService struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - TcpPorts []int32 `protobuf:"varint,3,rep,packed,name=tcpPorts,proto3" json:"tcpPorts,omitempty"` - UdpPorts []int32 `protobuf:"varint,4,rep,packed,name=udpPorts,proto3" json:"udpPorts,omitempty"` - Pods []*AppService_Pod `protobuf:"bytes,5,rep,name=pods,proto3" json:"pods,omitempty"` - OldPods []*AppService_Pod `protobuf:"bytes,6,rep,name=oldPods,proto3" json:"oldPods,omitempty"` + Ports []int32 `protobuf:"varint,3,rep,packed,name=ports,proto3" json:"ports,omitempty"` + Pods []*AppService_Pod `protobuf:"bytes,4,rep,name=pods,proto3" json:"pods,omitempty"` + OldPods []*AppService_Pod `protobuf:"bytes,5,rep,name=oldPods,proto3" json:"oldPods,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2188,16 +2187,9 @@ func (m *AppService) GetAddress() string { return "" } -func (m *AppService) GetTcpPorts() []int32 { +func (m *AppService) GetPorts() []int32 { if m != nil { - return m.TcpPorts - } - return nil -} - -func (m *AppService) GetUdpPorts() []int32 { - if m != nil { - return m.UdpPorts + return m.Ports } return nil } @@ -2482,13 +2474,13 @@ func init() { func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2594 bytes of a gzipped FileDescriptorProto + // 2584 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x39, 0x4b, 0x6f, 0x1b, 0xc9, 0xd1, 0x22, 0x29, 0xbe, 0x8a, 0x12, 0x45, 0xb5, 0x1e, 0xe6, 0x72, 0xd7, 0x8f, 0x9d, 0xcf, 0x36, 0x0c, 0xdb, 0x9f, 0xd6, 0x56, 0xd6, 0xf1, 0x33, 0x1b, 0x50, 0x24, 0x57, 0x66, 0x22, 0x51, 0xc4, 0x90, 0xda, 0x60, 0x81, 0x00, 0xc4, 0x88, 0xd3, 0x2b, 0x4f, 0x3c, 0x8f, 0xf6, 0x3c, 0xb4, 0xe1, - 0x31, 0xb9, 0xe6, 0x98, 0x9f, 0x90, 0x43, 0x0e, 0xc9, 0x31, 0x08, 0x72, 0xda, 0xbf, 0x90, 0x9f, - 0x90, 0x9f, 0xb0, 0x97, 0xdc, 0x72, 0x09, 0xaa, 0xbb, 0xe7, 0xc9, 0x91, 0x15, 0x07, 0x09, 0x72, + 0x31, 0xb9, 0xe6, 0x98, 0x9f, 0x90, 0x43, 0x0e, 0xc9, 0x31, 0x08, 0x72, 0xda, 0xbf, 0x90, 0x73, + 0x4e, 0xf9, 0x09, 0x7b, 0xc9, 0x0f, 0x08, 0xaa, 0xbb, 0xe7, 0xc9, 0x91, 0x15, 0x07, 0x09, 0x72, 0xe2, 0x54, 0x75, 0x55, 0x57, 0x75, 0x75, 0xbd, 0xba, 0x08, 0x6d, 0x8d, 0xb1, 0x99, 0x1b, 0xd8, 0xbe, 0x61, 0xd1, 0x99, 0x47, 0xdd, 0x0b, 0xea, 0xee, 0x31, 0xd7, 0xf1, 0x1d, 0x52, 0x64, 0x67, 0x4a, 0x15, 0xca, 0x03, 0x8b, 0xf9, 0x0b, 0xe5, 0x26, 0x54, 0xba, 0x8c, 0xa9, 0xf4, 0x1d, 0xd9, @@ -2571,7 +2563,7 @@ var fileDescriptor_f94cf1a886c479d6 = []byte{ 0x74, 0x70, 0x3c, 0x1c, 0x75, 0xa7, 0xc8, 0x57, 0x26, 0x6b, 0x50, 0xeb, 0x1e, 0x8c, 0x4e, 0xd4, 0xe3, 0xee, 0x51, 0xab, 0x82, 0xab, 0xc3, 0xd1, 0x70, 0x3a, 0x14, 0xab, 0x55, 0x84, 0x27, 0xbd, 0xd7, 0x83, 0xfe, 0xe9, 0x11, 0xc2, 0x35, 0xa4, 0x1e, 0x9d, 0x4c, 0xd5, 0x41, 0xb7, 0xff, 0x75, - 0xab, 0x8e, 0x32, 0x4f, 0x47, 0xaf, 0x07, 0xdd, 0xa3, 0xe9, 0xeb, 0xaf, 0x5b, 0xa0, 0xfc, 0xbd, + 0xab, 0x8e, 0x32, 0x4f, 0x47, 0xaf, 0x07, 0xdd, 0xa3, 0xe9, 0xeb, 0xaf, 0x5b, 0xa0, 0xfc, 0xa3, 0xc0, 0x1b, 0xf9, 0xb8, 0x3b, 0xdc, 0x86, 0xb2, 0x61, 0xa1, 0x05, 0xe4, 0x13, 0x98, 0x03, 0x88, 0xe5, 0x7d, 0x58, 0x58, 0x70, 0x38, 0x90, 0xb0, 0x63, 0x29, 0x6b, 0x47, 0xde, 0x73, 0x51, 0x3d, 0x6c, 0xb8, 0x25, 0x88, 0x65, 0x82, 0xd7, 0x87, 0x99, 0x28, 0x0c, 0xd2, 0x66, 0x0d, 0x8e, 0x3b, @@ -2603,7 +2595,7 @@ var fileDescriptor_f94cf1a886c479d6 = []byte{ 0xae, 0xb8, 0x98, 0xf1, 0xd4, 0x55, 0x09, 0x29, 0x7f, 0x2a, 0x40, 0x47, 0x3e, 0x2d, 0xc4, 0xb5, 0xa4, 0x47, 0x69, 0x07, 0x99, 0x51, 0xda, 0xfd, 0xc4, 0xdb, 0x3e, 0x87, 0x3e, 0x77, 0xae, 0xa6, 0x5e, 0x35, 0x57, 0xfb, 0xff, 0xa4, 0x85, 0x9b, 0xfb, 0xd7, 0x2e, 0x91, 0x91, 0x34, 0xfd, 0xdf, - 0x8a, 0x50, 0x8f, 0xe6, 0x95, 0x89, 0xd6, 0xa1, 0x90, 0x6a, 0x1d, 0x5a, 0x50, 0xc2, 0x9c, 0x27, + 0x8b, 0x50, 0x8f, 0xe6, 0x95, 0x89, 0xd6, 0xa1, 0x90, 0x6a, 0x1d, 0x5a, 0x50, 0xc2, 0x9c, 0x27, 0xfa, 0x78, 0xfc, 0x44, 0x4a, 0x99, 0x2c, 0x45, 0xeb, 0x2e, 0x21, 0xbe, 0x03, 0xf5, 0x7b, 0xe3, 0x53, 0xee, 0xd7, 0x35, 0x55, 0x42, 0xf8, 0x4c, 0xf7, 0xa8, 0x4c, 0xa5, 0xd2, 0x87, 0x63, 0x04, 0xba, 0x06, 0x7b, 0xa3, 0x79, 0xa1, 0xab, 0x0a, 0x00, 0x79, 0x9c, 0x0b, 0xea, 0xba, 0x86, 0x2e, @@ -2612,40 +2604,39 @@ var fileDescriptor_f94cf1a886c479d6 = []byte{ 0x91, 0x76, 0xa8, 0x42, 0x69, 0x34, 0x3c, 0xca, 0x96, 0x56, 0x80, 0x4a, 0xef, 0xe8, 0x64, 0xc2, 0xeb, 0x6a, 0xb2, 0x5c, 0x96, 0x10, 0x9a, 0x4c, 0xbb, 0x2a, 0x2f, 0x96, 0xab, 0x02, 0x3a, 0x19, 0x8f, 0x79, 0x61, 0x55, 0x5c, 0x20, 0xcb, 0x72, 0x2f, 0x6b, 0x5e, 0xa4, 0xf5, 0x8b, 0xd2, 0x76, - 0xd1, 0xad, 0x5c, 0x56, 0x12, 0xc3, 0xd6, 0x62, 0x35, 0xdd, 0xc2, 0xfc, 0xa3, 0x00, 0x80, 0x42, - 0xc5, 0xdd, 0xe7, 0xa6, 0xbc, 0x36, 0x54, 0x35, 0x5d, 0xc7, 0x60, 0x08, 0x7b, 0x2c, 0x09, 0x92, - 0x0e, 0xd4, 0xfc, 0x39, 0x1b, 0x3b, 0xae, 0x2f, 0x12, 0x5d, 0x59, 0x8d, 0x60, 0x5c, 0x0b, 0x74, - 0xb9, 0xb6, 0x2a, 0xd6, 0x42, 0x18, 0x3b, 0xa5, 0xc4, 0x20, 0x84, 0x84, 0x06, 0x17, 0x3a, 0x60, - 0x72, 0x97, 0x23, 0x90, 0x87, 0xf1, 0x4c, 0xb5, 0x72, 0x29, 0x69, 0x48, 0xd2, 0x79, 0x0c, 0xa5, - 0xb1, 0xa3, 0xe7, 0x1e, 0x21, 0x6d, 0xaf, 0xc8, 0x5b, 0x95, 0xe7, 0xd0, 0x88, 0x77, 0xc3, 0x9a, - 0x11, 0x8f, 0x5c, 0x44, 0xf0, 0x35, 0xd3, 0x02, 0xe3, 0x21, 0x8b, 0x72, 0x0c, 0x1b, 0xaf, 0xa9, - 0x69, 0xf1, 0x11, 0xbf, 0x49, 0x35, 0x2c, 0x39, 0x2f, 0xa0, 0xf9, 0x26, 0x85, 0x92, 0x9b, 0x70, - 0xad, 0xd3, 0xc4, 0x6a, 0x86, 0x52, 0xf9, 0x73, 0x01, 0x9a, 0x69, 0x12, 0xb4, 0xa0, 0x4b, 0x45, - 0x59, 0xe1, 0x87, 0x29, 0xab, 0x11, 0x8c, 0x77, 0x12, 0x30, 0x5d, 0xc3, 0x1e, 0x47, 0xde, 0x89, - 0x04, 0x13, 0x47, 0x2d, 0xa5, 0x02, 0x73, 0x1b, 0xca, 0xf3, 0x37, 0x9a, 0x7c, 0x00, 0xd4, 0x55, - 0x01, 0x90, 0x1b, 0x00, 0x1a, 0x63, 0x5f, 0xc9, 0xe8, 0x10, 0x5d, 0x41, 0x02, 0x83, 0xe5, 0x4e, - 0xa7, 0xde, 0xdc, 0x35, 0x18, 0xfa, 0xa2, 0x0c, 0xba, 0x24, 0xea, 0xfe, 0x67,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x13, 0x32, 0x4f, 0xf3, 0x6b, 0xf9, 0x2f, 0x49, 0x3c, 0x79, 0x0f, 0x76, 0x72, 0xc7, - 0x11, 0x84, 0x0f, 0x1e, 0x2f, 0x9d, 0x54, 0x74, 0x62, 0x35, 0xc5, 0x26, 0xb9, 0xe3, 0x04, 0xb1, - 0xc9, 0xa5, 0x93, 0x86, 0xa5, 0x4d, 0x72, 0xe7, 0x01, 0x44, 0x8e, 0x40, 0xcd, 0x7f, 0x65, 0x93, - 0xcf, 0xb9, 0x03, 0xc7, 0xcf, 0x02, 0xee, 0x05, 0x99, 0x27, 0x70, 0x27, 0x6c, 0xea, 0x05, 0x86, - 0x73, 0xe1, 0x3d, 0x66, 0x7a, 0xdf, 0xc4, 0x45, 0x90, 0x6c, 0xe7, 0x49, 0xd1, 0x74, 0x3f, 0xe1, - 0xf7, 0xd7, 0x65, 0x2c, 0x15, 0xb3, 0x79, 0xf6, 0xbf, 0xf1, 0xfe, 0xee, 0x43, 0x59, 0x21, 0x8f, - 0x60, 0x03, 0x2f, 0x34, 0x99, 0x47, 0x41, 0x46, 0x1a, 0x6a, 0xbc, 0x91, 0xce, 0xa0, 0x28, 0xfd, - 0x29, 0x10, 0xe4, 0xc8, 0xa4, 0xbb, 0x24, 0xd3, 0xd6, 0x72, 0xc6, 0xf4, 0x94, 0x95, 0xb3, 0x0a, - 0xff, 0x9b, 0xf5, 0x07, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xe5, 0xa6, 0x32, 0x38, 0x82, 0x1d, - 0x00, 0x00, + 0xd1, 0xad, 0x5c, 0x56, 0x12, 0xc3, 0xd6, 0x62, 0x35, 0xdd, 0xc2, 0xfc, 0xad, 0x00, 0x80, 0x42, + 0xc5, 0xdd, 0xe7, 0xa6, 0xbc, 0x36, 0x54, 0x35, 0x5d, 0xc7, 0x60, 0x08, 0x7b, 0x2c, 0x09, 0xf2, + 0xcb, 0x70, 0x5c, 0x5f, 0x64, 0xb9, 0xb2, 0x2a, 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 0x0b, 0xc4, 0x26, 0x97, 0xce, 0x11, 0x96, 0x36, 0xc9, 0x7d, 0xed, 0x13, + 0x39, 0xe0, 0x34, 0xff, 0x95, 0x4d, 0x3e, 0xe7, 0x0e, 0x1c, 0x37, 0xfd, 0xdc, 0x0b, 0x32, 0x0f, + 0xdc, 0x4e, 0xd8, 0xb2, 0x0b, 0x0c, 0xe7, 0xc2, 0x7b, 0xcc, 0x74, 0xb6, 0x89, 0x8b, 0x20, 0xd9, + 0xbe, 0x92, 0xa2, 0xe9, 0x7e, 0xc2, 0xef, 0xaf, 0xcb, 0x58, 0x2a, 0x66, 0xf3, 0xec, 0x7f, 0xe3, + 0xfd, 0xbd, 0x85, 0xb2, 0x42, 0x1e, 0xc1, 0x06, 0x5e, 0x68, 0x32, 0x8f, 0x82, 0x8c, 0x34, 0xd4, + 0x78, 0x23, 0x9d, 0x41, 0x51, 0xfa, 0x53, 0x20, 0xc8, 0x91, 0x49, 0x77, 0x49, 0xa6, 0xad, 0xe5, + 0x8c, 0xe9, 0x29, 0x2b, 0x67, 0x15, 0xfe, 0x27, 0xea, 0x0f, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, + 0x1a, 0x6e, 0xbb, 0xdc, 0x60, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 8e118f596..027ca87f5 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -285,10 +285,9 @@ message AppService { string name=1; string address=2; - repeated int32 tcpPorts=3; - repeated int32 udpPorts=4; - repeated Pod pods=5; - repeated Pod oldPods=6; + repeated int32 ports=3; + repeated Pod pods=4; + repeated Pod oldPods=5; } message AppServices { diff --git a/worker/server/server.go b/worker/server/server.go index 26080a9be..7fd5485cf 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -712,15 +712,9 @@ func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppService { var appServices []*pb.AppService for _, svc := range services { - var tcpPorts []int32 - var udpPorts []int32 + var ports []int32 for _, port := range svc.Spec.Ports { - if port.Protocol == corev1.ProtocolUDP { - udpPorts = append(udpPorts, port.Port) - } - if port.Protocol == corev1.ProtocolTCP || port.Protocol == "" { - tcpPorts = append(tcpPorts, port.Port) - } + ports = append(ports, port.Port) } selector := labels.NewSelector() for key, val := range svc.Spec.Selector { @@ -760,12 +754,11 @@ func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppSer } appServices = append(appServices, &pb.AppService{ - Name: svc.Name, - Address: address, - TcpPorts: tcpPorts, - UdpPorts: udpPorts, - OldPods: oldPods, - Pods: newPods, + Name: svc.Name, + Address: address, + Ports: ports, + OldPods: oldPods, + Pods: newPods, }) } return appServices From 4a74d64e1deb93119f765dce9e6f14650a4e167a Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Wed, 30 Jun 2021 16:46:39 +0800 Subject: [PATCH 48/65] support for custom component types and add thirdcomponent componentdefinition --- Makefile | 2 + api/controller/resources.go | 16 +- api/handler/application_handler.go | 2 +- api/handler/service.go | 53 +- api/handler/tenant.go | 5 +- api/model/model.go | 9 +- api/model/third_party_srvice.go | 2 +- cmd/mesh-data-panel/sidecar.go | 14 +- cmd/worker/server/server.go | 30 +- .../crd/rainbond.io_componentdefinitions.yaml | 297 ++++++++ ...elmapps.yaml => rainbond.io_helmapps.yaml} | 6 +- config/crd/rainbond.io_thirdcomponents.yaml | 204 ++++++ db/model/application.go | 2 +- db/model/tenant.go | 5 +- db/model/third_party_service.go | 6 + go.mod | 16 +- go.sum | 646 +++++++++++++++++- .../rainbond/v1alpha1/componentdefinition.go | 109 +++ pkg/apis/rainbond/v1alpha1/doc.go | 2 +- pkg/apis/rainbond/v1alpha1/register.go | 4 +- pkg/apis/rainbond/v1alpha1/third_component.go | 81 ++- .../v1alpha1/zz_generated.deepcopy.go | 410 ++++++++++- pkg/common/scheme.go | 42 ++ .../rainbond/v1alpha1/componentdefinition.go | 197 ++++++ .../v1alpha1/fake/fake_componentdefinition.go | 144 ++++ .../rainbond/v1alpha1/fake/fake_helmapp.go | 4 +- .../v1alpha1/fake/fake_rainbond_client.go | 8 + .../v1alpha1/fake/fake_thirdcomponent.go | 144 ++++ .../rainbond/v1alpha1/generated_expansion.go | 4 + .../rainbond/v1alpha1/rainbond_client.go | 12 +- .../typed/rainbond/v1alpha1/thirdcomponent.go | 197 ++++++ .../informers/externalversions/generic.go | 6 +- .../rainbond/v1alpha1/componentdefinition.go | 92 +++ .../rainbond/v1alpha1/interface.go | 14 + .../rainbond/v1alpha1/thirdcomponent.go | 92 +++ .../rainbond/v1alpha1/componentdefinition.go | 101 +++ .../rainbond/v1alpha1/expansion_generated.go | 16 + .../rainbond/v1alpha1/thirdcomponent.go | 101 +++ worker/appm/appm.go | 3 - .../component_properties.go | 29 +- .../componentdefinition.go | 164 +++++ .../componentdefinition_test.go | 42 ++ worker/appm/componentdefinition/parse.go | 183 +++++ .../thirdcomponentdefinition.go | 89 +++ worker/appm/controller/controller.go | 32 +- worker/appm/controller/start.go | 35 +- worker/appm/controller/stop.go | 28 +- worker/appm/conversion/conversion.go | 34 +- worker/appm/conversion/gateway.go | 5 +- worker/appm/conversion/plugin.go | 6 +- worker/appm/conversion/service.go | 21 +- worker/appm/store/informer.go | 4 + worker/appm/store/lister.go | 2 + worker/appm/store/store.go | 28 +- worker/appm/types/v1/status.go | 3 +- worker/appm/types/v1/v1.go | 47 +- worker/handle/manager.go | 107 ++- worker/master/{ => controller}/helmapp/app.go | 0 .../{ => controller}/helmapp/controller.go | 0 .../{ => controller}/helmapp/controlloop.go | 0 .../helmapp/controlloop_test.go | 0 .../{ => controller}/helmapp/detector.go | 0 .../{ => controller}/helmapp/finilizer.go | 0 .../master/{ => controller}/helmapp/status.go | 0 .../master/{ => controller}/helmapp/store.go | 0 .../{ => controller}/helmapp/suite_test.go | 11 +- .../controller/thirdcomponent/controller.go | 271 ++++++++ .../controller/thirdcomponent/discover.go | 147 ++++ .../thirdcomponent/discover_pool.go | 158 +++++ worker/master/master.go | 27 +- 70 files changed, 4301 insertions(+), 270 deletions(-) create mode 100644 config/crd/rainbond.io_componentdefinitions.yaml rename config/crd/{rainbond.goodrain.io_helmapps.yaml => rainbond.io_helmapps.yaml} (97%) create mode 100644 config/crd/rainbond.io_thirdcomponents.yaml create mode 100644 pkg/apis/rainbond/v1alpha1/componentdefinition.go create mode 100644 pkg/common/scheme.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/componentdefinition.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_componentdefinition.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_thirdcomponent.go create mode 100644 pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/thirdcomponent.go create mode 100644 pkg/generated/informers/externalversions/rainbond/v1alpha1/componentdefinition.go create mode 100644 pkg/generated/informers/externalversions/rainbond/v1alpha1/thirdcomponent.go create mode 100644 pkg/generated/listers/rainbond/v1alpha1/componentdefinition.go create mode 100644 pkg/generated/listers/rainbond/v1alpha1/thirdcomponent.go rename cmd/mesh-data-panel/sidecar_test.go => worker/appm/componentdefinition/component_properties.go (54%) create mode 100644 worker/appm/componentdefinition/componentdefinition.go create mode 100644 worker/appm/componentdefinition/componentdefinition_test.go create mode 100644 worker/appm/componentdefinition/parse.go create mode 100644 worker/appm/componentdefinition/thirdcomponentdefinition.go rename worker/master/{ => controller}/helmapp/app.go (100%) rename worker/master/{ => controller}/helmapp/controller.go (100%) rename worker/master/{ => controller}/helmapp/controlloop.go (100%) rename worker/master/{ => controller}/helmapp/controlloop_test.go (100%) rename worker/master/{ => controller}/helmapp/detector.go (100%) rename worker/master/{ => controller}/helmapp/finilizer.go (100%) rename worker/master/{ => controller}/helmapp/status.go (100%) rename worker/master/{ => controller}/helmapp/store.go (100%) rename worker/master/{ => controller}/helmapp/suite_test.go (85%) create mode 100644 worker/master/controller/thirdcomponent/controller.go create mode 100644 worker/master/controller/thirdcomponent/discover.go create mode 100644 worker/master/controller/thirdcomponent/discover_pool.go diff --git a/Makefile b/Makefile index 22d7daa92..eae508844 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,8 @@ generate: controller-gen chmod +x vendor/k8s.io/code-generator/generate-groups.sh ./hack/k8s/codegen/update-generated.sh $(CONTROLLER_GEN) object:headerFile="hack/k8s/codegen/boilerplate.go.txt" paths="./pkg/apis/..." + cp -r github.com/goodrain/rainbond/pkg/ ./pkg/ + rm -rf github.com/ # find or download controller-gen # download controller-gen if necessary diff --git a/api/controller/resources.go b/api/controller/resources.go index 8b8fccdf1..2ce08abbc 100644 --- a/api/controller/resources.go +++ b/api/controller/resources.go @@ -666,14 +666,16 @@ func (t *TenantStruct) CreateService(w http.ResponseWriter, r *http.Request) { handler.GetEtcdHandler().CleanServiceCheckData(ss.EtcdKey) values := url.Values{} - if ss.Endpoints != nil && strings.TrimSpace(ss.Endpoints.Static) != "" { - if strings.Contains(ss.Endpoints.Static, "127.0.0.1") { - values["ip"] = []string{"The ip field is can't contains '127.0.0.1'"} + if ss.Endpoints != nil { + for _, endpoint := range ss.Endpoints.Static { + if strings.Contains(endpoint, "127.0.0.1") { + values["ip"] = []string{"The ip field is can't contains '127.0.0.1'"} + } + } + if len(values) > 0 { + httputil.ReturnValidationError(r, w, values) + return } - } - if len(values) > 0 { - httputil.ReturnValidationError(r, w, values) - return } tenantID := r.Context().Value(ctxutil.ContextKey("tenant_id")).(string) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 204414716..fc6fb0132 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -98,7 +98,7 @@ func (a *ApplicationAction) CreateApp(ctx context.Context, req *model.Applicatio } if appReq.AppType == model.AppTypeHelm { - // create helmapp.rainbond.goodrain.io + // create helmapp.rainbond.io return a.createHelmApp(ctx, appReq) } return nil diff --git a/api/handler/service.go b/api/handler/service.go index ddb466836..f8080b435 100644 --- a/api/handler/service.go +++ b/api/handler/service.go @@ -718,20 +718,12 @@ func (s *ServiceAction) ServiceCreate(sc *api_model.ServiceStruct) error { tx.Rollback() return fmt.Errorf("endpoints can not be empty for third-party service") } - if config := strings.Replace(sc.Endpoints.Discovery, " ", "", -1); config != "" { - var cfg dCfg - err := json.Unmarshal([]byte(config), &cfg) - if err != nil { - tx.Rollback() - return err - } + if sc.Endpoints.Kubernetes != nil { c := &dbmodel.ThirdPartySvcDiscoveryCfg{ - ServiceID: sc.ServiceID, - Type: cfg.Type, - Servers: strings.Join(cfg.Servers, ","), - Key: cfg.Key, - Username: cfg.Username, - Password: cfg.Password, + ServiceID: sc.ServiceID, + Type: string(dbmodel.DiscorveryTypeKubernetes), + Namespace: sc.Endpoints.Kubernetes.Namespace, + ServiceName: sc.Endpoints.Kubernetes.ServiceName, } if err := db.GetManager().ThirdPartySvcDiscoveryCfgDaoTransactions(tx). AddModel(c); err != nil { @@ -739,15 +731,10 @@ func (s *ServiceAction) ServiceCreate(sc *api_model.ServiceStruct) error { tx.Rollback() return err } - } else if static := strings.Replace(sc.Endpoints.Static, " ", "", -1); static != "" { - var obj []string - err := json.Unmarshal([]byte(static), &obj) - if err != nil { - tx.Rollback() - return err - } + } + if sc.Endpoints.Static != nil { trueValue := true - for _, o := range obj { + for _, o := range sc.Endpoints.Static { ep := &dbmodel.Endpoint{ ServiceID: sc.ServiceID, UUID: core_util.NewUUID(), @@ -852,33 +839,9 @@ func (s *ServiceAction) ServiceCreate(sc *api_model.ServiceStruct) error { } logrus.Debugf("create a new app %s success", ts.ServiceAlias) - if sc.Kind == dbmodel.ServiceKindThirdParty.String() { - s.openInnerPorts(ts.ServiceID, ports) - } - return nil } -func (s *ServiceAction) openInnerPorts(componentID string, ports []dbmodel.TenantServicesPort) { - // TODO: support open multiple ports in one task. - for _, port := range ports { - if !port.IsOpen() { - continue - } - - logrus.Infof("component: %s; port: %d; open inner ports", componentID, port.ContainerPort) - task := &ComponentIngressTask{ - ComponentID: componentID, - Action: "port-open", - Port: port.ContainerPort, - IsInner: true, - } - if err := GetGatewayHandler().SendTask(task); err != nil { - logrus.Warningf("send runtime message about gateway failure %s", err.Error()) - } - } -} - func (s *ServiceAction) convertProbeModel(req *api_model.ServiceProbe, serviceID string) *dbmodel.TenantServiceProbe { return &dbmodel.TenantServiceProbe{ ServiceID: serviceID, diff --git a/api/handler/tenant.go b/api/handler/tenant.go index b499f3178..6aa6ecfe8 100644 --- a/api/handler/tenant.go +++ b/api/handler/tenant.go @@ -44,6 +44,7 @@ import ( v1 "k8s.io/api/core/v1" k8sErrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" k8sclient "sigs.k8s.io/controller-runtime/pkg/client" @@ -59,7 +60,7 @@ type TenantAction struct { cacheTime time.Time prometheusCli prometheus.Interface k8sClient k8sclient.Client - resources map[string]k8sclient.Object + resources map[string]runtime.Object } //CreateTenManager create Manger @@ -69,7 +70,7 @@ func CreateTenManager(mqc mqclient.MQClient, statusCli *client.AppRuntimeSyncCli prometheusCli prometheus.Interface, k8sClient k8sclient.Client) *TenantAction { - resources := map[string]k8sclient.Object{ + resources := map[string]runtime.Object{ "helmApp": &v1alpha1.HelmApp{}, "service": &corev1.Service{}, } diff --git a/api/model/model.go b/api/model/model.go index 34775ef47..c2451a899 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -362,8 +362,13 @@ type ServiceStruct struct { // Endpoints holds third-party service endpoints or configuraion to get endpoints. type Endpoints struct { - Static string `json:"static" validate:"static"` - Discovery string `json:"discovery" validate:"discovery"` + Static []string `json:"static" validate:"static"` + Kubernetes *EndpointKubernetes `json:"kubernetes" validate:"kubernetes"` +} + +type EndpointKubernetes struct { + Namespace string `json:"namespace"` + ServiceName string `json:"serviceName"` } //TenantServiceVolumeStruct - diff --git a/api/model/third_party_srvice.go b/api/model/third_party_srvice.go index 9e5b55923..4af9a3bbd 100644 --- a/api/model/third_party_srvice.go +++ b/api/model/third_party_srvice.go @@ -49,7 +49,7 @@ type EndpointResp struct { // ThridPartyServiceProbe is the json obejct in the request // to update or fetch the ThridPartyServiceProbe. type ThridPartyServiceProbe struct { - Scheme string `json:"scheme;"` + Scheme string `json:"scheme"` Path string `json:"path"` Port int `json:"port"` TimeInterval int `json:"time_interval"` diff --git a/cmd/mesh-data-panel/sidecar.go b/cmd/mesh-data-panel/sidecar.go index ae1717383..22a9122a1 100644 --- a/cmd/mesh-data-panel/sidecar.go +++ b/cmd/mesh-data-panel/sidecar.go @@ -37,6 +37,10 @@ import ( ) func main() { + if os.Getenv("LOG_LEVEL") != "" { + level, _ := logrus.ParseLevel(os.Getenv("LOG_LEVEL")) + logrus.SetLevel(level) + } if len(os.Args) > 1 && os.Args[1] == "version" { cmd.ShowVersion("sidecar") } @@ -49,7 +53,7 @@ func main() { client := &http.Client{ Timeout: time.Duration(requestTimeoutMillis) * time.Millisecond, } - logrus.Infof("Waiting for Envoy proxy to be ready (timeout: %d seconds)...", timeoutSeconds) + logrus.Debugf("Waiting for Envoy proxy to be ready (timeout: %d seconds)...", timeoutSeconds) var err error timeoutAt := time.Now().Add(time.Duration(timeoutSeconds) * time.Second) @@ -59,7 +63,7 @@ func main() { logrus.Infof("Sidecar server is ready!") break } - logrus.Infof("Not ready yet: %v", err) + logrus.Debugf("Not ready yet: %v", err) time.Sleep(time.Duration(periodMillis) * time.Millisecond) } if len(os.Args) > 2 && os.Args[2] != "0" { @@ -69,14 +73,14 @@ func main() { logrus.Infof("Sidecar is ready!") os.Exit(0) } - logrus.Infof("Not ready yet: %v", err) + logrus.Debugf("Not ready yet: %v", err) time.Sleep(time.Duration(periodMillis) * time.Millisecond) } } else { logrus.Infof("Sidecar is ready!") os.Exit(0) } - logrus.Errorf("timeout waiting for Envoy proxy to become ready. Last error: %v", err) + logrus.Errorf("timeout waiting for Mesh Sidecar to become ready. Last error: %v", err) os.Exit(1) } if len(os.Args) > 1 && os.Args[1] == "run" { @@ -106,7 +110,7 @@ func Run() error { ticker := time.NewTicker(time.Second * 5) defer ticker.Stop() //step finally: listen Signal - term := make(chan os.Signal) + term := make(chan os.Signal, 1) signal.Notify(term, os.Interrupt, syscall.SIGTERM) for { select { diff --git a/cmd/worker/server/server.go b/cmd/worker/server/server.go index 2ad555925..b67481150 100644 --- a/cmd/worker/server/server.go +++ b/cmd/worker/server/server.go @@ -28,10 +28,12 @@ import ( "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db/config" "github.com/goodrain/rainbond/event" + "github.com/goodrain/rainbond/pkg/common" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" etcdutil "github.com/goodrain/rainbond/util/etcd" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/goodrain/rainbond/worker/appm" + "github.com/goodrain/rainbond/worker/appm/componentdefinition" "github.com/goodrain/rainbond/worker/appm/controller" "github.com/goodrain/rainbond/worker/appm/store" "github.com/goodrain/rainbond/worker/discover" @@ -42,6 +44,7 @@ import ( "github.com/sirupsen/logrus" "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/flowcontrol" + "sigs.k8s.io/controller-runtime/pkg/client" ) //Run start run @@ -85,10 +88,16 @@ func Run(s *option.Worker) error { return err } s.Config.KubeClient = clientset - + runtimeClient, err := client.New(restConfig, client.Options{Scheme: common.Scheme}) + if err != nil { + logrus.Errorf("create kube runtime client error: %s", err.Error()) + return err + } rainbondClient := versioned.NewForConfigOrDie(restConfig) + //step 3: create componentdefinition builder factory + componentdefinition.NewComponentDefinitionBuilder(s.Config.RBDNamespace) - //step 3: create resource store + //step 4: create component resource store startCh := channels.NewRingChannel(1024) updateCh := channels.NewRingChannel(1024) probeCh := channels.NewRingChannel(1024) @@ -103,12 +112,12 @@ func Run(s *option.Worker) error { return err } - //step 4: create controller manager - controllerManager := controller.NewManager(cachestore, clientset) + //step 5: create controller manager + controllerManager := controller.NewManager(cachestore, clientset, runtimeClient) defer controllerManager.Stop() - //step 5 : start runtime master - masterCon, err := master.NewMasterController(s.Config, cachestore, clientset, rainbondClient) + //step 6 : start runtime master + masterCon, err := master.NewMasterController(s.Config, cachestore, clientset, rainbondClient, restConfig) if err != nil { return err } @@ -117,18 +126,19 @@ func Run(s *option.Worker) error { } defer masterCon.Stop() - //step 6 : create discover module + //step 7 : create discover module garbageCollector := gc.NewGarbageCollector(clientset) taskManager := discover.NewTaskManager(s.Config, cachestore, controllerManager, garbageCollector, startCh) if err := taskManager.Start(); err != nil { return err } defer taskManager.Stop() - //step 7: start app runtimer server + + //step 8: start app runtimer server runtimeServer := server.CreaterRuntimeServer(s.Config, cachestore, clientset, updateCh) runtimeServer.Start(errChan) - //step 8: create application use resource exporter. + //step 9: create application use resource exporter. exporterManager := monitor.NewManager(s.Config, masterCon, controllerManager) if err := exporterManager.Start(); err != nil { return err @@ -138,7 +148,7 @@ func Run(s *option.Worker) error { logrus.Info("worker begin running...") //step finally: listen Signal - term := make(chan os.Signal) + term := make(chan os.Signal, 1) signal.Notify(term, os.Interrupt, syscall.SIGTERM) select { case <-term: diff --git a/config/crd/rainbond.io_componentdefinitions.yaml b/config/crd/rainbond.io_componentdefinitions.yaml new file mode 100644 index 000000000..f8c395cac --- /dev/null +++ b/config/crd/rainbond.io_componentdefinitions.yaml @@ -0,0 +1,297 @@ + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.3.0 + creationTimestamp: null + name: componentdefinitions.rainbond.io +spec: + additionalPrinterColumns: + - JSONPath: .spec.workload.definition.kind + name: WORKLOAD-KIND + type: string + - JSONPath: .metadata.annotations.definition\.oam\.dev/description + name: DESCRIPTION + type: string + group: rainbond.io + names: + categories: + - oam + kind: ComponentDefinition + listKind: ComponentDefinitionList + plural: componentdefinitions + shortNames: + - comp + singular: componentdefinition + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: ComponentDefinition is the Schema for the componentdefinitions + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ComponentDefinitionSpec defines the desired state of ComponentDefinition + properties: + childResourceKinds: + description: ChildResourceKinds are the list of GVK of the child resources + this workload generates + items: + description: A ChildResourceKind defines a child Kubernetes resource + kind with a selector + properties: + apiVersion: + description: APIVersion of the child resource + type: string + kind: + description: Kind of the child resource + type: string + selector: + additionalProperties: + type: string + description: Selector to select the child resources that the workload + wants to expose to traits + type: object + required: + - apiVersion + - kind + type: object + type: array + extension: + description: Extension is used for extension needs by OAM platform builders + type: object + x-kubernetes-preserve-unknown-fields: true + podSpecPath: + description: PodSpecPath indicates where/if this workload has K8s podSpec + field if one workload has podSpec, trait can do lot's of assumption + such as port, env, volume fields. + type: string + revisionLabel: + description: RevisionLabel indicates which label for underlying resources(e.g. + pods) of this workload can be used by trait to create resource selectors(e.g. + label selector for pods). + type: string + schematic: + description: Schematic defines the data format and template of the encapsulation + of the workload + properties: + cue: + description: CUE defines the encapsulation in CUE format + properties: + template: + description: Template defines the abstraction template data + of the capability, it will replace the old CUE template in + extension field. Template is a required field if CUE is defined + in Capability Definition. + type: string + required: + - template + type: object + helm: + description: A Helm represents resources used by a Helm module + properties: + release: + description: Release records a Helm release used by a Helm module + workload. + type: object + x-kubernetes-preserve-unknown-fields: true + repository: + description: HelmRelease records a Helm repository used by a + Helm module workload. + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - release + - repository + type: object + kube: + description: Kube defines the encapsulation in raw Kubernetes resource + format + properties: + parameters: + description: Parameters defines configurable parameters + items: + description: A KubeParameter defines a configurable parameter + of a component. + properties: + description: + description: Description of this parameter. + type: string + fieldPaths: + description: "FieldPaths specifies an array of fields + within this workload that will be overwritten by the + value of this parameter. \tAll fields must be of the + same type. Fields are specified as JSON field paths + without a leading dot, for example 'spec.replicas'." + items: + type: string + type: array + name: + description: Name of this parameter + type: string + required: + default: false + description: Required specifies whether or not a value + for this parameter must be supplied when authoring an + Application. + type: boolean + type: + description: 'ValueType indicates the type of the parameter + value, and only supports basic data types: string, number, + boolean.' + enum: + - string + - number + - boolean + type: string + required: + - fieldPaths + - name + - type + type: object + type: array + template: + description: Template defines the raw Kubernetes resource + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - template + type: object + terraform: + description: Terraform is the struct to describe cloud resources + managed by Hashicorp Terraform + properties: + configuration: + description: Configuration is Terraform Configuration + type: string + type: + default: hcl + description: Type specifies which Terraform configuration it + is, HCL or JSON syntax + enum: + - hcl + - json + type: string + required: + - configuration + type: object + type: object + status: + description: Status defines the custom health policy and status message + for workload + properties: + customStatus: + description: CustomStatus defines the custom status message that + could display to user + type: string + healthPolicy: + description: HealthPolicy defines the health check policy for the + abstraction + type: string + type: object + workload: + description: Workload is a workload type descriptor + properties: + definition: + description: Definition mutually exclusive to workload.type, a embedded + WorkloadDefinition + properties: + apiVersion: + type: string + kind: + type: string + required: + - apiVersion + - kind + type: object + type: + description: Type ref to a WorkloadDefinition via name + type: string + type: object + required: + - workload + type: object + status: + description: ComponentDefinitionStatus is the status of ComponentDefinition + properties: + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, False, + or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + configMapRef: + description: ConfigMapRef refer to a ConfigMap which contains OpenAPI + V3 JSON schema of Component parameters. + type: string + latestRevision: + description: LatestRevision of the component definition + properties: + name: + type: string + revision: + format: int64 + type: integer + revisionHash: + description: RevisionHash record the hash value of the spec of ApplicationRevision + object. + type: string + required: + - name + - revision + type: object + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/rainbond.goodrain.io_helmapps.yaml b/config/crd/rainbond.io_helmapps.yaml similarity index 97% rename from config/crd/rainbond.goodrain.io_helmapps.yaml rename to config/crd/rainbond.io_helmapps.yaml index c5916be41..4b177d424 100644 --- a/config/crd/rainbond.goodrain.io_helmapps.yaml +++ b/config/crd/rainbond.io_helmapps.yaml @@ -4,11 +4,11 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.5 + controller-gen.kubebuilder.io/version: v0.3.0 creationTimestamp: null - name: helmapps.rainbond.goodrain.io + name: helmapps.rainbond.io spec: - group: rainbond.goodrain.io + group: rainbond.io names: kind: HelmApp listKind: HelmAppList diff --git a/config/crd/rainbond.io_thirdcomponents.yaml b/config/crd/rainbond.io_thirdcomponents.yaml new file mode 100644 index 000000000..0eb2324e7 --- /dev/null +++ b/config/crd/rainbond.io_thirdcomponents.yaml @@ -0,0 +1,204 @@ + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.3.0 + creationTimestamp: null + name: thirdcomponents.rainbond.io +spec: + group: rainbond.io + names: + kind: ThirdComponent + listKind: ThirdComponentList + plural: thirdcomponents + singular: thirdcomponent + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: HelmApp - + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + endpointSource: + description: endpoint source config + properties: + endpoints: + items: + properties: + address: + description: The address including the port number. + type: string + clientSecret: + description: Specify a private certificate when the protocol + is HTTPS + type: string + protocol: + description: 'Address protocols, including: HTTP, TCP, UDP, + HTTPS' + type: string + required: + - address + type: object + type: array + kubernetesService: + properties: + name: + type: string + namespace: + description: If not specified, the namespace is the namespace + of the current resource + type: string + required: + - name + type: object + type: object + ports: + description: component regist ports + items: + description: ComponentPort component port define + properties: + name: + type: string + openInner: + type: boolean + openOuter: + type: boolean + port: + type: integer + required: + - name + - openInner + - openOuter + - port + type: object + type: array + probe: + description: health check probe + properties: + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + httpHeaders: + description: Custom headers to set in the request. HTTP allows + repeated headers. + items: + description: HTTPHeader describes a custom header to be used + in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. + TCP hooks not yet supported TODO: implement a realistic TCP lifecycle + hook' + type: object + type: object + required: + - endpointSource + - ports + type: object + status: + properties: + endpoints: + items: + description: ThirdComponentEndpointStatus endpoint status + properties: + address: + description: The address including the port number. + type: string + reason: + description: Reason probe not passed reason + type: string + status: + description: Status endpoint status + type: string + targetRef: + description: Reference to object providing the endpoint. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + required: + - address + - status + type: object + type: array + phase: + type: string + reason: + type: string + required: + - endpoints + - phase + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/db/model/application.go b/db/model/application.go index 59cc558a1..2af234dcf 100644 --- a/db/model/application.go +++ b/db/model/application.go @@ -25,7 +25,7 @@ type Application struct { TenantID string `gorm:"column:tenant_id" json:"tenant_id"` AppName string `gorm:"column:app_name" json:"app_name"` AppID string `gorm:"column:app_id" json:"app_id"` - AppType string `gorm:"column:app_type;default:rainbond" json:"app_type"` + AppType string `gorm:"column:app_type;default:'rainbond'" json:"app_type"` AppStoreName string `gorm:"column:app_store_name" json:"app_store_name"` AppStoreURL string `gorm:"column:app_store_url" json:"app_store_url"` AppTemplateName string `gorm:"column:app_template_name" json:"app_template_name"` diff --git a/db/model/tenant.go b/db/model/tenant.go index f582ba617..66f13facf 100644 --- a/db/model/tenant.go +++ b/db/model/tenant.go @@ -83,6 +83,9 @@ var ServiceKindThirdParty ServiceKind = "third_party" // ServiceKindInternal means internal service var ServiceKindInternal ServiceKind = "internal" +// ServiceKindCustom means custom component define +var ServiceKindCustom ServiceKind = "custom.componentdefinition." + func (s ServiceKind) String() string { return string(s) } @@ -191,7 +194,7 @@ type TenantServices struct { UpdateTime time.Time `gorm:"column:update_time" json:"update_time"` // 服务创建类型cloud云市服务,assistant云帮服务 ServiceOrigin string `gorm:"column:service_origin;default:'assistant'" json:"service_origin"` - // kind of service. option: internal, third_party + // kind of service. option: internal, third_party, custom Kind string `gorm:"column:kind;default:'internal'" json:"kind"` // service bind appID AppID string `gorm:"column:app_id" json:"app_id"` diff --git a/db/model/third_party_service.go b/db/model/third_party_service.go index 870417a14..7ab8c23ba 100644 --- a/db/model/third_party_service.go +++ b/db/model/third_party_service.go @@ -40,6 +40,9 @@ type DiscorveryType string // DiscorveryTypeEtcd etcd var DiscorveryTypeEtcd DiscorveryType = "etcd" +// DiscorveryTypeKubernetes kubernetes service +var DiscorveryTypeKubernetes DiscorveryType = "kubernetes" + func (d DiscorveryType) String() string { return string(d) } @@ -55,6 +58,9 @@ type ThirdPartySvcDiscoveryCfg struct { Key string `gorm:"key"` Username string `gorm:"username"` Password string `gorm:"password"` + //for kubernetes service + Namespace string `gorm:"namespace"` + ServiceName string `gorm:"serviceName"` } // TableName returns table name of ThirdPartySvcDiscoveryCfg. diff --git a/go.mod b/go.mod index c7011aca0..462189638 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/goodrain/rainbond go 1.15 require ( + cuelang.org/go v0.2.2 github.com/DATA-DOG/go-sqlmock v1.5.0 - github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4 // indirect github.com/aliyun/aliyun-oss-go-sdk v2.1.5+incompatible @@ -17,6 +17,7 @@ require ( github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292 // indirect github.com/coreos/etcd v3.3.17+incompatible github.com/creack/pty v1.1.11 // indirect + github.com/crossplane/crossplane-runtime v0.10.0 github.com/docker/cli v20.10.3+incompatible github.com/docker/distribution v2.7.1+incompatible github.com/docker/docker v20.10.2+incompatible @@ -35,7 +36,7 @@ require ( github.com/go-kit/kit v0.10.0 github.com/go-ole/go-ole v1.2.4 // indirect github.com/go-playground/assert/v2 v2.0.1 - github.com/go-playground/validator/v10 v10.2.0 + github.com/go-playground/validator/v10 v10.4.1 github.com/go-sql-driver/mysql v1.5.0 github.com/godbus/dbus v4.1.0+incompatible // indirect github.com/gofrs/flock v0.8.0 @@ -47,7 +48,6 @@ require ( github.com/goodrain/rainbond-operator v1.3.1-0.20210401055914-f8fe4bf89a21 github.com/google/go-cmp v0.5.4 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de // indirect github.com/gorilla/websocket v1.4.2 github.com/gosuri/uitable v0.0.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect @@ -57,14 +57,14 @@ require ( github.com/json-iterator/go v1.1.10 github.com/kr/pretty v0.2.1 // indirect github.com/kr/pty v1.1.8 - github.com/mattn/go-colorable v0.1.6 // indirect github.com/mattn/go-runewidth v0.0.6 github.com/mitchellh/go-ps v1.0.0 github.com/mitchellh/go-wordwrap v1.0.0 github.com/mitchellh/mapstructure v1.3.3 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.14.1 - github.com/onsi/gomega v1.10.2 + github.com/onsi/gomega v1.10.3 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/runc v1.0.0-rc91.0.20200707015106-819fcc687efb // indirect github.com/pborman/uuid v1.2.1 @@ -79,20 +79,17 @@ require ( github.com/prometheus/common v0.15.0 github.com/prometheus/node_exporter v1.0.1 github.com/prometheus/procfs v0.2.0 - github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect github.com/shirou/gopsutil v3.21.3+incompatible github.com/sirupsen/logrus v1.7.0 - github.com/smartystreets/assertions v1.0.1 // indirect github.com/smartystreets/goconvey v1.6.4 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 github.com/testcontainers/testcontainers-go v0.8.0 github.com/thejerf/suture v3.0.3+incompatible - github.com/tidwall/gjson v1.6.1 + github.com/tidwall/gjson v1.6.8 github.com/twinj/uuid v1.0.0 github.com/urfave/cli v1.22.2 github.com/yudai/umutex v0.0.0-20150817080136-18216d265c6b - go.uber.org/atomic v1.7.0 // indirect golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad golang.org/x/net v0.0.0-20201224014010-6772e930b67b golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 // indirect @@ -131,4 +128,5 @@ replace ( k8s.io/client-go => k8s.io/client-go v0.20.0 k8s.io/code-generator => k8s.io/code-generator v0.20.0 k8s.io/component-base => k8s.io/component-base v0.20.0 + sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.6.2 ) diff --git a/go.sum b/go.sum index 6da5c6a30..94db0a4bc 100644 --- a/go.sum +++ b/go.sum @@ -2,11 +2,14 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxo cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.49.0/go.mod h1:hGvAdzcWNbyuxS3nWhD7H2cIJxjRRTRLQVB0bdputVY= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -20,6 +23,7 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -28,21 +32,41 @@ cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+ cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.3.0/go.mod h1:9IAwXhoyBJ7z9LcAwkj0/7NnPzYaPeZxxVp3zm+5IqA= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= +cuelang.org/go v0.2.2 h1:i/wFo48WDibGHKQTRZ08nB8PqmGpVpQ2sRflZPj73nQ= +cuelang.org/go v0.2.2/go.mod h1:Dyjk8Y/B3CfFT1jQKJU0g5PpCeMiDe0yMOhk57oXwqo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/AlecAivazis/survey/v2 v2.1.1/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v43.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.10.2/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +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.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= @@ -53,6 +77,10 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +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/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= +github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= @@ -60,35 +88,48 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= 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/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= +github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.1.0/go.mod h1:ONGMf7UfYGAbMXCZmQLy8x3lCDIPrEZE/rU8pmrbihA= github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Masterminds/squirrel v1.2.0/go.mod h1:yaPeOnPG5ZRwL9oKdTsO/prlkPbXWZlRVMQ/gGlzIuA= github.com/Masterminds/squirrel v1.5.0 h1:JukIZisrUXadA9pl3rMkjhiamxiB0cXiu+HGp/Y8cY8= github.com/Masterminds/squirrel v1.5.0/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= github.com/Microsoft/go-winio v0.3.8/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= github.com/Microsoft/hcsshim v0.8.14 h1:lbPVK25c1cu5xTLITwpUcxoA9vKrKErASPYygvouJns= github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v0.0.0-20170804200234-967539e5e271/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= 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 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= 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= @@ -102,6 +143,10 @@ github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUW github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +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/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -112,22 +157,37 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF 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/alessio/shellescape v1.2.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/aliyun/aliyun-oss-go-sdk v2.1.5+incompatible h1:v5yDfjkRY/kOxu05gkh0/D/2wYxbTFCoTr3JqFI0FLE= github.com/aliyun/aliyun-oss-go-sdk v2.1.5+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/brotli v0.0.0-20190621154722-5f990b63d2d6/go.mod h1:+lx6/Aqd1kLJ1GQfkvOnaZ1WGmLpMpbprPuIOOZX30U= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= 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/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= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= +github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= +github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= +github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +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/atcdot/gorm-bulk-upsert v1.0.0 h1:K+lS2jHHwXZjZSdiPjBiyQi8W9nnpTbdz69/YR1CI6s= @@ -135,7 +195,10 @@ github.com/atcdot/gorm-bulk-upsert v1.0.0/go.mod h1:b7/GgeVNbf/SFw4FYIWslxNV5I10 github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= +github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.36.15 h1:nGqgPlXegCKPZOKXvWnYCLvLPJPRoSOHHn9d0N0DG7Y= github.com/aws/aws-sdk-go v1.36.15/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= @@ -155,12 +218,18 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bluebreezecf/opentsdb-goclient v0.0.0-20190921120552-796138372df3 h1:tYQBYXi4kB0KecFLqZEo8VmPVANdBXZ6HbGCLmqicjY= github.com/bluebreezecf/opentsdb-goclient v0.0.0-20190921120552-796138372df3/go.mod h1:0GQvpWSQV6iuaYXLLau5GsbyYt22OpRD9qeSVENCXqU= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/brancz/kube-rbac-proxy v0.5.0/go.mod h1:cL2VjiIFGS90Cjh5ZZ8+It6tMcBt8rwvuw2J6Mamnl0= +github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0n+2ukqUJnS2vVe5pQNA= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= @@ -169,13 +238,18 @@ github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembj github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= 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/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= 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 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= @@ -186,23 +260,32 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200313221541-5f7e5dd04533 h1:8wZizuKuZVu5COB7EsBYxBQz8nRcXXn5d4Gt91eJLvU= github.com/cncf/udpa/go v0.0.0-20200313221541-5f7e5dd04533/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +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= +github.com/cockroachdb/apd/v2 v2.0.1/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292 h1:dzj1/xcivGjNPwwifh/dWTczkwcuqsXXFHY1X/TZMtw= github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292/go.mod h1:qRiX68mZX1lGBkTWyp3CLcenw9I94W2dLeRvMzcn9N4= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codegangsta/cli v1.19.1/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk= github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 h1:6ejg6Lkk8dskcM7wQ28gONkukbQkM4qpj4RnYbpFzrI= github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= @@ -226,6 +309,7 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+ 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/go.mod h1:LhLfEBydppl7nvfEA1jIqlF3xJ9myHCnzrU+HHDxRd4= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= 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= @@ -235,16 +319,23 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/crossplane/crossplane-runtime v0.8.0 h1:IBm5LWVeqB2BjHpkykURHY0PSozXWfIXk7LfWtr27wY= github.com/crossplane/crossplane-runtime v0.8.0/go.mod h1:gNY/21MLBaz5KNP7hmfXbBXp8reYRbwY5B/97Kp4tgM= +github.com/crossplane/crossplane-runtime v0.10.0 h1:H8YvMcrm1uzZYpwU/BpxjRQfceVulxgYJMx4rmX38Hg= +github.com/crossplane/crossplane-runtime v0.10.0/go.mod h1:cJl5ZZONisre4v6wTmbrC8Jh3AI+erq/lNaxZzv9tnU= github.com/crossplane/crossplane-tools v0.0.0-20200219001116-bb8b2ce46330/go.mod h1:C735A9X0x0lR8iGVOOxb49Mt70Ua4EM2b7PGaRPBLd4= github.com/crossplane/oam-kubernetes-runtime v0.1.0/go.mod h1:UZ4eXkl/e4lKrAhK81Pz1sR90wqeuE9PgdwVXr8kDgI= github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/dave/jennifer v1.3.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 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/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/deislabs/oras v0.8.1/go.mod h1:Mx0rMSbBNaNfY9hjpccEnxkOqJL6KGjtxNHPLC4G4As= github.com/deislabs/oras v0.10.0 h1:Eufbi8zVaULb7vYj5HKM9qv9qw6fJ7P75JSjn//gR0E= github.com/deislabs/oras v0.10.0/go.mod h1:N1UzE7rBa9qLyN4l8IlBTxc2PkrRcKgWQ3HTJvRnJRE= github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= @@ -255,9 +346,12 @@ github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8l github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/cli v0.0.0-20190711175710-5b38d82aa076/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.3+incompatible h1:WVEgoV/GpsTK5hruhHdYi79blQ+nmcm+7Ru/ZuiF+7E= github.com/docker/cli v20.10.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20191216044856-a8371794149d h1:jC8tT/S0OGx2cswpeUTn4gOIea8P08lD3VFQT0cOZ50= @@ -283,6 +377,8 @@ github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNE github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +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/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k= @@ -291,9 +387,16 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-sysinfo v1.0.1/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY= +github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= +github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= +github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/elazarl/go-bindata-assetfs v0.0.0-20150813044622-d5cac425555c h1:Knqh8y6EeTJQ3FZsqdRq7XfB7/RimWQjBtO4YRzUgcE= github.com/elazarl/go-bindata-assetfs v0.0.0-20150813044622-d5cac425555c/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= +github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= 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= @@ -304,6 +407,7 @@ github.com/emicklei/go-restful v2.14.2+incompatible h1:uyx8VgUCryEkh7qbr8rEtrA0r github.com/emicklei/go-restful v2.14.2+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/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= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -317,8 +421,10 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.1.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= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= @@ -326,9 +432,12 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/structs v0.0.0-20150526064352-a9f7daa9c272/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= 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/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= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -338,14 +447,26 @@ github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui72 github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko= 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/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= +github.com/gin-contrib/gzip v0.0.1/go.mod h1:fGBJBCdt6qCZuCAOwWuFhBB4OOq9EFqlo5dEaFhhu5w= +github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-contrib/static v0.0.0-20200815103939-31fb0c56a3d1/go.mod h1:VhW/Ch/3FhimwZb8Oj+qJmdMmoB8r7lmJ5auRjm50oQ= +github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= +github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec= github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/render v1.0.1 h1:4/5tis2cKaNdnv9zFLfXzcquC9HbeZgCnxGnKrltBS8= @@ -369,33 +490,105 @@ github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= -github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= +github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +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 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= 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/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= +github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +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= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U= +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= +github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +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= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +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 h1:RFTu/dlFySpyVvJDfp/7674JY4SDglYWKztbiIGFpmc= +github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= +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= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -404,37 +597,69 @@ github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 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-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.1 h1:OQl5ys5MBea7OGCdvPbBJWRgnhC/fGona6QKfvFeau8= github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuTg= github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/packr/v2 v2.7.1 h1:n3CIW5T17T8v4GGK5sWXLVWJhCz7b5aNLSxW6gYim4o= github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg= +github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 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= +github.com/golang/gddo v0.0.0-20190419222130-af0f2af80721/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= +github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -464,6 +689,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 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/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= @@ -474,6 +700,7 @@ github.com/goodrain/rainbond-operator v1.3.1-0.20210401055914-f8fe4bf89a21/go.mo github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -484,6 +711,9 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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 v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -491,27 +721,35 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200417002340-c6e0a841f49a/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.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.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +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= +github.com/gophercloud/gophercloud v0.11.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de h1:F7WD09S8QB4LrkEpka0dFPLSotH11HRpCsLIbIcJ7sU= github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -526,6 +764,7 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20150811171432-b6ab76f1fe98/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= 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.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= @@ -534,27 +773,45 @@ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWet github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= +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/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= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-getter v1.4.0/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUCwg2Umn7RjeY= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20150608033521-56912fb08d85/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -566,11 +823,21 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90= +github.com/hashicorp/hcl/v2 v2.9.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= +github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= +github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/hodgesds/perf-utils v0.0.8 h1:6BT6cddpouM0G7eHhLFS+XcqtPvhrzWbPreyIvgFEcg= github.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+gRZDtmTJkAs= github.com/howeyc/fsnotify v0.9.0 h1:0gtV5JmOKH4A8SsFxG2BczSeXWWPvcMT0euZt5gDAxY= @@ -581,16 +848,26 @@ github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 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.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +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= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/gorm v1.9.10/go.mod h1:Kh6hTsSGffh4ui079FHrR5Gg+5D0hgihqDcsDN2BBJY= github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= @@ -602,22 +879,28 @@ github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4 h1:nwOc1YaOrYJ37sEBrtWZrdqzK22hiJs3GpDmP3sR2Yw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -626,6 +909,7 @@ github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ansiterm v0.0.0-20160907234532-b99631de12cf/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= @@ -653,12 +937,27 @@ github.com/juju/version v0.0.0-20191219164919-81c1be00b9a6/go.mod h1:kE8gK5X0CIm 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/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/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.10.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.6/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +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= +github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -671,38 +970,55 @@ github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 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= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= 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/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/kyokomi/emoji v2.2.4+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= +github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= +github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.9.0 h1:L8nSXQQzAYByakOFMTwpjRoHsMJklur4Gi59b6VivR8= github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.0/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= github.com/lufia/iostat v1.1.0 h1:Z1wa4Hhxwi8uSKfgRsFc5RLtt3SuFPIOgkiPGkUtHDY= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= github.com/lunixbochs/vtclean v0.0.0-20160125035106-4fbf7632a2c6/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= 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/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 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= 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/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/masterzen/azure-sdk-for-go v3.2.0-beta.0.20161014135628-ee4f0065d00c+incompatible/go.mod h1:mf8fjOu33zCqxUjuiU3I8S1lJMyEAlH+0F2+M5xl3hE= github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= @@ -714,24 +1030,33 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +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 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-oci8 v0.0.7/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= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6 h1:V2iyH+aX9C5fsYCpK60U8BYIvmhqxuOL3JZcqc1NB7k= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA= github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= +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/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -746,7 +1071,15 @@ github.com/mdlayher/netlink v1.1.0 h1:mpdLgm+brq10nI9zM1BpX1kpDbh3NLl3RSnVq6ZSkf github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee h1:hZDujBrW3ye2xxdKNFYT59D4yCH5Q0zLuNBNtysKtok= github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mholt/archiver/v3 v3.3.0/go.mod h1:YnQtqsp+94Rwd0D/rk5cnLrxusUBUXg+08Ebtr1Mqao= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/minio/minio-go/v6 v6.0.49/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= +github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -756,12 +1089,16 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/hashstructure/v2 v2.0.1/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f h1:2+myh5ml7lgEU/51gbeLHfKGNfgEQQIWrlbdaOsidbQ= @@ -774,15 +1111,22 @@ github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/f 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 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mozillazg/go-cos v0.13.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= +github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= github.com/mozillazg/go-pinyin v0.18.0 h1:hQompXO23/0ohH8YNjvfsAITnCQImCiR/Fny8EhIeW0= github.com/mozillazg/go-pinyin v0.18.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc= +github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de h1:D5x39vF5KCwKQaw+OC9ZPiLVHXz3UFw2+psEX+gYcto= +github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de/go.mod h1:kJun4WP5gFuHZgRjZUWWuH1DTxCtxbHDOIJsudS8jzY= github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -807,10 +1151,17 @@ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= +github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oam-dev/kubevela v1.1.0-alpha.4.0.20210625105426-e176fcfc56f0 h1:r2/OGTlUVCYN42D6QgGePWZhOs/bW2A0c9mnYj0F8qY= +github.com/oam-dev/kubevela v1.1.0-alpha.4.0.20210625105426-e176fcfc56f0/go.mod h1:FnDQklgJoidiMqjD8nbQzGcmLlFsq1v+DyQ9pOFInQM= +github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28/go.mod h1:Mu8i0/DdplvnjwRbAYPsc8+LRR27n/mp8VWdkN10GzE= +github.com/oam-dev/terraform-controller v0.1.6/go.mod h1:8plSKkwgTSWnPDCEaQm/PAwPKed/kVo94Z2wwmJSL6k= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/oklog/ulid v0.0.0-20170117200651-66bb6560562f/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -819,8 +1170,11 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB 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.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -832,6 +1186,8 @@ github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= 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 v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -847,12 +1203,17 @@ github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5X github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc91.0.20200707015106-819fcc687efb h1:LcPVE5u4oaqw8ffPbJew0lUxZC7faM5t52PgU4px1xY= github.com/opencontainers/runc v1.0.0-rc91.0.20200707015106-819fcc687efb/go.mod h1:ZuXhqlr4EiRYgDrBDNfSbE4+n9JX4+V107NwAmF7sZA= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= +github.com/openkruise/kruise-api v0.7.0/go.mod h1:nCf5vVOjQJX5OaV7Qi0Z51/Rn9cd7s5kVrg8YLgFp1I= 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= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= @@ -860,6 +1221,8 @@ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -867,40 +1230,55 @@ github.com/pebbe/zmq4 v1.2.1 h1:jrXQW3mD8Si2mcSY/8VBs2nNkK/sKCOEM0rHAfxyc8c= github.com/pebbe/zmq4 v1.2.1/go.mod h1:7N4y5R18zBiu3l0vajMUWQgZyjv464prE8RCyBcmnZM= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20161029093637-248dadf4e906/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= 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/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= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= 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= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.44.1/go.mod h1:3WYi4xqXxGGXWDdQIITnLNmuDzO5n6wYva9spVhR4fg= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.45.0 h1:W3iIBbZbwWHNb5VfAUQhJIhG+m8X4XU+eAiufTd18pI= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.45.0/go.mod h1:3WYi4xqXxGGXWDdQIITnLNmuDzO5n6wYva9spVhR4fg= github.com/prometheus-operator/prometheus-operator/pkg/client v0.45.0 h1:2qET5dx1d91irZVhvemXWumYtIiQ+qGBZ0fRtIGrhFA= github.com/prometheus-operator/prometheus-operator/pkg/client v0.45.0/go.mod h1:k4BrWlVQQsvBiTcDnKEMgyh/euRxyxgrHdur/ZX/sdA= +github.com/prometheus/alertmanager v0.18.0/go.mod h1:WcxHBl40VSPuOaqWae6l6HpnEOVRIycEJ7i9iYkadEE= +github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.2.0/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= +github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= 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.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= @@ -916,6 +1294,7 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T 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= @@ -929,25 +1308,39 @@ github.com/prometheus/node_exporter v1.0.1 h1:xTBtauxuNCMhuF4FKiNo2wDCuCAWgS3PoT 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.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.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= +github.com/prometheus/prometheus v1.8.2-0.20200110114423-1e64d757f711/go.mod h1:7U90zPoLkWjEIQcy/rweQla82OCTUzxVHE51G3OhJbI= +github.com/prometheus/prometheus v1.8.2-0.20200507164740-ecee9c8abfd1/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= +github.com/prometheus/prometheus v1.8.2-0.20200609102542-5d7e3e970602/go.mod h1:CwaXafRa0mm72de2GQWtfQxjGytbSKIGivWxQvjpRZs= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.4.0 h1:LUa41nrWTQNGhzdsZ5lTnkwbNjj6rXTdazA1cSdjkOY= github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.6.0 h1:IZRgg4sfrDH7nsAD1Y/Nwj+GzIfEwpJSLjCaNC3SbsI= +github.com/rogpeppe/go-internal v1.6.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3/go.mod h1:rtQlpHw+eR6UrqaS3kX1VYeaCxzCVdimDS7g5Ln4pPc= github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 h1:HXr/qUllAWv9riaI4zh2eXWKmCSDqVS/XH1MRHLKRwk= github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351/go.mod h1:DCgfY80j8GYL7MLEfvcpSFvjD0L5yZq/aZUJmhZklyg= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= @@ -955,23 +1348,36 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= +github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM= github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v3.21.3+incompatible h1:uenXGGa8ESCQq+dbgtl916dmg6PSAz2cXov0uORQ9v8= github.com/shirou/gopsutil v3.21.3+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20180825020608-02ddb050ef6b/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/siebenmann/go-kstat v0.0.0-20200303194639-4e8294f9e9d5 h1:rRF7gJ7t0E1bfqNLwMqgb59eb273kgi+GgLE/yEiDzs= github.com/siebenmann/go-kstat v0.0.0-20200303194639-4e8294f9e9d5/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -988,6 +1394,7 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a h1:os5OBNhwOwybXZMNLqT96XqtjdTtwRFw2w08uluvNeI= github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +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/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -996,26 +1403,31 @@ github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= 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= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1024,46 +1436,85 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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= +github.com/swaggo/gin-swagger v1.3.0/go.mod h1:oy1BRA6WvgtCp848lhxce7BnWH4C8Bxa0m5SkWx+cS0= +github.com/swaggo/swag v1.5.1/go.mod h1:1Bl9F/ZBpVWh22nY0zmYyASPO1lI/zIwRDrpZU+tv8Y= +github.com/swaggo/swag v1.6.7/go.mod h1:xDhTyuFIujYiN3DKWC/H/83xcfHp+UE/IzWWampG7Zc= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/testcontainers/testcontainers-go v0.8.0 h1:RF0179BF/6hZeIaa9/T7fJMr7QjzWMLIVL/5jl2JAKU= github.com/testcontainers/testcontainers-go v0.8.0/go.mod h1:m9jHAu+OOFfbE6wQf98maI/6e/LKasi+uX3MVyVox4A= +github.com/thanos-io/thanos v0.11.0/go.mod h1:N/Yes7J68KqvmY+xM6J5CJqEvWIvKSR5sqGtmuD6wDc= github.com/thejerf/suture v3.0.3+incompatible h1:rliKxLrY4prqHrZl79a8IJgYD0K+0GnpgwwudE12QGM= github.com/thejerf/suture v3.0.3+incompatible/go.mod h1:ibKwrVj+Uzf3XZdAiNWUouPaAbSoemxOHLmJmwheEMc= -github.com/tidwall/gjson v1.6.1 h1:LRbvNuNuvAiISWg6gxLEFuCe72UKy5hDqhxW/8183ws= -github.com/tidwall/gjson v1.6.1/go.mod h1:BaHyNc5bjzYkPqgLq7mdVzeiRtULKULXLgZFKsxEHI0= -github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc= -github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= +github.com/tidwall/gjson v1.6.8 h1:CTmXMClGYPAmln7652e69B7OLXfTi5ABcPPwjIWUv7w= +github.com/tidwall/gjson v1.6.8/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= +github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= +github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twinj/uuid v1.0.0 h1:fzz7COZnDrXGTAOHGuUGYd6sG+JMq+AoE7+Jlu0przk= github.com/twinj/uuid v1.0.0/go.mod h1:mMgcE1RHFUFqe5AfiwlINXisXfDGro23fWdPUfOMjRY= +github.com/uber/jaeger-client-go v2.20.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.23.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.5-pre/go.mod h1:FwP/aQVg39TXzItUBMwnWp9T9gPQnXw4Poh4/oBQZ/0= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go v1.1.13/go.mod h1:jxau1n+/wyTGLQoCkjok9r5zFa/FxT6eI5HiHKQszjc= +github.com/ugorji/go v1.2.1 h1:dz+JxTe7GZQdErTo7SREc1jQj/hFP1k7jyIAwODoW+k= +github.com/ugorji/go v1.2.1/go.mod h1:cSVypSfTLm2o9fKxXvQgn3rMmkPXovcWor6Qn5tbFmI= +github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.5-pre/go.mod h1:tULtS6Gy1AE1yCENaw4Vb//HLH5njI2tfCQDUqRd8fI= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.1.13/go.mod h1:oNVt3Dq+FO91WNQ/9JnHKQP2QJxTzoN7wCBFCq1OeuU= +github.com/ugorji/go/codec v1.2.1 h1:/TRfW3XKkvWvmAYyCUaQlhoCDGjcvNR8xVVA/l5p/jQ= +github.com/ugorji/go/codec v1.2.1/go.mod h1:s/WxCRi46t8rA+fowL40EnmD7ec0XhR7ZypxeBNdzsM= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= +github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/wercker/stern v0.0.0-20190705090245-4fa46dd6987f/go.mod h1:+72MfLYlS87s4tqq+eVDANQ9GdILz0lkpAFlX/1+WWY= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/wonderflow/cert-manager-api v1.0.3/go.mod h1:1Se7MSg11/eNYlo4fWv6vOM55/jTBMOzg2DN1kVFiSc= github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= 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/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/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yudai/hcl v0.0.0-20151013225006-5fa2393b3552/go.mod h1:hg0ZaCmQL3rze1cH8Fh2g0a9q8vQs0uN8ESpePEwSEw= github.com/yudai/umutex v0.0.0-20150817080136-18216d265c6b h1:5/txHOjeYQCspaoZzyqanb7On7ZBSndTanlfFfOIEiE= @@ -1078,14 +1529,27 @@ github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMzt github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= +github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= +github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= +go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= +go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= +go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE= +go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +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= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.2/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1100,41 +1564,59 @@ 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/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= 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.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= 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/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= -go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180214000028-650f4a345ab4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/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-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= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +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= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1144,6 +1626,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -1156,6 +1640,8 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1169,7 +1655,9 @@ golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73r 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= +golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1178,10 +1666,13 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1189,8 +1680,12 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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-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= +golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1198,17 +1693,21 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1222,6 +1721,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1238,38 +1738,59 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1292,6 +1813,7 @@ golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1305,54 +1827,75 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +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-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/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-20191004055002-72853e10c5a3/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= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1364,11 +1907,14 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 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-20200630223951-c138986dd9b9/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1382,9 +1928,14 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= -gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +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.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1400,9 +1951,11 @@ google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.26.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +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.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1419,13 +1972,16 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -1435,11 +1991,13 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200603110839-e855014d5736/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1460,6 +2018,7 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +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= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1474,12 +2033,18 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v1 v1.0.0-20161222125816-442357a80af5/go.mod h1:u0ALmqvLRxLI95fkdCEWrE6mhWYZW1aMOJHp5YXLHTg= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +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/gorp.v1 v1.7.2 h1:j3DWlAyGVv8whO7AcIWznQ2Yj7yJkn34B8s63GViAAw= gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/httprequest.v1 v1.1.1/go.mod h1:/CkavNL+g3qLOrpFHVrEx4NKepeqR4XTZWNj4sGGjz0= 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= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20160818015218-f2b6f6c918c4/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= @@ -1505,20 +2070,26 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200603094226-e3079894b1e8/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v0.0.0-20181223230014-1083505acf35/go.mod h1:R//lfYlUuTOTfblYI3lGoAAAebUdzjvbmQsuB7Ykd90= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +helm.sh/helm/v3 v3.2.4/go.mod h1:ZaXz/vzktgwjyGGFbUWtIQkscfE7WYoRGP2szqAFHR0= helm.sh/helm/v3 v3.5.4 h1:FUx2L831YESvMcoNoPTicV0oW/6+es+Tnojw5yGvyVM= helm.sh/helm/v3 v3.5.4/go.mod h1:44SeYdnTImrEArjDazqgVQVRitFpLEZNYX97NFJyq4k= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1529,11 +2100,23 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= +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.0.0-20190813020757-36bff7324fb7/go.mod h1:3Iy+myeAORNCLgjd/Xu9ebwN7Vh59Bw0vh9jhoX+V58= k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0HRNyQ+8KTEERVsK0PW48= +k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjTEKBGgvsf2OraTuRtLFU= +k8s.io/api v0.0.0-20191122220107-b5267f2975e0/go.mod h1:vYpRfxYkMrmPPSesoHEkGNHxNKTk96REAwqm/inQbs0= +k8s.io/api v0.15.8/go.mod h1:hpDXsOhY/unVSSzhMol7kihWaNMf2snhF4nejjlzUzk= +k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= +k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= k8s.io/api v0.18.5/go.mod h1:tN+e/2nbdGKOAH55NMV8oGrMG+3uRlA9GaRfvnCCSNk= -k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= +k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= +k8s.io/api v0.18.8/go.mod h1:d/CXqwWv+Z2XEG1LgceeDmHQwpUJhROPx16SlxJgERY= +k8s.io/api v0.18.12/go.mod h1:3sS78jmUoGHwERyMbEhxP6owcQ77UxGo+Yy+dKNWrh0= k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4 h1:xZjKidCirayzX6tHONRQyTNDVIR55TYVqgATqo6ZULY= @@ -1559,6 +2142,7 @@ k8s.io/gengo v0.0.0-20201113003025-83324d819ded h1:JApXBKYyB7l9xx+DK7/+mFjC7A9Bt k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= 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 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= 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= @@ -1567,31 +2151,45 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-aggregator v0.20.1/go.mod h1:1ZeyRfSg5HcRI8dihvWAc7VpXSMAw9UmZoWXBUOPyew= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kubectl v0.18.0/go.mod h1:LOkWx9Z5DXMEg5KtOjHhRiC1fqJPLyCr3KtQgEolCkU= k8s.io/kubectl v0.18.5/go.mod h1:LAGxvYunNuwcZst0OAMXnInFIv81/IeoAz2N1Yh+AhU= +k8s.io/kubectl v0.18.6/go.mod h1:3TLzFOrF9h4mlRPAvdNkDbs5NWspN4e0EnPnEB41CGo= k8s.io/kubectl v0.20.4 h1:Y1gUiigiZM+ulcrnWeqSHlTd0/7xWcQIXjuMnjtHyoo= k8s.io/kubectl v0.20.4/go.mod h1:yCC5lUQyXRmmtwyxfaakryh9ezzp/bT0O14LeoFLbGo= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/metrics v0.18.0/go.mod h1:8aYTW18koXqjLVKL7Ds05RPMX9ipJZI3mywYvBOxXd4= k8s.io/metrics v0.18.5/go.mod h1:pqn6YiCCxUt067ivZVo4KtvppvdykV6HHG5+7ygVkNg= +k8s.io/metrics v0.18.6/go.mod h1:iAwGeabusQNO3duHDM7BBExTUB8L+iq8PM7N9EtQw6g= k8s.io/metrics v0.20.4/go.mod h1:DDXS+Ls+2NAxRcVhXKghRPa3csljyJRjDRjPe6EOg/g= 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= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 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= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo= -sigs.k8s.io/controller-runtime v0.7.0 h1:bU20IBBEPccWz5+zXpLnpVsgBYxqclaHu1pVDl/gEt8= -sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= +sigs.k8s.io/controller-runtime v0.6.2 h1:jkAnfdTYBpFwlmBn3pS5HFO06SfxvnTZ1p5PeEF/zAA= +sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= +sigs.k8s.io/kind v0.9.0/go.mod h1:cxKQWwmbtRDzQ+RNKnR6gZG6fjbeTtItp5cGf+ww+1Y= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= +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/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= diff --git a/pkg/apis/rainbond/v1alpha1/componentdefinition.go b/pkg/apis/rainbond/v1alpha1/componentdefinition.go new file mode 100644 index 000000000..70a5b66b4 --- /dev/null +++ b/pkg/apis/rainbond/v1alpha1/componentdefinition.go @@ -0,0 +1,109 @@ +/* +Copyright 2021 The KubeVela Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +// Code from kubevela, Used to generate the SDK. +*/ + +package v1alpha1 + +import ( + runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + + "github.com/oam-dev/kubevela/apis/core.oam.dev/common" +) + +// ComponentDefinitionSpec defines the desired state of ComponentDefinition +type ComponentDefinitionSpec struct { + // Workload is a workload type descriptor + Workload common.WorkloadTypeDescriptor `json:"workload"` + + // ChildResourceKinds are the list of GVK of the child resources this workload generates + ChildResourceKinds []common.ChildResourceKind `json:"childResourceKinds,omitempty"` + + // RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload + // can be used by trait to create resource selectors(e.g. label selector for pods). + // +optional + RevisionLabel string `json:"revisionLabel,omitempty"` + + // PodSpecPath indicates where/if this workload has K8s podSpec field + // if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields. + // +optional + PodSpecPath string `json:"podSpecPath,omitempty"` + + // Status defines the custom health policy and status message for workload + // +optional + Status *common.Status `json:"status,omitempty"` + + // Schematic defines the data format and template of the encapsulation of the workload + // +optional + Schematic *common.Schematic `json:"schematic,omitempty"` + + // Extension is used for extension needs by OAM platform builders + // +optional + // +kubebuilder:pruning:PreserveUnknownFields + Extension *runtime.RawExtension `json:"extension,omitempty"` +} + +// ComponentDefinitionStatus is the status of ComponentDefinition +type ComponentDefinitionStatus struct { + // ConditionedStatus reflects the observed status of a resource + runtimev1alpha1.ConditionedStatus `json:",inline"` + // ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters. + ConfigMapRef string `json:"configMapRef,omitempty"` + // LatestRevision of the component definition + // +optional + LatestRevision *common.Revision `json:"latestRevision,omitempty"` +} + +// +kubebuilder:object:root=true + +// ComponentDefinition is the Schema for the componentdefinitions API +// +genclient +// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=comp +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="WORKLOAD-KIND",type=string,JSONPath=".spec.workload.definition.kind" +// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description" +type ComponentDefinition struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ComponentDefinitionSpec `json:"spec,omitempty"` + Status ComponentDefinitionStatus `json:"status,omitempty"` +} + +// SetConditions set condition for ComponentDefinition +func (cd *ComponentDefinition) SetConditions(c ...runtimev1alpha1.Condition) { + cd.Status.SetConditions(c...) +} + +// GetCondition gets condition from ComponentDefinition +func (cd *ComponentDefinition) GetCondition(conditionType runtimev1alpha1.ConditionType) runtimev1alpha1.Condition { + return cd.Status.GetCondition(conditionType) +} + +// +kubebuilder:object:root=true + +// ComponentDefinitionList contains a list of ComponentDefinition +type ComponentDefinitionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ComponentDefinition `json:"items"` +} + +func init() { + SchemeBuilder.Register(&ComponentDefinition{}, &ComponentDefinitionList{}) +} diff --git a/pkg/apis/rainbond/v1alpha1/doc.go b/pkg/apis/rainbond/v1alpha1/doc.go index 3381a25fe..e90966196 100644 --- a/pkg/apis/rainbond/v1alpha1/doc.go +++ b/pkg/apis/rainbond/v1alpha1/doc.go @@ -1,4 +1,4 @@ // Package v1alpha1 contains API Schema definitions for the rainbond v1alpha1 API group // +k8s:deepcopy-gen=package,register -// +groupName=rainbond.goodrain.io +// +groupName=rainbond.io package v1alpha1 diff --git a/pkg/apis/rainbond/v1alpha1/register.go b/pkg/apis/rainbond/v1alpha1/register.go index 4a4593c09..87b783c76 100644 --- a/pkg/apis/rainbond/v1alpha1/register.go +++ b/pkg/apis/rainbond/v1alpha1/register.go @@ -2,7 +2,7 @@ // Package v1alpha1 contains API Schema definitions for the rainbond v1alpha1 API group // +k8s:deepcopy-gen=package,register -// +groupName=rainbond.goodrain.io +// +groupName=rainbond.io package v1alpha1 import ( @@ -12,7 +12,7 @@ import ( var ( // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: "rainbond.goodrain.io", Version: "v1alpha1"} + SchemeGroupVersion = schema.GroupVersion{Group: "rainbond.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} diff --git a/pkg/apis/rainbond/v1alpha1/third_component.go b/pkg/apis/rainbond/v1alpha1/third_component.go index 245ee803b..07add125b 100644 --- a/pkg/apis/rainbond/v1alpha1/third_component.go +++ b/pkg/apis/rainbond/v1alpha1/third_component.go @@ -18,12 +18,26 @@ package v1alpha1 +import ( + "fmt" + "net" + "strconv" + "strings" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func init() { + SchemeBuilder.Register(&ThirdComponent{}, &ThirdComponentList{}) +} + // +genclient // +kubebuilder:object:root=true // HelmApp - // +kubebuilder:subresource:status -// +kubebuilder:resource:path=thirdcomponent,scope=Namespaced +// +kubebuilder:resource:path=thirdcomponents,scope=Namespaced type ThirdComponent struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -32,19 +46,28 @@ type ThirdComponent struct { Status ThirdComponentStatus `json:"status,omitempty"` } +// +kubebuilder:object:root=true + +// ThirdComponentList contains a list of ThirdComponent +type ThirdComponentList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ThirdComponent `json:"items"` +} + type ThirdComponentSpec struct { // health check probe // +optional - HealthProbe *HealthProbe `json:"health_probe,omitempty"` + Probe *HealthProbe `json:"probe,omitempty"` // component regist ports Ports []*ComponentPort `json:"ports"` // endpoint source config - EndpointSource ThirdComponentEndpointSource `json:"endpoint_source"` + EndpointSource ThirdComponentEndpointSource `json:"endpointSource"` } type ThirdComponentEndpointSource struct { StaticEndpoints []*ThirdComponentEndpoint `json:"endpoints,omitempty"` - KubernetesService KubernetesServiceSource `json:"kubernetes_service,omitempty"` + KubernetesService *KubernetesServiceSource `json:"kubernetesService,omitempty"` //other source // NacosSource // EurekaSource @@ -60,7 +83,7 @@ type ThirdComponentEndpoint struct { Protocol string `json:"protocol,omitempty"` // Specify a private certificate when the protocol is HTTPS // +optional - ClentSecret string `json:"client_secret,omitempty"` + ClentSecret string `json:"clientSecret,omitempty"` } type KubernetesServiceSource struct { @@ -81,7 +104,12 @@ type HealthProbe struct { TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"` } +//ComponentPort component port define type ComponentPort struct { + Name string `json:"name"` + Port int `json:"port"` + OpenInner bool `json:"openInner"` + OpenOuter bool `json:"openOuter"` } //TCPSocketAction enable tcp check @@ -92,10 +120,10 @@ type TCPSocketAction struct { type HTTPGetAction struct { // Path to access on the HTTP server. // +optional - Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + Path string `json:"path,omitempty"` // Custom headers to set in the request. HTTP allows repeated headers. // +optional - HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"` + HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"` } // HTTPHeader describes a custom header to be used in HTTP probes @@ -121,6 +149,7 @@ const ( type ThirdComponentStatus struct { Phase ComponentPhase `json:"phase"` + Reason string `json:"reason,omitempty"` Endpoints []*ThirdComponentEndpointStatus `json:"endpoints"` } @@ -133,15 +162,45 @@ const ( EndpointNotReady EndpointStatus = "NotReady" ) +type EndpointAddress string + +func (e EndpointAddress) GetIP() string { + info := strings.Split(string(e), ":") + if len(info) == 2 { + return info[0] + } + return "" +} + +func (e EndpointAddress) GetPort() int { + info := strings.Split(string(e), ":") + if len(info) == 2 { + port, _ := strconv.Atoi(info[1]) + return port + } + return 0 +} + +func NewEndpointAddress(host string, port int) *EndpointAddress { + if net.ParseIP(host) == nil { + return nil + } + if port < 0 || port > 65533 { + return nil + } + ea := EndpointAddress(fmt.Sprintf("%s:%d", host, port)) + return &ea +} + //ThirdComponentEndpointStatus endpoint status type ThirdComponentEndpointStatus struct { // The address including the port number. - Address string `json:"address"` - //PodName means endpoint come from kubernetes pod + Address EndpointAddress `json:"address"` + // Reference to object providing the endpoint. // +optional - PodName string `json:"pod_name"` + TargetRef *v1.ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"` //Status endpoint status Status EndpointStatus `json:"status"` //Reason probe not passed reason - Reason string `json:"reason"` + Reason string `json:"reason,omitempty"` } diff --git a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index 6006769c2..a8679217e 100644 --- a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -23,9 +23,204 @@ package v1alpha1 import ( - runtime "k8s.io/apimachinery/pkg/runtime" + "github.com/oam-dev/kubevela/apis/core.oam.dev/common" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentDefinition) DeepCopyInto(out *ComponentDefinition) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinition. +func (in *ComponentDefinition) DeepCopy() *ComponentDefinition { + if in == nil { + return nil + } + out := new(ComponentDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ComponentDefinition) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentDefinitionList) DeepCopyInto(out *ComponentDefinitionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ComponentDefinition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionList. +func (in *ComponentDefinitionList) DeepCopy() *ComponentDefinitionList { + if in == nil { + return nil + } + out := new(ComponentDefinitionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ComponentDefinitionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentDefinitionSpec) DeepCopyInto(out *ComponentDefinitionSpec) { + *out = *in + out.Workload = in.Workload + if in.ChildResourceKinds != nil { + in, out := &in.ChildResourceKinds, &out.ChildResourceKinds + *out = make([]common.ChildResourceKind, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(common.Status) + **out = **in + } + if in.Schematic != nil { + in, out := &in.Schematic, &out.Schematic + *out = new(common.Schematic) + (*in).DeepCopyInto(*out) + } + if in.Extension != nil { + in, out := &in.Extension, &out.Extension + *out = new(runtime.RawExtension) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionSpec. +func (in *ComponentDefinitionSpec) DeepCopy() *ComponentDefinitionSpec { + if in == nil { + return nil + } + out := new(ComponentDefinitionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentDefinitionStatus) DeepCopyInto(out *ComponentDefinitionStatus) { + *out = *in + in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus) + if in.LatestRevision != nil { + in, out := &in.LatestRevision, &out.LatestRevision + *out = new(common.Revision) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionStatus. +func (in *ComponentDefinitionStatus) DeepCopy() *ComponentDefinitionStatus { + if in == nil { + return nil + } + out := new(ComponentDefinitionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentPort) DeepCopyInto(out *ComponentPort) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentPort. +func (in *ComponentPort) DeepCopy() *ComponentPort { + if in == nil { + return nil + } + out := new(ComponentPort) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HTTPGetAction) DeepCopyInto(out *HTTPGetAction) { + *out = *in + if in.HTTPHeaders != nil { + in, out := &in.HTTPHeaders, &out.HTTPHeaders + *out = make([]HTTPHeader, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPGetAction. +func (in *HTTPGetAction) DeepCopy() *HTTPGetAction { + if in == nil { + return nil + } + out := new(HTTPGetAction) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HTTPHeader) DeepCopyInto(out *HTTPHeader) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeader. +func (in *HTTPHeader) DeepCopy() *HTTPHeader { + if in == nil { + return nil + } + out := new(HTTPHeader) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HealthProbe) DeepCopyInto(out *HealthProbe) { + *out = *in + if in.HTTPGet != nil { + in, out := &in.HTTPGet, &out.HTTPGet + *out = new(HTTPGetAction) + (*in).DeepCopyInto(*out) + } + if in.TCPSocket != nil { + in, out := &in.TCPSocket, &out.TCPSocket + *out = new(TCPSocketAction) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthProbe. +func (in *HealthProbe) DeepCopy() *HealthProbe { + if in == nil { + return nil + } + out := new(HealthProbe) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HelmApp) DeepCopyInto(out *HelmApp) { *out = *in @@ -167,3 +362,216 @@ func (in *HelmAppStore) DeepCopy() *HelmAppStore { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesServiceSource) DeepCopyInto(out *KubernetesServiceSource) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesServiceSource. +func (in *KubernetesServiceSource) DeepCopy() *KubernetesServiceSource { + if in == nil { + return nil + } + out := new(KubernetesServiceSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TCPSocketAction) DeepCopyInto(out *TCPSocketAction) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPSocketAction. +func (in *TCPSocketAction) DeepCopy() *TCPSocketAction { + if in == nil { + return nil + } + out := new(TCPSocketAction) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ThirdComponent) DeepCopyInto(out *ThirdComponent) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdComponent. +func (in *ThirdComponent) DeepCopy() *ThirdComponent { + if in == nil { + return nil + } + out := new(ThirdComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ThirdComponent) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ThirdComponentEndpoint) DeepCopyInto(out *ThirdComponentEndpoint) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdComponentEndpoint. +func (in *ThirdComponentEndpoint) DeepCopy() *ThirdComponentEndpoint { + if in == nil { + return nil + } + out := new(ThirdComponentEndpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ThirdComponentEndpointSource) DeepCopyInto(out *ThirdComponentEndpointSource) { + *out = *in + if in.StaticEndpoints != nil { + in, out := &in.StaticEndpoints, &out.StaticEndpoints + *out = make([]*ThirdComponentEndpoint, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ThirdComponentEndpoint) + **out = **in + } + } + } + if in.KubernetesService != nil { + in, out := &in.KubernetesService, &out.KubernetesService + *out = new(KubernetesServiceSource) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdComponentEndpointSource. +func (in *ThirdComponentEndpointSource) DeepCopy() *ThirdComponentEndpointSource { + if in == nil { + return nil + } + out := new(ThirdComponentEndpointSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ThirdComponentEndpointStatus) DeepCopyInto(out *ThirdComponentEndpointStatus) { + *out = *in + if in.TargetRef != nil { + in, out := &in.TargetRef, &out.TargetRef + *out = new(v1.ObjectReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdComponentEndpointStatus. +func (in *ThirdComponentEndpointStatus) DeepCopy() *ThirdComponentEndpointStatus { + if in == nil { + return nil + } + out := new(ThirdComponentEndpointStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ThirdComponentList) DeepCopyInto(out *ThirdComponentList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ThirdComponent, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdComponentList. +func (in *ThirdComponentList) DeepCopy() *ThirdComponentList { + if in == nil { + return nil + } + out := new(ThirdComponentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ThirdComponentList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ThirdComponentSpec) DeepCopyInto(out *ThirdComponentSpec) { + *out = *in + if in.Probe != nil { + in, out := &in.Probe, &out.Probe + *out = new(HealthProbe) + (*in).DeepCopyInto(*out) + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]*ComponentPort, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ComponentPort) + **out = **in + } + } + } + in.EndpointSource.DeepCopyInto(&out.EndpointSource) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdComponentSpec. +func (in *ThirdComponentSpec) DeepCopy() *ThirdComponentSpec { + if in == nil { + return nil + } + out := new(ThirdComponentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ThirdComponentStatus) DeepCopyInto(out *ThirdComponentStatus) { + *out = *in + if in.Endpoints != nil { + in, out := &in.Endpoints, &out.Endpoints + *out = make([]*ThirdComponentEndpointStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ThirdComponentEndpointStatus) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThirdComponentStatus. +func (in *ThirdComponentStatus) DeepCopy() *ThirdComponentStatus { + if in == nil { + return nil + } + out := new(ThirdComponentStatus) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/common/scheme.go b/pkg/common/scheme.go new file mode 100644 index 000000000..7d83b379f --- /dev/null +++ b/pkg/common/scheme.go @@ -0,0 +1,42 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 common + +import ( + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + oamcore "github.com/oam-dev/kubevela/apis/core.oam.dev" + oamstandard "github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1" + crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" +) + +var ( + // Scheme defines the default KubeVela schema + Scheme = k8sruntime.NewScheme() +) + +func init() { + _ = clientgoscheme.AddToScheme(Scheme) + _ = crdv1.AddToScheme(Scheme) + _ = oamcore.AddToScheme(Scheme) + _ = oamstandard.AddToScheme(Scheme) + _ = rainbondv1alpha1.AddToScheme(Scheme) + // +kubebuilder:scaffold:scheme +} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/componentdefinition.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/componentdefinition.go new file mode 100644 index 000000000..6ee03cf96 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/componentdefinition.go @@ -0,0 +1,197 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + scheme "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ComponentDefinitionsGetter has a method to return a ComponentDefinitionInterface. +// A group's client should implement this interface. +type ComponentDefinitionsGetter interface { + ComponentDefinitions(namespace string) ComponentDefinitionInterface +} + +// ComponentDefinitionInterface has methods to work with ComponentDefinition resources. +type ComponentDefinitionInterface interface { + Create(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.CreateOptions) (*v1alpha1.ComponentDefinition, error) + Update(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.UpdateOptions) (*v1alpha1.ComponentDefinition, error) + UpdateStatus(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.UpdateOptions) (*v1alpha1.ComponentDefinition, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ComponentDefinition, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ComponentDefinitionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ComponentDefinition, err error) + ComponentDefinitionExpansion +} + +// componentDefinitions implements ComponentDefinitionInterface +type componentDefinitions struct { + client rest.Interface + ns string +} + +// newComponentDefinitions returns a ComponentDefinitions +func newComponentDefinitions(c *RainbondV1alpha1Client, namespace string) *componentDefinitions { + return &componentDefinitions{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the componentDefinition, and returns the corresponding componentDefinition object, and an error if there is any. +func (c *componentDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ComponentDefinition, err error) { + result = &v1alpha1.ComponentDefinition{} + err = c.client.Get(). + Namespace(c.ns). + Resource("componentdefinitions"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ComponentDefinitions that match those selectors. +func (c *componentDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ComponentDefinitionList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ComponentDefinitionList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("componentdefinitions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested componentDefinitions. +func (c *componentDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("componentdefinitions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a componentDefinition and creates it. Returns the server's representation of the componentDefinition, and an error, if there is any. +func (c *componentDefinitions) Create(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.CreateOptions) (result *v1alpha1.ComponentDefinition, err error) { + result = &v1alpha1.ComponentDefinition{} + err = c.client.Post(). + Namespace(c.ns). + Resource("componentdefinitions"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(componentDefinition). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a componentDefinition and updates it. Returns the server's representation of the componentDefinition, and an error, if there is any. +func (c *componentDefinitions) Update(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.UpdateOptions) (result *v1alpha1.ComponentDefinition, err error) { + result = &v1alpha1.ComponentDefinition{} + err = c.client.Put(). + Namespace(c.ns). + Resource("componentdefinitions"). + Name(componentDefinition.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(componentDefinition). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *componentDefinitions) UpdateStatus(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.UpdateOptions) (result *v1alpha1.ComponentDefinition, err error) { + result = &v1alpha1.ComponentDefinition{} + err = c.client.Put(). + Namespace(c.ns). + Resource("componentdefinitions"). + Name(componentDefinition.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(componentDefinition). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the componentDefinition and deletes it. Returns an error if one occurs. +func (c *componentDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("componentdefinitions"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *componentDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("componentdefinitions"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched componentDefinition. +func (c *componentDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ComponentDefinition, err error) { + result = &v1alpha1.ComponentDefinition{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("componentdefinitions"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_componentdefinition.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_componentdefinition.go new file mode 100644 index 000000000..1f09c52ba --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_componentdefinition.go @@ -0,0 +1,144 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeComponentDefinitions implements ComponentDefinitionInterface +type FakeComponentDefinitions struct { + Fake *FakeRainbondV1alpha1 + ns string +} + +var componentdefinitionsResource = schema.GroupVersionResource{Group: "rainbond.io", Version: "v1alpha1", Resource: "componentdefinitions"} + +var componentdefinitionsKind = schema.GroupVersionKind{Group: "rainbond.io", Version: "v1alpha1", Kind: "ComponentDefinition"} + +// Get takes name of the componentDefinition, and returns the corresponding componentDefinition object, and an error if there is any. +func (c *FakeComponentDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ComponentDefinition, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(componentdefinitionsResource, c.ns, name), &v1alpha1.ComponentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ComponentDefinition), err +} + +// List takes label and field selectors, and returns the list of ComponentDefinitions that match those selectors. +func (c *FakeComponentDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ComponentDefinitionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(componentdefinitionsResource, componentdefinitionsKind, c.ns, opts), &v1alpha1.ComponentDefinitionList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ComponentDefinitionList{ListMeta: obj.(*v1alpha1.ComponentDefinitionList).ListMeta} + for _, item := range obj.(*v1alpha1.ComponentDefinitionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested componentDefinitions. +func (c *FakeComponentDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(componentdefinitionsResource, c.ns, opts)) + +} + +// Create takes the representation of a componentDefinition and creates it. Returns the server's representation of the componentDefinition, and an error, if there is any. +func (c *FakeComponentDefinitions) Create(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.CreateOptions) (result *v1alpha1.ComponentDefinition, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(componentdefinitionsResource, c.ns, componentDefinition), &v1alpha1.ComponentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ComponentDefinition), err +} + +// Update takes the representation of a componentDefinition and updates it. Returns the server's representation of the componentDefinition, and an error, if there is any. +func (c *FakeComponentDefinitions) Update(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.UpdateOptions) (result *v1alpha1.ComponentDefinition, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(componentdefinitionsResource, c.ns, componentDefinition), &v1alpha1.ComponentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ComponentDefinition), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeComponentDefinitions) UpdateStatus(ctx context.Context, componentDefinition *v1alpha1.ComponentDefinition, opts v1.UpdateOptions) (*v1alpha1.ComponentDefinition, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(componentdefinitionsResource, "status", c.ns, componentDefinition), &v1alpha1.ComponentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ComponentDefinition), err +} + +// Delete takes name of the componentDefinition and deletes it. Returns an error if one occurs. +func (c *FakeComponentDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(componentdefinitionsResource, c.ns, name), &v1alpha1.ComponentDefinition{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeComponentDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(componentdefinitionsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ComponentDefinitionList{}) + return err +} + +// Patch applies the patch and returns the patched componentDefinition. +func (c *FakeComponentDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ComponentDefinition, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(componentdefinitionsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ComponentDefinition{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ComponentDefinition), err +} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go index aa452a67c..42170de45 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_helmapp.go @@ -38,9 +38,9 @@ type FakeHelmApps struct { ns string } -var helmappsResource = schema.GroupVersionResource{Group: "rainbond.goodrain.io", Version: "v1alpha1", Resource: "helmapps"} +var helmappsResource = schema.GroupVersionResource{Group: "rainbond.io", Version: "v1alpha1", Resource: "helmapps"} -var helmappsKind = schema.GroupVersionKind{Group: "rainbond.goodrain.io", Version: "v1alpha1", Kind: "HelmApp"} +var helmappsKind = schema.GroupVersionKind{Group: "rainbond.io", Version: "v1alpha1", Kind: "HelmApp"} // Get takes name of the helmApp, and returns the corresponding helmApp object, and an error if there is any. func (c *FakeHelmApps) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HelmApp, err error) { diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go index fd7134c54..0f9a7eb7b 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_rainbond_client.go @@ -30,10 +30,18 @@ type FakeRainbondV1alpha1 struct { *testing.Fake } +func (c *FakeRainbondV1alpha1) ComponentDefinitions(namespace string) v1alpha1.ComponentDefinitionInterface { + return &FakeComponentDefinitions{c, namespace} +} + func (c *FakeRainbondV1alpha1) HelmApps(namespace string) v1alpha1.HelmAppInterface { return &FakeHelmApps{c, namespace} } +func (c *FakeRainbondV1alpha1) ThirdComponents(namespace string) v1alpha1.ThirdComponentInterface { + return &FakeThirdComponents{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeRainbondV1alpha1) RESTClient() rest.Interface { diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_thirdcomponent.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_thirdcomponent.go new file mode 100644 index 000000000..f1d30fa98 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/fake/fake_thirdcomponent.go @@ -0,0 +1,144 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeThirdComponents implements ThirdComponentInterface +type FakeThirdComponents struct { + Fake *FakeRainbondV1alpha1 + ns string +} + +var thirdcomponentsResource = schema.GroupVersionResource{Group: "rainbond.io", Version: "v1alpha1", Resource: "thirdcomponents"} + +var thirdcomponentsKind = schema.GroupVersionKind{Group: "rainbond.io", Version: "v1alpha1", Kind: "ThirdComponent"} + +// Get takes name of the thirdComponent, and returns the corresponding thirdComponent object, and an error if there is any. +func (c *FakeThirdComponents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ThirdComponent, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(thirdcomponentsResource, c.ns, name), &v1alpha1.ThirdComponent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ThirdComponent), err +} + +// List takes label and field selectors, and returns the list of ThirdComponents that match those selectors. +func (c *FakeThirdComponents) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ThirdComponentList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(thirdcomponentsResource, thirdcomponentsKind, c.ns, opts), &v1alpha1.ThirdComponentList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ThirdComponentList{ListMeta: obj.(*v1alpha1.ThirdComponentList).ListMeta} + for _, item := range obj.(*v1alpha1.ThirdComponentList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested thirdComponents. +func (c *FakeThirdComponents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(thirdcomponentsResource, c.ns, opts)) + +} + +// Create takes the representation of a thirdComponent and creates it. Returns the server's representation of the thirdComponent, and an error, if there is any. +func (c *FakeThirdComponents) Create(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.CreateOptions) (result *v1alpha1.ThirdComponent, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(thirdcomponentsResource, c.ns, thirdComponent), &v1alpha1.ThirdComponent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ThirdComponent), err +} + +// Update takes the representation of a thirdComponent and updates it. Returns the server's representation of the thirdComponent, and an error, if there is any. +func (c *FakeThirdComponents) Update(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.UpdateOptions) (result *v1alpha1.ThirdComponent, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(thirdcomponentsResource, c.ns, thirdComponent), &v1alpha1.ThirdComponent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ThirdComponent), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeThirdComponents) UpdateStatus(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.UpdateOptions) (*v1alpha1.ThirdComponent, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(thirdcomponentsResource, "status", c.ns, thirdComponent), &v1alpha1.ThirdComponent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ThirdComponent), err +} + +// Delete takes name of the thirdComponent and deletes it. Returns an error if one occurs. +func (c *FakeThirdComponents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(thirdcomponentsResource, c.ns, name), &v1alpha1.ThirdComponent{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeThirdComponents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(thirdcomponentsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ThirdComponentList{}) + return err +} + +// Patch applies the patch and returns the patched thirdComponent. +func (c *FakeThirdComponents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ThirdComponent, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(thirdcomponentsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ThirdComponent{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ThirdComponent), err +} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go index 92ee79eb9..55882d164 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/generated_expansion.go @@ -20,4 +20,8 @@ package v1alpha1 +type ComponentDefinitionExpansion interface{} + type HelmAppExpansion interface{} + +type ThirdComponentExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go index c580f85ec..d98f3f748 100644 --- a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/rainbond_client.go @@ -28,18 +28,28 @@ import ( type RainbondV1alpha1Interface interface { RESTClient() rest.Interface + ComponentDefinitionsGetter HelmAppsGetter + ThirdComponentsGetter } -// RainbondV1alpha1Client is used to interact with features provided by the rainbond.goodrain.io group. +// RainbondV1alpha1Client is used to interact with features provided by the rainbond.io group. type RainbondV1alpha1Client struct { restClient rest.Interface } +func (c *RainbondV1alpha1Client) ComponentDefinitions(namespace string) ComponentDefinitionInterface { + return newComponentDefinitions(c, namespace) +} + func (c *RainbondV1alpha1Client) HelmApps(namespace string) HelmAppInterface { return newHelmApps(c, namespace) } +func (c *RainbondV1alpha1Client) ThirdComponents(namespace string) ThirdComponentInterface { + return newThirdComponents(c, namespace) +} + // NewForConfig creates a new RainbondV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*RainbondV1alpha1Client, error) { config := *c diff --git a/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/thirdcomponent.go b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/thirdcomponent.go new file mode 100644 index 000000000..aa002ace9 --- /dev/null +++ b/pkg/generated/clientset/versioned/typed/rainbond/v1alpha1/thirdcomponent.go @@ -0,0 +1,197 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + scheme "github.com/goodrain/rainbond/pkg/generated/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ThirdComponentsGetter has a method to return a ThirdComponentInterface. +// A group's client should implement this interface. +type ThirdComponentsGetter interface { + ThirdComponents(namespace string) ThirdComponentInterface +} + +// ThirdComponentInterface has methods to work with ThirdComponent resources. +type ThirdComponentInterface interface { + Create(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.CreateOptions) (*v1alpha1.ThirdComponent, error) + Update(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.UpdateOptions) (*v1alpha1.ThirdComponent, error) + UpdateStatus(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.UpdateOptions) (*v1alpha1.ThirdComponent, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ThirdComponent, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ThirdComponentList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ThirdComponent, err error) + ThirdComponentExpansion +} + +// thirdComponents implements ThirdComponentInterface +type thirdComponents struct { + client rest.Interface + ns string +} + +// newThirdComponents returns a ThirdComponents +func newThirdComponents(c *RainbondV1alpha1Client, namespace string) *thirdComponents { + return &thirdComponents{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the thirdComponent, and returns the corresponding thirdComponent object, and an error if there is any. +func (c *thirdComponents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ThirdComponent, err error) { + result = &v1alpha1.ThirdComponent{} + err = c.client.Get(). + Namespace(c.ns). + Resource("thirdcomponents"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ThirdComponents that match those selectors. +func (c *thirdComponents) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ThirdComponentList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ThirdComponentList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("thirdcomponents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested thirdComponents. +func (c *thirdComponents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("thirdcomponents"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a thirdComponent and creates it. Returns the server's representation of the thirdComponent, and an error, if there is any. +func (c *thirdComponents) Create(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.CreateOptions) (result *v1alpha1.ThirdComponent, err error) { + result = &v1alpha1.ThirdComponent{} + err = c.client.Post(). + Namespace(c.ns). + Resource("thirdcomponents"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(thirdComponent). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a thirdComponent and updates it. Returns the server's representation of the thirdComponent, and an error, if there is any. +func (c *thirdComponents) Update(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.UpdateOptions) (result *v1alpha1.ThirdComponent, err error) { + result = &v1alpha1.ThirdComponent{} + err = c.client.Put(). + Namespace(c.ns). + Resource("thirdcomponents"). + Name(thirdComponent.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(thirdComponent). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *thirdComponents) UpdateStatus(ctx context.Context, thirdComponent *v1alpha1.ThirdComponent, opts v1.UpdateOptions) (result *v1alpha1.ThirdComponent, err error) { + result = &v1alpha1.ThirdComponent{} + err = c.client.Put(). + Namespace(c.ns). + Resource("thirdcomponents"). + Name(thirdComponent.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(thirdComponent). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the thirdComponent and deletes it. Returns an error if one occurs. +func (c *thirdComponents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("thirdcomponents"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *thirdComponents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("thirdcomponents"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched thirdComponent. +func (c *thirdComponents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ThirdComponent, err error) { + result = &v1alpha1.ThirdComponent{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("thirdcomponents"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go index b86930e2f..18297d56c 100644 --- a/pkg/generated/informers/externalversions/generic.go +++ b/pkg/generated/informers/externalversions/generic.go @@ -54,9 +54,13 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=rainbond.goodrain.io, Version=v1alpha1 + // Group=rainbond.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("componentdefinitions"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rainbond().V1alpha1().ComponentDefinitions().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("helmapps"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rainbond().V1alpha1().HelmApps().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("thirdcomponents"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rainbond().V1alpha1().ThirdComponents().Informer()}, nil } diff --git a/pkg/generated/informers/externalversions/rainbond/v1alpha1/componentdefinition.go b/pkg/generated/informers/externalversions/rainbond/v1alpha1/componentdefinition.go new file mode 100644 index 000000000..7aaf59d4b --- /dev/null +++ b/pkg/generated/informers/externalversions/rainbond/v1alpha1/componentdefinition.go @@ -0,0 +1,92 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + versioned "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + internalinterfaces "github.com/goodrain/rainbond/pkg/generated/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/goodrain/rainbond/pkg/generated/listers/rainbond/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ComponentDefinitionInformer provides access to a shared informer and lister for +// ComponentDefinitions. +type ComponentDefinitionInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ComponentDefinitionLister +} + +type componentDefinitionInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewComponentDefinitionInformer constructs a new informer for ComponentDefinition type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewComponentDefinitionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredComponentDefinitionInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredComponentDefinitionInformer constructs a new informer for ComponentDefinition type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredComponentDefinitionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.RainbondV1alpha1().ComponentDefinitions(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.RainbondV1alpha1().ComponentDefinitions(namespace).Watch(context.TODO(), options) + }, + }, + &rainbondv1alpha1.ComponentDefinition{}, + resyncPeriod, + indexers, + ) +} + +func (f *componentDefinitionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredComponentDefinitionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *componentDefinitionInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rainbondv1alpha1.ComponentDefinition{}, f.defaultInformer) +} + +func (f *componentDefinitionInformer) Lister() v1alpha1.ComponentDefinitionLister { + return v1alpha1.NewComponentDefinitionLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go b/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go index 74c73e751..57ee823e0 100644 --- a/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go +++ b/pkg/generated/informers/externalversions/rainbond/v1alpha1/interface.go @@ -26,8 +26,12 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // ComponentDefinitions returns a ComponentDefinitionInformer. + ComponentDefinitions() ComponentDefinitionInformer // HelmApps returns a HelmAppInformer. HelmApps() HelmAppInformer + // ThirdComponents returns a ThirdComponentInformer. + ThirdComponents() ThirdComponentInformer } type version struct { @@ -41,7 +45,17 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// ComponentDefinitions returns a ComponentDefinitionInformer. +func (v *version) ComponentDefinitions() ComponentDefinitionInformer { + return &componentDefinitionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // HelmApps returns a HelmAppInformer. func (v *version) HelmApps() HelmAppInformer { return &helmAppInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// ThirdComponents returns a ThirdComponentInformer. +func (v *version) ThirdComponents() ThirdComponentInformer { + return &thirdComponentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/generated/informers/externalversions/rainbond/v1alpha1/thirdcomponent.go b/pkg/generated/informers/externalversions/rainbond/v1alpha1/thirdcomponent.go new file mode 100644 index 000000000..9cc990968 --- /dev/null +++ b/pkg/generated/informers/externalversions/rainbond/v1alpha1/thirdcomponent.go @@ -0,0 +1,92 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + rainbondv1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + versioned "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + internalinterfaces "github.com/goodrain/rainbond/pkg/generated/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/goodrain/rainbond/pkg/generated/listers/rainbond/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ThirdComponentInformer provides access to a shared informer and lister for +// ThirdComponents. +type ThirdComponentInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ThirdComponentLister +} + +type thirdComponentInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewThirdComponentInformer constructs a new informer for ThirdComponent type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewThirdComponentInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredThirdComponentInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredThirdComponentInformer constructs a new informer for ThirdComponent type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredThirdComponentInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.RainbondV1alpha1().ThirdComponents(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.RainbondV1alpha1().ThirdComponents(namespace).Watch(context.TODO(), options) + }, + }, + &rainbondv1alpha1.ThirdComponent{}, + resyncPeriod, + indexers, + ) +} + +func (f *thirdComponentInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredThirdComponentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *thirdComponentInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&rainbondv1alpha1.ThirdComponent{}, f.defaultInformer) +} + +func (f *thirdComponentInformer) Lister() v1alpha1.ThirdComponentLister { + return v1alpha1.NewThirdComponentLister(f.Informer().GetIndexer()) +} diff --git a/pkg/generated/listers/rainbond/v1alpha1/componentdefinition.go b/pkg/generated/listers/rainbond/v1alpha1/componentdefinition.go new file mode 100644 index 000000000..a27e3711a --- /dev/null +++ b/pkg/generated/listers/rainbond/v1alpha1/componentdefinition.go @@ -0,0 +1,101 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ComponentDefinitionLister helps list ComponentDefinitions. +// All objects returned here must be treated as read-only. +type ComponentDefinitionLister interface { + // List lists all ComponentDefinitions in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ComponentDefinition, err error) + // ComponentDefinitions returns an object that can list and get ComponentDefinitions. + ComponentDefinitions(namespace string) ComponentDefinitionNamespaceLister + ComponentDefinitionListerExpansion +} + +// componentDefinitionLister implements the ComponentDefinitionLister interface. +type componentDefinitionLister struct { + indexer cache.Indexer +} + +// NewComponentDefinitionLister returns a new ComponentDefinitionLister. +func NewComponentDefinitionLister(indexer cache.Indexer) ComponentDefinitionLister { + return &componentDefinitionLister{indexer: indexer} +} + +// List lists all ComponentDefinitions in the indexer. +func (s *componentDefinitionLister) List(selector labels.Selector) (ret []*v1alpha1.ComponentDefinition, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ComponentDefinition)) + }) + return ret, err +} + +// ComponentDefinitions returns an object that can list and get ComponentDefinitions. +func (s *componentDefinitionLister) ComponentDefinitions(namespace string) ComponentDefinitionNamespaceLister { + return componentDefinitionNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ComponentDefinitionNamespaceLister helps list and get ComponentDefinitions. +// All objects returned here must be treated as read-only. +type ComponentDefinitionNamespaceLister interface { + // List lists all ComponentDefinitions in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ComponentDefinition, err error) + // Get retrieves the ComponentDefinition from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.ComponentDefinition, error) + ComponentDefinitionNamespaceListerExpansion +} + +// componentDefinitionNamespaceLister implements the ComponentDefinitionNamespaceLister +// interface. +type componentDefinitionNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ComponentDefinitions in the indexer for a given namespace. +func (s componentDefinitionNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ComponentDefinition, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ComponentDefinition)) + }) + return ret, err +} + +// Get retrieves the ComponentDefinition from the indexer for a given namespace and name. +func (s componentDefinitionNamespaceLister) Get(name string) (*v1alpha1.ComponentDefinition, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("componentdefinition"), name) + } + return obj.(*v1alpha1.ComponentDefinition), nil +} diff --git a/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go b/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go index f8e4a8e5b..467614796 100644 --- a/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go +++ b/pkg/generated/listers/rainbond/v1alpha1/expansion_generated.go @@ -20,6 +20,14 @@ package v1alpha1 +// ComponentDefinitionListerExpansion allows custom methods to be added to +// ComponentDefinitionLister. +type ComponentDefinitionListerExpansion interface{} + +// ComponentDefinitionNamespaceListerExpansion allows custom methods to be added to +// ComponentDefinitionNamespaceLister. +type ComponentDefinitionNamespaceListerExpansion interface{} + // HelmAppListerExpansion allows custom methods to be added to // HelmAppLister. type HelmAppListerExpansion interface{} @@ -27,3 +35,11 @@ type HelmAppListerExpansion interface{} // HelmAppNamespaceListerExpansion allows custom methods to be added to // HelmAppNamespaceLister. type HelmAppNamespaceListerExpansion interface{} + +// ThirdComponentListerExpansion allows custom methods to be added to +// ThirdComponentLister. +type ThirdComponentListerExpansion interface{} + +// ThirdComponentNamespaceListerExpansion allows custom methods to be added to +// ThirdComponentNamespaceLister. +type ThirdComponentNamespaceListerExpansion interface{} diff --git a/pkg/generated/listers/rainbond/v1alpha1/thirdcomponent.go b/pkg/generated/listers/rainbond/v1alpha1/thirdcomponent.go new file mode 100644 index 000000000..bd714c54c --- /dev/null +++ b/pkg/generated/listers/rainbond/v1alpha1/thirdcomponent.go @@ -0,0 +1,101 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 . + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ThirdComponentLister helps list ThirdComponents. +// All objects returned here must be treated as read-only. +type ThirdComponentLister interface { + // List lists all ThirdComponents in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ThirdComponent, err error) + // ThirdComponents returns an object that can list and get ThirdComponents. + ThirdComponents(namespace string) ThirdComponentNamespaceLister + ThirdComponentListerExpansion +} + +// thirdComponentLister implements the ThirdComponentLister interface. +type thirdComponentLister struct { + indexer cache.Indexer +} + +// NewThirdComponentLister returns a new ThirdComponentLister. +func NewThirdComponentLister(indexer cache.Indexer) ThirdComponentLister { + return &thirdComponentLister{indexer: indexer} +} + +// List lists all ThirdComponents in the indexer. +func (s *thirdComponentLister) List(selector labels.Selector) (ret []*v1alpha1.ThirdComponent, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ThirdComponent)) + }) + return ret, err +} + +// ThirdComponents returns an object that can list and get ThirdComponents. +func (s *thirdComponentLister) ThirdComponents(namespace string) ThirdComponentNamespaceLister { + return thirdComponentNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ThirdComponentNamespaceLister helps list and get ThirdComponents. +// All objects returned here must be treated as read-only. +type ThirdComponentNamespaceLister interface { + // List lists all ThirdComponents in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ThirdComponent, err error) + // Get retrieves the ThirdComponent from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.ThirdComponent, error) + ThirdComponentNamespaceListerExpansion +} + +// thirdComponentNamespaceLister implements the ThirdComponentNamespaceLister +// interface. +type thirdComponentNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ThirdComponents in the indexer for a given namespace. +func (s thirdComponentNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ThirdComponent, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ThirdComponent)) + }) + return ret, err +} + +// Get retrieves the ThirdComponent from the indexer for a given namespace and name. +func (s thirdComponentNamespaceLister) Get(name string) (*v1alpha1.ThirdComponent, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("thirdcomponent"), name) + } + return obj.(*v1alpha1.ThirdComponent), nil +} diff --git a/worker/appm/appm.go b/worker/appm/appm.go index eb41f2121..3f9525009 100644 --- a/worker/appm/appm.go +++ b/worker/appm/appm.go @@ -20,7 +20,6 @@ package appm import ( "github.com/eapache/channels" - opt "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/worker/appm/prober" "github.com/goodrain/rainbond/worker/appm/store" "github.com/goodrain/rainbond/worker/appm/thirdparty" @@ -49,8 +48,6 @@ func NewAPPMController(clientset kubernetes.Interface, // Controller describes a new appm controller. type Controller struct { - cfg opt.Config - store store.Storer thirdparty thirdparty.ThirdPartier prober prober.Prober diff --git a/cmd/mesh-data-panel/sidecar_test.go b/worker/appm/componentdefinition/component_properties.go similarity index 54% rename from cmd/mesh-data-panel/sidecar_test.go rename to worker/appm/componentdefinition/component_properties.go index 33ffc9c05..e4eafc836 100644 --- a/cmd/mesh-data-panel/sidecar_test.go +++ b/worker/appm/componentdefinition/component_properties.go @@ -1,5 +1,5 @@ // RAINBOND, Application Management Platform -// Copyright (C) 2014-2017 Goodrain Co., Ltd. +// Copyright (C) 2021-2021 Goodrain Co., Ltd. // 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 @@ -16,15 +16,22 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package main +package componentdefinition -import "testing" - -func TestHaveChange(t *testing.T) { - old := make(map[string]string) - t.Log(haveChange(map[string]string{"console": "127.0.0.1"}, old)) - t.Log(haveChange(map[string]string{"console": "127.0.0.1"}, map[string]string{"console": "127.0.0.1"})) - t.Log(haveChange(map[string]string{"console": "127.0.0.2"}, map[string]string{"console": "127.0.0.1"})) - t.Log(haveChange(map[string]string{"console": "127.0.0.2", "console1": "127.0.0.1"}, map[string]string{"console": "127.0.0.1"})) - t.Log(haveChange(map[string]string{"console": "127.0.0.2"}, map[string]string{"console2": "127.0.0.1", "console1": "127.0.0.1"})) +//ThirdComponentProperties third component properties +type ThirdComponentProperties struct { + Kubernetes ThirdComponentKubernetes `json:"kubernetes"` + Port []*ThirdComponentPort `json:"port"` +} + +type ThirdComponentPort struct { + Name string `json:"name"` + Port int `json:"port"` + OpenInner bool `json:"openInner"` + OpenOuter bool `json:"openOuter"` +} + +type ThirdComponentKubernetes struct { + Name string `json:"name"` + Namespace string `json:"namespace"` } diff --git a/worker/appm/componentdefinition/componentdefinition.go b/worker/appm/componentdefinition/componentdefinition.go new file mode 100644 index 000000000..03e4df4c2 --- /dev/null +++ b/worker/appm/componentdefinition/componentdefinition.go @@ -0,0 +1,164 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 componentdefinition + +import ( + "context" + "fmt" + "strings" + "sync" + + "github.com/goodrain/rainbond/db" + dbmodel "github.com/goodrain/rainbond/db/model" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + rainbondversioned "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/sirupsen/logrus" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var ErrNotSupport = fmt.Errorf("not support component definition") +var ErrOnlyCUESupport = fmt.Errorf("component definition only support cue template") + +type ComponentDefinitionBuilder struct { + definitions map[string]*v1alpha1.ComponentDefinition + namespace string + lock sync.Mutex +} + +var componentDefinitionBuilder *ComponentDefinitionBuilder + +func NewComponentDefinitionBuilder(namespace string) *ComponentDefinitionBuilder { + componentDefinitionBuilder = &ComponentDefinitionBuilder{ + definitions: make(map[string]*v1alpha1.ComponentDefinition), + namespace: namespace, + } + return componentDefinitionBuilder +} + +func GetComponentDefinitionBuilder() *ComponentDefinitionBuilder { + return componentDefinitionBuilder +} + +func (c *ComponentDefinitionBuilder) OnAdd(obj interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + cd, ok := obj.(*v1alpha1.ComponentDefinition) + if ok { + logrus.Infof("load componentdefinition %s", cd.Name) + c.definitions[cd.Name] = cd + } +} +func (c *ComponentDefinitionBuilder) OnUpdate(oldObj, newObj interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + cd, ok := newObj.(*v1alpha1.ComponentDefinition) + if ok { + logrus.Infof("update componentdefinition %s", cd.Name) + c.definitions[cd.Name] = cd + } +} +func (c *ComponentDefinitionBuilder) OnDelete(obj interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + cd, ok := obj.(*v1alpha1.ComponentDefinition) + if ok { + logrus.Infof("delete componentdefinition %s", cd.Name) + delete(c.definitions, cd.Name) + } +} + +func (c *ComponentDefinitionBuilder) GetComponentDefinition(name string) *v1alpha1.ComponentDefinition { + c.lock.Lock() + defer c.lock.Unlock() + return c.definitions[name] +} + +func (c *ComponentDefinitionBuilder) GetComponentProperties(as *v1.AppService, dbm db.Manager, cd *v1alpha1.ComponentDefinition) interface{} { + //TODO: support custom component properties + switch cd.Name { + case thirdComponetDefineName: + properties := &ThirdComponentProperties{} + tpsd, err := dbm.ThirdPartySvcDiscoveryCfgDao().GetByServiceID(as.ServiceID) + if err != nil { + logrus.Errorf("query component %s third source config failure %s", as.ServiceID, err.Error()) + } + if tpsd != nil { + // support other source type + if tpsd.Type == dbmodel.DiscorveryTypeKubernetes.String() { + properties.Kubernetes = ThirdComponentKubernetes{ + Name: tpsd.ServiceName, + Namespace: tpsd.Namespace, + } + } + } + ports, err := dbm.TenantServicesPortDao().GetPortsByServiceID(as.ServiceID) + if err != nil { + logrus.Errorf("query component %s ports failure %s", as.ServiceID, err.Error()) + } + + for _, port := range ports { + properties.Port = append(properties.Port, &ThirdComponentPort{ + Port: port.ContainerPort, + Name: strings.ToLower(port.PortAlias), + OpenInner: *port.IsInnerService, + OpenOuter: *port.IsOuterService, + }) + } + if properties.Port == nil { + properties.Port = []*ThirdComponentPort{} + } + return properties + default: + return nil + } +} + +func (c *ComponentDefinitionBuilder) BuildWorkloadResource(as *v1.AppService, dbm db.Manager) error { + cd := c.GetComponentDefinition(as.GetComponentDefinitionName()) + if cd == nil { + return ErrNotSupport + } + if cd.Spec.Schematic == nil || cd.Spec.Schematic.CUE == nil { + return ErrOnlyCUESupport + } + ctx := NewTemplateContext(as, cd.Spec.Schematic.CUE.Template, c.GetComponentProperties(as, dbm, cd)) + manifests, err := ctx.GenerateComponentManifests() + if err != nil { + return err + } + ctx.SetContextValue(manifests) + as.SetManifests(manifests) + return nil +} + +//InitCoreComponentDefinition init the built-in component type definition. +//Should be called after the store is initialized. +func (c *ComponentDefinitionBuilder) InitCoreComponentDefinition(rainbondClient rainbondversioned.Interface) { + coreComponentDefinition := []*v1alpha1.ComponentDefinition{&thirdComponetDefine} + for _, ccd := range coreComponentDefinition { + if c.GetComponentDefinition(ccd.Name) == nil { + logrus.Infof("create core componentdefinition %s", ccd.Name) + if _, err := rainbondClient.RainbondV1alpha1().ComponentDefinitions(c.namespace).Create(context.Background(), ccd, metav1.CreateOptions{}); err != nil { + logrus.Errorf("create core componentdefinition %s failire %s", ccd.Name, err.Error()) + } + } + } + logrus.Infof("success check core componentdefinition from cluster") +} diff --git a/worker/appm/componentdefinition/componentdefinition_test.go b/worker/appm/componentdefinition/componentdefinition_test.go new file mode 100644 index 000000000..beb4fe95c --- /dev/null +++ b/worker/appm/componentdefinition/componentdefinition_test.go @@ -0,0 +1,42 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 componentdefinition + +import ( + "encoding/json" + "testing" + + v1 "github.com/goodrain/rainbond/worker/appm/types/v1" +) + +func TestTemplateContext(t *testing.T) { + ctx := NewTemplateContext(&v1.AppService{AppServiceBase: v1.AppServiceBase{ServiceID: "1234567890", ServiceAlias: "niasdjaj", TenantID: "098765432345678"}}, cueTemplate, map[string]interface{}{ + "kubernetes": map[string]interface{}{ + "name": "service-name", + "namespace": "t-namesapce", + }, + "port": []map[string]interface{}{}, + }) + manifests, err := ctx.GenerateComponentManifests() + if err != nil { + t.Fatal(err) + } + show, _ := json.Marshal(manifests) + t.Log(string(show)) +} diff --git a/worker/appm/componentdefinition/parse.go b/worker/appm/componentdefinition/parse.go new file mode 100644 index 000000000..89ee9b5ca --- /dev/null +++ b/worker/appm/componentdefinition/parse.go @@ -0,0 +1,183 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 componentdefinition + +import ( + "encoding/json" + "fmt" + "strings" + "unicode" + + "cuelang.org/go/cue" + "cuelang.org/go/cue/build" + v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/oam-dev/kubevela/pkg/cue/model" + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" +) + +const ( + // ParameterTag is the keyword in CUE template to define users' input + ParameterTag = "parameter" + // OutputFieldName is the reference of context base object + OutputFieldName = "output" + // OutputsFieldName is the reference of context Auxiliaries + OutputsFieldName = "outputs" + // ConfigFieldName is the reference of context config + ConfigFieldName = "config" + // ContextName is the name of context + ContextName = "name" + // ContextAppName is the appName of context + ContextAppName = "appName" + // ContextID is the componentID of context + ContextID = "componentID" + // ContextAppID is the appID of context + ContextAppID = "appID" + // ContextNamespace is the namespace of the app + ContextNamespace = "namespace" +) + +type TemplateContext struct { + as *v1.AppService + componentName string + appName string + componentID string + appID string + namespace string + template string + params interface{} +} + +func NewTemplateContext(as *v1.AppService, template string, params interface{}) *TemplateContext { + return &TemplateContext{ + as: as, + componentName: as.ServiceAlias, + appName: as.AppID, + componentID: as.ServiceID, + appID: as.AppID, + namespace: as.TenantID, + template: template, + params: params, + } +} + +func (c *TemplateContext) GenerateComponentManifests() ([]*unstructured.Unstructured, error) { + bi := build.NewContext().NewInstance("", nil) + if err := bi.AddFile("-", c.template); err != nil { + return nil, errors.WithMessagef(err, "invalid cue template of component %s", c.componentID) + } + var paramFile = "parameter: {}" + if c.params != nil { + bt, err := json.Marshal(c.params) + if err != nil { + return nil, errors.WithMessagef(err, "marshal parameter of component %s", c.componentID) + } + if string(bt) != "null" { + paramFile = fmt.Sprintf("%s: %s", ParameterTag, string(bt)) + } + } + if err := bi.AddFile("parameter", paramFile); err != nil { + return nil, errors.WithMessagef(err, "invalid parameter of component %s", c.componentID) + } + + if err := bi.AddFile("-", c.ExtendedContextFile()); err != nil { + return nil, err + } + var r cue.Runtime + inst, err := r.Build(bi) + if err != nil { + return nil, err + } + if err := inst.Value().Validate(); err != nil { + return nil, errors.WithMessagef(err, "invalid cue template of component %s after merge parameter and context", c.componentID) + } + + output := inst.Lookup(OutputFieldName) + + base, err := model.NewBase(output) + if err != nil { + return nil, errors.WithMessagef(err, "invalid output of component %s", c.componentID) + } + workload, err := base.Unstructured() + if err != nil { + return nil, errors.WithMessagef(err, "invalid output of component %s", c.componentID) + } + + manifests := []*unstructured.Unstructured{workload} + + outputs := inst.Lookup(OutputsFieldName) + if !outputs.Exists() { + return manifests, nil + } + st, err := outputs.Struct() + if err != nil { + return nil, errors.WithMessagef(err, "invalid outputs of workload %s", c.componentID) + } + for i := 0; i < st.Len(); i++ { + fieldInfo := st.Field(i) + if fieldInfo.IsDefinition || fieldInfo.IsHidden || fieldInfo.IsOptional { + continue + } + other, err := model.NewOther(fieldInfo.Value) + if err != nil { + return nil, errors.WithMessagef(err, "invalid outputs(%s) of workload %s", fieldInfo.Name, c.componentID) + } + othermanifest, err := other.Unstructured() + if err != nil { + return nil, errors.WithMessagef(err, "invalid outputs(%s) of workload %s", fieldInfo.Name, c.componentID) + } + manifests = append(manifests, othermanifest) + } + return manifests, nil +} + +func (c *TemplateContext) SetContextValue(manifests []*unstructured.Unstructured) { + for i := range manifests { + manifests[i].SetNamespace(c.namespace) + manifests[i].SetLabels(c.as.GetCommonLabels(manifests[i].GetLabels())) + } +} +func (c *TemplateContext) ExtendedContextFile() string { + var buff string + buff += fmt.Sprintf(ContextName+": \"%s\"\n", c.componentName) + buff += fmt.Sprintf(ContextAppName+": \"%s\"\n", c.appName) + buff += fmt.Sprintf(ContextNamespace+": \"%s\"\n", c.namespace) + buff += fmt.Sprintf(ContextAppID+": \"%s\"\n", c.appID) + buff += fmt.Sprintf(ContextID+": \"%s\"\n", c.componentID) + return fmt.Sprintf("context: %s", structMarshal(buff)) +} + +func structMarshal(v string) string { + skip := false + v = strings.TrimFunc(v, func(r rune) bool { + if !skip { + if unicode.IsSpace(r) { + return true + } + skip = true + + } + return false + }) + + if strings.HasPrefix(v, "{") { + return v + } + return fmt.Sprintf("{%s}", v) +} diff --git a/worker/appm/componentdefinition/thirdcomponentdefinition.go b/worker/appm/componentdefinition/thirdcomponentdefinition.go new file mode 100644 index 000000000..b2e46947b --- /dev/null +++ b/worker/appm/componentdefinition/thirdcomponentdefinition.go @@ -0,0 +1,89 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 componentdefinition + +import ( + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/oam-dev/kubevela/apis/core.oam.dev/common" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var cueTemplate = ` +output: { + apiVersion: "rainbond.io/v1alpha1" + kind: "ThirdComponent" + metadata: { + name: context.componentID + namespace: context.namespace + } + spec: { + endpointSource: { + if parameter["kubernetes"] != _|_ { + kubernetesService: { + namespace: parameter["kubernetes"]["namespace"], + name: parameter["kubernetes"]["name"] + } + } + } + if parameter["port"] != _|_ { + ports: parameter["port"] + } + } +} + +parameter: { + kubernetes?: { + namespace?: string + name: string + } + port?: [...{ + name: string + port: >0 & <=65533 + openInner: bool + openOuter: bool + }] +} +` +var thirdComponetDefineName = "core-thirdcomponent" +var thirdComponetDefine = v1alpha1.ComponentDefinition{ + TypeMeta: v1.TypeMeta{ + Kind: "ComponentDefinition", + APIVersion: "rainbond.io/v1alpha1", + }, + ObjectMeta: v1.ObjectMeta{ + Name: thirdComponetDefineName, + Annotations: map[string]string{ + "definition.oam.dev/description": "Rainbond built-in component type that defines third-party service components.", + }, + }, + Spec: v1alpha1.ComponentDefinitionSpec{ + Workload: common.WorkloadTypeDescriptor{ + Type: "ThirdComponent", + Definition: common.WorkloadGVK{ + APIVersion: "rainbond.io/v1alpha1", + Kind: "ThirdComponent", + }, + }, + Schematic: &common.Schematic{ + CUE: &common.CUE{ + Template: cueTemplate, + }, + }, + }, +} diff --git a/worker/appm/controller/controller.go b/worker/appm/controller/controller.go index 7ec13f9fc..bd8bc15d2 100644 --- a/worker/appm/controller/controller.go +++ b/worker/appm/controller/controller.go @@ -26,7 +26,9 @@ import ( "github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/worker/appm/store" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/oam-dev/kubevela/pkg/utils/apply" "k8s.io/client-go/kubernetes" + "sigs.k8s.io/controller-runtime/pkg/client" ) //Controller service operating controller interface @@ -64,23 +66,27 @@ var TypeControllerRefreshHPA TypeController = "refreshhpa" //Manager controller manager type Manager struct { - ctx context.Context - cancel context.CancelFunc - client kubernetes.Interface - controllers map[string]Controller - store store.Storer - lock sync.Mutex + ctx context.Context + cancel context.CancelFunc + client kubernetes.Interface + runtimeClient client.Client + apply apply.Applicator + controllers map[string]Controller + store store.Storer + lock sync.Mutex } //NewManager new manager -func NewManager(store store.Storer, client kubernetes.Interface) *Manager { +func NewManager(store store.Storer, client kubernetes.Interface, runtimeClient client.Client) *Manager { ctx, cancel := context.WithCancel(context.Background()) return &Manager{ - ctx: ctx, - cancel: cancel, - client: client, - controllers: make(map[string]Controller), - store: store, + ctx: ctx, + cancel: cancel, + client: client, + apply: apply.NewAPIApplicator(runtimeClient), + runtimeClient: runtimeClient, + controllers: make(map[string]Controller), + store: store, } } @@ -108,6 +114,7 @@ func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppS appService: apps, manager: m, stopChan: make(chan struct{}), + ctx: context.Background(), } case TypeStopController: controller = &stopController{ @@ -115,6 +122,7 @@ func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppS appService: apps, manager: m, stopChan: make(chan struct{}), + ctx: context.Background(), } case TypeScalingController: controller = &scalingController{ diff --git a/worker/appm/controller/start.go b/worker/appm/controller/start.go index c8dfb25c3..24fbfe1e5 100644 --- a/worker/appm/controller/start.go +++ b/worker/appm/controller/start.go @@ -39,6 +39,7 @@ type startController struct { controllerID string appService []v1.AppService manager *Manager + ctx context.Context } func (s *startController) Begin() { @@ -54,8 +55,8 @@ func (s *startController) Begin() { for _, slist := range sl { var wait sync.WaitGroup for _, service := range slist { + wait.Add(1) go func(service v1.AppService) { - wait.Add(1) defer wait.Done() logrus.Debugf("App runtime begin start app service(%s)", service.ServiceAlias) service.Logger.Info("App runtime begin start app service "+service.ServiceAlias, event.GetLoggerOption("starting")) @@ -82,6 +83,7 @@ func (s *startController) errorCallback(app v1.AppService) error { app.Logger.Info("Begin clean resources that have been created", event.GetLoggerOption("starting")) stopController := stopController{ manager: s.manager, + ctx: s.ctx, } if err := stopController.stopOne(app); err != nil { logrus.Errorf("stop app failure after start failure. %s", err.Error()) @@ -92,19 +94,28 @@ func (s *startController) errorCallback(app v1.AppService) error { } func (s *startController) startOne(app v1.AppService) error { //first: check and create namespace - _, err := s.manager.client.CoreV1().Namespaces().Get(context.Background(), app.TenantID, metav1.GetOptions{}) + _, err := s.manager.client.CoreV1().Namespaces().Get(s.ctx, app.TenantID, metav1.GetOptions{}) if err != nil { if errors.IsNotFound(err) { - _, err = s.manager.client.CoreV1().Namespaces().Create(context.Background(), app.GetTenant(), metav1.CreateOptions{}) + _, err = s.manager.client.CoreV1().Namespaces().Create(s.ctx, app.GetTenant(), metav1.CreateOptions{}) } if err != nil { return fmt.Errorf("create or check namespace failure %s", err.Error()) } } + // for custom component + if len(app.GetManifests()) > 0 { + for _, manifest := range app.GetManifests() { + if err := s.manager.apply.Apply(s.ctx, manifest); err != nil { + return fmt.Errorf("apply custom component manifest %s/%s failure %s", manifest.GetKind(), manifest.GetName(), err.Error()) + } + } + } + // for core component //step 1: create configmap if configs := app.GetConfigMaps(); configs != nil { for _, config := range configs { - _, err := s.manager.client.CoreV1().ConfigMaps(app.TenantID).Create(context.Background(), config, metav1.CreateOptions{}) + _, err := s.manager.client.CoreV1().ConfigMaps(app.TenantID).Create(s.ctx, config, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { return fmt.Errorf("create config map failure:%s", err.Error()) } @@ -113,20 +124,20 @@ func (s *startController) startOne(app v1.AppService) error { // create claims for _, claim := range app.GetClaimsManually() { logrus.Debugf("create claim: %s", claim.Name) - _, err := s.manager.client.CoreV1().PersistentVolumeClaims(app.TenantID).Create(context.Background(), claim, metav1.CreateOptions{}) + _, err := s.manager.client.CoreV1().PersistentVolumeClaims(app.TenantID).Create(s.ctx, claim, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { return fmt.Errorf("create claims: %v", err) } } //step 2: create statefulset or deployment if statefulset := app.GetStatefulSet(); statefulset != nil { - _, err = s.manager.client.AppsV1().StatefulSets(app.TenantID).Create(context.Background(), statefulset, metav1.CreateOptions{}) + _, err = s.manager.client.AppsV1().StatefulSets(app.TenantID).Create(s.ctx, statefulset, metav1.CreateOptions{}) if err != nil { return fmt.Errorf("create statefulset failure:%s", err.Error()) } } if deployment := app.GetDeployment(); deployment != nil { - _, err = s.manager.client.AppsV1().Deployments(app.TenantID).Create(context.Background(), deployment, metav1.CreateOptions{}) + _, err = s.manager.client.AppsV1().Deployments(app.TenantID).Create(s.ctx, deployment, metav1.CreateOptions{}) if err != nil { return fmt.Errorf("create deployment failure:%s;", err.Error()) } @@ -134,14 +145,14 @@ func (s *startController) startOne(app v1.AppService) error { //step 3: create services if services := app.GetServices(true); services != nil { if err := CreateKubeService(s.manager.client, app.TenantID, services...); err != nil { - return fmt.Errorf("Create service failure %s", err.Error()) + return fmt.Errorf("create service failure %s", err.Error()) } } //step 4: create secrets if secrets := append(app.GetSecrets(true), app.GetEnvVarSecrets(true)...); secrets != nil { for _, secret := range secrets { if len(secret.ResourceVersion) == 0 { - _, err := s.manager.client.CoreV1().Secrets(app.TenantID).Create(context.Background(), secret, metav1.CreateOptions{}) + _, err := s.manager.client.CoreV1().Secrets(app.TenantID).Create(s.ctx, secret, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { return fmt.Errorf("create secret failure:%s", err.Error()) } @@ -152,7 +163,7 @@ func (s *startController) startOne(app v1.AppService) error { if ingresses := app.GetIngress(true); ingresses != nil { for _, ingress := range ingresses { if len(ingress.ResourceVersion) == 0 { - _, err := s.manager.client.ExtensionsV1beta1().Ingresses(app.TenantID).Create(context.Background(), ingress, metav1.CreateOptions{}) + _, err := s.manager.client.ExtensionsV1beta1().Ingresses(app.TenantID).Create(s.ctx, ingress, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { return fmt.Errorf("create ingress failure:%s", err.Error()) } @@ -163,7 +174,7 @@ func (s *startController) startOne(app v1.AppService) error { if hpas := app.GetHPAs(); len(hpas) != 0 { for _, hpa := range hpas { if len(hpa.ResourceVersion) == 0 { - _, err := s.manager.client.AutoscalingV2beta2().HorizontalPodAutoscalers(hpa.GetNamespace()).Create(context.Background(), hpa, metav1.CreateOptions{}) + _, err := s.manager.client.AutoscalingV2beta2().HorizontalPodAutoscalers(hpa.GetNamespace()).Create(s.ctx, hpa, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { logrus.Debugf("hpa: %#v", hpa) return fmt.Errorf("create hpa: %v", err) @@ -182,7 +193,7 @@ func (s *startController) startOne(app v1.AppService) error { if smClient != nil { for _, sm := range sms { if len(sm.ResourceVersion) == 0 { - _, err := smClient.MonitoringV1().ServiceMonitors(sm.GetNamespace()).Create(context.Background(), sm, metav1.CreateOptions{}) + _, err := smClient.MonitoringV1().ServiceMonitors(sm.GetNamespace()).Create(s.ctx, sm, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { logrus.Errorf("create service monitor failure: %s", err.Error()) } diff --git a/worker/appm/controller/stop.go b/worker/appm/controller/stop.go index 8408c7abc..e022042e4 100644 --- a/worker/appm/controller/stop.go +++ b/worker/appm/controller/stop.go @@ -39,6 +39,7 @@ type stopController struct { appService []v1.AppService manager *Manager waiting time.Duration + ctx context.Context } func (s *stopController) Begin() { @@ -64,12 +65,21 @@ func (s *stopController) Begin() { s.manager.callback(s.controllerID, nil) } func (s *stopController) stopOne(app v1.AppService) error { + + // for custom component + if len(app.GetManifests()) > 0 { + for _, manifest := range app.GetManifests() { + if err := s.manager.runtimeClient.Delete(s.ctx, manifest); err != nil && !errors.IsNotFound(err) { + logrus.Errorf("delete custom component manifest %s/%s failure %s", manifest.GetKind(), manifest.GetName(), err.Error()) + } + } + } var zero int64 //step 1: delete services if services := app.GetServices(true); services != nil { for _, service := range services { if service != nil && service.Name != "" { - err := s.manager.client.CoreV1().Services(app.TenantID).Delete(context.Background(), service.Name, metav1.DeleteOptions{ + err := s.manager.client.CoreV1().Services(app.TenantID).Delete(s.ctx, service.Name, metav1.DeleteOptions{ GracePeriodSeconds: &zero, }) if err != nil && !errors.IsNotFound(err) { @@ -82,7 +92,7 @@ func (s *stopController) stopOne(app v1.AppService) error { if secrets := app.GetSecrets(true); secrets != nil { for _, secret := range secrets { if secret != nil && secret.Name != "" { - err := s.manager.client.CoreV1().Secrets(app.TenantID).Delete(context.Background(), secret.Name, metav1.DeleteOptions{ + err := s.manager.client.CoreV1().Secrets(app.TenantID).Delete(s.ctx, secret.Name, metav1.DeleteOptions{ GracePeriodSeconds: &zero, }) if err != nil && !errors.IsNotFound(err) { @@ -95,7 +105,7 @@ func (s *stopController) stopOne(app v1.AppService) error { if ingresses := app.GetIngress(true); ingresses != nil { for _, ingress := range ingresses { if ingress != nil && ingress.Name != "" { - err := s.manager.client.ExtensionsV1beta1().Ingresses(app.TenantID).Delete(context.Background(), ingress.Name, metav1.DeleteOptions{ + err := s.manager.client.ExtensionsV1beta1().Ingresses(app.TenantID).Delete(s.ctx, ingress.Name, metav1.DeleteOptions{ GracePeriodSeconds: &zero, }) if err != nil && !errors.IsNotFound(err) { @@ -108,7 +118,7 @@ func (s *stopController) stopOne(app v1.AppService) error { if configs := app.GetConfigMaps(); configs != nil { for _, config := range configs { if config != nil && config.Name != "" { - err := s.manager.client.CoreV1().ConfigMaps(app.TenantID).Delete(context.Background(), config.Name, metav1.DeleteOptions{ + err := s.manager.client.CoreV1().ConfigMaps(app.TenantID).Delete(s.ctx, config.Name, metav1.DeleteOptions{ GracePeriodSeconds: &zero, }) if err != nil && !errors.IsNotFound(err) { @@ -119,14 +129,14 @@ func (s *stopController) stopOne(app v1.AppService) error { } //step 5: delete statefulset or deployment if statefulset := app.GetStatefulSet(); statefulset != nil { - err := s.manager.client.AppsV1().StatefulSets(app.TenantID).Delete(context.Background(), statefulset.Name, metav1.DeleteOptions{}) + err := s.manager.client.AppsV1().StatefulSets(app.TenantID).Delete(s.ctx, statefulset.Name, metav1.DeleteOptions{}) if err != nil && !errors.IsNotFound(err) { return fmt.Errorf("delete statefulset failure:%s", err.Error()) } s.manager.store.OnDeletes(statefulset) } if deployment := app.GetDeployment(); deployment != nil && deployment.Name != "" { - err := s.manager.client.AppsV1().Deployments(app.TenantID).Delete(context.Background(), deployment.Name, metav1.DeleteOptions{}) + err := s.manager.client.AppsV1().Deployments(app.TenantID).Delete(s.ctx, deployment.Name, metav1.DeleteOptions{}) if err != nil && !errors.IsNotFound(err) { return fmt.Errorf("delete deployment failure:%s", err.Error()) } @@ -137,7 +147,7 @@ func (s *stopController) stopOne(app v1.AppService) error { if pods := app.GetPods(true); pods != nil { for _, pod := range pods { if pod != nil && pod.Name != "" { - err := s.manager.client.CoreV1().Pods(app.TenantID).Delete(context.Background(), pod.Name, metav1.DeleteOptions{ + err := s.manager.client.CoreV1().Pods(app.TenantID).Delete(s.ctx, pod.Name, metav1.DeleteOptions{ GracePeriodSeconds: &gracePeriodSeconds, }) if err != nil && !errors.IsNotFound(err) { @@ -149,7 +159,7 @@ func (s *stopController) stopOne(app v1.AppService) error { //step 7: deleta all hpa if hpas := app.GetHPAs(); len(hpas) != 0 { for _, hpa := range hpas { - err := s.manager.client.AutoscalingV2beta2().HorizontalPodAutoscalers(hpa.GetNamespace()).Delete(context.Background(), hpa.GetName(), metav1.DeleteOptions{}) + err := s.manager.client.AutoscalingV2beta2().HorizontalPodAutoscalers(hpa.GetNamespace()).Delete(s.ctx, hpa.GetName(), metav1.DeleteOptions{}) if err != nil && !errors.IsNotFound(err) { return fmt.Errorf("delete hpa: %v", err) } @@ -165,7 +175,7 @@ func (s *stopController) stopOne(app v1.AppService) error { } if smClient != nil { for _, sm := range sms { - err := smClient.MonitoringV1().ServiceMonitors(sm.GetNamespace()).Delete(context.Background(), sm.GetName(), metav1.DeleteOptions{}) + err := smClient.MonitoringV1().ServiceMonitors(sm.GetNamespace()).Delete(s.ctx, sm.GetName(), metav1.DeleteOptions{}) if err != nil && !errors.IsNotFound(err) { logrus.Errorf("delete service monitor failure: %s", err.Error()) } diff --git a/worker/appm/conversion/conversion.go b/worker/appm/conversion/conversion.go index 919ef4a1b..106f1a4fc 100644 --- a/worker/appm/conversion/conversion.go +++ b/worker/appm/conversion/conversion.go @@ -25,25 +25,22 @@ import ( "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/util" + "github.com/goodrain/rainbond/worker/appm/componentdefinition" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/sirupsen/logrus" ) func init() { - //first conv service source - RegistConversion("ServiceSource", ServiceSource) - //step2 conv service base - RegistConversion("TenantServiceBase", TenantServiceBase) + // core component conversion // convert config group to env secrets RegistConversion("TenantServiceConfigGroup", TenantServiceConfigGroup) - //step3 conv service pod base info + //step1 conv service pod base info RegistConversion("TenantServiceVersion", TenantServiceVersion) - //step4 conv service plugin + //step2 conv service plugin RegistConversion("TenantServicePlugin", TenantServicePlugin) - //step5 conv service inner and outer regist - RegistConversion("TenantServiceRegist", TenantServiceRegist) - //step6 - + //step3 - RegistConversion("TenantServiceAutoscaler", TenantServiceAutoscaler) - //step7 conv service monitor + //step4 conv service monitor RegistConversion("TenantServiceMonitor", TenantServiceMonitor) } @@ -88,7 +85,22 @@ func InitAppService(dbmanager db.Manager, serviceID string, configs map[string]s if app != nil { appService.AppServiceBase.GovernanceMode = app.GovernanceMode } - + if err := TenantServiceBase(appService, dbmanager); err != nil { + logrus.Errorf("init component base config failure %s", err.Error()) + return nil, err + } + // all component can regist server. + if err := TenantServiceRegist(appService, dbmanager); err != nil { + logrus.Errorf("init component server regist config failure %s", err.Error()) + return nil, err + } + if appService.IsCustomComponent() { + if err := componentdefinition.GetComponentDefinitionBuilder().BuildWorkloadResource(appService, dbmanager); err != nil { + logrus.Errorf("init component by component definition build failure %s", err.Error()) + return nil, err + } + return appService, nil + } for _, c := range conversionList { if len(enableConversionList) == 0 || util.StringArrayContains(enableConversionList, c.Name) { if err := c.Conversion(appService, dbmanager); err != nil { diff --git a/worker/appm/conversion/gateway.go b/worker/appm/conversion/gateway.go index 5cab10d6e..52e07769e 100644 --- a/worker/appm/conversion/gateway.go +++ b/worker/appm/conversion/gateway.go @@ -138,12 +138,15 @@ func (a *AppServiceBuild) Build() (*v1.K8sResources, error) { return nil, fmt.Errorf("find upstream plugin mapping port error, %s", err.Error()) } ports, pp, err = a.CreateUpstreamPluginMappingPort(ports, pluginPorts) + if err != nil { + logrus.Errorf("create mapping port failure %s", err.Error()) + } } var services []*corev1.Service var ingresses []*extensions.Ingress var secrets []*corev1.Secret - if ports != nil && len(ports) > 0 { + if len(ports) > 0 { for i := range ports { port := ports[i] if *port.IsInnerService { diff --git a/worker/appm/conversion/plugin.go b/worker/appm/conversion/plugin.go index 9aec5cff2..d756e4c68 100644 --- a/worker/appm/conversion/plugin.go +++ b/worker/appm/conversion/plugin.go @@ -218,10 +218,10 @@ func createTCPDefaultPluginContainer(as *typesv1.AppService, pluginID string, en } func setSidecarContainerLifecycle(as *typesv1.AppService, con *corev1.Container, pluginConfig *api_model.ResourceSpec) { - if strings.ToLower(as.ExtensionSet["DISABLE_SIDECAR_CHECK"]) != "true" { + if strings.ToLower(as.ExtensionSet["disable_sidecar_check"]) != "true" { var port int - if as.ExtensionSet["SIDECAR_CHECK_PORT"] != "" { - cport, _ := strconv.Atoi(as.ExtensionSet["SIDECAR_CHECK_PORT"]) + if as.ExtensionSet["sidecar_check_port"] != "" { + cport, _ := strconv.Atoi(as.ExtensionSet["sidecar_check_port"]) if cport != 0 { port = cport } diff --git a/worker/appm/conversion/service.go b/worker/appm/conversion/service.go index f3b1fec87..b01ac1223 100644 --- a/worker/appm/conversion/service.go +++ b/worker/appm/conversion/service.go @@ -95,11 +95,7 @@ func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error { if as.DeployVersion == "" { as.DeployVersion = tenantService.DeployVersion } - as.ContainerCPU = tenantService.ContainerCPU - as.ContainerGPU = tenantService.ContainerGPU as.AppID = tenantService.AppID - as.ContainerMemory = tenantService.ContainerMemory - as.Replicas = tenantService.Replicas as.ServiceAlias = tenantService.ServiceAlias as.UpgradeMethod = v1.TypeUpgradeMethod(tenantService.UpgradeMethod) if as.CreaterID == "" { @@ -110,12 +106,19 @@ func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error { return fmt.Errorf("conversion tenant info failure %s", err.Error()) } if tenantService.Kind == dbmodel.ServiceKindThirdParty.String() { + disCfg, _ := dbmanager.ThirdPartySvcDiscoveryCfgDao().GetByServiceID(as.ServiceID) + as.SetDiscoveryCfg(disCfg) return nil } - label, err := dbmanager.TenantServiceLabelDao().GetLabelByNodeSelectorKey(as.ServiceID, "windows") + + if tenantService.Kind == dbmodel.ServiceKindCustom.String() { + return nil + } + label, _ := dbmanager.TenantServiceLabelDao().GetLabelByNodeSelectorKey(as.ServiceID, "windows") if label != nil { as.IsWindowsService = true } + if !tenantService.IsState() { initBaseDeployment(as, tenantService) return nil @@ -124,8 +127,12 @@ func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error { initBaseStatefulSet(as, tenantService) return nil } - return fmt.Errorf("Kind: %s; do not decision build type for service %s", - tenantService.Kind, as.ServiceAlias) + // component resource and + as.ContainerCPU = tenantService.ContainerCPU + as.ContainerGPU = tenantService.ContainerGPU + as.ContainerMemory = tenantService.ContainerMemory + as.Replicas = tenantService.Replicas + return fmt.Errorf("kind: %s; do not decision build type for service %s", tenantService.Kind, as.ServiceAlias) } func initTenant(as *v1.AppService, tenant *dbmodel.Tenants) error { diff --git a/worker/appm/store/informer.go b/worker/appm/store/informer.go index 4fc4a39b6..140931969 100644 --- a/worker/appm/store/informer.go +++ b/worker/appm/store/informer.go @@ -41,6 +41,8 @@ type Informer struct { HorizontalPodAutoscaler cache.SharedIndexInformer CRD cache.SharedIndexInformer HelmApp cache.SharedIndexInformer + ComponentDefinition cache.SharedIndexInformer + ThirdComponent cache.SharedIndexInformer CRS map[string]cache.SharedIndexInformer } @@ -70,6 +72,8 @@ func (i *Informer) Start(stop chan struct{}) { go i.Claims.Run(stop) go i.CRD.Run(stop) go i.HelmApp.Run(stop) + go i.ComponentDefinition.Run(stop) + go i.ThirdComponent.Run(stop) } //Ready if all kube informers is syncd, store is ready diff --git a/worker/appm/store/lister.go b/worker/appm/store/lister.go index 916557391..bceefd519 100644 --- a/worker/appm/store/lister.go +++ b/worker/appm/store/lister.go @@ -45,4 +45,6 @@ type Lister struct { HorizontalPodAutoscaler autoscalingv2.HorizontalPodAutoscalerLister CRD crdlisters.CustomResourceDefinitionLister HelmApp v1alpha1.HelmAppLister + ComponentDefinition v1alpha1.ComponentDefinitionLister + ThirdComponent v1alpha1.ThirdComponentLister } diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index f5dd01b6f..9829f5a35 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -35,6 +35,7 @@ import ( "github.com/goodrain/rainbond/pkg/generated/informers/externalversions" "github.com/goodrain/rainbond/util/constants" k8sutil "github.com/goodrain/rainbond/util/k8s" + "github.com/goodrain/rainbond/worker/appm/componentdefinition" "github.com/goodrain/rainbond/worker/appm/conversion" "github.com/goodrain/rainbond/worker/appm/f" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" @@ -137,6 +138,7 @@ type appRuntimeStore struct { kubeconfig *rest.Config clientset kubernetes.Interface crdClient *internalclientset.Clientset + rainbondClient rainbondversioned.Interface crClients map[string]interface{} ctx context.Context cancel context.CancelFunc @@ -169,6 +171,7 @@ func NewStore( store := &appRuntimeStore{ kubeconfig: kubeconfig, clientset: clientset, + rainbondClient: rainbondClient, ctx: ctx, cancel: cancel, informers: &Informer{CRS: make(map[string]cache.SharedIndexInformer)}, @@ -197,11 +200,6 @@ func NewStore( infFactory := informers.NewSharedInformerFactoryWithOptions(conf.KubeClient, 10*time.Second, informers.WithNamespace(corev1.NamespaceAll)) - sharedInformer := externalversions.NewSharedInformerFactoryWithOptions(rainbondClient, 10*time.Second, - externalversions.WithNamespace(corev1.NamespaceAll)) - store.listers.HelmApp = sharedInformer.Rainbond().V1alpha1().HelmApps().Lister() - store.informers.HelmApp = sharedInformer.Rainbond().V1alpha1().HelmApps().Informer() - store.informers.Namespace = infFactory.Core().V1().Namespaces().Informer() store.informers.Deployment = infFactory.Apps().V1().Deployments().Informer() @@ -245,6 +243,17 @@ func NewStore( store.informers.HorizontalPodAutoscaler = infFactory.Autoscaling().V2beta2().HorizontalPodAutoscalers().Informer() store.listers.HorizontalPodAutoscaler = infFactory.Autoscaling().V2beta2().HorizontalPodAutoscalers().Lister() + // rainbond custom resource + rainbondInformer := externalversions.NewSharedInformerFactoryWithOptions(rainbondClient, 10*time.Second, + externalversions.WithNamespace(corev1.NamespaceAll)) + store.listers.HelmApp = rainbondInformer.Rainbond().V1alpha1().HelmApps().Lister() + store.informers.HelmApp = rainbondInformer.Rainbond().V1alpha1().HelmApps().Informer() + store.listers.ThirdComponent = rainbondInformer.Rainbond().V1alpha1().ThirdComponents().Lister() + store.informers.ThirdComponent = rainbondInformer.Rainbond().V1alpha1().ThirdComponents().Informer() + store.listers.ComponentDefinition = rainbondInformer.Rainbond().V1alpha1().ComponentDefinitions().Lister() + store.informers.ComponentDefinition = rainbondInformer.Rainbond().V1alpha1().ComponentDefinitions().Informer() + store.informers.ComponentDefinition.AddEventHandlerWithResyncPeriod(componentdefinition.GetComponentDefinitionBuilder(), time.Second*300) + isThirdParty := func(ep *corev1.Endpoints) bool { return ep.Labels["service-kind"] == model.ServiceKindThirdParty.String() } @@ -427,6 +436,8 @@ func (a *appRuntimeStore) Start() error { go a.clean() for !a.Ready() { } + // init core componentdefinition + componentdefinition.GetComponentDefinitionBuilder().InitCoreComponentDefinition(a.rainbondClient) go func() { a.initThirdPartyService() a.initCustomResourceInformer(stopch) @@ -989,6 +1000,13 @@ func (a *appRuntimeStore) GetAllAppServices() (apps []*v1.AppService) { func (a *appRuntimeStore) GetAppServiceStatus(serviceID string) string { app := a.GetAppService(serviceID) if app == nil { + component, _ := a.dbmanager.TenantServiceDao().GetServiceByID(serviceID) + if component == nil { + return v1.UNKNOW + } + if component.Kind == model.ServiceKindThirdParty.String() { + return v1.CLOSED + } versions, err := a.dbmanager.VersionInfoDao().GetVersionByServiceID(serviceID) if (err != nil && err == gorm.ErrRecordNotFound) || len(versions) == 0 { return v1.UNDEPLOY diff --git a/worker/appm/types/v1/status.go b/worker/appm/types/v1/status.go index 2d149a25f..314b66291 100644 --- a/worker/appm/types/v1/status.go +++ b/worker/appm/types/v1/status.go @@ -90,12 +90,13 @@ var ( //GetServiceStatus get service status func (a *AppService) GetServiceStatus() string { + //TODO: support custom component status + if a.ServiceKind == model.ServiceKindThirdParty { endpoints := a.GetEndpoints(false) if len(endpoints) == 0 { return CLOSED } - var readyEndpointSize int for _, ed := range endpoints { for _, s := range ed.Subsets { diff --git a/worker/appm/types/v1/v1.go b/worker/appm/types/v1/v1.go index 895ff587f..5e48e1e58 100644 --- a/worker/appm/types/v1/v1.go +++ b/worker/appm/types/v1/v1.go @@ -22,7 +22,9 @@ import ( "fmt" "os" "strconv" + "strings" + dbmodel "github.com/goodrain/rainbond/db/model" monitorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/sirupsen/logrus" v1 "k8s.io/api/apps/v1" @@ -30,6 +32,7 @@ import ( corev1 "k8s.io/api/core/v1" extensions "k8s.io/api/extensions/v1beta1" storagev1 "k8s.io/api/storage/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/db/model" @@ -87,6 +90,7 @@ type AppServiceBase struct { ServiceAlias string ServiceType AppServiceType ServiceKind model.ServiceKind + discoveryCfg *dbmodel.ThirdPartySvcDiscoveryCfg DeployVersion string ContainerCPU int ContainerMemory int @@ -102,6 +106,31 @@ type AppServiceBase struct { GovernanceMode string } +//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) + } + if a.discoveryCfg != nil && a.discoveryCfg.Type == dbmodel.DiscorveryTypeKubernetes.String() { + return "core-thirdcomponent" + } + return "" +} + +func (a AppServiceBase) IsCustomComponent() bool { + if strings.HasPrefix(a.ServiceKind.String(), dbmodel.ServiceKindCustom.String()) { + return true + } + if a.discoveryCfg != nil && a.discoveryCfg.Type == dbmodel.DiscorveryTypeKubernetes.String() { + return true + } + return false +} + +func (a *AppServiceBase) SetDiscoveryCfg(discoveryCfg *dbmodel.ThirdPartySvcDiscoveryCfg) { + a.discoveryCfg = discoveryCfg +} + //AppService a service of rainbond app state in kubernetes type AppService struct { AppServiceBase @@ -124,7 +153,6 @@ type AppService struct { serviceMonitor []*monitorv1.ServiceMonitor // claims that needs to be created manually claimsmanual []*corev1.PersistentVolumeClaim - status AppServiceStatus podMemoryRequest int64 podCPURequest int64 BootSeqContainer *corev1.Container @@ -133,6 +161,8 @@ type AppService struct { UpgradePatch map[string][]byte CustomParams map[string]string envVarSecrets []*corev1.Secret + // custom componentdefinition output manifests + manifests []*unstructured.Unstructured } //CacheKey app cache key @@ -140,10 +170,7 @@ type CacheKey string //Equal cache key serviceid and version and createID Equal func (c CacheKey) Equal(end CacheKey) bool { - if string(c) == string(end) { - return true - } - return false + return string(c) == string(end) } //GetCacheKeyOnlyServiceID get cache key only service id @@ -798,6 +825,16 @@ func (a *AppService) GetCPURequest() (res int64) { return } +//GetManifests get component custom manifest +func (a *AppService) GetManifests() []*unstructured.Unstructured { + return a.manifests +} + +//GetManifests get component custom manifest +func (a *AppService) SetManifests(manifests []*unstructured.Unstructured) { + a.manifests = manifests +} + func (a *AppService) String() string { return fmt.Sprintf(` ----------------------------------------------------- diff --git a/worker/handle/manager.go b/worker/handle/manager.go index d7a471c21..1df8db36d 100644 --- a/worker/handle/manager.go +++ b/worker/handle/manager.go @@ -1,5 +1,5 @@ // Copyright (C) 2nilfmt.Errorf("a")4-2nilfmt.Errorf("a")8 Goodrain Co., Ltd. -// RAINBOND, Application Management Platform +// RAINBOND, component 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 @@ -78,10 +78,7 @@ func NewManager(ctx context.Context, var ErrCallback = fmt.Errorf("callback task to mq") func (m *Manager) checkCount() bool { - if m.controllerManager.GetControllerSize() > m.cfg.MaxTasks { - return true - } - return false + return m.controllerManager.GetControllerSize() > m.cfg.MaxTasks } //AnalystToExec analyst exec @@ -146,28 +143,28 @@ func (m *Manager) startExec(task *model.Task) error { logger := event.GetManager().GetLogger(body.EventID) appService := m.store.GetAppService(body.ServiceID) if appService != nil && !appService.IsClosed() { - logger.Info("Application is not closed, can not start", event.GetLastLoggerOption()) + logger.Info("component is not closed, can not start", event.GetLastLoggerOption()) event.GetManager().ReleaseLogger(logger) return nil } newAppService, err := conversion.InitAppService(m.dbmanager, body.ServiceID, body.Configs) if err != nil { - logrus.Errorf("Application init create failure:%s", err.Error()) - logger.Error("Application init create failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component init create failure:%s", err.Error()) + logger.Error("component init create failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application init create failure") + return fmt.Errorf("application init create failure") } newAppService.Logger = logger //regist new app service m.store.RegistAppService(newAppService) err = m.controllerManager.StartController(controller.TypeStartController, *newAppService) if err != nil { - logrus.Errorf("Application run start controller failure:%s", err.Error()) - logger.Error("Application run start controller failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component run start controller failure:%s", err.Error()) + logger.Error("component run start controller failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application start failure") + return fmt.Errorf("component start failure") } - logrus.Infof("service(%s) %s working is running.", body.ServiceID, "start") + logrus.Infof("component(%s) %s working is running.", body.ServiceID, "start") return nil } @@ -180,7 +177,7 @@ func (m *Manager) stopExec(task *model.Task) error { logger := event.GetManager().GetLogger(body.EventID) appService := m.store.GetAppService(body.ServiceID) if appService == nil { - logger.Info("Application is closed, can not stop", event.GetLastLoggerOption()) + logger.Info("component is closed, can not stop", event.GetLastLoggerOption()) event.GetManager().ReleaseLogger(logger) return nil } @@ -190,10 +187,10 @@ func (m *Manager) stopExec(task *model.Task) error { } err := m.controllerManager.StartController(controller.TypeStopController, *appService) if err != nil { - logrus.Errorf("Application run stop controller failure:%s", err.Error()) - logger.Info("Application run stop controller failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component run stop controller failure:%s", err.Error()) + logger.Info("component run stop controller failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application stop failure") + return fmt.Errorf("component stop failure") } logrus.Infof("service(%s) %s working is running.", body.ServiceID, "stop") return nil @@ -208,7 +205,7 @@ func (m *Manager) restartExec(task *model.Task) error { logger := event.GetManager().GetLogger(body.EventID) appService := m.store.GetAppService(body.ServiceID) if appService == nil { - logger.Info("Application is closed, can not stop", event.GetLastLoggerOption()) + logger.Info("component is closed, can not stop", event.GetLastLoggerOption()) event.GetManager().ReleaseLogger(logger) return nil } @@ -219,10 +216,10 @@ func (m *Manager) restartExec(task *model.Task) error { //first stop app err := m.controllerManager.StartController(controller.TypeRestartController, *appService) if err != nil { - logrus.Errorf("Application run restart controller failure:%s", err.Error()) - logger.Info("Application run restart controller failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component run restart controller failure:%s", err.Error()) + logger.Info("component run restart controller failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application restart failure") + return fmt.Errorf("component restart failure") } logrus.Infof("service(%s) %s working is running.", body.ServiceID, "restart") return nil @@ -280,8 +277,8 @@ func (m *Manager) horizontalScalingExec(task *model.Task) (err error) { appService.Replicas = service.Replicas err = m.controllerManager.StartController(controller.TypeScalingController, *appService) if err != nil { - logrus.Errorf("Application run scaling controller failure:%s", err.Error()) - logger.Info("Application run scaling controller failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component run scaling controller failure:%s", err.Error()) + logger.Info("component run scaling controller failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) return } @@ -315,8 +312,8 @@ func (m *Manager) verticalScalingExec(task *model.Task) error { appService.Logger = logger newAppService, err := conversion.InitAppService(m.dbmanager, body.ServiceID, nil) if err != nil { - logrus.Errorf("Application init create failure:%s", err.Error()) - logger.Error("Application init create failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component init create failure:%s", err.Error()) + logger.Error("component init create failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) return fmt.Errorf("application init create failure") } @@ -324,8 +321,8 @@ func (m *Manager) verticalScalingExec(task *model.Task) error { appService.SetUpgradePatch(newAppService) err = m.controllerManager.StartController(controller.TypeUpgradeController, *newAppService) if err != nil { - logrus.Errorf("Application run vertical scaling(upgrade) controller failure:%s", err.Error()) - logger.Info("Application run vertical scaling(upgrade) controller failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component run vertical scaling(upgrade) controller failure:%s", err.Error()) + logger.Info("component run vertical scaling(upgrade) controller failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) return fmt.Errorf("application vertical scaling(upgrade) failure") } @@ -342,10 +339,10 @@ func (m *Manager) rollingUpgradeExec(task *model.Task) error { logger := event.GetManager().GetLogger(body.EventID) newAppService, err := conversion.InitAppService(m.dbmanager, body.ServiceID, body.Configs) if err != nil { - logrus.Errorf("Application init create failure:%s", err.Error()) - logger.Error("Application init create failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component init create failure:%s", err.Error()) + logger.Error("component init create failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application init create failure") + return fmt.Errorf("component init create failure") } newAppService.Logger = logger oldAppService := m.store.GetAppService(body.ServiceID) @@ -355,30 +352,30 @@ func (m *Manager) rollingUpgradeExec(task *model.Task) error { m.store.RegistAppService(newAppService) err = m.controllerManager.StartController(controller.TypeStartController, *newAppService) if err != nil { - logrus.Errorf("Application run start controller failure:%s", err.Error()) - logger.Info("Application run start controller failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component run start controller failure:%s", err.Error()) + logger.Info("component run start controller failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application start failure") + return fmt.Errorf("component start failure") } logrus.Infof("service(%s) %s working is running.", body.ServiceID, "start") return nil } if err := oldAppService.SetUpgradePatch(newAppService); err != nil { if err.Error() == "no upgrade" { - logger.Info("Application no change no need upgrade.", event.GetLastLoggerOption()) + logger.Info("component no change no need upgrade.", event.GetLastLoggerOption()) return nil } - logrus.Errorf("Application get upgrade info error:%s", err.Error()) - logger.Error(fmt.Sprintf("Application get upgrade info error:%s", err.Error()), event.GetCallbackLoggerOption()) + logrus.Errorf("component get upgrade info error:%s", err.Error()) + logger.Error(fmt.Sprintf("component get upgrade info error:%s", err.Error()), event.GetCallbackLoggerOption()) return nil } //if service already deploy,upgrade it: err = m.controllerManager.StartController(controller.TypeUpgradeController, *newAppService) if err != nil { - logrus.Errorf("Application run upgrade controller failure:%s", err.Error()) - logger.Info("Application run upgrade controller failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component run upgrade controller failure:%s", err.Error()) + logger.Info("component run upgrade controller failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application upgrade failure") + return fmt.Errorf("component upgrade failure") } logrus.Infof("service(%s) %s working is running.", body.ServiceID, "upgrade") return nil @@ -388,7 +385,7 @@ func (m *Manager) applyRuleExec(task *model.Task) error { body, ok := task.Body.(*model.ApplyRuleTaskBody) if !ok { logrus.Errorf("Can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body)) - return fmt.Errorf("Can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body)) + return fmt.Errorf("can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body)) } svc, err := db.GetManager().TenantServiceDao().GetServiceByID(body.ServiceID) if err != nil { @@ -414,10 +411,10 @@ func (m *Manager) applyRuleExec(task *model.Task) error { newAppService, err = conversion.InitAppService(m.dbmanager, body.ServiceID, nil) } if err != nil { - logrus.Errorf("Application init create failure:%s", err.Error()) - logger.Error("Application init create failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component init create failure:%s", err.Error()) + logger.Error("component init create failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application init create failure") + return fmt.Errorf("component init create failure") } newAppService.Logger = logger newAppService.SetDeletedResources(m.store.GetAppService(body.ServiceID)) @@ -425,8 +422,8 @@ func (m *Manager) applyRuleExec(task *model.Task) error { newAppService.CustomParams = body.Limit err = m.controllerManager.StartController(controller.TypeApplyRuleController, *newAppService) if err != nil { - logrus.Errorf("Application apply rule controller failure:%s", err.Error()) - return fmt.Errorf("Application apply rule controller failure:%s", err.Error()) + logrus.Errorf("component apply rule controller failure:%s", err.Error()) + return fmt.Errorf("component apply rule controller failure:%s", err.Error()) } if svc.Kind == dbmodel.ServiceKindThirdParty.String() && strings.HasPrefix(body.Action, "port") { @@ -463,7 +460,7 @@ func (m *Manager) applyPluginConfig(task *model.Task) error { body, ok := task.Body.(*model.ApplyPluginConfigTaskBody) if !ok { logrus.Errorf("Can't convert %s to *model.ApplyPluginConfigTaskBody", reflect.TypeOf(task.Body)) - return fmt.Errorf("Can't convert %s to *model.ApplyPluginConfigTaskBody", reflect.TypeOf(task.Body)) + return fmt.Errorf("can't convert %s to *model.ApplyPluginConfigTaskBody", reflect.TypeOf(task.Body)) } oldAppService := m.store.GetAppService(body.ServiceID) if oldAppService == nil || oldAppService.IsClosed() { @@ -472,13 +469,13 @@ func (m *Manager) applyPluginConfig(task *model.Task) error { } newApp, err := conversion.InitAppService(m.dbmanager, body.ServiceID, nil, "ServiceSource", "TenantServiceBase", "TenantServicePlugin") if err != nil { - logrus.Errorf("Application apply plugin config controller failure:%s", err.Error()) + logrus.Errorf("component apply plugin config controller failure:%s", err.Error()) return err } err = m.controllerManager.StartController(controller.TypeApplyConfigController, *newApp) if err != nil { - logrus.Errorf("Application apply plugin config controller failure:%s", err.Error()) - return fmt.Errorf("Application apply plugin config controller failure:%s", err.Error()) + logrus.Errorf("component apply plugin config controller failure:%s", err.Error()) + return fmt.Errorf("component apply plugin config controller failure:%s", err.Error()) } return nil } @@ -519,7 +516,7 @@ func (m *Manager) deleteTenant(task *model.Task) (err error) { tenant.Status = dbmodel.TenantStatusDeleteFailed.String() err := db.GetManager().TenantDao().UpdateModel(tenant) if err != nil { - err = fmt.Errorf("update tenant_status to '%s': %v", tenant.Status, err) + logrus.Errorf("update tenant_status to '%s': %v", tenant.Status, err) return } }() @@ -559,18 +556,18 @@ func (m *Manager) ExecRefreshHPATask(task *model.Task) error { newAppService, err := conversion.InitAppService(m.dbmanager, body.ServiceID, nil) if err != nil { - logrus.Errorf("Application init create failure:%s", err.Error()) - logger.Error("Application init create failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component init create failure:%s", err.Error()) + logger.Error("component init create failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) - return fmt.Errorf("Application init create failure") + return fmt.Errorf("component init create failure") } newAppService.Logger = logger newAppService.SetDeletedResources(oldAppService) err = m.controllerManager.StartController(controller.TypeControllerRefreshHPA, *newAppService) if err != nil { - logrus.Errorf("Application run refreshhpa controller failure: %s", err.Error()) - logger.Error("Application run refreshhpa controller failure", event.GetCallbackLoggerOption()) + logrus.Errorf("component run refreshhpa controller failure: %s", err.Error()) + logger.Error("component run refreshhpa controller failure", event.GetCallbackLoggerOption()) event.GetManager().ReleaseLogger(logger) return fmt.Errorf("refresh hpa: %v", err) } diff --git a/worker/master/helmapp/app.go b/worker/master/controller/helmapp/app.go similarity index 100% rename from worker/master/helmapp/app.go rename to worker/master/controller/helmapp/app.go diff --git a/worker/master/helmapp/controller.go b/worker/master/controller/helmapp/controller.go similarity index 100% rename from worker/master/helmapp/controller.go rename to worker/master/controller/helmapp/controller.go diff --git a/worker/master/helmapp/controlloop.go b/worker/master/controller/helmapp/controlloop.go similarity index 100% rename from worker/master/helmapp/controlloop.go rename to worker/master/controller/helmapp/controlloop.go diff --git a/worker/master/helmapp/controlloop_test.go b/worker/master/controller/helmapp/controlloop_test.go similarity index 100% rename from worker/master/helmapp/controlloop_test.go rename to worker/master/controller/helmapp/controlloop_test.go diff --git a/worker/master/helmapp/detector.go b/worker/master/controller/helmapp/detector.go similarity index 100% rename from worker/master/helmapp/detector.go rename to worker/master/controller/helmapp/detector.go diff --git a/worker/master/helmapp/finilizer.go b/worker/master/controller/helmapp/finilizer.go similarity index 100% rename from worker/master/helmapp/finilizer.go rename to worker/master/controller/helmapp/finilizer.go diff --git a/worker/master/helmapp/status.go b/worker/master/controller/helmapp/status.go similarity index 100% rename from worker/master/helmapp/status.go rename to worker/master/controller/helmapp/status.go diff --git a/worker/master/helmapp/store.go b/worker/master/controller/helmapp/store.go similarity index 100% rename from worker/master/helmapp/store.go rename to worker/master/controller/helmapp/store.go diff --git a/worker/master/helmapp/suite_test.go b/worker/master/controller/helmapp/suite_test.go similarity index 85% rename from worker/master/helmapp/suite_test.go rename to worker/master/controller/helmapp/suite_test.go index c33bed1fd..8f3479e3a 100644 --- a/worker/master/helmapp/suite_test.go +++ b/worker/master/controller/helmapp/suite_test.go @@ -20,14 +20,17 @@ package helmapp import ( "context" - "github.com/goodrain/rainbond/util" - clientset "k8s.io/client-go/kubernetes" "os" "path/filepath" "testing" "time" + "github.com/goodrain/rainbond/util" + corev1 "k8s.io/api/core/v1" + clientset "k8s.io/client-go/kubernetes" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" + "github.com/goodrain/rainbond/pkg/generated/informers/externalversions" k8sutil "github.com/goodrain/rainbond/util/k8s" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -72,8 +75,10 @@ var _ = BeforeSuite(func() { rainbondClient = versioned.NewForConfigOrDie(restConfig) kubeClient = clientset.NewForConfigOrDie(restConfig) + rainbondInformer := externalversions.NewSharedInformerFactoryWithOptions(rainbondClient, 10*time.Second, + externalversions.WithNamespace(corev1.NamespaceAll)) - ctrl := NewController(ctx, stopCh, kubeClient, rainbondClient, 5*time.Second, "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache", "/tmp/helm/chart") + ctrl := NewController(ctx, stopCh, kubeClient, rainbondClient, rainbondInformer.Rainbond().V1alpha1().HelmApps().Informer(), rainbondInformer.Rainbond().V1alpha1().HelmApps().Lister(), "/tmp/helm/repo/repositories.yaml", "/tmp/helm/cache", "/tmp/helm/chart") go ctrl.Start() // create namespace diff --git a/worker/master/controller/thirdcomponent/controller.go b/worker/master/controller/thirdcomponent/controller.go new file mode 100644 index 000000000..e70a3fd0e --- /dev/null +++ b/worker/master/controller/thirdcomponent/controller.go @@ -0,0 +1,271 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 thirdcomponent + +import ( + "context" + "reflect" + "time" + + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/oam-dev/kubevela/pkg/utils/apply" + "github.com/sirupsen/logrus" + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/rest" + "k8s.io/client-go/util/retry" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller" + "sigs.k8s.io/controller-runtime/pkg/reconcile" +) + +const reconcileTimeOut = 60 * time.Second + +type Reconciler struct { + Client client.Client + restConfig *rest.Config + Scheme *runtime.Scheme + concurrentReconciles int + applyer apply.Applicator + discoverPool *DiscoverPool +} + +// Reconcile is the main logic of appDeployment controller +func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr error) { + log := logrus.WithField("thirdcomponent", req) + commonResult := ctrl.Result{RequeueAfter: time.Second * 5} + component := &v1alpha1.ThirdComponent{} + ctx, cancel := context.WithTimeout(context.TODO(), reconcileTimeOut) + defer cancel() + defer func() { + if retErr == nil { + log.Infof("finished reconciling") + } else { + log.Errorf("Failed to reconcile %v", retErr) + } + }() + + if err := r.Client.Get(ctx, req.NamespacedName, component); err != nil { + if apierrors.IsNotFound(err) { + log.Infof("thirdcomponent %s does not exist", req) + } + return ctrl.Result{}, client.IgnoreNotFound(err) + } + if component.DeletionTimestamp != nil { + log.Infof("component %s will be deleted", req) + return ctrl.Result{}, nil + } + logrus.Infof("start to reconcile component %s/%s", component.Namespace, component.Name) + discover, err := NewDiscover(component, r.restConfig) + if err != nil { + component.Status.Phase = v1alpha1.ComponentFailed + component.Status.Reason = err.Error() + r.updateStatus(ctx, component) + return ctrl.Result{}, nil + } + if discover == nil { + component.Status.Phase = v1alpha1.ComponentFailed + component.Status.Reason = "third component source not support" + r.updateStatus(ctx, component) + return ctrl.Result{}, nil + } + endpoints, err := discover.DiscoverOne(ctx) + if err != nil { + component.Status.Phase = v1alpha1.ComponentFailed + component.Status.Reason = err.Error() + r.updateStatus(ctx, component) + return commonResult, nil + } + r.discoverPool.AddDiscover(discover) + + if len(endpoints) == 0 { + component.Status.Phase = v1alpha1.ComponentPending + component.Status.Reason = "endpoints not found" + r.updateStatus(ctx, component) + return commonResult, nil + } + + // create endpoints for service + if len(component.Spec.Ports) > 0 && len(component.Status.Endpoints) > 0 { + var services corev1.ServiceList + selector, err := labels.Parse(labels.FormatLabels(map[string]string{ + "service_id": component.Labels["service_id"], + })) + if err != nil { + logrus.Errorf("create selector failure %s", err.Error()) + return commonResult, err + } + err = r.Client.List(ctx, &services, &client.ListOptions{LabelSelector: selector}) + if err != nil { + return commonResult, nil + } + log.Infof("list component service success, size:%d", len(services.Items)) + if len(services.Items) == 0 { + log.Warning("component service is empty") + return commonResult, nil + } + // init component port + var portMap = make(map[int][]*v1alpha1.ThirdComponentEndpointStatus) + for _, end := range component.Status.Endpoints { + portMap[end.Address.GetPort()] = append(portMap[end.Address.GetPort()], end) + } + // create endpoint for component service + for _, service := range services.Items { + for _, port := range service.Spec.Ports { + // if component port not exist in endpoint port list, ignore it. + if sourceEndpoint, ok := portMap[int(port.Port)]; ok { + endpoint := createEndpoint(component, &service, sourceEndpoint, int(port.Port)) + var old corev1.Endpoints + var apply = true + if err := r.Client.Get(ctx, types.NamespacedName{Namespace: endpoint.Namespace, Name: endpoint.Name}, &old); err == nil { + // no change not apply + if reflect.DeepEqual(old.Subsets, endpoint.Subsets) { + apply = false + } + } + if apply { + if err := r.applyer.Apply(ctx, &endpoint); err != nil { + log.Errorf("apply endpoint for service %s failure %s", service.Name, err.Error()) + } + log.Infof("apply endpoint for service %s success", service.Name) + } + } + } + } + } + component.Status.Endpoints = endpoints + component.Status.Phase = v1alpha1.ComponentRunning + if err := r.updateStatus(ctx, component); err != nil { + log.Errorf("update status failure %s", err.Error()) + return commonResult, nil + } + return reconcile.Result{}, nil +} + +func createEndpoint(component *v1alpha1.ThirdComponent, service *corev1.Service, sourceEndpoint []*v1alpha1.ThirdComponentEndpointStatus, port int) corev1.Endpoints { + endpoints := corev1.Endpoints{ + TypeMeta: metav1.TypeMeta{ + Kind: "Endpoints", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: service.Name, + Namespace: service.Namespace, + Labels: service.Labels, + }, + Subsets: func() []corev1.EndpointSubset { + return []corev1.EndpointSubset{ + { + Ports: func() (re []corev1.EndpointPort) { + for _, servicePort := range service.Spec.Ports { + re = append(re, corev1.EndpointPort{ + Name: servicePort.Name, + Port: servicePort.Port, + Protocol: servicePort.Protocol, + AppProtocol: servicePort.AppProtocol, + }) + } + return + }(), + Addresses: func() (re []corev1.EndpointAddress) { + for _, se := range sourceEndpoint { + if se.Status == v1alpha1.EndpointReady { + re = append(re, corev1.EndpointAddress{ + IP: se.Address.GetIP(), + TargetRef: &corev1.ObjectReference{ + Namespace: component.Namespace, + Name: component.Name, + Kind: component.Kind, + APIVersion: component.APIVersion, + UID: component.UID, + ResourceVersion: component.ResourceVersion, + }, + }) + } + } + return + }(), + NotReadyAddresses: func() (re []corev1.EndpointAddress) { + for _, se := range sourceEndpoint { + if se.Status == v1alpha1.EndpointNotReady { + re = append(re, corev1.EndpointAddress{ + IP: se.Address.GetIP(), + TargetRef: &corev1.ObjectReference{ + Namespace: component.Namespace, + Name: component.Name, + Kind: component.Kind, + APIVersion: component.APIVersion, + UID: component.UID, + ResourceVersion: component.ResourceVersion, + }, + }) + } + } + return + }(), + }, + } + }(), + } + return endpoints +} + +// UpdateStatus updates ThirdComponent's Status with retry.RetryOnConflict +func (r *Reconciler) updateStatus(ctx context.Context, appd *v1alpha1.ThirdComponent, opts ...client.UpdateOption) 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 { + return + } + if status.Endpoints == nil { + status.Endpoints = []*v1alpha1.ThirdComponentEndpointStatus{} + } + appd.Status = status + return r.Client.Status().Update(ctx, appd, opts...) + }) +} + +// SetupWithManager setup the controller with manager +func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + WithOptions(controller.Options{ + MaxConcurrentReconciles: r.concurrentReconciles, + }). + For(&v1alpha1.ThirdComponent{}). + Complete(r) +} + +// Setup adds a controller that reconciles AppDeployment. +func Setup(ctx context.Context, mgr ctrl.Manager) error { + applyer := apply.NewAPIApplicator(mgr.GetClient()) + r := &Reconciler{ + Client: mgr.GetClient(), + restConfig: mgr.GetConfig(), + Scheme: mgr.GetScheme(), + applyer: applyer, + } + dp := NewDiscoverPool(ctx, r) + r.discoverPool = dp + return r.SetupWithManager(mgr) +} diff --git a/worker/master/controller/thirdcomponent/discover.go b/worker/master/controller/thirdcomponent/discover.go new file mode 100644 index 000000000..471c71990 --- /dev/null +++ b/worker/master/controller/thirdcomponent/discover.go @@ -0,0 +1,147 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 thirdcomponent + +import ( + "context" + "fmt" + "time" + + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/sirupsen/logrus" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +type Discover interface { + GetComponent() *v1alpha1.ThirdComponent + DiscoverOne(ctx context.Context) ([]*v1alpha1.ThirdComponentEndpointStatus, error) + Discover(ctx context.Context, update chan *v1alpha1.ThirdComponent) ([]*v1alpha1.ThirdComponentEndpointStatus, error) +} + +func NewDiscover(component *v1alpha1.ThirdComponent, restConfig *rest.Config) (Discover, error) { + if component.Spec.EndpointSource.KubernetesService != nil { + clientset, err := kubernetes.NewForConfig(restConfig) + if err != nil { + logrus.Errorf("create kube client error: %s", err.Error()) + return nil, err + } + return &kubernetesDiscover{ + component: component, + client: clientset, + }, nil + } + return nil, fmt.Errorf("not support source type") +} + +type kubernetesDiscover struct { + component *v1alpha1.ThirdComponent + client *kubernetes.Clientset +} + +func (k *kubernetesDiscover) GetComponent() *v1alpha1.ThirdComponent { + return k.component +} +func (k *kubernetesDiscover) getNamespace() string { + component := k.component + namespace := component.Spec.EndpointSource.KubernetesService.Namespace + if namespace == "" { + namespace = component.Namespace + } + return namespace +} +func (k *kubernetesDiscover) Discover(ctx context.Context, update chan *v1alpha1.ThirdComponent) ([]*v1alpha1.ThirdComponentEndpointStatus, error) { + namespace := k.getNamespace() + component := k.component + service, err := k.client.CoreV1().Services(namespace).Get(ctx, component.Spec.EndpointSource.KubernetesService.Name, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("load kubernetes service failure %s", err.Error()) + } + re, err := k.client.CoreV1().Endpoints(namespace).Watch(ctx, metav1.ListOptions{LabelSelector: labels.FormatLabels(service.Spec.Selector)}) + if err != nil { + return nil, fmt.Errorf("watch kubernetes endpoints failure %s", err.Error()) + } + defer re.Stop() + for { + select { + case <-ctx.Done(): + return nil, nil + case <-re.ResultChan(): + func() { + ctx, cancel := context.WithTimeout(ctx, time.Second*10) + defer cancel() + endpoints, err := k.DiscoverOne(ctx) + if err == nil { + new := component.DeepCopy() + new.Status.Endpoints = endpoints + update <- new + } else { + logrus.Errorf("discover kubernetes endpoints %s change failure %s", component.Spec.EndpointSource.KubernetesService.Name, err.Error()) + } + }() + return k.DiscoverOne(ctx) + } + } +} +func (k *kubernetesDiscover) DiscoverOne(ctx context.Context) ([]*v1alpha1.ThirdComponentEndpointStatus, error) { + component := k.component + namespace := k.getNamespace() + service, err := k.client.CoreV1().Services(namespace).Get(ctx, component.Spec.EndpointSource.KubernetesService.Name, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("load kubernetes service failure %s", err.Error()) + } + endpoints, err := k.client.CoreV1().Endpoints(namespace).List(ctx, metav1.ListOptions{LabelSelector: labels.FormatLabels(service.Spec.Selector)}) + if err != nil { + if apierrors.IsNotFound(err) { + return nil, nil + } + return nil, fmt.Errorf("load kubernetes endpoints failure %s", err.Error()) + } + var es = []*v1alpha1.ThirdComponentEndpointStatus{} + for _, endpoint := range endpoints.Items { + for _, subset := range endpoint.Subsets { + for _, port := range subset.Ports { + for _, address := range subset.Addresses { + ed := v1alpha1.NewEndpointAddress(address.IP, int(port.Port)) + if ed != nil { + es = append(es, &v1alpha1.ThirdComponentEndpointStatus{ + Address: *ed, + TargetRef: address.TargetRef, + Status: v1alpha1.EndpointReady, + }) + } + } + for _, address := range subset.NotReadyAddresses { + ed := v1alpha1.NewEndpointAddress(address.IP, int(port.Port)) + if ed != nil { + es = append(es, &v1alpha1.ThirdComponentEndpointStatus{ + Address: *ed, + TargetRef: address.TargetRef, + Status: v1alpha1.EndpointReady, + }) + } + } + } + } + } + return es, nil +} diff --git a/worker/master/controller/thirdcomponent/discover_pool.go b/worker/master/controller/thirdcomponent/discover_pool.go new file mode 100644 index 000000000..d0fba2338 --- /dev/null +++ b/worker/master/controller/thirdcomponent/discover_pool.go @@ -0,0 +1,158 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2021-2021 Goodrain Co., Ltd. + +// 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 thirdcomponent + +import ( + "context" + "reflect" + "sync" + "time" + + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/sirupsen/logrus" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +type DiscoverPool struct { + ctx context.Context + lock sync.Mutex + discoverWorker map[string]*Worker + updateChan chan *v1alpha1.ThirdComponent + reconciler *Reconciler +} + +func NewDiscoverPool(ctx context.Context, reconciler *Reconciler) *DiscoverPool { + dp := &DiscoverPool{ + ctx: ctx, + discoverWorker: make(map[string]*Worker), + updateChan: make(chan *v1alpha1.ThirdComponent, 1024), + reconciler: reconciler, + } + go dp.Start() + return dp +} + +func (d *DiscoverPool) Start() { + logrus.Infof("third component discover pool started") + for { + select { + case <-d.ctx.Done(): + logrus.Infof("third component discover pool stoped") + return + case component := <-d.updateChan: + func() { + ctx, cancel := context.WithTimeout(d.ctx, time.Second*10) + defer cancel() + var old v1alpha1.ThirdComponent + name := client.ObjectKey{Name: component.Name, Namespace: component.Namespace} + d.reconciler.Client.Get(ctx, name, &old) + if !reflect.DeepEqual(component.Status.Endpoints, old.Status.Endpoints) { + if err := d.reconciler.updateStatus(ctx, component); err != nil { + logrus.Errorf("update component status failure", err.Error()) + } + logrus.Infof("update component %s status success by discover pool", name) + } else { + logrus.Debugf("component %s status endpoints not change", name) + } + }() + } + } +} + +type Worker struct { + discover Discover + cancel context.CancelFunc + ctx context.Context + updateChan chan *v1alpha1.ThirdComponent + stoped bool +} + +func (w *Worker) Start() { + defer func() { + logrus.Infof("discover endpoint list worker %s/%s stoed", w.discover.GetComponent().Namespace, w.discover.GetComponent().Name) + w.stoped = true + }() + w.stoped = false + logrus.Infof("discover endpoint list worker %s/%s started", w.discover.GetComponent().Namespace, w.discover.GetComponent().Name) + for { + w.discover.Discover(w.ctx, w.updateChan) + select { + case <-w.ctx.Done(): + return + default: + } + } +} + +func (w *Worker) UpdateDiscover(discover Discover) { + w.discover = discover +} + +func (w *Worker) Stop() { + w.cancel() +} + +func (w *Worker) IsStop() bool { + return w.stoped +} + +func (d *DiscoverPool) newWorker(dis Discover) *Worker { + ctx, cancel := context.WithCancel(d.ctx) + return &Worker{ + ctx: ctx, + discover: dis, + cancel: cancel, + updateChan: d.updateChan, + } +} + +func (d *DiscoverPool) AddDiscover(dis Discover) { + d.lock.Lock() + defer d.lock.Unlock() + component := dis.GetComponent() + if component == nil { + return + } + key := component.Namespace + component.Name + olddis, exist := d.discoverWorker[key] + if exist { + olddis.UpdateDiscover(dis) + if olddis.IsStop() { + go olddis.Start() + } + return + } + worker := d.newWorker(dis) + go worker.Start() + d.discoverWorker[key] = worker +} + +func (d *DiscoverPool) RemoveDiscover(dis Discover) { + d.lock.Lock() + defer d.lock.Unlock() + component := dis.GetComponent() + if component == nil { + return + } + key := component.Namespace + component.Name + olddis, exist := d.discoverWorker[key] + if exist { + olddis.Stop() + } +} diff --git a/worker/master/master.go b/worker/master/master.go index 55a9e0c73..351011829 100644 --- a/worker/master/master.go +++ b/worker/master/master.go @@ -27,10 +27,12 @@ import ( "github.com/goodrain/rainbond/cmd/worker/option" "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db/model" + "github.com/goodrain/rainbond/pkg/common" "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/goodrain/rainbond/util/leader" "github.com/goodrain/rainbond/worker/appm/store" - "github.com/goodrain/rainbond/worker/master/helmapp" + "github.com/goodrain/rainbond/worker/master/controller/helmapp" + "github.com/goodrain/rainbond/worker/master/controller/thirdcomponent" "github.com/goodrain/rainbond/worker/master/podevent" "github.com/goodrain/rainbond/worker/master/volumes/provider" "github.com/goodrain/rainbond/worker/master/volumes/provider/lib/controller" @@ -40,6 +42,8 @@ import ( "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + ctrl "sigs.k8s.io/controller-runtime" ) //Controller app runtime master controller @@ -70,10 +74,11 @@ type Controller struct { version *version.Info rainbondsssc controller.Provisioner rainbondsslc controller.Provisioner + mgr ctrl.Manager } //NewMasterController new master controller -func NewMasterController(conf option.Config, store store.Storer, kubeClient kubernetes.Interface, rainbondClient versioned.Interface) (*Controller, error) { +func NewMasterController(conf option.Config, store store.Storer, kubeClient kubernetes.Interface, rainbondClient versioned.Interface, restConfig *rest.Config) (*Controller, error) { ctx, cancel := context.WithCancel(context.Background()) // The controller needs to know what the server version is because out-of-tree @@ -99,6 +104,17 @@ func NewMasterController(conf option.Config, store store.Storer, kubeClient kube }, serverVersion.GitVersion) stopCh := make(chan struct{}) + mgr, err := ctrl.NewManager(restConfig, ctrl.Options{ + Scheme: common.Scheme, + LeaderElection: false, + LeaderElectionID: "controllers.rainbond.io", + }) + if err != nil { + cancel() + return nil, err + } + thirdcomponent.Setup(ctx, mgr) + helmAppController := helmapp.NewController(ctx, stopCh, kubeClient, rainbondClient, store.Informer().HelmApp, store.Lister().HelmApp, conf.Helm.RepoFile, conf.Helm.RepoCache, conf.Helm.RepoCache) @@ -111,6 +127,7 @@ func NewMasterController(conf option.Config, store store.Storer, kubeClient kube cancel: cancel, ctx: ctx, dbmanager: db.GetManager(), + mgr: mgr, memoryUse: prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "app_resource", Name: "appmemory", @@ -187,11 +204,17 @@ func (m *Controller) Start() error { // helm app controller go m.helmAppController.Start() defer m.helmAppController.Stop() + // start controller + stopchan := make(chan struct{}) + go m.mgr.Start(stopchan) + + defer func() { stopchan <- struct{}{} }() select { case <-ctx.Done(): case <-m.ctx.Done(): } + } // Leader election was requested. if m.conf.LeaderElectionNamespace == "" { From 6545fb2a75c27705b7f8b16edfe6a963e8d37fed Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Wed, 30 Jun 2021 18:48:27 +0800 Subject: [PATCH 49/65] support update storageclass --- worker/appm/conversion/service.go | 10 +++++----- worker/appm/store/storeage_class.go | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/worker/appm/conversion/service.go b/worker/appm/conversion/service.go index b01ac1223..74a61a177 100644 --- a/worker/appm/conversion/service.go +++ b/worker/appm/conversion/service.go @@ -119,6 +119,11 @@ func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error { as.IsWindowsService = true } + // component resource config + as.ContainerCPU = tenantService.ContainerCPU + as.ContainerGPU = tenantService.ContainerGPU + as.ContainerMemory = tenantService.ContainerMemory + as.Replicas = tenantService.Replicas if !tenantService.IsState() { initBaseDeployment(as, tenantService) return nil @@ -127,11 +132,6 @@ func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error { initBaseStatefulSet(as, tenantService) return nil } - // component resource and - as.ContainerCPU = tenantService.ContainerCPU - as.ContainerGPU = tenantService.ContainerGPU - as.ContainerMemory = tenantService.ContainerMemory - as.Replicas = tenantService.Replicas return fmt.Errorf("kind: %s; do not decision build type for service %s", tenantService.Kind, as.ServiceAlias) } diff --git a/worker/appm/store/storeage_class.go b/worker/appm/store/storeage_class.go index b35ae2fb9..cd2e49bd0 100644 --- a/worker/appm/store/storeage_class.go +++ b/worker/appm/store/storeage_class.go @@ -22,6 +22,7 @@ import ( "context" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -29,13 +30,28 @@ import ( //InitStorageclass init storage class func (a *appRuntimeStore) initStorageclass() error { for _, storageclass := range v1.GetInitStorageClass() { - if _, err := a.conf.KubeClient.StorageV1().StorageClasses().Get(context.Background(), storageclass.Name, metav1.GetOptions{}); err != nil { + old, err := a.conf.KubeClient.StorageV1().StorageClasses().Get(context.Background(), storageclass.Name, metav1.GetOptions{}) + if err != nil { if errors.IsNotFound(err) { _, err = a.conf.KubeClient.StorageV1().StorageClasses().Create(context.Background(), storageclass, metav1.CreateOptions{}) } if err != nil { return err } + logrus.Info("create storageclass %s", storageclass.Name) + } else { + if old.VolumeBindingMode != storageclass.VolumeBindingMode || old.ReclaimPolicy != storageclass.ReclaimPolicy { + err := a.conf.KubeClient.StorageV1().StorageClasses().Delete(context.Background(), storageclass.Name, metav1.DeleteOptions{}) + if err == nil { + _, err := a.conf.KubeClient.StorageV1().StorageClasses().Create(context.Background(), storageclass, metav1.CreateOptions{}) + if err != nil { + logrus.Errorf("recreate strageclass %s failure %s", storageclass.Name, err.Error()) + } + logrus.Info("update storageclass %s success", storageclass.Name) + } else { + logrus.Errorf("recreate strageclass %s failure %s", err.Error()) + } + } } } return nil From 49e011ea5001ef5c76eb14fd1a7ca211235601e3 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 30 Jun 2021 20:37:42 +0800 Subject: [PATCH 50/65] grctl upgrade cluster --- grctl/clients/kubernetes.go | 2 + grctl/cluster/cluster.go | 178 ++++++++++++++++++++++++++++++++++++ grctl/cluster/vergion.go | 174 +++++++++++++++++++++++++++++++++++ grctl/cmd/cluster.go | 27 +++++- 4 files changed, 380 insertions(+), 1 deletion(-) create mode 100644 grctl/cluster/cluster.go create mode 100644 grctl/cluster/vergion.go diff --git a/grctl/clients/kubernetes.go b/grctl/clients/kubernetes.go index 8e19f6ab9..9116e8844 100644 --- a/grctl/clients/kubernetes.go +++ b/grctl/clients/kubernetes.go @@ -27,6 +27,7 @@ import ( "github.com/goodrain/rainbond/builder/sources" k8sutil "github.com/goodrain/rainbond/util/k8s" "github.com/sirupsen/logrus" + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/kubernetes" @@ -42,6 +43,7 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(rainbondv1alpha1.AddToScheme(scheme)) + utilruntime.Must(apiextensionsv1beta1.AddToScheme(scheme)) } //K8SClient K8SClient diff --git a/grctl/cluster/cluster.go b/grctl/cluster/cluster.go new file mode 100644 index 000000000..d9b0c4e42 --- /dev/null +++ b/grctl/cluster/cluster.go @@ -0,0 +1,178 @@ +// RAINBOND, Application Management Platform +// Copyright (C) 2014-2021 Goodrain Co., Ltd. + +// 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 cluster + +import ( + "context" + "fmt" + "strings" + + "github.com/docker/distribution/reference" + "github.com/goodrain/rainbond-operator/api/v1alpha1" + "github.com/goodrain/rainbond/grctl/clients" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/yaml" +) + +// Cluster represents a rainbond cluster. +type Cluster struct { + rainbondCluster *v1alpha1.RainbondCluster + namespace string + newVersion string +} + +// NewCluster creates new cluster. +func NewCluster(namespace, newVersion string) (*Cluster, error) { + rainbondCluster, err := getRainbondCluster(namespace) + if err != nil { + return nil, err + } + return &Cluster{ + rainbondCluster: rainbondCluster, + namespace: namespace, + newVersion: newVersion, + }, nil +} + +// Upgrade upgrade cluster. +func (c *Cluster) Upgrade() error { + logrus.Infof("upgrade cluster from %s to %s", c.rainbondCluster.Spec.InstallVersion, c.newVersion) + + if errs := c.createCrds(); len(errs) > 0 { + return errors.New(strings.Join(errs, ",")) + } + + if errs := c.updateRbdComponents(); len(errs) > 0 { + return fmt.Errorf("update rainbond components: %s", strings.Join(errs, ",")) + } + + if err := c.updateCluster(); err != nil { + return err + } + + return nil +} + +func (c *Cluster) createCrds() []string { + crds, err := c.getCrds() + if err != nil { + return []string{err.Error()} + } + logrus.Info("start creating crds") + var errs []string + for _, crd := range crds { + if err := c.createCrd(crd); err != nil { + errs = append(errs, err.Error()) + } + } + logrus.Info("crds created") + return errs +} + +func (c *Cluster) createCrd(crdStr string) error { + var crd apiextensionsv1beta1.CustomResourceDefinition + if err := yaml.Unmarshal([]byte(crdStr), &crd); err != nil { + return fmt.Errorf("unmarshal crd: %v", err) + } + + if err := clients.RainbondKubeClient.Create(context.Background(), &crd); err != nil { + return fmt.Errorf("create crd: %v", err) + } + + return nil +} + +func (c *Cluster) getCrds() ([]string, error) { + key := c.rainbondCluster.Spec.InstallVersion + "-" + c.newVersion + logrus.Infof("key: %s", key) + version, ok := versions[key] + if !ok { + return nil, fmt.Errorf("unsupport new version %s", c.newVersion) + } + return version.CRDs, nil +} + +func (c *Cluster) updateRbdComponents() []string { + componentNames := []string{ + "rbd-api", + "rbd-chaos", + "rbd-mq", + "rbd-eventlog", + "rbd-gateway", + "rbd-node", + "rbd-resource-proxy", + "rbd-webcli", + "rbd-worker", + } + var errs []string + for _, name := range componentNames { + err := c.updateRbdComponent(name) + if err != nil { + errs = append(errs, err.Error()) + } + } + return errs +} + +func (c *Cluster) updateRbdComponent(name string) error { + var cpt v1alpha1.RbdComponent + err := clients.RainbondKubeClient.Get(context.Background(), + types.NamespacedName{Namespace: c.namespace, Name: name}, &cpt) + if err != nil { + return fmt.Errorf("get rbdcomponent %s: %v", name, err) + } + + ref, err := reference.Parse(cpt.Spec.Image) + if err != nil { + return fmt.Errorf("parse image %s: %v", cpt.Spec.Image, err) + } + repo := ref.(reference.Named) + newImage := repo.Name() + ":" + c.newVersion + + oldImageName := cpt.Spec.Image + cpt.Spec.Image = newImage + if err := clients.RainbondKubeClient.Update(context.Background(), &cpt); err != nil { + return fmt.Errorf("update rbdcomponent %s: %v", name, err) + } + + logrus.Infof("update rbdcomponent %s \nfrom %s \nto %s", name, oldImageName, newImage) + return nil +} + +func (c *Cluster) updateCluster() error { + c.rainbondCluster.Spec.InstallVersion = c.newVersion + if err := clients.RainbondKubeClient.Update(context.Background(), c.rainbondCluster); err != nil { + return fmt.Errorf("update rainbond cluster: %v", err) + } + logrus.Infof("update rainbond cluster to %s", c.newVersion) + return nil +} + +func getRainbondCluster(namespace string) (*v1alpha1.RainbondCluster, error) { + var cluster v1alpha1.RainbondCluster + err := clients.RainbondKubeClient.Get(context.Background(), + types.NamespacedName{Namespace: namespace, Name: "rainbondcluster"}, &cluster) + if err != nil { + return nil, fmt.Errorf("get rainbond cluster: %v", err) + } + return &cluster, nil +} diff --git a/grctl/cluster/vergion.go b/grctl/cluster/vergion.go new file mode 100644 index 000000000..e6fcc1c4b --- /dev/null +++ b/grctl/cluster/vergion.go @@ -0,0 +1,174 @@ +package cluster + +var versions = map[string]Version{ + "v5.3.0-release-v5.3.1-release": { + CRDs: []string{ + helmappCRD531, + }, + }, +} + +type Version struct { + CRDs []string +} + +var helmappCRD531 = ` +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.5 + creationTimestamp: null + name: helmapps.rainbond.goodrain.io +spec: + group: rainbond.goodrain.io + names: + kind: HelmApp + listKind: HelmAppList + plural: helmapps + singular: helmapp + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: HelmApp - + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: HelmAppSpec defines the desired state of HelmApp + properties: + appStore: + description: The helm app store. + properties: + branch: + description: The branch of a git repo. + type: string + name: + description: The name of app store. + type: string + password: + description: The chart repository password where to locate the requested + chart + type: string + url: + description: The url of helm repo, sholud be a helm native repo + url or a git url. + type: string + username: + description: The chart repository username where to locate the requested + chart + type: string + version: + description: The verision of the helm app store. + type: string + required: + - name + - url + - version + type: object + eid: + type: string + overrides: + description: Overrides will overrides the values in the chart. + items: + type: string + type: array + preStatus: + description: The prerequisite status. + enum: + - NotConfigured + - Configured + type: string + revision: + description: The application revision. + type: integer + templateName: + description: The application name. + type: string + version: + description: The application version. + type: string + required: + - appStore + - eid + - templateName + - version + type: object + status: + description: HelmAppStatus defines the observed state of HelmApp + properties: + conditions: + description: Current state of helm app. + items: + description: HelmAppCondition contains details for the current condition + of this helm application. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last + transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + status: + description: 'Status is the status of the condition. Can be True, + False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions' + type: string + type: + description: Type is the type of the condition. + type: string + required: + - status + - type + type: object + type: array + currentVersion: + description: The version infect. + type: string + overrides: + description: Overrides in effect. + items: + type: string + type: array + phase: + description: The phase of the helm app. + type: string + status: + description: The status of helm app. + type: string + required: + - phase + - status + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +` diff --git a/grctl/cmd/cluster.go b/grctl/cmd/cluster.go index 2f481f332..ffac6d15d 100644 --- a/grctl/cmd/cluster.go +++ b/grctl/cmd/cluster.go @@ -28,6 +28,7 @@ import ( rainbondv1alpha1 "github.com/goodrain/rainbond-operator/api/v1alpha1" "github.com/goodrain/rainbond/grctl/clients" + "github.com/goodrain/rainbond/grctl/cluster" "github.com/goodrain/rainbond/node/nodem/client" "github.com/goodrain/rainbond/util/termtables" "github.com/gosuri/uitable" @@ -42,7 +43,7 @@ func NewCmdCluster() cli.Command { Name: "cluster", Usage: "show curren cluster datacenter info", Subcommands: []cli.Command{ - cli.Command{ + { Name: "config", Usage: "prints the current cluster configuration", Flags: []cli.Flag{ @@ -57,6 +58,30 @@ func NewCmdCluster() cli.Command { return printConfig(c) }, }, + { + Name: "upgrade", + Usage: "upgrade cluster", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "namespace, ns", + Usage: "rainbond default namespace", + Value: "rbd-system", + }, + cli.StringFlag{ + Name: "new-version", + Usage: "the new version of rainbond cluster", + Required: true, + }, + }, + Action: func(c *cli.Context) error { + Common(c) + cluster, err := cluster.NewCluster(c.String("namespace"), c.String("new-version")) + if err != nil { + return err + } + return cluster.Upgrade() + }, + }, }, Flags: []cli.Flag{ cli.StringFlag{ From e6167c5251f115f61cc0ac6613c5b791476c2dcc Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Wed, 30 Jun 2021 20:40:42 +0800 Subject: [PATCH 51/65] update some code --- .../crd/rainbond.io_componentdefinitions.yaml | 88 ------------------- .../rainbond/v1alpha1/componentdefinition.go | 8 +- .../v1alpha1/zz_generated.deepcopy.go | 22 ++++- .../thirdcomponentdefinition.go | 2 +- worker/appm/controller/apply_rule.go | 2 +- worker/appm/controller/controller.go | 34 +------ worker/appm/controller/refresh_xpa.go | 2 +- worker/appm/controller/restart.go | 4 +- worker/appm/controller/start.go | 1 - worker/appm/controller/upgrade.go | 62 +++++-------- worker/appm/store/storeage_class.go | 17 +++- 11 files changed, 69 insertions(+), 173 deletions(-) diff --git a/config/crd/rainbond.io_componentdefinitions.yaml b/config/crd/rainbond.io_componentdefinitions.yaml index f8c395cac..16a0a0df7 100644 --- a/config/crd/rainbond.io_componentdefinitions.yaml +++ b/config/crd/rainbond.io_componentdefinitions.yaml @@ -102,94 +102,6 @@ spec: required: - template type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm module - workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by a - Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes resource - format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring an - Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, number, - boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - type: - default: hcl - description: Type specifies which Terraform configuration it - is, HCL or JSON syntax - enum: - - hcl - - json - type: string - required: - - configuration - type: object type: object status: description: Status defines the custom health policy and status message diff --git a/pkg/apis/rainbond/v1alpha1/componentdefinition.go b/pkg/apis/rainbond/v1alpha1/componentdefinition.go index 70a5b66b4..e15833fff 100644 --- a/pkg/apis/rainbond/v1alpha1/componentdefinition.go +++ b/pkg/apis/rainbond/v1alpha1/componentdefinition.go @@ -50,7 +50,7 @@ type ComponentDefinitionSpec struct { // Schematic defines the data format and template of the encapsulation of the workload // +optional - Schematic *common.Schematic `json:"schematic,omitempty"` + Schematic *Schematic `json:"schematic,omitempty"` // Extension is used for extension needs by OAM platform builders // +optional @@ -58,6 +58,12 @@ type ComponentDefinitionSpec struct { Extension *runtime.RawExtension `json:"extension,omitempty"` } +// Schematic defines the encapsulation of this capability(workload/trait/scope), +// the encapsulation can be defined in different ways, e.g. CUE/HCL(terraform)/KUBE(K8s Object)/HELM, etc... +type Schematic struct { + CUE *common.CUE `json:"cue,omitempty"` +} + // ComponentDefinitionStatus is the status of ComponentDefinition type ComponentDefinitionStatus struct { // ConditionedStatus reflects the observed status of a resource diff --git a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go index a8679217e..3beafa6dc 100644 --- a/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rainbond/v1alpha1/zz_generated.deepcopy.go @@ -105,7 +105,7 @@ func (in *ComponentDefinitionSpec) DeepCopyInto(out *ComponentDefinitionSpec) { } if in.Schematic != nil { in, out := &in.Schematic, &out.Schematic - *out = new(common.Schematic) + *out = new(Schematic) (*in).DeepCopyInto(*out) } if in.Extension != nil { @@ -378,6 +378,26 @@ func (in *KubernetesServiceSource) DeepCopy() *KubernetesServiceSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Schematic) DeepCopyInto(out *Schematic) { + *out = *in + if in.CUE != nil { + in, out := &in.CUE, &out.CUE + *out = new(common.CUE) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schematic. +func (in *Schematic) DeepCopy() *Schematic { + if in == nil { + return nil + } + out := new(Schematic) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TCPSocketAction) DeepCopyInto(out *TCPSocketAction) { *out = *in diff --git a/worker/appm/componentdefinition/thirdcomponentdefinition.go b/worker/appm/componentdefinition/thirdcomponentdefinition.go index b2e46947b..db622b43c 100644 --- a/worker/appm/componentdefinition/thirdcomponentdefinition.go +++ b/worker/appm/componentdefinition/thirdcomponentdefinition.go @@ -80,7 +80,7 @@ var thirdComponetDefine = v1alpha1.ComponentDefinition{ Kind: "ThirdComponent", }, }, - Schematic: &common.Schematic{ + Schematic: &v1alpha1.Schematic{ CUE: &common.CUE{ Template: cueTemplate, }, diff --git a/worker/appm/controller/apply_rule.go b/worker/appm/controller/apply_rule.go index c7b993ee5..67a6a21d4 100644 --- a/worker/appm/controller/apply_rule.go +++ b/worker/appm/controller/apply_rule.go @@ -37,8 +37,8 @@ type applyRuleController struct { func (a *applyRuleController) Begin() { var wait sync.WaitGroup for _, service := range a.appService { + wait.Add(1) go func(service v1.AppService) { - wait.Add(1) defer wait.Done() if err := f.ApplyOne(a.manager.client, &service); err != nil { logrus.Errorf("apply rules for service %s failure: %s", service.ServiceAlias, err.Error()) diff --git a/worker/appm/controller/controller.go b/worker/appm/controller/controller.go index bd8bc15d2..82941a9d6 100644 --- a/worker/appm/controller/controller.go +++ b/worker/appm/controller/controller.go @@ -137,6 +137,7 @@ func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppS appService: apps, manager: m, stopChan: make(chan struct{}), + ctx: context.Background(), } case TypeRestartController: controller = &restartController{ @@ -198,36 +199,3 @@ func (s *sequencelist) Contains(id string) bool { func (s *sequencelist) Add(ids []*v1.AppService) { *s = append(*s, ids) } - -func foundsequence(source map[string]*v1.AppService, sl *sequencelist) { - if len(source) == 0 { - return - } - var deleteKey []string -source: - for _, s := range source { - for _, d := range s.Dependces { - if !sl.Contains(d) { - continue source - } - } - deleteKey = append(deleteKey, s.ServiceID) - } - var list []*v1.AppService - for _, d := range deleteKey { - list = append(list, source[d]) - delete(source, d) - } - sl.Add(list) - foundsequence(source, sl) -} - -func decisionSequence(appService []*v1.AppService) sequencelist { - var sourceIDs = make(map[string]*v1.AppService, len(appService)) - for _, a := range appService { - sourceIDs[a.ServiceID] = a - } - var sl sequencelist - foundsequence(sourceIDs, &sl) - return sl -} diff --git a/worker/appm/controller/refresh_xpa.go b/worker/appm/controller/refresh_xpa.go index c4b613c0b..063871f6a 100644 --- a/worker/appm/controller/refresh_xpa.go +++ b/worker/appm/controller/refresh_xpa.go @@ -41,8 +41,8 @@ type refreshXPAController struct { func (a *refreshXPAController) Begin() { var wait sync.WaitGroup for _, service := range a.appService { + wait.Add(1) go func(service v1.AppService) { - wait.Add(1) defer wait.Done() if err := a.applyOne(a.manager.client, &service); err != nil { logrus.Errorf("apply rules for service %s failure: %s", service.ServiceAlias, err.Error()) diff --git a/worker/appm/controller/restart.go b/worker/appm/controller/restart.go index 1d5d32846..f6a35a638 100644 --- a/worker/appm/controller/restart.go +++ b/worker/appm/controller/restart.go @@ -41,8 +41,8 @@ type restartController struct { func (s *restartController) Begin() { var wait sync.WaitGroup for _, service := range s.appService { + wait.Add(1) go func(service v1.AppService) { - wait.Add(1) defer wait.Done() service.Logger.Info("App runtime begin restart app service "+service.ServiceAlias, event.GetLoggerOption("starting")) if err := s.restartOne(service); err != nil { @@ -84,7 +84,7 @@ func (s *restartController) restartOne(app v1.AppService) error { if err != nil { logrus.Errorf("Application model init create failure:%s", err.Error()) app.Logger.Error(util.Translation("(restart)Application model init create failure"), event.GetCallbackLoggerOption()) - return fmt.Errorf("Application model init create failure,%s", err.Error()) + return fmt.Errorf("application model init create failure,%s", err.Error()) } newAppService.Logger = app.Logger //regist new app service diff --git a/worker/appm/controller/start.go b/worker/appm/controller/start.go index 24fbfe1e5..b45c2ad65 100644 --- a/worker/appm/controller/start.go +++ b/worker/appm/controller/start.go @@ -51,7 +51,6 @@ func (s *startController) Begin() { } var sl sequencelist sl = append(sl, list) // should be delete when using foundsequence - //foundsequence(sourceIDs, &sl) for _, slist := range sl { var wait sync.WaitGroup for _, service := range slist { diff --git a/worker/appm/controller/upgrade.go b/worker/appm/controller/upgrade.go index 0d6e06af9..63b2cad70 100644 --- a/worker/appm/controller/upgrade.go +++ b/worker/appm/controller/upgrade.go @@ -41,13 +41,14 @@ type upgradeController struct { controllerID string appService []v1.AppService manager *Manager + ctx context.Context } func (s *upgradeController) Begin() { var wait sync.WaitGroup for _, service := range s.appService { + wait.Add(1) go func(service v1.AppService) { - wait.Add(1) defer wait.Done() service.Logger.Info("App runtime begin upgrade app service "+service.ServiceAlias, event.GetLoggerOption("starting")) if err := s.upgradeOne(service); err != nil { @@ -79,7 +80,7 @@ func (s *upgradeController) upgradeConfigMap(newapp v1.AppService) { for _, new := range newConfigMaps { if nowConfig, ok := nowConfigMapMaps[new.Name]; ok { new.UID = nowConfig.UID - newc, err := s.manager.client.CoreV1().ConfigMaps(nowApp.TenantID).Update(context.Background(), new, metav1.UpdateOptions{}) + newc, err := s.manager.client.CoreV1().ConfigMaps(nowApp.TenantID).Update(s.ctx, new, metav1.UpdateOptions{}) if err != nil { logrus.Errorf("update config map failure %s", err.Error()) } @@ -87,7 +88,7 @@ func (s *upgradeController) upgradeConfigMap(newapp v1.AppService) { nowConfigMapMaps[new.Name] = nil logrus.Debugf("update configmap %s for service %s", new.Name, newapp.ServiceID) } else { - newc, err := s.manager.client.CoreV1().ConfigMaps(nowApp.TenantID).Create(context.Background(), new, metav1.CreateOptions{}) + newc, err := s.manager.client.CoreV1().ConfigMaps(nowApp.TenantID).Create(s.ctx, new, metav1.CreateOptions{}) if err != nil { logrus.Errorf("update config map failure %s", err.Error()) } @@ -97,7 +98,7 @@ func (s *upgradeController) upgradeConfigMap(newapp v1.AppService) { } for name, handle := range nowConfigMapMaps { if handle != nil { - if err := s.manager.client.CoreV1().ConfigMaps(nowApp.TenantID).Delete(context.Background(), name, metav1.DeleteOptions{}); err != nil { + if err := s.manager.client.CoreV1().ConfigMaps(nowApp.TenantID).Delete(s.ctx, name, metav1.DeleteOptions{}); err != nil { logrus.Errorf("delete config map failure %s", err.Error()) } logrus.Debugf("delete configmap %s for service %s", name, newapp.ServiceID) @@ -119,7 +120,7 @@ func (s *upgradeController) upgradeService(newapp v1.AppService) { nowConfig.Spec.Ports = new.Spec.Ports nowConfig.Spec.Type = new.Spec.Type nowConfig.Labels = new.Labels - newc, err := s.manager.client.CoreV1().Services(nowApp.TenantID).Update(context.Background(), nowConfig, metav1.UpdateOptions{}) + newc, err := s.manager.client.CoreV1().Services(nowApp.TenantID).Update(s.ctx, nowConfig, metav1.UpdateOptions{}) if err != nil { logrus.Errorf("update service failure %s", err.Error()) } @@ -137,59 +138,36 @@ func (s *upgradeController) upgradeService(newapp v1.AppService) { } for name, handle := range nowServiceMaps { if handle != nil { - if err := s.manager.client.CoreV1().Services(nowApp.TenantID).Delete(context.Background(), name, metav1.DeleteOptions{}); err != nil { + if err := s.manager.client.CoreV1().Services(nowApp.TenantID).Delete(s.ctx, name, metav1.DeleteOptions{}); err != nil { logrus.Errorf("delete service failure %s", err.Error()) } logrus.Debugf("delete service %s for service %s", name, newapp.ServiceID) } } } -func (s *upgradeController) upgradeClaim(newapp v1.AppService) { - nowApp := s.manager.store.GetAppService(newapp.ServiceID) - nowClaims := nowApp.GetClaims() - newClaims := newapp.GetClaims() - var nowClaimMaps = make(map[string]*corev1.PersistentVolumeClaim, len(nowClaims)) - for i, now := range nowClaims { - nowClaimMaps[now.Name] = nowClaims[i] - } - for _, n := range newClaims { - if o, ok := nowClaimMaps[n.Name]; ok { - n.UID = o.UID - n.ResourceVersion = o.ResourceVersion - claim, err := s.manager.client.CoreV1().PersistentVolumeClaims(n.Namespace).Update(context.Background(), n, metav1.UpdateOptions{}) - if err != nil { - logrus.Errorf("update claim[%s] error: %s", n.GetName(), err.Error()) - continue - } - nowApp.SetClaim(claim) - delete(nowClaimMaps, o.Name) - logrus.Debugf("ServiceID: %s; successfully update claim: %s", nowApp.ServiceID, n.Name) - } else { - claim, err := s.manager.client.CoreV1().PersistentVolumeClaims(n.Namespace).Create(context.Background(), n, metav1.CreateOptions{}) - if err != nil { - logrus.Errorf("error create claim: %+v: err: %v", claim.GetName(), err) - continue - } - logrus.Debugf("ServiceID: %s; successfully create claim: %s", nowApp.ServiceID, claim.Name) - nowApp.SetClaim(claim) - } - } -} func (s *upgradeController) upgradeOne(app v1.AppService) error { //first: check and create namespace - _, err := s.manager.client.CoreV1().Namespaces().Get(context.Background(), app.TenantID, metav1.GetOptions{}) + _, err := s.manager.client.CoreV1().Namespaces().Get(s.ctx, app.TenantID, metav1.GetOptions{}) if err != nil { if errors.IsNotFound(err) { - _, err = s.manager.client.CoreV1().Namespaces().Create(context.Background(), app.GetTenant(), metav1.CreateOptions{}) + _, err = s.manager.client.CoreV1().Namespaces().Create(s.ctx, app.GetTenant(), metav1.CreateOptions{}) } if err != nil { return fmt.Errorf("create or check namespace failure %s", err.Error()) } } + // for custom component + if len(app.GetManifests()) > 0 { + for _, manifest := range app.GetManifests() { + if err := s.manager.apply.Apply(s.ctx, manifest); err != nil { + return fmt.Errorf("apply custom component manifest %s/%s failure %s", manifest.GetKind(), manifest.GetName(), err.Error()) + } + } + } s.upgradeConfigMap(app) if deployment := app.GetDeployment(); deployment != nil { - _, err = s.manager.client.AppsV1().Deployments(deployment.Namespace).Patch(context.Background(), deployment.Name, types.MergePatchType, app.UpgradePatch["deployment"], metav1.PatchOptions{}) + _, err = s.manager.client.AppsV1().Deployments(deployment.Namespace).Patch(s.ctx, deployment.Name, types.MergePatchType, app.UpgradePatch["deployment"], metav1.PatchOptions{}) if err != nil { app.Logger.Error(fmt.Sprintf("upgrade deployment %s failure %s", app.ServiceAlias, err.Error()), event.GetLoggerOption("failure")) return fmt.Errorf("upgrade deployment %s failure %s", app.ServiceAlias, err.Error()) @@ -199,14 +177,14 @@ func (s *upgradeController) upgradeOne(app v1.AppService) error { // create claims for _, claim := range app.GetClaimsManually() { logrus.Debugf("create claim: %s", claim.Name) - _, err := s.manager.client.CoreV1().PersistentVolumeClaims(app.TenantID).Create(context.Background(), claim, metav1.CreateOptions{}) + _, err := s.manager.client.CoreV1().PersistentVolumeClaims(app.TenantID).Create(s.ctx, claim, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { return fmt.Errorf("create claims: %v", err) } } if statefulset := app.GetStatefulSet(); statefulset != nil { - _, err = s.manager.client.AppsV1().StatefulSets(statefulset.Namespace).Patch(context.Background(), statefulset.Name, types.MergePatchType, app.UpgradePatch["statefulset"], metav1.PatchOptions{}) + _, err = s.manager.client.AppsV1().StatefulSets(statefulset.Namespace).Patch(s.ctx, statefulset.Name, types.MergePatchType, app.UpgradePatch["statefulset"], metav1.PatchOptions{}) if err != nil { logrus.Errorf("patch statefulset error : %s", err.Error()) app.Logger.Error(fmt.Sprintf("upgrade statefulset %s failure %s", app.ServiceAlias, err.Error()), event.GetLoggerOption("failure")) diff --git a/worker/appm/store/storeage_class.go b/worker/appm/store/storeage_class.go index cd2e49bd0..74fd5a902 100644 --- a/worker/appm/store/storeage_class.go +++ b/worker/appm/store/storeage_class.go @@ -40,14 +40,27 @@ func (a *appRuntimeStore) initStorageclass() error { } logrus.Info("create storageclass %s", storageclass.Name) } else { - if old.VolumeBindingMode != storageclass.VolumeBindingMode || old.ReclaimPolicy != storageclass.ReclaimPolicy { + update := false + if old.VolumeBindingMode == nil { + update = true + } + if !update && old.ReclaimPolicy == nil { + update = true + } + if !update && string(*old.VolumeBindingMode) != string(*storageclass.VolumeBindingMode) { + update = true + } + if !update && string(*old.ReclaimPolicy) != string(*storageclass.ReclaimPolicy) { + update = true + } + if update { err := a.conf.KubeClient.StorageV1().StorageClasses().Delete(context.Background(), storageclass.Name, metav1.DeleteOptions{}) if err == nil { _, err := a.conf.KubeClient.StorageV1().StorageClasses().Create(context.Background(), storageclass, metav1.CreateOptions{}) if err != nil { logrus.Errorf("recreate strageclass %s failure %s", storageclass.Name, err.Error()) } - logrus.Info("update storageclass %s success", storageclass.Name) + logrus.Infof("update storageclass %s success", storageclass.Name) } else { logrus.Errorf("recreate strageclass %s failure %s", err.Error()) } From 75311600f1ca097514e69cc3383fd0c0a979d414 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Wed, 30 Jun 2021 20:47:39 +0800 Subject: [PATCH 52/65] return ports, not tcpPorts --- api/model/app.go | 12 +- db/model/application.go | 2 +- worker/server/pb/app_runtime_server.pb.go | 394 ++++++++++++---------- worker/server/pb/app_runtime_server.proto | 7 +- worker/server/server.go | 7 +- 5 files changed, 241 insertions(+), 181 deletions(-) diff --git a/api/model/app.go b/api/model/app.go index 15cb8a6cd..b24fea15e 100644 --- a/api/model/app.go +++ b/api/model/app.go @@ -1,5 +1,7 @@ package model +import "github.com/goodrain/rainbond/worker/server/pb" + // AppPort - type AppPort struct { ServiceID string `json:"service_id" validate:"required"` @@ -30,11 +32,11 @@ type AppStatusCondition struct { // AppService - type AppService struct { - ServiceName string `json:"service_name"` - Address string `json:"address"` - Ports []int32 `json:"tcp_ports"` - OldPods []*AppPod `json:"oldPods"` - Pods []*AppPod `json:"pods"` + ServiceName string `json:"service_name"` + Address string `json:"address"` + Ports []*pb.AppService_Port `json:"ports"` + OldPods []*AppPod `json:"oldPods"` + Pods []*AppPod `json:"pods"` } // ByServiceName implements sort.Interface for []*AppService based on diff --git a/db/model/application.go b/db/model/application.go index 59cc558a1..2af234dcf 100644 --- a/db/model/application.go +++ b/db/model/application.go @@ -25,7 +25,7 @@ type Application struct { TenantID string `gorm:"column:tenant_id" json:"tenant_id"` AppName string `gorm:"column:app_name" json:"app_name"` AppID string `gorm:"column:app_id" json:"app_id"` - AppType string `gorm:"column:app_type;default:rainbond" json:"app_type"` + AppType string `gorm:"column:app_type;default:'rainbond'" json:"app_type"` AppStoreName string `gorm:"column:app_store_name" json:"app_store_name"` AppStoreURL string `gorm:"column:app_store_url" json:"app_store_url"` AppTemplateName string `gorm:"column:app_template_name" json:"app_template_name"` diff --git a/worker/server/pb/app_runtime_server.pb.go b/worker/server/pb/app_runtime_server.pb.go index a288e3c63..436c3ec35 100644 --- a/worker/server/pb/app_runtime_server.pb.go +++ b/worker/server/pb/app_runtime_server.pb.go @@ -2138,14 +2138,14 @@ func (m *AppStatusCondition) GetMessage() string { } type AppService struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - Ports []int32 `protobuf:"varint,3,rep,packed,name=ports,proto3" json:"ports,omitempty"` - Pods []*AppService_Pod `protobuf:"bytes,4,rep,name=pods,proto3" json:"pods,omitempty"` - OldPods []*AppService_Pod `protobuf:"bytes,5,rep,name=oldPods,proto3" json:"oldPods,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Ports []*AppService_Port `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"` + Pods []*AppService_Pod `protobuf:"bytes,4,rep,name=pods,proto3" json:"pods,omitempty"` + OldPods []*AppService_Pod `protobuf:"bytes,5,rep,name=oldPods,proto3" json:"oldPods,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AppService) Reset() { *m = AppService{} } @@ -2187,7 +2187,7 @@ func (m *AppService) GetAddress() string { return "" } -func (m *AppService) GetPorts() []int32 { +func (m *AppService) GetPorts() []*AppService_Port { if m != nil { return m.Ports } @@ -2255,6 +2255,53 @@ func (m *AppService_Pod) GetStatus() string { return "" } +type AppService_Port struct { + Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` + Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppService_Port) Reset() { *m = AppService_Port{} } +func (m *AppService_Port) String() string { return proto.CompactTextString(m) } +func (*AppService_Port) ProtoMessage() {} +func (*AppService_Port) Descriptor() ([]byte, []int) { + return fileDescriptor_f94cf1a886c479d6, []int{34, 1} +} + +func (m *AppService_Port) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppService_Port.Unmarshal(m, b) +} +func (m *AppService_Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppService_Port.Marshal(b, m, deterministic) +} +func (m *AppService_Port) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppService_Port.Merge(m, src) +} +func (m *AppService_Port) XXX_Size() int { + return xxx_messageInfo_AppService_Port.Size(m) +} +func (m *AppService_Port) XXX_DiscardUnknown() { + xxx_messageInfo_AppService_Port.DiscardUnknown(m) +} + +var xxx_messageInfo_AppService_Port proto.InternalMessageInfo + +func (m *AppService_Port) GetPort() int32 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *AppService_Port) GetProtocol() string { + if m != nil { + return m.Protocol + } + return "" +} + type AppServices struct { Services []*AppService `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -2466,6 +2513,7 @@ func init() { proto.RegisterType((*AppStatusCondition)(nil), "pb.AppStatusCondition") proto.RegisterType((*AppService)(nil), "pb.AppService") proto.RegisterType((*AppService_Pod)(nil), "pb.AppService.Pod") + proto.RegisterType((*AppService_Port)(nil), "pb.AppService.Port") proto.RegisterType((*AppServices)(nil), "pb.AppServices") proto.RegisterType((*HelmAppReleases)(nil), "pb.HelmAppReleases") proto.RegisterType((*HelmAppRelease)(nil), "pb.HelmAppRelease") @@ -2474,169 +2522,171 @@ func init() { func init() { proto.RegisterFile("app_runtime_server.proto", fileDescriptor_f94cf1a886c479d6) } var fileDescriptor_f94cf1a886c479d6 = []byte{ - // 2584 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x39, 0x4b, 0x6f, 0x1b, 0xc9, - 0xd1, 0x22, 0x29, 0xbe, 0x8a, 0x12, 0x45, 0xb5, 0x1e, 0xe6, 0x72, 0xd7, 0x8f, 0x9d, 0xcf, 0x36, - 0x0c, 0xdb, 0x9f, 0xd6, 0x56, 0xd6, 0xf1, 0x33, 0x1b, 0x50, 0x24, 0x57, 0x66, 0x22, 0x51, 0xc4, - 0x90, 0xda, 0x60, 0x81, 0x00, 0xc4, 0x88, 0xd3, 0x2b, 0x4f, 0x3c, 0x8f, 0xf6, 0x3c, 0xb4, 0xe1, - 0x31, 0xb9, 0xe6, 0x98, 0x9f, 0x90, 0x43, 0x0e, 0xc9, 0x31, 0x08, 0x72, 0xda, 0xbf, 0x90, 0x73, - 0x4e, 0xf9, 0x09, 0x7b, 0xc9, 0x0f, 0x08, 0xaa, 0xbb, 0xe7, 0xc9, 0x91, 0x15, 0x07, 0x09, 0x72, - 0xe2, 0x54, 0x75, 0x55, 0x57, 0x75, 0x75, 0xbd, 0xba, 0x08, 0x6d, 0x8d, 0xb1, 0x99, 0x1b, 0xd8, - 0xbe, 0x61, 0xd1, 0x99, 0x47, 0xdd, 0x0b, 0xea, 0xee, 0x31, 0xd7, 0xf1, 0x1d, 0x52, 0x64, 0x67, - 0x4a, 0x15, 0xca, 0x03, 0x8b, 0xf9, 0x0b, 0xe5, 0x26, 0x54, 0xba, 0x8c, 0xa9, 0xf4, 0x1d, 0xd9, - 0x81, 0x0a, 0xb2, 0x18, 0x7a, 0xbb, 0x70, 0xab, 0x70, 0xaf, 0xae, 0x96, 0x35, 0xc6, 0x86, 0xba, - 0x72, 0x07, 0xd6, 0xba, 0x8c, 0x4d, 0x7c, 0xcd, 0x0f, 0xbc, 0xf7, 0x90, 0x7d, 0x06, 0xcd, 0x09, - 0x75, 0x2f, 0x8c, 0x39, 0x55, 0xe9, 0xbb, 0x80, 0x7a, 0x3e, 0xb9, 0x0e, 0xe0, 0x09, 0x4c, 0x4c, - 0x5c, 0x97, 0x98, 0xa1, 0xae, 0xec, 0xc3, 0x86, 0x64, 0xf0, 0x42, 0x8e, 0x9b, 0xd0, 0x88, 0x39, - 0x3c, 0xc9, 0x02, 0x11, 0x8b, 0xa7, 0x3c, 0x84, 0xf5, 0x29, 0xb5, 0x35, 0xdb, 0x0f, 0x39, 0x3e, - 0x86, 0xba, 0xcf, 0x11, 0xb1, 0x88, 0x9a, 0x40, 0x0c, 0x75, 0xe5, 0x57, 0x05, 0x58, 0x17, 0x7a, - 0x1f, 0x53, 0xcf, 0xd3, 0xce, 0x29, 0x79, 0x02, 0x15, 0x8f, 0x23, 0xda, 0x85, 0x5b, 0xa5, 0x7b, - 0x8d, 0xfd, 0xeb, 0x7b, 0xec, 0x6c, 0x2f, 0x45, 0x22, 0xa1, 0x81, 0xed, 0xbb, 0x0b, 0x55, 0x12, - 0x77, 0x9e, 0x43, 0x23, 0x81, 0x26, 0x2d, 0x28, 0xbd, 0xa5, 0x0b, 0x29, 0x0e, 0x3f, 0xc9, 0x36, - 0x94, 0x2f, 0x34, 0x33, 0xa0, 0xed, 0xa2, 0x30, 0x09, 0x07, 0x5e, 0x14, 0x9f, 0x15, 0x94, 0x05, - 0x34, 0xfa, 0x86, 0xf7, 0x36, 0x54, 0xe0, 0x11, 0x94, 0x75, 0xc3, 0x7b, 0x1b, 0xca, 0xef, 0xa0, - 0xfc, 0xc4, 0x3a, 0xff, 0x96, 0xc2, 0x05, 0x61, 0xe7, 0x19, 0x40, 0x8c, 0xbc, 0x4a, 0x74, 0x21, - 0x29, 0xda, 0x82, 0x4d, 0x69, 0xe0, 0x2e, 0x63, 0x63, 0x47, 0x3f, 0x32, 0x3c, 0x9f, 0x3c, 0x80, - 0xaa, 0x63, 0xea, 0x63, 0x47, 0x0f, 0x55, 0xd8, 0xe4, 0x26, 0x48, 0xd2, 0xa9, 0x21, 0x05, 0x12, - 0xdb, 0xf4, 0x5b, 0x4e, 0x5c, 0xbc, 0x94, 0x58, 0x52, 0x28, 0xdf, 0x15, 0x60, 0xf7, 0x38, 0x30, - 0x7d, 0x63, 0x59, 0xe8, 0x71, 0x74, 0xaf, 0x09, 0xc1, 0x0f, 0x70, 0xaf, 0x7c, 0x86, 0x50, 0x04, - 0x52, 0x0b, 0x63, 0x24, 0xf9, 0x3b, 0xa7, 0xd0, 0xca, 0x12, 0xe4, 0x18, 0xe6, 0x41, 0xd2, 0x30, - 0x8d, 0xfd, 0x9d, 0x25, 0xd5, 0x51, 0x52, 0xd2, 0x5e, 0xbf, 0x29, 0x40, 0xab, 0xe7, 0x58, 0xcc, - 0xb1, 0xa9, 0xed, 0x8f, 0x1d, 0x7d, 0x14, 0x58, 0x1e, 0x79, 0x09, 0x55, 0x26, 0x3e, 0xa5, 0xda, - 0x9f, 0xe2, 0x3e, 0x59, 0xb2, 0x3d, 0xf9, 0x2b, 0x94, 0x0d, 0x39, 0x3a, 0x2f, 0x60, 0x2d, 0xb9, - 0x70, 0xd5, 0xed, 0x95, 0x93, 0xda, 0x7c, 0x5f, 0x84, 0xf5, 0x94, 0xba, 0x57, 0xc4, 0x13, 0x86, - 0x82, 0x4e, 0x99, 0xe9, 0x2c, 0x70, 0x55, 0xf8, 0x61, 0x4d, 0x20, 0x86, 0x3a, 0x46, 0x96, 0x5c, - 0xf4, 0x17, 0x8c, 0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79, 0x8e, - 0x2d, 0x19, 0x25, 0x84, 0x42, 0xb4, 0xf3, 0xb0, 0x91, 0xc3, 0x4f, 0xd2, 0x86, 0xaa, 0x25, 0x5e, - 0x11, 0xd2, 0x4c, 0x21, 0xa8, 0x7c, 0x57, 0xe4, 0xd5, 0x45, 0x36, 0x66, 0x77, 0x13, 0x52, 0x9a, - 0x22, 0x98, 0xa2, 0xc5, 0x3d, 0xec, 0x05, 0xaf, 0x90, 0x9c, 0x90, 0x53, 0x4a, 0xc9, 0x41, 0x0e, - 0x4d, 0xc7, 0x52, 0x24, 0x7b, 0x0a, 0x09, 0xe1, 0xf1, 0x71, 0xc7, 0x99, 0xe7, 0xbb, 0xa1, 0x6a, - 0x08, 0x4f, 0x7c, 0x57, 0xf9, 0x5d, 0x01, 0x56, 0x79, 0xff, 0xd9, 0x80, 0xea, 0x78, 0x30, 0xea, - 0x0f, 0x47, 0x87, 0xad, 0x15, 0x04, 0xd4, 0xd3, 0xd1, 0x08, 0x81, 0x02, 0x59, 0x87, 0xfa, 0xe4, - 0xb4, 0xd7, 0x1b, 0x0c, 0xfa, 0x83, 0x7e, 0xab, 0x48, 0x00, 0x2a, 0x5f, 0x76, 0x87, 0x47, 0x83, - 0x7e, 0xab, 0x84, 0x74, 0xa7, 0xa3, 0x9f, 0x8e, 0x4e, 0x7e, 0x36, 0x6a, 0xad, 0x92, 0x26, 0xc0, - 0x74, 0x70, 0x3c, 0x1c, 0x75, 0xa7, 0xc8, 0x57, 0x26, 0x6b, 0x50, 0xeb, 0x1e, 0x8c, 0x4e, 0xd4, - 0xe3, 0xee, 0x51, 0xab, 0x82, 0xab, 0xc3, 0xd1, 0x70, 0x3a, 0x14, 0xab, 0x55, 0x84, 0x27, 0xbd, - 0xd7, 0x83, 0xfe, 0xe9, 0x11, 0xc2, 0x35, 0xa4, 0x1e, 0x9d, 0x4c, 0xd5, 0x41, 0xb7, 0xff, 0x75, - 0xab, 0x8e, 0x32, 0x4f, 0x47, 0xaf, 0x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0x89, 0x8b, 0x20, 0xd9, - 0xbe, 0x92, 0xa2, 0xe9, 0x7e, 0xc2, 0xef, 0xaf, 0xcb, 0x58, 0x2a, 0x66, 0xf3, 0xec, 0x7f, 0xe3, - 0xfd, 0xbd, 0x85, 0xb2, 0x42, 0x1e, 0xc1, 0x06, 0x5e, 0x68, 0x32, 0x8f, 0x82, 0x8c, 0x34, 0xd4, - 0x78, 0x23, 0x9d, 0x41, 0x51, 0xfa, 0x53, 0x20, 0xc8, 0x91, 0x49, 0x77, 0x49, 0xa6, 0xad, 0xe5, - 0x8c, 0xe9, 0x29, 0x2b, 0x67, 0x15, 0xfe, 0x27, 0xea, 0x0f, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, - 0x1a, 0x6e, 0xbb, 0xdc, 0x60, 0x1d, 0x00, 0x00, + // 2612 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x39, 0xcd, 0x72, 0x1b, 0xc7, + 0xd1, 0xc4, 0x3f, 0xd0, 0x20, 0x41, 0x70, 0xf8, 0x23, 0x18, 0xb6, 0x25, 0x79, 0x3f, 0x49, 0xa5, + 0x4f, 0x52, 0x68, 0x89, 0xb1, 0xac, 0xdf, 0x38, 0x05, 0x02, 0x30, 0x85, 0x84, 0x04, 0x51, 0x4b, + 0xd0, 0x29, 0x57, 0xa5, 0x0a, 0xb5, 0xc4, 0x8e, 0xa9, 0x8d, 0xf6, 0x67, 0xb4, 0xbb, 0xa0, 0x83, + 0x63, 0x72, 0xcd, 0x31, 0x8f, 0x90, 0xaa, 0xe4, 0x90, 0x1c, 0x53, 0xa9, 0x9c, 0xfc, 0x0a, 0x79, + 0x84, 0x3c, 0x82, 0x2f, 0x79, 0x80, 0x54, 0xcf, 0xcc, 0xee, 0xce, 0x02, 0x4b, 0x31, 0x4a, 0x25, + 0x95, 0x13, 0xb6, 0x7b, 0xba, 0xa7, 0x7b, 0x7a, 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 0xe2, 0x79, 0xa5, 0xd2, 0x3a, 0xe4, 0x52, 0xad, 0x43, 0x13, 0x0a, + 0x98, 0xf3, 0x44, 0x1f, 0x8f, 0x9f, 0x48, 0x29, 0x93, 0xa5, 0x68, 0xdd, 0x25, 0xc4, 0x77, 0xa0, + 0x61, 0x77, 0x74, 0xca, 0xfd, 0xba, 0xaa, 0x4b, 0x08, 0x9f, 0xe9, 0x01, 0x95, 0xa9, 0x54, 0xfa, + 0x70, 0x82, 0x40, 0xd7, 0x60, 0xaf, 0x8d, 0x20, 0x72, 0x55, 0x01, 0x20, 0x8f, 0x77, 0x41, 0x7d, + 0xdf, 0x32, 0xa5, 0x57, 0xd6, 0xf4, 0x04, 0xa1, 0x66, 0xb2, 0x6a, 0x3a, 0x93, 0x7d, 0xce, 0xd3, + 0x91, 0x69, 0x85, 0xdc, 0x53, 0x6a, 0x49, 0xaa, 0x88, 0x0f, 0xda, 0x8d, 0x96, 0x75, 0x85, 0x52, + 0x1b, 0x43, 0x59, 0xda, 0xa1, 0x02, 0x85, 0xe1, 0xe0, 0x70, 0xb1, 0xb4, 0x02, 0x94, 0xbb, 0x87, + 0xc7, 0x27, 0xbc, 0xae, 0xaa, 0xe5, 0xb2, 0x80, 0xd0, 0xc9, 0xb8, 0xa3, 0xf3, 0x62, 0x59, 0x14, + 0xd0, 0xf1, 0x68, 0xc4, 0x0b, 0xab, 0xe6, 0x03, 0x59, 0x96, 0x7b, 0x59, 0xf3, 0x22, 0xad, 0x9f, + 0x97, 0xb6, 0x8b, 0x6f, 0xe5, 0xb2, 0x92, 0x18, 0xb5, 0x16, 0xc5, 0x74, 0x0b, 0xf3, 0xfb, 0x3c, + 0x00, 0x0a, 0x15, 0x77, 0x9f, 0x99, 0xf2, 0x5a, 0x50, 0x31, 0x4c, 0x13, 0x83, 0x21, 0xea, 0xb1, + 0x24, 0x48, 0xfe, 0x1f, 0x4a, 0xd8, 0x47, 0x46, 0x59, 0x6e, 0x33, 0xb2, 0x9c, 0x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, 0x96, 0xfd, 0xe8, 0xc4, 0x93, 0x77, 0x61, + 0x3b, 0x73, 0x72, 0x41, 0xf8, 0x8c, 0xf2, 0xd2, 0xa1, 0x46, 0x3b, 0x51, 0x53, 0x6c, 0x92, 0x39, + 0x79, 0x10, 0x9b, 0x5c, 0x3a, 0x94, 0x58, 0xda, 0x24, 0x73, 0x74, 0x40, 0xe4, 0xb4, 0xd4, 0xfe, + 0x57, 0x36, 0xf9, 0x8c, 0x3b, 0x70, 0xf2, 0x82, 0xe0, 0x5e, 0xb0, 0xf0, 0x5a, 0x6e, 0x47, 0xfd, + 0xbf, 0xc0, 0x70, 0x2e, 0xbc, 0xc7, 0x85, 0x36, 0x59, 0xb9, 0x08, 0xb2, 0xd8, 0xa4, 0x52, 0x34, + 0xdd, 0x4f, 0xf8, 0xfd, 0x75, 0x18, 0x4b, 0xc5, 0x6c, 0x96, 0xfd, 0xaf, 0xbf, 0xbb, 0x51, 0xd1, + 0x56, 0xc8, 0x43, 0x58, 0xc7, 0x0b, 0x55, 0xf3, 0x28, 0xc8, 0x48, 0x43, 0x8d, 0xd7, 0xd3, 0x19, + 0x14, 0xa5, 0x3f, 0x01, 0x82, 0x1c, 0x0b, 0xe9, 0x4e, 0x65, 0xda, 0x5c, 0xce, 0x98, 0x81, 0xb6, + 0x72, 0x56, 0xe6, 0x89, 0xfb, 0x87, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x65, 0xba, 0x0b, 0x0e, + 0xad, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/worker/server/pb/app_runtime_server.proto b/worker/server/pb/app_runtime_server.proto index 027ca87f5..f28ed32a8 100644 --- a/worker/server/pb/app_runtime_server.proto +++ b/worker/server/pb/app_runtime_server.proto @@ -283,9 +283,14 @@ message AppService { string status=2; } + message Port { + int32 port=1; + string protocol=2; + } + string name=1; string address=2; - repeated int32 ports=3; + repeated Port ports=3; repeated Pod pods=4; repeated Pod oldPods=5; } diff --git a/worker/server/server.go b/worker/server/server.go index 7fd5485cf..9641f8f3e 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -712,9 +712,12 @@ func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppService { var appServices []*pb.AppService for _, svc := range services { - var ports []int32 + var ports []*pb.AppService_Port for _, port := range svc.Spec.Ports { - ports = append(ports, port.Port) + ports = append(ports, &pb.AppService_Port{ + Port: port.Port, + Protocol: string(port.Protocol), + }) } selector := labels.NewSelector() for key, val := range svc.Spec.Selector { From 0ef6f25765536285587b917d54c62965c1f3aac4 Mon Sep 17 00:00:00 2001 From: yangk Date: Wed, 30 Jun 2021 20:54:11 +0800 Subject: [PATCH 53/65] sync component endpoints --- api/handler/application_handler.go | 6 ++++++ api/handler/service.go | 22 ++++++++++++++++++++++ api/handler/service_handler.go | 1 + api/model/component.go | 1 + api/model/model.go | 9 +++++++++ db/dao/dao.go | 2 ++ db/mysql/dao/3rd_party.go | 19 +++++++++++++++++++ go.mod | 1 + 8 files changed, 61 insertions(+) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index fc6fb0132..52afc854b 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -610,6 +610,9 @@ func (a *ApplicationAction) SyncComponents(app *dbmodel.Application, components if err := GetServiceManager().SyncComponentScaleRules(tx, components); err != nil { return err } + if err := GetServiceManager().SyncComponentEndpoints(tx, components); err != nil { + return err + } if len(deleteComponentIDs) != 0 { return a.deleteByComponentIDs(tx, app, deleteComponentIDs) } @@ -669,6 +672,9 @@ func (a *ApplicationAction) deleteByComponentIDs(tx *gorm.DB, app *dbmodel.Appli if err := db.GetManager().TenantServiceLabelDaoTransactions(tx).DeleteByComponentIDs(componentIDs); err != nil { return err } + if err := db.GetManager().ThirdPartySvcDiscoveryCfgDaoTransactions(tx).DeleteByComponentIDs(componentIDs); err != nil { + return err + } autoScaleRules, err := db.GetManager().TenantServceAutoscalerRulesDaoTransactions(tx).ListByComponentIDs(componentIDs) if err != nil { return err diff --git a/api/handler/service.go b/api/handler/service.go index f8080b435..d302235b1 100644 --- a/api/handler/service.go +++ b/api/handler/service.go @@ -2830,6 +2830,28 @@ func (s *ServiceAction) SyncComponentScaleRules(tx *gorm.DB, components []*api_m return db.GetManager().TenantServceAutoscalerRuleMetricsDaoTransactions(tx).CreateOrUpdateScaleRuleMetricsInBatch(autoScaleRuleMetrics) } +// SyncComponentEndpoints - +func (s *ServiceAction) SyncComponentEndpoints(tx *gorm.DB, components []*api_model.Component) error { + var ( + componentIDs []string + thirdPartySvcDiscoveryCfgs []*dbmodel.ThirdPartySvcDiscoveryCfg + ) + for _, component := range components { + if component.Endpoint == nil { + continue + } + componentIDs = append(componentIDs, component.ComponentBase.ComponentID) + if component.Endpoint.Kubernetes != nil { + thirdPartySvcDiscoveryCfgs = append(thirdPartySvcDiscoveryCfgs, component.Endpoint.DbModel(component.ComponentBase.ComponentID)) + } + } + + if err := db.GetManager().ThirdPartySvcDiscoveryCfgDaoTransactions(tx).DeleteByComponentIDs(componentIDs); err != nil { + return err + } + return db.GetManager().ThirdPartySvcDiscoveryCfgDaoTransactions(tx).CreateOrUpdate3rdSvcDiscoveryCfgInBatch(thirdPartySvcDiscoveryCfgs) +} + //TransStatus trans service status func TransStatus(eStatus string) string { switch eStatus { diff --git a/api/handler/service_handler.go b/api/handler/service_handler.go index 8b04d86a7..c5d6e3e1d 100644 --- a/api/handler/service_handler.go +++ b/api/handler/service_handler.go @@ -101,4 +101,5 @@ type ServiceHandler interface { SyncComponentLabels(tx *gorm.DB, components []*api_model.Component) error SyncComponentPlugins(tx *gorm.DB, app *dbmodel.Application, components []*api_model.Component) error SyncComponentScaleRules(tx *gorm.DB, components []*api_model.Component) error + SyncComponentEndpoints(tx *gorm.DB, components []*api_model.Component) error } diff --git a/api/model/component.go b/api/model/component.go index b15aaa9c1..d678a8f1e 100644 --- a/api/model/component.go +++ b/api/model/component.go @@ -251,6 +251,7 @@ type Component struct { ConfigFiles []ComponentConfigFile `json:"config_files"` VolumeRelations []VolumeRelation `json:"volume_relations"` Volumes []ComponentVolume `json:"volumes"` + Endpoint *Endpoints `json:"endpoint"` } // SyncComponentReq - diff --git a/api/model/model.go b/api/model/model.go index c2451a899..6aae5c566 100644 --- a/api/model/model.go +++ b/api/model/model.go @@ -366,6 +366,15 @@ type Endpoints struct { Kubernetes *EndpointKubernetes `json:"kubernetes" validate:"kubernetes"` } +func (e *Endpoints) DbModel(componentID string) *dbmodel.ThirdPartySvcDiscoveryCfg { + return &dbmodel.ThirdPartySvcDiscoveryCfg{ + ServiceID: componentID, + Type: string(dbmodel.DiscorveryTypeKubernetes), + Namespace: e.Kubernetes.Namespace, + ServiceName: e.Kubernetes.ServiceName, + } +} + type EndpointKubernetes struct { Namespace string `json:"namespace"` ServiceName string `json:"serviceName"` diff --git a/db/dao/dao.go b/db/dao/dao.go index a3ac1c771..9f515b2b5 100644 --- a/db/dao/dao.go +++ b/db/dao/dao.go @@ -552,6 +552,8 @@ type ThirdPartySvcDiscoveryCfgDao interface { Dao GetByServiceID(sid string) (*model.ThirdPartySvcDiscoveryCfg, error) DeleteByServiceID(sid string) error + DeleteByComponentIDs(componentIDs []string) error + CreateOrUpdate3rdSvcDiscoveryCfgInBatch(cfgs []*model.ThirdPartySvcDiscoveryCfg) error } // GwRuleConfigDao is the interface that wraps the required methods to execute diff --git a/db/mysql/dao/3rd_party.go b/db/mysql/dao/3rd_party.go index 0252a1ebb..539d8d834 100644 --- a/db/mysql/dao/3rd_party.go +++ b/db/mysql/dao/3rd_party.go @@ -20,6 +20,8 @@ package dao import ( "fmt" + gormbulkups "github.com/atcdot/gorm-bulk-upsert" + pkgerr "github.com/pkg/errors" "reflect" "strings" @@ -152,3 +154,20 @@ func (t *ThirdPartySvcDiscoveryCfgDaoImpl) GetByServiceID(sid string) (*model.Th func (t *ThirdPartySvcDiscoveryCfgDaoImpl) DeleteByServiceID(sid string) error { return t.DB.Where("service_id=?", sid).Delete(&model.ThirdPartySvcDiscoveryCfg{}).Error } + +// DeleteByComponentIDs delete discovery config based on componentIDs. +func (t *ThirdPartySvcDiscoveryCfgDaoImpl) DeleteByComponentIDs(componentIDs []string) error { + return t.DB.Where("service_id in (?)", componentIDs).Delete(&model.ThirdPartySvcDiscoveryCfg{}).Error +} + +// CreateOrUpdate3rdSvcDiscoveryCfgInBatch - +func (t *ThirdPartySvcDiscoveryCfgDaoImpl) CreateOrUpdate3rdSvcDiscoveryCfgInBatch(cfgs []*model.ThirdPartySvcDiscoveryCfg) error { + var objects []interface{} + for _, cfg := range cfgs { + objects = append(objects, *cfg) + } + if err := gormbulkups.BulkUpsert(t.DB, objects, 2000); err != nil { + return pkgerr.Wrap(err, "create or update third party svc discovery config in batch") + } + return nil +} diff --git a/go.mod b/go.mod index 462189638..8d3606317 100644 --- a/go.mod +++ b/go.mod @@ -116,6 +116,7 @@ require ( // Pinned to kubernetes-1.20.0 replace ( + github.com/atcdot/gorm-bulk-upsert => github.com/goodrain/gorm-bulk-upsert v1.0.1-0.20210608013724-7e7870d16357 github.com/coreos/etcd => github.com/coreos/etcd v3.2.31+incompatible github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d github.com/docker/docker => github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible From 14390592bac095e468f9d80a7e2f7062937bcda3 Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Wed, 30 Jun 2021 21:32:14 +0800 Subject: [PATCH 54/65] change upgrade --- grctl/cluster/cluster.go | 14 +- grctl/cluster/vergion.go | 431 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 433 insertions(+), 12 deletions(-) diff --git a/grctl/cluster/cluster.go b/grctl/cluster/cluster.go index d9b0c4e42..26a2975a1 100644 --- a/grctl/cluster/cluster.go +++ b/grctl/cluster/cluster.go @@ -26,6 +26,7 @@ import ( "github.com/docker/distribution/reference" "github.com/goodrain/rainbond-operator/api/v1alpha1" "github.com/goodrain/rainbond/grctl/clients" + "github.com/oam-dev/kubevela/pkg/utils/apply" "github.com/pkg/errors" "github.com/sirupsen/logrus" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" @@ -84,7 +85,7 @@ func (c *Cluster) createCrds() []string { errs = append(errs, err.Error()) } } - logrus.Info("crds created") + logrus.Info("crds applyed") return errs } @@ -93,18 +94,15 @@ func (c *Cluster) createCrd(crdStr string) error { if err := yaml.Unmarshal([]byte(crdStr), &crd); err != nil { return fmt.Errorf("unmarshal crd: %v", err) } - - if err := clients.RainbondKubeClient.Create(context.Background(), &crd); err != nil { - return fmt.Errorf("create crd: %v", err) + applyer := apply.NewAPIApplicator(clients.RainbondKubeClient) + if err := applyer.Apply(context.Background(), &crd); err != nil { + return fmt.Errorf("apply crd: %v", err) } - return nil } func (c *Cluster) getCrds() ([]string, error) { - key := c.rainbondCluster.Spec.InstallVersion + "-" + c.newVersion - logrus.Infof("key: %s", key) - version, ok := versions[key] + version, ok := versions[c.newVersion] if !ok { return nil, fmt.Errorf("unsupport new version %s", c.newVersion) } diff --git a/grctl/cluster/vergion.go b/grctl/cluster/vergion.go index e6fcc1c4b..67b60383c 100644 --- a/grctl/cluster/vergion.go +++ b/grctl/cluster/vergion.go @@ -1,9 +1,11 @@ package cluster var versions = map[string]Version{ - "v5.3.0-release-v5.3.1-release": { + "v5.3.1-release": { CRDs: []string{ + componentdefinitionsCRD531, helmappCRD531, + thirdcomponentCRD531, }, }, } @@ -12,17 +14,228 @@ type Version struct { CRDs []string } +var componentdefinitionsCRD531 = ` +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.3.0 + creationTimestamp: null + name: componentdefinitions.rainbond.io +spec: + additionalPrinterColumns: + - JSONPath: .spec.workload.definition.kind + name: WORKLOAD-KIND + type: string + - JSONPath: .metadata.annotations.definition\.oam\.dev/description + name: DESCRIPTION + type: string + group: rainbond.io + names: + categories: + - oam + kind: ComponentDefinition + listKind: ComponentDefinitionList + plural: componentdefinitions + shortNames: + - comp + singular: componentdefinition + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: ComponentDefinition is the Schema for the componentdefinitions + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ComponentDefinitionSpec defines the desired state of ComponentDefinition + properties: + childResourceKinds: + description: ChildResourceKinds are the list of GVK of the child resources + this workload generates + items: + description: A ChildResourceKind defines a child Kubernetes resource + kind with a selector + properties: + apiVersion: + description: APIVersion of the child resource + type: string + kind: + description: Kind of the child resource + type: string + selector: + additionalProperties: + type: string + description: Selector to select the child resources that the workload + wants to expose to traits + type: object + required: + - apiVersion + - kind + type: object + type: array + extension: + description: Extension is used for extension needs by OAM platform builders + type: object + x-kubernetes-preserve-unknown-fields: true + podSpecPath: + description: PodSpecPath indicates where/if this workload has K8s podSpec + field if one workload has podSpec, trait can do lot's of assumption + such as port, env, volume fields. + type: string + revisionLabel: + description: RevisionLabel indicates which label for underlying resources(e.g. + pods) of this workload can be used by trait to create resource selectors(e.g. + label selector for pods). + type: string + schematic: + description: Schematic defines the data format and template of the encapsulation + of the workload + properties: + cue: + description: CUE defines the encapsulation in CUE format + properties: + template: + description: Template defines the abstraction template data + of the capability, it will replace the old CUE template in + extension field. Template is a required field if CUE is defined + in Capability Definition. + type: string + required: + - template + type: object + type: object + status: + description: Status defines the custom health policy and status message + for workload + properties: + customStatus: + description: CustomStatus defines the custom status message that + could display to user + type: string + healthPolicy: + description: HealthPolicy defines the health check policy for the + abstraction + type: string + type: object + workload: + description: Workload is a workload type descriptor + properties: + definition: + description: Definition mutually exclusive to workload.type, a embedded + WorkloadDefinition + properties: + apiVersion: + type: string + kind: + type: string + required: + - apiVersion + - kind + type: object + type: + description: Type ref to a WorkloadDefinition via name + type: string + type: object + required: + - workload + type: object + status: + description: ComponentDefinitionStatus is the status of ComponentDefinition + properties: + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, False, + or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + configMapRef: + description: ConfigMapRef refer to a ConfigMap which contains OpenAPI + V3 JSON schema of Component parameters. + type: string + latestRevision: + description: LatestRevision of the component definition + properties: + name: + type: string + revision: + format: int64 + type: integer + revisionHash: + description: RevisionHash record the hash value of the spec of ApplicationRevision + object. + type: string + required: + - name + - revision + type: object + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +` + var helmappCRD531 = ` --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.5 + controller-gen.kubebuilder.io/version: v0.3.0 creationTimestamp: null - name: helmapps.rainbond.goodrain.io + name: helmapps.rainbond.io spec: - group: rainbond.goodrain.io + group: rainbond.io names: kind: HelmApp listKind: HelmAppList @@ -171,4 +384,214 @@ status: plural: "" conditions: [] storedVersions: [] + +` + +var thirdcomponentCRD531 = ` + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.3.0 + creationTimestamp: null + name: thirdcomponents.rainbond.io +spec: + group: rainbond.io + names: + kind: ThirdComponent + listKind: ThirdComponentList + plural: thirdcomponents + singular: thirdcomponent + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: HelmApp - + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + endpointSource: + description: endpoint source config + properties: + endpoints: + items: + properties: + address: + description: The address including the port number. + type: string + clientSecret: + description: Specify a private certificate when the protocol + is HTTPS + type: string + protocol: + description: 'Address protocols, including: HTTP, TCP, UDP, + HTTPS' + type: string + required: + - address + type: object + type: array + kubernetesService: + properties: + name: + type: string + namespace: + description: If not specified, the namespace is the namespace + of the current resource + type: string + required: + - name + type: object + type: object + ports: + description: component regist ports + items: + description: ComponentPort component port define + properties: + name: + type: string + openInner: + type: boolean + openOuter: + type: boolean + port: + type: integer + required: + - name + - openInner + - openOuter + - port + type: object + type: array + probe: + description: health check probe + properties: + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + httpHeaders: + description: Custom headers to set in the request. HTTP allows + repeated headers. + items: + description: HTTPHeader describes a custom header to be used + in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. + TCP hooks not yet supported TODO: implement a realistic TCP lifecycle + hook' + type: object + type: object + required: + - endpointSource + - ports + type: object + status: + properties: + endpoints: + items: + description: ThirdComponentEndpointStatus endpoint status + properties: + address: + description: The address including the port number. + type: string + reason: + description: Reason probe not passed reason + type: string + status: + description: Status endpoint status + type: string + targetRef: + description: Reference to object providing the endpoint. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + required: + - address + - status + type: object + type: array + phase: + type: string + reason: + type: string + required: + - endpoints + - phase + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] + + ` From 207d435e92115070e3530d48feb1c67ea9eadf6f Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 1 Jul 2021 13:35:25 +0800 Subject: [PATCH 55/65] helm app not found --- api/handler/application_handler.go | 2 +- worker/appm/store/store.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/handler/application_handler.go b/api/handler/application_handler.go index 7dec9c1cf..5281ba121 100644 --- a/api/handler/application_handler.go +++ b/api/handler/application_handler.go @@ -409,7 +409,7 @@ func (a *ApplicationAction) GetStatus(ctx context.Context, app *dbmodel.Applicat var conditions []*model.AppStatusCondition for _, cdt := range status.Conditions { conditions = append(conditions, &model.AppStatusCondition{ - Type: string(cdt.Type), + Type: cdt.Type, Status: cdt.Status, Reason: cdt.Reason, Message: cdt.Message, diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index f5dd01b6f..565008c81 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -1530,7 +1530,7 @@ func (a *appRuntimeStore) secretByKey(key types.NamespacedName) (*corev1.Secret, func (a *appRuntimeStore) GetHelmApp(namespace, name string) (*v1alpha1.HelmApp, error) { helmApp, err := a.listers.HelmApp.HelmApps(namespace).Get(name) - if err != nil && k8sErrors.IsNotFound(err) { + if err != nil && !k8sErrors.IsNotFound(err) { err = errors.Wrap(bcode.ErrApplicationNotFound, "get helm app") } return helmApp, err From d457f88eff03eb3ae9a520d1a308235224bdae1f Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 1 Jul 2021 16:17:46 +0800 Subject: [PATCH 56/65] delete third component --- api/controller/resources.go | 4 +- api/handler/handler.go | 2 +- api/handler/service.go | 68 ++++++++++++++++++++++++++-------- api/handler/service_handler.go | 2 +- api/handler/tenant.go | 4 +- api/handler/tenant_handler.go | 2 +- go.sum | 2 + 7 files changed, 62 insertions(+), 22 deletions(-) diff --git a/api/controller/resources.go b/api/controller/resources.go index 2ce08abbc..308482e78 100644 --- a/api/controller/resources.go +++ b/api/controller/resources.go @@ -551,7 +551,7 @@ func (t *TenantStruct) GetTenants(w http.ResponseWriter, r *http.Request) { func (t *TenantStruct) DeleteTenant(w http.ResponseWriter, r *http.Request) { tenantID := r.Context().Value(ctxutil.ContextKey("tenant_id")).(string) - if err := handler.GetTenantManager().DeleteTenant(tenantID); err != nil { + if err := handler.GetTenantManager().DeleteTenant(r.Context(), tenantID); err != nil { if err == handler.ErrTenantStillHasServices || err == handler.ErrTenantStillHasPlugins { httputil.ReturnError(r, w, 400, err.Error()) return @@ -1009,7 +1009,7 @@ func (t *TenantStruct) DeleteSingleServiceInfo(w http.ResponseWriter, r *http.Re handler.GetEtcdHandler().CleanAllServiceData(req.Keys) } - if err := handler.GetServiceManager().TransServieToDelete(tenantID, serviceID); err != nil { + if err := handler.GetServiceManager().TransServieToDelete(r.Context(), tenantID, serviceID); err != nil { if err == handler.ErrServiceNotClosed { httputil.ReturnError(r, w, 400, fmt.Sprintf("Service must be closed")) return diff --git a/api/handler/handler.go b/api/handler/handler.go index 4c0c95a97..e55216f47 100644 --- a/api/handler/handler.go +++ b/api/handler/handler.go @@ -60,7 +60,7 @@ func InitHandle(conf option.Config, return err } dbmanager := db.GetManager() - defaultServieHandler = CreateManager(conf, mqClient, etcdcli, statusCli, prometheusCli) + defaultServieHandler = CreateManager(conf, mqClient, etcdcli, statusCli, prometheusCli, rainbondClient) defaultPluginHandler = CreatePluginManager(mqClient) defaultAppHandler = CreateAppManager(mqClient) defaultTenantHandler = CreateTenManager(mqClient, statusCli, &conf, kubeClient, prometheusCli, k8sClient) diff --git a/api/handler/service.go b/api/handler/service.go index d302235b1..4b7894f8f 100644 --- a/api/handler/service.go +++ b/api/handler/service.go @@ -36,6 +36,7 @@ import ( "github.com/goodrain/rainbond/cmd/api/option" "github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/event" + "github.com/goodrain/rainbond/pkg/generated/clientset/versioned" "github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/discover/model" "github.com/goodrain/rainbond/worker/server" @@ -45,6 +46,8 @@ import ( "github.com/pquerna/ffjson/ffjson" "github.com/sirupsen/logrus" "github.com/twinj/uuid" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api_model "github.com/goodrain/rainbond/api/model" core_model "github.com/goodrain/rainbond/db/model" @@ -60,11 +63,12 @@ var ErrServiceNotClosed = errors.New("Service has not been closed") //ServiceAction service act type ServiceAction struct { - MQClient gclient.MQClient - EtcdCli *clientv3.Client - statusCli *client.AppRuntimeSyncClient - prometheusCli prometheus.Interface - conf option.Config + MQClient gclient.MQClient + EtcdCli *clientv3.Client + statusCli *client.AppRuntimeSyncClient + prometheusCli prometheus.Interface + conf option.Config + rainbondClient versioned.Interface } type dCfg struct { @@ -76,14 +80,19 @@ type dCfg struct { } //CreateManager create Manger -func CreateManager(conf option.Config, mqClient gclient.MQClient, - etcdCli *clientv3.Client, statusCli *client.AppRuntimeSyncClient, prometheusCli prometheus.Interface) *ServiceAction { +func CreateManager(conf option.Config, + mqClient gclient.MQClient, + etcdCli *clientv3.Client, + statusCli *client.AppRuntimeSyncClient, + prometheusCli prometheus.Interface, + rainbondClient versioned.Interface) *ServiceAction { return &ServiceAction{ - MQClient: mqClient, - EtcdCli: etcdCli, - statusCli: statusCli, - conf: conf, - prometheusCli: prometheusCli, + MQClient: mqClient, + EtcdCli: etcdCli, + statusCli: statusCli, + conf: conf, + prometheusCli: prometheusCli, + rainbondClient: rainbondClient, } } @@ -2152,7 +2161,7 @@ func (s *ServiceAction) GetPodContainerMemory(podNames []string) (map[string]map } //TransServieToDelete trans service info to delete table -func (s *ServiceAction) TransServieToDelete(tenantID, serviceID string) error { +func (s *ServiceAction) TransServieToDelete(ctx context.Context, tenantID, serviceID string) error { _, err := db.GetManager().TenantServiceDao().GetServiceByID(serviceID) if err != nil && gorm.ErrRecordNotFound == err { logrus.Infof("service[%s] of tenant[%s] do not exist, ignore it", serviceID, tenantID) @@ -2167,7 +2176,7 @@ func (s *ServiceAction) TransServieToDelete(tenantID, serviceID string) error { return fmt.Errorf("GC task body: %v", err) } - if err := s.delServiceMetadata(serviceID); err != nil { + if err := s.delServiceMetadata(ctx, serviceID); err != nil { return fmt.Errorf("delete service-related metadata: %v", err) } @@ -2245,17 +2254,46 @@ func (s *ServiceAction) deleteComponent(tx *gorm.DB, service *dbmodel.TenantServ } // delServiceMetadata deletes service-related metadata in the database. -func (s *ServiceAction) delServiceMetadata(serviceID string) error { +func (s *ServiceAction) delServiceMetadata(ctx context.Context, serviceID string) error { service, err := db.GetManager().TenantServiceDao().GetServiceByID(serviceID) if err != nil { return err } logrus.Infof("delete service %s %s", serviceID, service.ServiceAlias) return db.GetManager().DB().Transaction(func(tx *gorm.DB) error { + if err := s.deleteThirdComponent(ctx, service); err != nil { + return err + } return s.deleteComponent(tx, service) }) } +func (s *ServiceAction) deleteThirdComponent(ctx context.Context, component *dbmodel.TenantServices) error { + if component.Kind != "third_party" { + return nil + } + + thirdPartySvcDiscoveryCfg, err := db.GetManager().ThirdPartySvcDiscoveryCfgDao().GetByServiceID(component.ServiceID) + if err != nil { + return err + } + if thirdPartySvcDiscoveryCfg == nil { + return nil + } + if thirdPartySvcDiscoveryCfg.Type != string(dbmodel.DiscorveryTypeKubernetes) { + return nil + } + + newCtx, cancel := context.WithTimeout(ctx, 3*time.Second) + defer cancel() + + err = s.rainbondClient.RainbondV1alpha1().ThirdComponents(component.TenantID).Delete(newCtx, component.ServiceID, metav1.DeleteOptions{}) + if err != nil && !k8sErrors.IsNotFound(err) { + return err + } + return nil +} + // delLogFile deletes persistent data related to the service based on serviceID. func (s *ServiceAction) delLogFile(serviceID string, eventIDs []string) { // log generated during service running diff --git a/api/handler/service_handler.go b/api/handler/service_handler.go index c5d6e3e1d..01eb91012 100644 --- a/api/handler/service_handler.go +++ b/api/handler/service_handler.go @@ -69,7 +69,7 @@ type ServiceHandler interface { GetPods(serviceID string) (*K8sPodInfos, error) GetMultiServicePods(serviceIDs []string) (*K8sPodInfos, error) GetComponentPodNums(ctx context.Context, componentIDs []string) (map[string]int32, error) - TransServieToDelete(tenantID, serviceID string) error + TransServieToDelete(ctx context.Context, tenantID, serviceID string) error TenantServiceDeletePluginRelation(tenantID, serviceID, pluginID string) *util.APIHandleError GetTenantServicePluginRelation(serviceID string) ([]*dbmodel.TenantServicePluginRelation, *util.APIHandleError) SetTenantServicePluginRelation(tenantID, serviceID string, pss *api_model.PluginSetStruct) (*dbmodel.TenantServicePluginRelation, *util.APIHandleError) diff --git a/api/handler/tenant.go b/api/handler/tenant.go index 6aa6ecfe8..ba7341a09 100644 --- a/api/handler/tenant.go +++ b/api/handler/tenant.go @@ -153,7 +153,7 @@ func (t *TenantAction) UpdateTenant(tenant *dbmodel.Tenants) error { // DeleteTenant deletes tenant based on the given tenantID. // // tenant can only be deleted without service or plugin -func (t *TenantAction) DeleteTenant(tenantID string) error { +func (t *TenantAction) DeleteTenant(ctx context.Context, tenantID string) error { // check if there are still services services, err := db.GetManager().TenantServiceDao().ListServicesByTenantID(tenantID) if err != nil { @@ -161,7 +161,7 @@ func (t *TenantAction) DeleteTenant(tenantID string) error { } if len(services) > 0 { for _, service := range services { - GetServiceManager().TransServieToDelete(tenantID, service.ServiceID) + GetServiceManager().TransServieToDelete(ctx, tenantID, service.ServiceID) } } diff --git a/api/handler/tenant_handler.go b/api/handler/tenant_handler.go index 6c3918a5c..95c223736 100644 --- a/api/handler/tenant_handler.go +++ b/api/handler/tenant_handler.go @@ -47,7 +47,7 @@ type TenantHandler interface { IsClosedStatus(status string) bool BindTenantsResource(source []*dbmodel.Tenants) api_model.TenantList UpdateTenant(*dbmodel.Tenants) error - DeleteTenant(tenantID string) error + DeleteTenant(ctx context.Context, tenantID string) error GetClusterResource(ctx context.Context) *ClusterResourceStats CheckResourceName(ctx context.Context, namespace string, req *model.CheckResourceNameReq) (*model.CheckResourceNameResp, error) } diff --git a/go.sum b/go.sum index 94db0a4bc..8b0a1b55a 100644 --- a/go.sum +++ b/go.sum @@ -693,6 +693,8 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= +github.com/goodrain/gorm-bulk-upsert v1.0.1-0.20210608013724-7e7870d16357 h1:kdSSrpA5yNvgqbfpMlEr8bvQWiLc1Uz9g0vYf3JVT7s= +github.com/goodrain/gorm-bulk-upsert v1.0.1-0.20210608013724-7e7870d16357/go.mod h1:b7/GgeVNbf/SFw4FYIWslxNV5I10C9Mhf/++3jsDk3M= github.com/goodrain/rainbond-oam v0.0.0-20210206075623-511d0796af43 h1:xhUwEWQKk+maL6CmV5Y6kxKb+jA/RvN6SZcDbNm51FM= github.com/goodrain/rainbond-oam v0.0.0-20210206075623-511d0796af43/go.mod h1:/dRehR3e1pGexOaIDjA44AHBlVPbb7v+O7GWAVyo740= github.com/goodrain/rainbond-operator v1.3.1-0.20210401055914-f8fe4bf89a21 h1:iCPI96slvJv88iPc1NJW8zhpkiza0kwB0jtsuZIJLRQ= From c08b27a7290b28b2698fb4bb12f9122922e51bc9 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 1 Jul 2021 17:42:54 +0800 Subject: [PATCH 57/65] start/stop third components in batch --- api/handler/service_operation.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/api/handler/service_operation.go b/api/handler/service_operation.go index 2ff7d0bdb..4c85ab6ef 100644 --- a/api/handler/service_operation.go +++ b/api/handler/service_operation.go @@ -129,9 +129,6 @@ func (o *OperationHandler) Stop(batchOpReq model.ComponentOpReq) error { if err != nil { return err } - if dbmodel.ServiceKind(service.Kind) == dbmodel.ServiceKindThirdParty { - return nil - } body := batchOpReq.TaskBody(service) err = o.mqCli.SendBuilderTopic(gclient.TaskStruct{ TaskType: "stop", @@ -150,9 +147,6 @@ func (o *OperationHandler) Start(batchOpReq model.ComponentOpReq) error { if err != nil { return err } - if dbmodel.ServiceKind(service.Kind) == dbmodel.ServiceKindThirdParty { - return nil - } body := batchOpReq.TaskBody(service) err = o.mqCli.SendBuilderTopic(gclient.TaskStruct{ From dc70429ed1f42e39669d52ee2f904c5d3e47794f Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Thu, 1 Jul 2021 20:35:52 +0800 Subject: [PATCH 58/65] fix service port bug --- config/crd/rainbond.io_thirdcomponents.yaml | 4 +++ go.sum | 2 -- grctl/cluster/vergion.go | 6 ++-- pkg/apis/rainbond/v1alpha1/third_component.go | 2 ++ worker/appm/conversion/conversion.go | 3 ++ worker/appm/types/v1/v1.go | 7 +++++ .../controller/thirdcomponent/controller.go | 30 +++++++++++++++---- .../controller/thirdcomponent/discover.go | 22 ++++++++++---- .../thirdcomponent/discover_pool.go | 12 ++++---- 9 files changed, 67 insertions(+), 21 deletions(-) diff --git a/config/crd/rainbond.io_thirdcomponents.yaml b/config/crd/rainbond.io_thirdcomponents.yaml index 0eb2324e7..ad28f100f 100644 --- a/config/crd/rainbond.io_thirdcomponents.yaml +++ b/config/crd/rainbond.io_thirdcomponents.yaml @@ -138,6 +138,10 @@ spec: reason: description: Reason probe not passed reason type: string + servicePort: + description: ServicePort if address build from kubernetes endpoint, + The corresponding service port + type: integer status: description: Status endpoint status type: string diff --git a/go.sum b/go.sum index 8b0a1b55a..832441b3d 100644 --- a/go.sum +++ b/go.sum @@ -190,8 +190,6 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l 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/atcdot/gorm-bulk-upsert v1.0.0 h1:K+lS2jHHwXZjZSdiPjBiyQi8W9nnpTbdz69/YR1CI6s= -github.com/atcdot/gorm-bulk-upsert v1.0.0/go.mod h1:b7/GgeVNbf/SFw4FYIWslxNV5I10C9Mhf/++3jsDk3M= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= diff --git a/grctl/cluster/vergion.go b/grctl/cluster/vergion.go index 67b60383c..81715f8d1 100644 --- a/grctl/cluster/vergion.go +++ b/grctl/cluster/vergion.go @@ -528,6 +528,10 @@ spec: reason: description: Reason probe not passed reason type: string + servicePort: + description: ServicePort if address build from kubernetes endpoint, + The corresponding service port + type: integer status: description: Status endpoint status type: string @@ -592,6 +596,4 @@ status: plural: "" conditions: [] storedVersions: [] - - ` diff --git a/pkg/apis/rainbond/v1alpha1/third_component.go b/pkg/apis/rainbond/v1alpha1/third_component.go index 07add125b..463d3213f 100644 --- a/pkg/apis/rainbond/v1alpha1/third_component.go +++ b/pkg/apis/rainbond/v1alpha1/third_component.go @@ -199,6 +199,8 @@ type ThirdComponentEndpointStatus struct { // Reference to object providing the endpoint. // +optional TargetRef *v1.ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"` + // ServicePort if address build from kubernetes endpoint, The corresponding service port + ServicePort int `json:"servicePort,omitempty"` //Status endpoint status Status EndpointStatus `json:"status"` //Reason probe not passed reason diff --git a/worker/appm/conversion/conversion.go b/worker/appm/conversion/conversion.go index 106f1a4fc..bd95bc1d6 100644 --- a/worker/appm/conversion/conversion.go +++ b/worker/appm/conversion/conversion.go @@ -101,6 +101,9 @@ func InitAppService(dbmanager db.Manager, serviceID string, configs map[string]s } return appService, nil } + if appService.IsThirdComponent() { + return appService, nil + } for _, c := range conversionList { if len(enableConversionList) == 0 || util.StringArrayContains(enableConversionList, c.Name) { if err := c.Conversion(appService, dbmanager); err != nil { diff --git a/worker/appm/types/v1/v1.go b/worker/appm/types/v1/v1.go index 5e48e1e58..e3072fd56 100644 --- a/worker/appm/types/v1/v1.go +++ b/worker/appm/types/v1/v1.go @@ -127,6 +127,13 @@ func (a AppServiceBase) IsCustomComponent() bool { return false } +func (a AppServiceBase) IsThirdComponent() bool { + if a.ServiceKind.String() == dbmodel.ServiceKindThirdParty.String() { + return true + } + return false +} + func (a *AppServiceBase) SetDiscoveryCfg(discoveryCfg *dbmodel.ThirdPartySvcDiscoveryCfg) { a.discoveryCfg = discoveryCfg } diff --git a/worker/master/controller/thirdcomponent/controller.go b/worker/master/controller/thirdcomponent/controller.go index e70a3fd0e..3535d7b05 100644 --- a/worker/master/controller/thirdcomponent/controller.go +++ b/worker/master/controller/thirdcomponent/controller.go @@ -37,6 +37,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/reconcile" ) @@ -74,6 +75,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e } if component.DeletionTimestamp != nil { log.Infof("component %s will be deleted", req) + r.discoverPool.RemoveDiscover(component) return ctrl.Result{}, nil } logrus.Infof("start to reconcile component %s/%s", component.Namespace, component.Name) @@ -95,7 +97,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e component.Status.Phase = v1alpha1.ComponentFailed component.Status.Reason = err.Error() r.updateStatus(ctx, component) - return commonResult, nil + return ctrl.Result{}, nil } r.discoverPool.AddDiscover(discover) @@ -103,7 +105,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e component.Status.Phase = v1alpha1.ComponentPending component.Status.Reason = "endpoints not found" r.updateStatus(ctx, component) - return commonResult, nil + return ctrl.Result{}, nil } // create endpoints for service @@ -114,7 +116,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e })) if err != nil { logrus.Errorf("create selector failure %s", err.Error()) - return commonResult, err + return ctrl.Result{}, err } err = r.Client.List(ctx, &services, &client.ListOptions{LabelSelector: selector}) if err != nil { @@ -128,7 +130,11 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e // init component port var portMap = make(map[int][]*v1alpha1.ThirdComponentEndpointStatus) for _, end := range component.Status.Endpoints { - portMap[end.Address.GetPort()] = append(portMap[end.Address.GetPort()], end) + port := end.Address.GetPort() + if end.ServicePort != 0 { + port = end.ServicePort + } + portMap[port] = append(portMap[end.Address.GetPort()], end) } // create endpoint for component service for _, service := range services.Items { @@ -136,6 +142,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e // if component port not exist in endpoint port list, ignore it. if sourceEndpoint, ok := portMap[int(port.Port)]; ok { endpoint := createEndpoint(component, &service, sourceEndpoint, int(port.Port)) + controllerutil.SetControllerReference(component, &endpoint, r.Scheme) var old corev1.Endpoints var apply = true if err := r.Client.Get(ctx, types.NamespacedName{Namespace: endpoint.Namespace, Name: endpoint.Name}, &old); err == nil { @@ -164,6 +171,12 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e } func createEndpoint(component *v1alpha1.ThirdComponent, service *corev1.Service, sourceEndpoint []*v1alpha1.ThirdComponentEndpointStatus, port int) corev1.Endpoints { + spep := make(map[int]int, len(sourceEndpoint)) + for _, endpoint := range sourceEndpoint { + if endpoint.ServicePort != 0 { + spep[endpoint.ServicePort] = endpoint.Address.GetPort() + } + } endpoints := corev1.Endpoints{ TypeMeta: metav1.TypeMeta{ Kind: "Endpoints", @@ -179,12 +192,17 @@ func createEndpoint(component *v1alpha1.ThirdComponent, service *corev1.Service, { Ports: func() (re []corev1.EndpointPort) { for _, servicePort := range service.Spec.Ports { - re = append(re, corev1.EndpointPort{ + ep := corev1.EndpointPort{ Name: servicePort.Name, Port: servicePort.Port, Protocol: servicePort.Protocol, AppProtocol: servicePort.AppProtocol, - }) + } + endPort, exist := spep[int(servicePort.Port)] + if exist { + ep.Port = int32(endPort) + } + re = append(re, ep) } return }(), diff --git a/worker/master/controller/thirdcomponent/discover.go b/worker/master/controller/thirdcomponent/discover.go index 471c71990..c6cac86e1 100644 --- a/worker/master/controller/thirdcomponent/discover.go +++ b/worker/master/controller/thirdcomponent/discover.go @@ -116,6 +116,14 @@ func (k *kubernetesDiscover) DiscoverOne(ctx context.Context) ([]*v1alpha1.Third } return nil, fmt.Errorf("load kubernetes endpoints failure %s", err.Error()) } + getServicePort := func(portName string) int { + for _, port := range service.Spec.Ports { + if port.Name == portName { + return int(port.Port) + } + } + return 0 + } var es = []*v1alpha1.ThirdComponentEndpointStatus{} for _, endpoint := range endpoints.Items { for _, subset := range endpoint.Subsets { @@ -124,9 +132,10 @@ func (k *kubernetesDiscover) DiscoverOne(ctx context.Context) ([]*v1alpha1.Third ed := v1alpha1.NewEndpointAddress(address.IP, int(port.Port)) if ed != nil { es = append(es, &v1alpha1.ThirdComponentEndpointStatus{ - Address: *ed, - TargetRef: address.TargetRef, - Status: v1alpha1.EndpointReady, + ServicePort: getServicePort(port.Name), + Address: *ed, + TargetRef: address.TargetRef, + Status: v1alpha1.EndpointReady, }) } } @@ -134,9 +143,10 @@ func (k *kubernetesDiscover) DiscoverOne(ctx context.Context) ([]*v1alpha1.Third ed := v1alpha1.NewEndpointAddress(address.IP, int(port.Port)) if ed != nil { es = append(es, &v1alpha1.ThirdComponentEndpointStatus{ - Address: *ed, - TargetRef: address.TargetRef, - Status: v1alpha1.EndpointReady, + Address: *ed, + ServicePort: getServicePort(port.Name), + TargetRef: address.TargetRef, + Status: v1alpha1.EndpointReady, }) } } diff --git a/worker/master/controller/thirdcomponent/discover_pool.go b/worker/master/controller/thirdcomponent/discover_pool.go index d0fba2338..5c0beb515 100644 --- a/worker/master/controller/thirdcomponent/discover_pool.go +++ b/worker/master/controller/thirdcomponent/discover_pool.go @@ -26,6 +26,7 @@ import ( "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" "github.com/sirupsen/logrus" + apierrors "k8s.io/apimachinery/pkg/api/errors" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -64,6 +65,10 @@ func (d *DiscoverPool) Start() { d.reconciler.Client.Get(ctx, name, &old) if !reflect.DeepEqual(component.Status.Endpoints, old.Status.Endpoints) { if err := d.reconciler.updateStatus(ctx, component); err != nil { + if apierrors.IsNotFound(err) { + d.RemoveDiscover(component) + return + } logrus.Errorf("update component status failure", err.Error()) } logrus.Infof("update component %s status success by discover pool", name) @@ -143,16 +148,13 @@ func (d *DiscoverPool) AddDiscover(dis Discover) { d.discoverWorker[key] = worker } -func (d *DiscoverPool) RemoveDiscover(dis Discover) { +func (d *DiscoverPool) RemoveDiscover(component *v1alpha1.ThirdComponent) { d.lock.Lock() defer d.lock.Unlock() - component := dis.GetComponent() - if component == nil { - return - } key := component.Namespace + component.Name olddis, exist := d.discoverWorker[key] if exist { olddis.Stop() + delete(d.discoverWorker, key) } } From d330fe00a79a04d34ad97570bd19e86cedc17372 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 1 Jul 2021 21:34:40 +0800 Subject: [PATCH 59/65] ignore headless service --- worker/server/server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/worker/server/server.go b/worker/server/server.go index 9641f8f3e..dac4feae0 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -712,6 +712,11 @@ func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppService { var appServices []*pb.AppService for _, svc := range services { + if svc.Spec.ClusterIP == "None" { + // ignore headless service + continue + } + var ports []*pb.AppService_Port for _, port := range svc.Spec.Ports { ports = append(ports, &pb.AppService_Port{ From 93b58352399b474125bf78fc772a7e8079a52e6d Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Fri, 2 Jul 2021 10:48:25 +0800 Subject: [PATCH 60/65] change bug --- grctl/cluster/cluster.go | 17 +++++++++-------- grctl/cluster/vergion.go | 2 +- worker/appm/controller/apply_plugin_config.go | 1 + worker/appm/controller/apply_rule.go | 4 +++- worker/appm/controller/controller.go | 4 ++++ worker/appm/controller/refresh_xpa.go | 1 + worker/appm/controller/restart.go | 3 +++ worker/appm/f/function.go | 11 ++++++++++- 8 files changed, 32 insertions(+), 11 deletions(-) diff --git a/grctl/cluster/cluster.go b/grctl/cluster/cluster.go index 26a2975a1..516bac563 100644 --- a/grctl/cluster/cluster.go +++ b/grctl/cluster/cluster.go @@ -74,9 +74,9 @@ func (c *Cluster) Upgrade() error { } func (c *Cluster) createCrds() []string { - crds, err := c.getCrds() - if err != nil { - return []string{err.Error()} + crds := c.getCrds() + if crds == nil { + return nil } logrus.Info("start creating crds") var errs []string @@ -101,12 +101,13 @@ func (c *Cluster) createCrd(crdStr string) error { return nil } -func (c *Cluster) getCrds() ([]string, error) { - version, ok := versions[c.newVersion] - if !ok { - return nil, fmt.Errorf("unsupport new version %s", c.newVersion) +func (c *Cluster) getCrds() []string { + for v, versionConfig := range versions { + if strings.Contains(c.newVersion, v) { + return versionConfig.CRDs + } } - return version.CRDs, nil + return nil } func (c *Cluster) updateRbdComponents() []string { diff --git a/grctl/cluster/vergion.go b/grctl/cluster/vergion.go index 81715f8d1..deb93d558 100644 --- a/grctl/cluster/vergion.go +++ b/grctl/cluster/vergion.go @@ -1,7 +1,7 @@ package cluster var versions = map[string]Version{ - "v5.3.1-release": { + "5.3.1": { CRDs: []string{ componentdefinitionsCRD531, helmappCRD531, diff --git a/worker/appm/controller/apply_plugin_config.go b/worker/appm/controller/apply_plugin_config.go index bb11a3ff7..293e99a14 100644 --- a/worker/appm/controller/apply_plugin_config.go +++ b/worker/appm/controller/apply_plugin_config.go @@ -32,6 +32,7 @@ type applyConfigController struct { appService v1.AppService manager *Manager stopChan chan struct{} + ctx context.Context } // Begin begins applying rule diff --git a/worker/appm/controller/apply_rule.go b/worker/appm/controller/apply_rule.go index 67a6a21d4..477bd5068 100644 --- a/worker/appm/controller/apply_rule.go +++ b/worker/appm/controller/apply_rule.go @@ -19,6 +19,7 @@ package controller import ( + "context" "sync" "github.com/goodrain/rainbond/worker/appm/f" @@ -31,6 +32,7 @@ type applyRuleController struct { appService []v1.AppService manager *Manager stopChan chan struct{} + ctx context.Context } // Begin begins applying rule @@ -40,7 +42,7 @@ func (a *applyRuleController) Begin() { wait.Add(1) go func(service v1.AppService) { defer wait.Done() - if err := f.ApplyOne(a.manager.client, &service); err != nil { + if err := f.ApplyOne(a.ctx, a.manager.apply, a.manager.client, &service); err != nil { logrus.Errorf("apply rules for service %s failure: %s", service.ServiceAlias, err.Error()) } }(service) diff --git a/worker/appm/controller/controller.go b/worker/appm/controller/controller.go index 82941a9d6..7632c07f9 100644 --- a/worker/appm/controller/controller.go +++ b/worker/appm/controller/controller.go @@ -145,6 +145,7 @@ func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppS appService: apps, manager: m, stopChan: make(chan struct{}), + ctx: context.Background(), } case TypeApplyRuleController: controller = &applyRuleController{ @@ -152,6 +153,7 @@ func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppS appService: apps, manager: m, stopChan: make(chan struct{}), + ctx: context.Background(), } case TypeApplyConfigController: controller = &applyConfigController{ @@ -159,6 +161,7 @@ func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppS appService: apps[0], manager: m, stopChan: make(chan struct{}), + ctx: context.Background(), } case TypeControllerRefreshHPA: controller = &refreshXPAController{ @@ -166,6 +169,7 @@ func (m *Manager) StartController(controllerType TypeController, apps ...v1.AppS appService: apps, manager: m, stopChan: make(chan struct{}), + ctx: context.Background(), } default: return fmt.Errorf("No support controller") diff --git a/worker/appm/controller/refresh_xpa.go b/worker/appm/controller/refresh_xpa.go index 063871f6a..fe410096f 100644 --- a/worker/appm/controller/refresh_xpa.go +++ b/worker/appm/controller/refresh_xpa.go @@ -35,6 +35,7 @@ type refreshXPAController struct { appService []v1.AppService manager *Manager stopChan chan struct{} + ctx context.Context } // Begin begins applying rule diff --git a/worker/appm/controller/restart.go b/worker/appm/controller/restart.go index f6a35a638..a04eb7f12 100644 --- a/worker/appm/controller/restart.go +++ b/worker/appm/controller/restart.go @@ -19,6 +19,7 @@ package controller import ( + "context" "fmt" "sync" "time" @@ -36,6 +37,7 @@ type restartController struct { controllerID string appService []v1.AppService manager *Manager + ctx context.Context } func (s *restartController) Begin() { @@ -60,6 +62,7 @@ func (s *restartController) restartOne(app v1.AppService) error { stopController := &stopController{ manager: s.manager, waiting: time.Minute * 5, + ctx: s.ctx, } if err := stopController.stopOne(app); err != nil { if err != ErrWaitTimeOut { diff --git a/worker/appm/f/function.go b/worker/appm/f/function.go index 691d7828f..9e5b74aa3 100644 --- a/worker/appm/f/function.go +++ b/worker/appm/f/function.go @@ -25,6 +25,7 @@ import ( "github.com/goodrain/rainbond/gateway/annotations/parser" v1 "github.com/goodrain/rainbond/worker/appm/types/v1" + "github.com/oam-dev/kubevela/pkg/utils/apply" monitorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned" "github.com/sirupsen/logrus" @@ -44,7 +45,7 @@ const ( ) // ApplyOne applies one rule. -func ApplyOne(clientset kubernetes.Interface, app *v1.AppService) error { +func ApplyOne(ctx context.Context, apply apply.Applicator, clientset kubernetes.Interface, app *v1.AppService) error { _, err := clientset.CoreV1().Namespaces().Get(context.Background(), app.TenantID, metav1.GetOptions{}) if err != nil { if k8sErrors.IsNotFound(err) { @@ -57,6 +58,14 @@ func ApplyOne(clientset kubernetes.Interface, app *v1.AppService) error { return fmt.Errorf("error checking namespace: %v", err) } } + // for custom component + if len(app.GetManifests()) > 0 { + for _, manifest := range app.GetManifests() { + if err := apply.Apply(ctx, manifest); err != nil { + return fmt.Errorf("apply custom component manifest %s/%s failure %s", manifest.GetKind(), manifest.GetName(), err.Error()) + } + } + } if app.CustomParams != nil { if domain, exist := app.CustomParams["domain"]; exist { // update ingress From b50b23b71d6fd54821d2adb38cfe858cede15177 Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Fri, 2 Jul 2021 11:08:48 +0800 Subject: [PATCH 61/65] change build bug --- local_release.sh | 2 +- worker/appm/f/function.go | 2 +- worker/appm/store/store.go | 2 +- worker/master/controller/thirdcomponent/controller.go | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/local_release.sh b/local_release.sh index b5f83cd5f..1ca6bdf95 100755 --- a/local_release.sh +++ b/local_release.sh @@ -1,5 +1,5 @@ #! /bin/bash -export VERSION=v5.3.0-release +export VERSION=v5.3.1-release export BUILD_IMAGE_BASE_NAME=registry.cn-hangzhou.aliyuncs.com/goodrain ./release.sh all push diff --git a/worker/appm/f/function.go b/worker/appm/f/function.go index 9e5b74aa3..3502405f8 100644 --- a/worker/appm/f/function.go +++ b/worker/appm/f/function.go @@ -59,7 +59,7 @@ func ApplyOne(ctx context.Context, apply apply.Applicator, clientset kubernetes. } } // for custom component - if len(app.GetManifests()) > 0 { + if len(app.GetManifests()) > 0 && apply != nil { for _, manifest := range app.GetManifests() { if err := apply.Apply(ctx, manifest); err != nil { return fmt.Errorf("apply custom component manifest %s/%s failure %s", manifest.GetKind(), manifest.GetName(), err.Error()) diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index 5558aac54..162a7e6f8 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -481,7 +481,7 @@ func (a *appRuntimeStore) InitOneThirdPartService(service *model.TenantServices) return err } a.RegistAppService(appService) - err = f.ApplyOne(a.clientset, appService) + err = f.ApplyOne(context.Background(), nil, a.clientset, appService) if err != nil { logrus.Errorf("error applying rule: %v", err) return err diff --git a/worker/master/controller/thirdcomponent/controller.go b/worker/master/controller/thirdcomponent/controller.go index 3535d7b05..228b2062b 100644 --- a/worker/master/controller/thirdcomponent/controller.go +++ b/worker/master/controller/thirdcomponent/controller.go @@ -61,7 +61,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e defer cancel() defer func() { if retErr == nil { - log.Infof("finished reconciling") + log.Debugf("finished reconciling") } else { log.Errorf("Failed to reconcile %v", retErr) } @@ -69,7 +69,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e if err := r.Client.Get(ctx, req.NamespacedName, component); err != nil { if apierrors.IsNotFound(err) { - log.Infof("thirdcomponent %s does not exist", req) + log.Warningf("thirdcomponent %s does not exist", req) } return ctrl.Result{}, client.IgnoreNotFound(err) } @@ -78,7 +78,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res reconcile.Result, retErr e r.discoverPool.RemoveDiscover(component) return ctrl.Result{}, nil } - logrus.Infof("start to reconcile component %s/%s", component.Namespace, component.Name) + logrus.Debugf("start to reconcile component %s/%s", component.Namespace, component.Name) discover, err := NewDiscover(component, r.restConfig) if err != nil { component.Status.Phase = v1alpha1.ComponentFailed From 08a08ce61d07f00f87323348a48c01d7bca68862 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 2 Jul 2021 15:44:59 +0800 Subject: [PATCH 62/65] bug fix: app status --- worker/server/server.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/worker/server/server.go b/worker/server/server.go index dac4feae0..aea71afa9 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -144,9 +144,11 @@ func (r *RuntimeServer) getRainbondAppStatus(app *model.Application) (*pb.AppSta } return &pb.AppStatus{ - Status: string(status), - Cpu: cpu, - Memory: memory, + Status: status.String(), + SetCPU: true, + Cpu: cpu, + SetMemory: true, + Memory: memory, }, nil } From c9d5530567c39ef5c91162dc2ae3a1ed29f0c1c5 Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Fri, 2 Jul 2021 15:51:45 +0800 Subject: [PATCH 63/65] go lint --- worker/server/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/worker/server/server.go b/worker/server/server.go index aea71afa9..7ba8c9a34 100644 --- a/worker/server/server.go +++ b/worker/server/server.go @@ -688,6 +688,7 @@ func (r *RuntimeServer) GetAppVolumeStatus(ctx context.Context, re *pb.ServiceRe return ret, nil } +// ListAppServices - func (r *RuntimeServer) ListAppServices(ctx context.Context, in *pb.AppReq) (*pb.AppServices, error) { app, err := db.GetManager().ApplicationDao().GetAppByID(in.AppId) if err != nil { @@ -774,6 +775,7 @@ func (r *RuntimeServer) convertServices(services []*corev1.Service) []*pb.AppSer return appServices } +// ListHelmAppRelease - func (r *RuntimeServer) ListHelmAppRelease(ctx context.Context, req *pb.AppReq) (*pb.HelmAppReleases, error) { app, err := db.GetManager().ApplicationDao().GetAppByID(req.AppId) if err != nil { From cdda65a17ca1af73f54caa5eb5eba0025a0e0701 Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Fri, 2 Jul 2021 16:08:23 +0800 Subject: [PATCH 64/65] change bug --- hack/contrib/docker/worker/Dockerfile | 1 + .../componentdefinition.go | 3 ++ worker/appm/store/store.go | 29 +++++++++++ worker/appm/types/v1/status.go | 49 +++++++++++++++++-- worker/appm/types/v1/v1.go | 19 +++++-- 5 files changed, 93 insertions(+), 8 deletions(-) diff --git a/hack/contrib/docker/worker/Dockerfile b/hack/contrib/docker/worker/Dockerfile index a246f315b..2fa27e126 100644 --- a/hack/contrib/docker/worker/Dockerfile +++ b/hack/contrib/docker/worker/Dockerfile @@ -1,5 +1,6 @@ FROM goodrainapps/alpine:3.4 +ARG RELEASE_DESC COPY rainbond-worker /run/rainbond-worker COPY entrypoint.sh /run/entrypoint.sh RUN chmod 655 /run/rainbond-worker diff --git a/worker/appm/componentdefinition/componentdefinition.go b/worker/appm/componentdefinition/componentdefinition.go index 03e4df4c2..a36269652 100644 --- a/worker/appm/componentdefinition/componentdefinition.go +++ b/worker/appm/componentdefinition/componentdefinition.go @@ -145,6 +145,9 @@ func (c *ComponentDefinitionBuilder) BuildWorkloadResource(as *v1.AppService, db } ctx.SetContextValue(manifests) as.SetManifests(manifests) + if len(manifests) > 0 { + as.SetWorkload(manifests[0]) + } return nil } diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index 162a7e6f8..1c6c1d1d1 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -351,6 +351,8 @@ func NewStore( store.informers.Claims.AddEventHandlerWithResyncPeriod(store, time.Second*10) store.informers.Events.AddEventHandlerWithResyncPeriod(store.evtEventHandler(), time.Second*10) store.informers.HorizontalPodAutoscaler.AddEventHandlerWithResyncPeriod(store, time.Second*10) + store.informers.ThirdComponent.AddEventHandlerWithResyncPeriod(store, time.Second*10) + return store } @@ -512,6 +514,18 @@ func (a *appRuntimeStore) checkReplicasetWhetherDelete(app *v1.AppService, rs *a } func (a *appRuntimeStore) OnAdd(obj interface{}) { + if thirdComponent, ok := obj.(*v1alpha1.ThirdComponent); ok { + serviceID := thirdComponent.Labels["service_id"] + version := thirdComponent.Labels["version"] + createrID := thirdComponent.Labels["creater_id"] + if serviceID != "" && version != "" && createrID != "" { + appservice, _ := a.getAppService(serviceID, version, createrID, true) + if appservice != nil { + appservice.SetWorkload(thirdComponent) + return + } + } + } if deployment, ok := obj.(*appsv1.Deployment); ok { serviceID := deployment.Labels["service_id"] version := deployment.Labels["version"] @@ -722,6 +736,21 @@ func (a *appRuntimeStore) OnDelete(objs interface{}) { func (a *appRuntimeStore) OnDeletes(objs ...interface{}) { for i := range objs { obj := objs[i] + if thirdComponent, ok := obj.(*v1alpha1.ThirdComponent); ok { + serviceID := thirdComponent.Labels["service_id"] + version := thirdComponent.Labels["version"] + createrID := thirdComponent.Labels["creater_id"] + if serviceID != "" && version != "" && createrID != "" { + appservice, _ := a.getAppService(serviceID, version, createrID, true) + if appservice != nil { + appservice.DeleteWorkload(thirdComponent) + if appservice.IsClosed() { + a.DeleteAppService(appservice) + } + return + } + } + } if deployment, ok := obj.(*appsv1.Deployment); ok { serviceID := deployment.Labels["service_id"] version := deployment.Labels["version"] diff --git a/worker/appm/types/v1/status.go b/worker/appm/types/v1/status.go index 314b66291..9c995cc3f 100644 --- a/worker/appm/types/v1/status.go +++ b/worker/appm/types/v1/status.go @@ -20,12 +20,15 @@ package v1 import ( "crypto/sha256" + "encoding/json" "fmt" "time" - "github.com/goodrain/rainbond/db/model" + "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" ) //IsEmpty is empty @@ -45,7 +48,10 @@ func (a *AppService) IsEmpty() bool { //IsClosed is closed func (a *AppService) IsClosed() bool { - if a.ServiceKind == model.ServiceKindThirdParty { + if a.IsCustomComponent() { + return a.workload == nil + } + if a.IsThirdComponent() { if a.endpoints == nil || len(a.endpoints) == 0 { return true } @@ -88,11 +94,46 @@ var ( UNDEPLOY = "undeploy" ) +func conversionThirdComponent(obj runtime.Object) *v1alpha1.ThirdComponent { + if third, ok := obj.(*v1alpha1.ThirdComponent); ok { + return third + } + if struc, ok := obj.(*unstructured.Unstructured); ok { + data, _ := json.Marshal(struc) + var third v1alpha1.ThirdComponent + if err := json.Unmarshal(data, &third); err != nil { + return nil + } + return &third + } + return nil +} + //GetServiceStatus get service status func (a *AppService) GetServiceStatus() string { //TODO: support custom component status - - if a.ServiceKind == model.ServiceKindThirdParty { + if a.IsCustomComponent() { + if a.workload != nil { + switch a.workload.GetObjectKind().GroupVersionKind().Kind { + case "ThirdComponent": + third := conversionThirdComponent(a.workload) + if third != nil { + switch third.Status.Phase { + case v1alpha1.ComponentFailed: + return ABNORMAL + case v1alpha1.ComponentRunning: + return RUNNING + case v1alpha1.ComponentPending: + return STARTING + } + } + default: + return RUNNING + } + } + return CLOSED + } + if a.IsThirdComponent() { endpoints := a.GetEndpoints(false) if len(endpoints) == 0 { return CLOSED diff --git a/worker/appm/types/v1/v1.go b/worker/appm/types/v1/v1.go index e3072fd56..aeec6ee89 100644 --- a/worker/appm/types/v1/v1.go +++ b/worker/appm/types/v1/v1.go @@ -33,6 +33,7 @@ import ( extensions "k8s.io/api/extensions/v1beta1" storagev1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" "github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/db/model" @@ -128,10 +129,7 @@ func (a AppServiceBase) IsCustomComponent() bool { } func (a AppServiceBase) IsThirdComponent() bool { - if a.ServiceKind.String() == dbmodel.ServiceKindThirdParty.String() { - return true - } - return false + return a.ServiceKind.String() == dbmodel.ServiceKindThirdParty.String() } func (a *AppServiceBase) SetDiscoveryCfg(discoveryCfg *dbmodel.ThirdPartySvcDiscoveryCfg) { @@ -144,6 +142,7 @@ type AppService struct { tenant *corev1.Namespace statefulset *v1.StatefulSet deployment *v1.Deployment + workload runtime.Object hpas []*autoscalingv2.HorizontalPodAutoscaler delHPAs []*autoscalingv2.HorizontalPodAutoscaler replicasets []*v1.ReplicaSet @@ -193,6 +192,7 @@ func (a AppService) GetDeployment() *v1.Deployment { //SetDeployment set kubernetes deployment model func (a *AppService) SetDeployment(d *v1.Deployment) { a.deployment = d + a.workload = d if v, ok := d.Spec.Template.Labels["version"]; ok && v != "" { a.DeployVersion = v } @@ -213,6 +213,7 @@ func (a AppService) GetStatefulSet() *v1.StatefulSet { //SetStatefulSet set kubernetes statefulset model func (a *AppService) SetStatefulSet(d *v1.StatefulSet) { a.statefulset = d + a.workload = d if v, ok := d.Spec.Template.Labels["version"]; ok && v != "" { a.DeployVersion = v } @@ -842,6 +843,16 @@ func (a *AppService) SetManifests(manifests []*unstructured.Unstructured) { a.manifests = manifests } +//SetWorkload set component workload +func (a *AppService) SetWorkload(workload runtime.Object) { + a.workload = workload +} + +//DeleteWorkload delete component workload +func (a *AppService) DeleteWorkload(workload runtime.Object) { + a.workload = nil +} + func (a *AppService) String() string { return fmt.Sprintf(` ----------------------------------------------------- From ea0c2dc51965059023625e72452224e7b7fbf9b4 Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Fri, 2 Jul 2021 20:13:00 +0800 Subject: [PATCH 65/65] change thirdcomponent status bug --- worker/appm/controller/restart.go | 11 +++-- worker/appm/store/store.go | 5 +- worker/appm/types/v1/status.go | 5 +- .../controller/thirdcomponent/discover.go | 47 +++++++++---------- 4 files changed, 36 insertions(+), 32 deletions(-) diff --git a/worker/appm/controller/restart.go b/worker/appm/controller/restart.go index a04eb7f12..0f77d8646 100644 --- a/worker/appm/controller/restart.go +++ b/worker/appm/controller/restart.go @@ -60,9 +60,10 @@ func (s *restartController) Begin() { func (s *restartController) restartOne(app v1.AppService) error { //Restart the control set timeout interval is 5m stopController := &stopController{ - manager: s.manager, - waiting: time.Minute * 5, - ctx: s.ctx, + manager: s.manager, + waiting: time.Minute * 5, + ctx: s.ctx, + controllerID: s.controllerID, } if err := stopController.stopOne(app); err != nil { if err != ErrWaitTimeOut { @@ -81,7 +82,9 @@ func (s *restartController) restartOne(app v1.AppService) error { } } startController := startController{ - manager: s.manager, + manager: s.manager, + ctx: s.ctx, + controllerID: s.controllerID, } newAppService, err := conversion.InitAppService(db.GetManager(), app.ServiceID, app.ExtensionSet) if err != nil { diff --git a/worker/appm/store/store.go b/worker/appm/store/store.go index 1c6c1d1d1..d12ac19df 100644 --- a/worker/appm/store/store.go +++ b/worker/appm/store/store.go @@ -516,10 +516,9 @@ func (a *appRuntimeStore) checkReplicasetWhetherDelete(app *v1.AppService, rs *a func (a *appRuntimeStore) OnAdd(obj interface{}) { if thirdComponent, ok := obj.(*v1alpha1.ThirdComponent); ok { serviceID := thirdComponent.Labels["service_id"] - version := thirdComponent.Labels["version"] createrID := thirdComponent.Labels["creater_id"] - if serviceID != "" && version != "" && createrID != "" { - appservice, _ := a.getAppService(serviceID, version, createrID, true) + if serviceID != "" && createrID != "" { + appservice, _ := a.getAppService(serviceID, "", createrID, true) if appservice != nil { appservice.SetWorkload(thirdComponent) return diff --git a/worker/appm/types/v1/status.go b/worker/appm/types/v1/status.go index 9c995cc3f..6f88cb9de 100644 --- a/worker/appm/types/v1/status.go +++ b/worker/appm/types/v1/status.go @@ -25,6 +25,7 @@ import ( "time" "github.com/goodrain/rainbond/pkg/apis/rainbond/v1alpha1" + "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -99,9 +100,10 @@ func conversionThirdComponent(obj runtime.Object) *v1alpha1.ThirdComponent { return third } if struc, ok := obj.(*unstructured.Unstructured); ok { - data, _ := json.Marshal(struc) + data, _ := struc.MarshalJSON() var third v1alpha1.ThirdComponent if err := json.Unmarshal(data, &third); err != nil { + logrus.Errorf("unmarshal object to ThirdComponent failure") return nil } return &third @@ -127,6 +129,7 @@ func (a *AppService) GetServiceStatus() string { return STARTING } } + return RUNNING default: return RUNNING } diff --git a/worker/master/controller/thirdcomponent/discover.go b/worker/master/controller/thirdcomponent/discover.go index c6cac86e1..80b36b1d1 100644 --- a/worker/master/controller/thirdcomponent/discover.go +++ b/worker/master/controller/thirdcomponent/discover.go @@ -109,7 +109,8 @@ func (k *kubernetesDiscover) DiscoverOne(ctx context.Context) ([]*v1alpha1.Third if err != nil { return nil, fmt.Errorf("load kubernetes service failure %s", err.Error()) } - endpoints, err := k.client.CoreV1().Endpoints(namespace).List(ctx, metav1.ListOptions{LabelSelector: labels.FormatLabels(service.Spec.Selector)}) + // service name must be same with endpoint name + endpoint, err := k.client.CoreV1().Endpoints(namespace).Get(ctx, service.Name, metav1.GetOptions{}) if err != nil { if apierrors.IsNotFound(err) { return nil, nil @@ -125,30 +126,28 @@ func (k *kubernetesDiscover) DiscoverOne(ctx context.Context) ([]*v1alpha1.Third return 0 } var es = []*v1alpha1.ThirdComponentEndpointStatus{} - for _, endpoint := range endpoints.Items { - for _, subset := range endpoint.Subsets { - for _, port := range subset.Ports { - for _, address := range subset.Addresses { - ed := v1alpha1.NewEndpointAddress(address.IP, int(port.Port)) - if ed != nil { - es = append(es, &v1alpha1.ThirdComponentEndpointStatus{ - ServicePort: getServicePort(port.Name), - Address: *ed, - TargetRef: address.TargetRef, - Status: v1alpha1.EndpointReady, - }) - } + for _, subset := range endpoint.Subsets { + for _, port := range subset.Ports { + for _, address := range subset.Addresses { + ed := v1alpha1.NewEndpointAddress(address.IP, int(port.Port)) + if ed != nil { + es = append(es, &v1alpha1.ThirdComponentEndpointStatus{ + ServicePort: getServicePort(port.Name), + Address: *ed, + TargetRef: address.TargetRef, + Status: v1alpha1.EndpointReady, + }) } - for _, address := range subset.NotReadyAddresses { - ed := v1alpha1.NewEndpointAddress(address.IP, int(port.Port)) - if ed != nil { - es = append(es, &v1alpha1.ThirdComponentEndpointStatus{ - Address: *ed, - ServicePort: getServicePort(port.Name), - TargetRef: address.TargetRef, - Status: v1alpha1.EndpointReady, - }) - } + } + for _, address := range subset.NotReadyAddresses { + ed := v1alpha1.NewEndpointAddress(address.IP, int(port.Port)) + if ed != nil { + es = append(es, &v1alpha1.ThirdComponentEndpointStatus{ + Address: *ed, + ServicePort: getServicePort(port.Name), + TargetRef: address.TargetRef, + Status: v1alpha1.EndpointReady, + }) } } }