From 5d9affa90d0a8ef2baec8046a957d58efa9ced5f Mon Sep 17 00:00:00 2001 From: qishiyao Date: Mon, 12 Dec 2022 09:59:28 +0800 Subject: [PATCH 01/43] * Fix deletebackuprequest name confict bug. --- backend/internal/app/service/app/instance/backup.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/internal/app/service/app/instance/backup.go b/backend/internal/app/service/app/instance/backup.go index 4fe8aa75..db6d6338 100644 --- a/backend/internal/app/service/app/instance/backup.go +++ b/backend/internal/app/service/app/instance/backup.go @@ -172,7 +172,10 @@ func (i *Instance) GetBackupStatus(backupName string) (interface{}, error) { func (i *Instance) RemoveBackup(backupName string) error { ns := viper.GetString(constant.FlagRuntimeNamespace) currTime := time.Now() - delName := fmt.Sprintf("%s-delete-%d", i.name, currTime.Unix()) + delName := fmt.Sprintf("%s-del-%d", backupName, currTime.Unix()) + if len(delName) > 63 { + delName = delName[0:63] + } delReq := quchengv1beta1.DeleteBackupRequest{ ObjectMeta: metav1.ObjectMeta{ Name: delName, From a24be34fec2a2ec789ef6c82f8295cb32fc69b6e Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Mon, 12 Dec 2022 20:39:46 +0800 Subject: [PATCH 02/43] * Improve autobackup. --- frontend/module/instance/lang/zh-cn.php | 2 ++ frontend/module/instance/model.php | 25 +++++++++++++++---- frontend/module/instance/view/backup.html.php | 5 ++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/frontend/module/instance/lang/zh-cn.php b/frontend/module/instance/lang/zh-cn.php index 8ae6bb93..0975bf3a 100644 --- a/frontend/module/instance/lang/zh-cn.php +++ b/frontend/module/instance/lang/zh-cn.php @@ -105,6 +105,7 @@ $lang->instance->backup->firstStartTime = '%s 首次备份将于%s 执行'; $lang->instance->backup->invalidTime = '无效的时间'; $lang->instance->backup->disableAutoBackup = '自动备份已关闭'; +$lang->instance->backup->keepBackupBySystem = '备份数据超过1条时系统才会删除过期的自动备份数据。'; $lang->instance->backup->cycleList[1] = '每日'; @@ -120,6 +121,7 @@ $lang->instance->backup->statusList['completed'] = '完成'; $lang->instance->backup->statusList['executedFailed'] = '失败'; $lang->instance->backup->statusList['uploading'] = '上传中'; +$lang->instance->backup->statusList['deleting'] = '删除中'; $lang->instance->backup->statusList['uploadFailed'] = '上传失败'; $lang->instance->backup->statusList['downloading'] = '下载中'; $lang->instance->backup->statusList['downloadFailed'] = '下载失败'; diff --git a/frontend/module/instance/model.php b/frontend/module/instance/model.php index 8e8a0290..f8aa6426 100644 --- a/frontend/module/instance/model.php +++ b/frontend/module/instance/model.php @@ -1185,7 +1185,11 @@ public function getAutoBackupSettings($instanceID) */ public function autoBackup() { - $instanceList = $this->dao->select('*')->from(TABLE_INSTANCE)->where('deleted')->eq(0)->andWhere('autoBackup')->eq(true)->fetchAll('id'); + $instanceList = $this->dao->select('*')->from(TABLE_INSTANCE) + ->where('deleted')->eq(0) + ->andWhere('autoBackup')->eq(true) + ->andWhere('status')->eq('running') + ->fetchAll('id'); /* Load all crons that instance is enable auto backup. */ $crons = $this->dao->select('*')->from(TABLE_CRON)->where('objectID')->in(array_keys($instanceList))->fetchAll(); @@ -1198,7 +1202,7 @@ public function autoBackup() $minute = intval($cron->m); if(!($nowHour == $hour and $nowMiute == $minute)) continue; - // 1. create new backup of instance. + /* 1. create new backup of instance. */ $system = new stdclass; $system->account = 'auto'; // The string 'auto' should be kept for System. @@ -1208,14 +1212,25 @@ public function autoBackup() $this->action->create('instance', $instance->id, 'autoBackup'); - // 2. delete expired backup. Get backup list of instance, then check every backup is expired or not. + /* 2. Pick latest successful backup recorder. */ + $latestBackup = null; $backupList = $this->backupList($instance); foreach($backupList as $backup) { - if($backup->creator != 'auto') continue; + if(empty($latestBackup) or $backup->status == 'completed' && $backup->create_time > $latestBackup->create_time) + { + $latestBackup = $backup; + } + } + + /* 3. delete expired backup. Get backup list of instance, then check every backup is expired or not.*/ + foreach($backupList as $backup) + { + if($backup->creator != 'auto') continue; // Only delete data madde by auto backup. + if($latestBackup && $latestBackup->name == $backup->name) continue; // Keep latest successful backup. $deadline = intval($backup->create_time) + $instance->backupKeepDays * 24 * 3600; - //$deadline = intval($backup->create_time) + 300; // Debug codes: delete backup if it life is older 5 minuts. + //$deadline = intval($backup->create_time) + 300; // Debug codes: delete backup if it's life is older 5 minuts. if($deadline < time()) { $this->deleteBackup($instance, $backup->name); diff --git a/frontend/module/instance/view/backup.html.php b/frontend/module/instance/view/backup.html.php index 1a1262f1..8c5606e0 100644 --- a/frontend/module/instance/view/backup.html.php +++ b/frontend/module/instance/view/backup.html.php @@ -1,5 +1,6 @@
+ instance->backup->keepBackupBySystem;?>
refresh, '', "class='btn'");?> id}", '', true), $lang->instance->backup->autoBackup, '', "class='iframe btn btn-primary' title='{$lang->instance->backup->autoBackup}' data-width='520' data-app='space'");?> @@ -35,14 +36,14 @@ create_time);?>'>create_time);?> instance->backup->operators, $backup->username, $backup->username);?> - backup_details->db[0]) ? zget($lang->instance->backup->statusList, strtolower(zget($backup->backup_details->db[0], 'status'))) : '';?> + instance->backup->statusList, strtolower($backup->status));?> backup_details->db[0]) ? intval(zget($backup->backup_details->db[0], 'size', 0)) : 0;?> backup_details->volume[0]) ? intval(zget($backup->backup_details->volume[0], 'doneBytes', 0)) : 0;?> latest_restore_time) : '';?>'> - latest_restore_time ? date('Y-m-d', $backup->latest_restore_time) : '';?> + latest_restore_time ? date('Y-m-d', $backup->latest_restore_time) : '';?> latest_restore_status ? zget($lang->instance->restore->statusList, $backup->latest_restore_status, '') : '';?> From 19d7fee2c369fac9685dc9a63b42412b2d35048f Mon Sep 17 00:00:00 2001 From: qishiyao Date: Tue, 13 Dec 2022 10:44:16 +0800 Subject: [PATCH 03/43] * Fix app restart bug. --- backend/internal/app/service/app/instance/update.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/internal/app/service/app/instance/update.go b/backend/internal/app/service/app/instance/update.go index 87f79838..b9666e62 100644 --- a/backend/internal/app/service/app/instance/update.go +++ b/backend/internal/app/service/app/instance/update.go @@ -118,7 +118,7 @@ func (i *Instance) Restart(chart, channel string) error { } defer os.Remove(lastValFile) - stopSettings := []string{generateRestartSetting()} + stopSettings := generateRestartSetting() options := &values.Options{ Values: stopSettings, ValueFiles: []string{lastValFile}, @@ -132,9 +132,12 @@ func (i *Instance) Restart(chart, channel string) error { } } -func generateRestartSetting() string { +func generateRestartSetting() []string { uniqueStr := time.Now().Format(time.RFC3339) - return "global.env.RESTART_TIME=" + uniqueStr + return []string{ + "global.env.RESTART_TIME=" + uniqueStr, + "env.RESTART_TIME=null", + } } func (i *Instance) PatchSettings(chart string, body model.AppCreateOrUpdateModel, snippetSettings, delSettings map[string]interface{}) error { From a3a8549db82a9d46b863eb78781ed3d7e172f409 Mon Sep 17 00:00:00 2001 From: qishiyao Date: Tue, 13 Dec 2022 10:48:20 +0800 Subject: [PATCH 04/43] * Fix app restart bug. --- backend/internal/app/service/app/instance/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/app/service/app/instance/update.go b/backend/internal/app/service/app/instance/update.go index b9666e62..9f3f61cb 100644 --- a/backend/internal/app/service/app/instance/update.go +++ b/backend/internal/app/service/app/instance/update.go @@ -176,7 +176,7 @@ func (i *Instance) PatchSettings(chart string, body model.AppCreateOrUpdateModel } if body.ForceRestart { - settings = append(settings, generateRestartSetting()) + settings = append(settings, generateRestartSetting()...) } options := &values.Options{ From d1c267c8d71684e07485120530c40b3a721654af Mon Sep 17 00:00:00 2001 From: qishiyao Date: Tue, 13 Dec 2022 11:03:50 +0800 Subject: [PATCH 05/43] * Add tls upload toolkit. --- backend/internal/app/model/system.go | 6 + backend/internal/app/router/router.go | 2 + backend/internal/app/router/system.go | 56 +++++++++ backend/internal/app/service/app/manage.go | 41 ++++++ backend/pkg/utils/tls/error.go | 7 ++ backend/pkg/utils/tls/tls.go | 137 +++++++++++++++++++++ 6 files changed, 249 insertions(+) create mode 100644 backend/pkg/utils/tls/error.go create mode 100644 backend/pkg/utils/tls/tls.go diff --git a/backend/internal/app/model/system.go b/backend/internal/app/model/system.go index e6fd8d01..e2233a18 100644 --- a/backend/internal/app/model/system.go +++ b/backend/internal/app/model/system.go @@ -15,3 +15,9 @@ type ReqSmtpAuth struct { User string `json:"user"` Pass string `json:"pass"` } + +type ReqTLSUpload struct { + Name string `json:"name,omitempty"` + CertificatePem string `json:"certificate_pem"` + PrivateKeyPem string `json:"private_key_pem"` +} diff --git a/backend/internal/app/router/router.go b/backend/internal/app/router/router.go index 0f2ae640..68237ea7 100644 --- a/backend/internal/app/router/router.go +++ b/backend/internal/app/router/router.go @@ -102,6 +102,8 @@ func Config(r *gin.Engine) { api.POST("/system/update", SystemUpdate) api.GET("/system/app-full-list", FindAllApps) api.POST("/system/smtp/validator", AuthMailServer) + api.POST("/system/tls/upload", UploadTLS) + api.GET("/system/tls/info", ReadTLSInfo) api.GET("/snippet", ListSnippets) api.GET("/snippet/read", ReadSnippet) diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index 735c1877..0035f783 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -17,6 +17,7 @@ import ( "gitlab.zcorp.cc/pangu/cne-api/internal/app/model" "gitlab.zcorp.cc/pangu/cne-api/internal/app/service" "gitlab.zcorp.cc/pangu/cne-api/internal/pkg/constant" + utiltls "gitlab.zcorp.cc/pangu/cne-api/pkg/utils/tls" ) func SystemUpdate(c *gin.Context) { @@ -156,3 +157,58 @@ func AuthMailServer(c *gin.Context) { renderSuccess(c, http.StatusOK) } + +func UploadTLS(c *gin.Context) { + var ( + err error + ctx = c.Request.Context() + body model.ReqTLSUpload + ) + + if err = c.ShouldBindJSON(&body); err != nil { + renderError(c, http.StatusBadRequest, err) + return + } + + logger := getLogger(ctx) + logger.Debugf("certificate: %s", body.CertificatePem) + logger.Debugf("privateKey: %s", body.PrivateKeyPem) + + t, err := utiltls.Parse([]byte(body.CertificatePem), []byte(body.PrivateKeyPem)) + if err != nil { + renderError(c, http.StatusBadRequest, err) + return + } + + if err = t.Valid(); err != nil { + renderError(c, http.StatusBadRequest, err) + return + } + + renderJson(c, http.StatusOK, t.GetCertInfo()) + + service.Apps(ctx, "", viper.GetString(constant.FlagRuntimeNamespace)).UploadTLS(body.Name, body.CertificatePem, body.PrivateKeyPem) +} + +func ReadTLSInfo(c *gin.Context) { + var ( + err error + ctx = c.Request.Context() + query struct { + model.QueryCluster + Name string `form:"name"` + } + ) + + if err = c.ShouldBindQuery(&query); err != nil { + renderError(c, http.StatusBadRequest, err) + return + } + + info, err := service.Apps(ctx, "", viper.GetString(constant.FlagRuntimeNamespace)).ReadTLSCertInfo(query.Name) + if err != nil { + renderError(c, http.StatusInternalServerError, err) + return + } + renderJson(c, http.StatusOK, info) +} diff --git a/backend/internal/app/service/app/manage.go b/backend/internal/app/service/app/manage.go index 530b8eb9..d16d2253 100644 --- a/backend/internal/app/service/app/manage.go +++ b/backend/internal/app/service/app/manage.go @@ -11,6 +11,7 @@ import ( "encoding/base64" "encoding/json" "fmt" + "gitlab.zcorp.cc/pangu/cne-api/pkg/utils/tls" "io" "github.com/sirupsen/logrus" @@ -130,6 +131,46 @@ func (m *Manager) ListAllApplications() (interface{}, error) { return result, nil } +func (m *Manager) UploadTLS(name, certPem, keyPem string) error { + secret, err := m.ks.Store.GetSecret(m.namespace, name) + if err != nil { + s := v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + }, + Data: map[string][]byte{ + v1.TLSCertKey: []byte(certPem), + v1.TLSPrivateKeyKey: []byte(keyPem), + }, + Type: v1.SecretTypeTLS, + } + _, err = m.ks.Clients.Base.CoreV1().Secrets(m.namespace).Create(m.ctx, &s, metav1.CreateOptions{}) + return err + } + + secret.Data[v1.TLSCertKey] = []byte(certPem) + secret.Data[v1.TLSPrivateKeyKey] = []byte(keyPem) + + _, err = m.ks.Clients.Base.CoreV1().Secrets(m.namespace).Update(m.ctx, secret, metav1.UpdateOptions{}) + return err +} + +func (m *Manager) ReadTLSCertInfo(name string) (*tls.CertInfo, error) { + secret, err := m.ks.Store.GetSecret(m.namespace, name) + if err != nil { + return nil, err + } + + t, err := tls.Parse(secret.Data[v1.TLSCertKey], secret.Data[v1.TLSPrivateKeyKey]) + if err != nil { + return nil, err + } + + info := t.GetCertInfo() + + return &info, nil +} + func completeAppLabels(ctx context.Context, rel *release.Release, ks *cluster.Cluster, logger logrus.FieldLogger, meta metav1.ObjectMeta) error { logger.Info("start complete app labels") latestSecret, err := loadAppSecret(ctx, rel.Name, rel.Namespace, rel.Version, ks) diff --git a/backend/pkg/utils/tls/error.go b/backend/pkg/utils/tls/error.go new file mode 100644 index 00000000..d8ee48b7 --- /dev/null +++ b/backend/pkg/utils/tls/error.go @@ -0,0 +1,7 @@ +package tls + +var ( + ErrUnmatchedCertificate error + ErrExpiredCertificate error + ErrIncompleteCertificateChain error +) diff --git a/backend/pkg/utils/tls/tls.go b/backend/pkg/utils/tls/tls.go new file mode 100644 index 00000000..78d418c8 --- /dev/null +++ b/backend/pkg/utils/tls/tls.go @@ -0,0 +1,137 @@ +package tls + +import ( + "crypto/rand" + "crypto/rsa" + "crypto/sha512" + "crypto/x509" + "encoding/pem" + "github.com/pkg/errors" + "time" +) + +type tlsKeyPair struct { + certificate []byte + privateKey []byte + + Certificates []*x509.Certificate + PrivateKey *rsa.PrivateKey +} + +func Parse(cert, key []byte) (*tlsKeyPair, error) { + t := &tlsKeyPair{ + certificate: cert, + privateKey: key, + } + + var err error + + t.Certificates, err = parseCertificate(cert) + if err != nil { + return nil, err + } + + t.PrivateKey, err = parseKey(key) + if err != nil { + return nil, err + } + + return t, nil +} + +func parseCertificate(cert []byte) ([]*x509.Certificate, error) { + block, rest := pem.Decode(cert) + if block == nil { + return nil, errors.Errorf("decode certificate failed, rest: %s", rest) + } + + certificates, err := x509.ParseCertificates(block.Bytes) + if err != nil { + return nil, err + } + + return certificates, err +} + +func parseKey(key []byte) (*rsa.PrivateKey, error) { + block, rest := pem.Decode(key) + if block == nil { + return nil, errors.Errorf("decode private key failed, rest: %s", rest) + } + + return x509.ParsePKCS1PrivateKey(block.Bytes) +} + +func validCertificates(certs []*x509.Certificate) error { + domainCert := certs[0] + if time.Now().After(domainCert.NotAfter) { + //return ErrExpiredCertificate(fmt.Sprintf("Expired at %s", domainCert.NotAfter.Format(time.RFC3339))) + return ErrExpiredCertificate + } + + lastCert := *domainCert + + for _, cert := range certs[1:] { + if string(lastCert.AuthorityKeyId) != string(cert.SubjectKeyId) { + return ErrUnmatchedCertificate + } + + lastCert = *cert + } + + if !lastCert.IsCA { + return ErrIncompleteCertificateChain + } + return nil +} + +func (t *tlsKeyPair) Valid() error { + return validCertificates(t.Certificates) +} + +func (t *tlsKeyPair) Encrypt(content []byte) ([]byte, error) { + hash := sha512.New() + pub, _ := t.Certificates[0].PublicKey.(*rsa.PublicKey) + + ciphertext, err := rsa.EncryptOAEP(hash, rand.Reader, pub, content, nil) + if err != nil { + return nil, err + } + return ciphertext, nil +} + +func (t *tlsKeyPair) Decrypt(content []byte) ([]byte, error) { + hash := sha512.New() + plaintext, err := rsa.DecryptOAEP(hash, rand.Reader, t.PrivateKey, content, nil) + if err != nil { + return nil, err + } + return plaintext, nil +} + +func (t *tlsKeyPair) GetCertInfo() CertInfo { + cert := t.Certificates[0] + return CertInfo{ + Sans: cert.DNSNames, + NotBefore: cert.NotBefore.Unix(), + NotAfter: cert.NotAfter.Unix(), + Subject: SubjectInfo{ + CN: cert.Subject.CommonName, + O: cert.Subject.Organization, + OU: cert.Subject.OrganizationalUnit, + }, + } +} + +type CertInfo struct { + Sans []string `json:"sans,omitempty"` + NotBefore int64 `json:"not_before,omitempty"` + NotAfter int64 `json:"not_after,omitempty"` + Subject SubjectInfo `json:"subject"` +} + +type SubjectInfo struct { + CN string `json:"cn,omitempty"` + O []string `json:"o,omitempty"` + OU []string `json:"ou,omitempty"` +} From b0e6d14e9c67e70fbc30cf21d17f9d3e7ded47e3 Mon Sep 17 00:00:00 2001 From: ysbot Date: Tue, 13 Dec 2022 13:48:54 +0800 Subject: [PATCH 06/43] feat(lb): add lb support add lb support Signed-off-by: ysbot --- .github/dependabot.yml | 2 +- .gitignore | 1 + backend/docs/docs.go | 145 +++++++ backend/docs/swagger.json | 145 +++++++ backend/docs/swagger.yaml | 93 +++++ backend/go.mod | 97 ++--- backend/go.sum | 360 ++++++++++++------ backend/hack/scripts/gendocs.sh | 2 +- backend/internal/app/model/system.go | 7 + backend/internal/app/router/router.go | 2 + backend/internal/app/router/system.go | 97 +++++ .../app/service/component/component.go | 60 +++ backend/internal/pkg/kube/store/store.go | 14 +- 13 files changed, 859 insertions(+), 166 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 28a9cfb0..16c9e1f7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,7 @@ version: 2 updates: - package-ecosystem: gomod - directory: / + directory: /backend schedule: interval: daily open-pull-requests-limit: 1 diff --git a/.gitignore b/.gitignore index ead09b3f..597fb4bf 100755 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ backup/ _output/ .build/ test/ +.history diff --git a/backend/docs/docs.go b/backend/docs/docs.go index d2051c7c..741e0191 100644 --- a/backend/docs/docs.go +++ b/backend/docs/docs.go @@ -705,6 +705,128 @@ const docTemplate = `{ } } } + }, + "/api/cne/system/qlb/config": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "配置负载均衡", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "系统" + ], + "summary": "配置负载均衡", + "parameters": [ + { + "type": "string", + "description": "jwtToken", + "name": "Authorization", + "in": "header" + }, + { + "type": "string", + "description": "staticToken", + "name": "X-Auth-Token", + "in": "header" + }, + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "cluster", + "name": "cluster", + "in": "query" + }, + { + "type": "string", + "description": "name", + "name": "name", + "in": "query", + "required": true + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/router.response2xx" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/router.response5xx" + } + } + } + }, + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "配置负载均衡", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "系统" + ], + "summary": "配置负载均衡", + "parameters": [ + { + "type": "string", + "description": "jwtToken", + "name": "Authorization", + "in": "header" + }, + { + "type": "string", + "description": "staticToken", + "name": "X-Auth-Token", + "in": "header" + }, + { + "description": "meta", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.ReqSystemQLB" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/router.response2xx" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/router.response5xx" + } + } + } + } } }, "definitions": { @@ -725,6 +847,9 @@ const docTemplate = `{ "cluster": { "type": "string" }, + "force_restart": { + "type": "boolean" + }, "name": { "type": "string" }, @@ -831,6 +956,26 @@ const docTemplate = `{ } } }, + "model.ReqSystemQLB": { + "type": "object", + "required": [ + "namespace" + ], + "properties": { + "cluster": { + "type": "string" + }, + "ippool": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + } + }, "model.StringSetting": { "type": "object", "properties": { diff --git a/backend/docs/swagger.json b/backend/docs/swagger.json index b674274f..0d5dd1b7 100644 --- a/backend/docs/swagger.json +++ b/backend/docs/swagger.json @@ -696,6 +696,128 @@ } } } + }, + "/api/cne/system/qlb/config": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "配置负载均衡", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "系统" + ], + "summary": "配置负载均衡", + "parameters": [ + { + "type": "string", + "description": "jwtToken", + "name": "Authorization", + "in": "header" + }, + { + "type": "string", + "description": "staticToken", + "name": "X-Auth-Token", + "in": "header" + }, + { + "type": "string", + "description": "namespace", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "cluster", + "name": "cluster", + "in": "query" + }, + { + "type": "string", + "description": "name", + "name": "name", + "in": "query", + "required": true + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/router.response2xx" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/router.response5xx" + } + } + } + }, + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "配置负载均衡", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "系统" + ], + "summary": "配置负载均衡", + "parameters": [ + { + "type": "string", + "description": "jwtToken", + "name": "Authorization", + "in": "header" + }, + { + "type": "string", + "description": "staticToken", + "name": "X-Auth-Token", + "in": "header" + }, + { + "description": "meta", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/model.ReqSystemQLB" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/router.response2xx" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/router.response5xx" + } + } + } + } } }, "definitions": { @@ -716,6 +838,9 @@ "cluster": { "type": "string" }, + "force_restart": { + "type": "boolean" + }, "name": { "type": "string" }, @@ -822,6 +947,26 @@ } } }, + "model.ReqSystemQLB": { + "type": "object", + "required": [ + "namespace" + ], + "properties": { + "cluster": { + "type": "string" + }, + "ippool": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + } + }, "model.StringSetting": { "type": "object", "properties": { diff --git a/backend/docs/swagger.yaml b/backend/docs/swagger.yaml index d075b716..67a37d74 100644 --- a/backend/docs/swagger.yaml +++ b/backend/docs/swagger.yaml @@ -7,6 +7,8 @@ definitions: type: string cluster: type: string + force_restart: + type: boolean name: type: string namespace: @@ -82,6 +84,19 @@ definitions: required: - name type: object + model.ReqSystemQLB: + properties: + cluster: + type: string + ippool: + type: string + name: + type: string + namespace: + type: string + required: + - namespace + type: object model.StringSetting: properties: key: @@ -549,4 +564,82 @@ paths: summary: 删除命名空间 tags: - 命名空间 + /api/cne/system/qlb/config: + get: + consumes: + - application/json + description: 配置负载均衡 + parameters: + - description: jwtToken + in: header + name: Authorization + type: string + - description: staticToken + in: header + name: X-Auth-Token + type: string + - description: namespace + in: query + name: namespace + type: string + - description: cluster + in: query + name: cluster + type: string + - description: name + in: query + name: name + required: true + type: string + produces: + - application/json + responses: + "201": + description: Created + schema: + $ref: '#/definitions/router.response2xx' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/router.response5xx' + security: + - ApiKeyAuth: [] + summary: 配置负载均衡 + tags: + - 系统 + post: + consumes: + - application/json + description: 配置负载均衡 + parameters: + - description: jwtToken + in: header + name: Authorization + type: string + - description: staticToken + in: header + name: X-Auth-Token + type: string + - description: meta + in: body + name: body + required: true + schema: + $ref: '#/definitions/model.ReqSystemQLB' + produces: + - application/json + responses: + "201": + description: Created + schema: + $ref: '#/definitions/router.response2xx' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/router.response5xx' + security: + - ApiKeyAuth: [] + summary: 配置负载均衡 + tags: + - 系统 swagger: "2.0" diff --git a/backend/go.mod b/backend/go.mod index 6da1873e..ccbc669c 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -6,45 +6,45 @@ require ( github.com/Masterminds/semver v1.5.0 github.com/chartmuseum/helm-push v0.10.2 github.com/easysoft/quickon-api v0.6.0 - github.com/ergoapi/util v0.2.23 + github.com/ergoapi/util v0.2.26 github.com/gin-gonic/gin v1.8.1 github.com/go-playground/locales v0.14.0 github.com/go-playground/universal-translator v0.18.0 github.com/go-playground/validator/v10 v10.11.1 - github.com/go-sql-driver/mysql v1.6.0 + github.com/go-sql-driver/mysql v1.7.0 github.com/google/uuid v1.3.0 github.com/imdario/mergo v0.3.12 github.com/imroc/req/v3 v3.25.0 github.com/kelseyhightower/envconfig v1.4.0 - github.com/lib/pq v1.10.6 + github.com/lib/pq v1.10.7 github.com/parnurzeal/gorequest v0.2.16 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.13.0 + github.com/prometheus/client_golang v1.14.0 github.com/robfig/cron/v3 v3.0.1 github.com/sethvargo/go-envconfig v0.6.0 github.com/sirupsen/logrus v1.9.0 - github.com/spf13/cobra v1.6.0 + github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.13.0 + github.com/spf13/viper v1.14.0 github.com/swaggo/gin-swagger v1.4.2 github.com/swaggo/swag v1.8.1 github.com/vmware-tanzu/velero v1.9.0 go.uber.org/automaxprocs v1.5.1 gopkg.in/natefinch/lumberjack.v2 v2.0.0 helm.sh/helm/v3 v3.9.4 - k8s.io/api v0.24.7 - k8s.io/apimachinery v0.24.7 - k8s.io/client-go v0.24.7 - k8s.io/kubectl v0.24.7 - k8s.io/metrics v0.24.7 + k8s.io/api v0.25.4 + k8s.io/apimachinery v0.25.4 + k8s.io/client-go v0.25.4 + k8s.io/kubectl v0.25.4 + k8s.io/metrics v0.25.4 sigs.k8s.io/yaml v1.3.0 ) require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/BurntSushi/toml v1.0.0 // indirect + github.com/BurntSushi/toml v1.2.0 // indirect github.com/KyleBanks/depth v1.2.1 // indirect - github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect + github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect github.com/Masterminds/sprig/v3 v3.2.2 // indirect @@ -53,7 +53,10 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect + github.com/chai2010/gettext-go v1.0.2 // indirect + github.com/cockroachdb/errors v1.9.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect + github.com/cockroachdb/redact v1.1.3 // indirect github.com/containerd/containerd v1.6.6 // indirect github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -69,9 +72,10 @@ require ( github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect github.com/fatih/color v1.13.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.14.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-errors/errors v1.0.1 // indirect + github.com/go-errors/errors v1.4.2 // indirect github.com/go-gorp/gorp/v3 v3.0.2 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect @@ -80,13 +84,13 @@ require ( github.com/go-openapi/swag v0.22.3 // indirect github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/goccy/go-json v0.9.11 // indirect + github.com/goccy/go-json v0.10.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20221103000818-d260c55eee4c // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -97,24 +101,26 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/huandu/xstrings v1.3.2 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.13.6 // indirect + github.com/klauspost/compress v1.15.11 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/lucas-clemente/quic-go v0.30.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/marten-seemann/qpack v0.3.0 // indirect github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect github.com/marten-seemann/qtls-go1-18 v0.1.3 // indirect github.com/marten-seemann/qtls-go1-19 v0.1.1 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect @@ -134,41 +140,40 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/rubenv/sql-migrate v1.1.1 // indirect github.com/russross/blackfriday v1.5.2 // indirect github.com/shopspring/decimal v1.2.0 // indirect - github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/stretchr/testify v1.8.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/ugorji/go/codec v1.2.7 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect + github.com/xlab/treeprint v1.1.0 // indirect go.starlark.net v0.0.0-20201006213952-227f4aabceb5 // indirect - golang.org/x/crypto v0.1.0 // indirect + golang.org/x/crypto v0.4.0 // indirect golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect - golang.org/x/mod v0.6.0 // indirect - golang.org/x/net v0.1.0 // indirect - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/term v0.1.0 // indirect - golang.org/x/text v0.4.0 // indirect - golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect - golang.org/x/tools v0.2.0 // indirect + golang.org/x/mod v0.7.0 // indirect + golang.org/x/net v0.4.0 // indirect + golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/term v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect + golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect + golang.org/x/tools v0.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect - google.golang.org/grpc v1.46.2 // indirect + google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e // indirect + google.golang.org/grpc v1.50.1 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect @@ -176,17 +181,17 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.24.2 // indirect k8s.io/apiserver v0.24.2 // indirect - k8s.io/cli-runtime v0.24.7 // indirect - k8s.io/component-base v0.24.7 // indirect + k8s.io/cli-runtime v0.25.4 // indirect + k8s.io/component-base v0.25.4 // indirect k8s.io/helm v2.17.0+incompatible // indirect k8s.io/klog/v2 v2.70.1 // indirect - k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect - k8s.io/utils v0.0.0-20220713171938-56c0de1e6f5e // indirect + k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect + k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect moul.io/http2curl v1.0.0 // indirect oras.land/oras-go v1.2.0 // indirect sigs.k8s.io/controller-runtime v0.12.3 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/kustomize/api v0.11.4 // indirect - sigs.k8s.io/kustomize/kyaml v0.13.6 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/kustomize/api v0.12.1 // indirect + sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/backend/go.sum b/backend/go.sum index 71d1def9..0ae110a2 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -47,6 +47,7 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -57,14 +58,20 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935 github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= -github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= +github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU= -github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= +github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -84,9 +91,11 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs= github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -96,6 +105,7 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/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-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -103,6 +113,7 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -127,8 +138,8 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 h1:7aWHqerlJ41y6FOsEUvknqgXnGmJyJSbjhAWq5pO4F8= -github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= +github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/chartmuseum/helm-push v0.10.2 h1:vuzgu+j+2yKOpPtfF4ksD7RC9Y7wAwrHNpiWDnzAZzM= github.com/chartmuseum/helm-push v0.10.2/go.mod h1:s6xTICU31jKdLkOXS+GgaR61E+oU4h8TWb1yZcHq8OE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= @@ -139,25 +150,37 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/datadriven v1.0.1-0.20211007161720-b558070c3be0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= +github.com/cockroachdb/datadriven v1.0.1-0.20220214170620-9913f5bc19b7/go.mod h1:hi0MtSY3AYDQNDi83kDkMH5/yqM/CsIrsOITkSoH7KI= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= +github.com/cockroachdb/errors v1.8.8/go.mod h1:z6VnEL3hZ/2ONZEvG7S5Ym0bU2AqPcEKnIiA1wbsSu0= +github.com/cockroachdb/errors v1.9.0 h1:B48dYem5SlAY7iU8AKsgedb4gH6mo+bDkbtLIvM/a88= +github.com/cockroachdb/errors v1.9.0/go.mod h1:vaNcEYYqbIqB5JhKBhFV9CneUqeuEbB2OYJBK4GBNYQ= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0njg5jJ1DdKCFPdMBrp/mdZfCpa5h+WM74= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= +github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= github.com/containerd/containerd v1.6.6 h1:xJNPhbrmz8xAMDNoVjHy9YHtWwEQNS+CDkcIRh7t8Y0= github.com/containerd/containerd v1.6.6/go.mod h1:ZoP1geJldzCVY3Tonoz7b1IXk8rIX0Nltt5QE4OMNk0= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +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= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -171,9 +194,10 @@ github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7h 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/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/distribution/distribution/v3 v3.0.0-20220526142353-ffbd94cbe269 h1:hbCT8ZPPMqefiAWD2ZKjn7ypokIGViTvBBg/ExLSdCk= github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= @@ -196,6 +220,7 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/easysoft/quickon-api v0.6.0 h1:RzgLKQDFCQTOn+Mm0zabc/9fzybKsUbAaywYwhvTBQg= github.com/easysoft/quickon-api v0.6.0/go.mod h1:J3QfhrkhaitaJzQc16SxiLFOVk86uYhouNaYGHOXzjY= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= 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/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -209,21 +234,22 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ergoapi/util v0.2.23 h1:JGWv/7hRpQVF5OsNhbFZRM5sEWATzLZcQHTb50LYlbo= -github.com/ergoapi/util v0.2.23/go.mod h1:AOjgjb+Yc6ieykNVujb318Qh9VZL/PI10dQdXBgc4Oc= -github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/ergoapi/util v0.2.26 h1:vpxdt0EHMzt5PVlpvmd7KGeWiGSOwODr5GIFA2K26Y8= +github.com/ergoapi/util v0.2.26/go.mod h1:lc2keKuxkzG0Uu3hTN8f/GECHTjjRse8mQ97RC6CaCc= +github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/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/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -234,22 +260,29 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= +github.com/getsentry/sentry-go v0.14.0 h1:rlOBkuFZRKKdUnKO+0U3JclRDQKlRu5vVQtkWSQvC70= +github.com/getsentry/sentry-go v0.14.0/go.mod h1:RZPJKSw+adu8PBNygiri/A98FqVr2HtRckJk9XVxJ9I= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/gzip v0.0.3 h1:etUaeesHhEORpZMp18zoOhepboiWnFtXrBZxszWUn4k= github.com/gin-contrib/gzip v0.0.3/go.mod h1:YxxswVZIqOvcHEQpsSn+QF5guQtO1dCfy0shBPy4jFc= +github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -269,6 +302,7 @@ github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= 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= @@ -299,8 +333,9 @@ github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJ github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -312,15 +347,23 @@ github.com/gobuffalo/packr/v2 v2.8.3 h1:xE1yzvnO56cUC0sTpKR3DIbxZgB54AftTFMhB2XE github.com/gobuffalo/packr/v2 v2.8.3/go.mod h1:0SahksCVcx4IMnigTjiFuyldmTrdTctXsOdiU5KwbKc= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= +github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godror/godror v0.24.2/go.mod h1:wZv/9vPiUib6tkoDl+AZ/QLf5YZgMravZ7jxH2eQWAE= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= 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.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -359,7 +402,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= +github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -380,9 +423,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -417,13 +459,14 @@ github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= 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.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= 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 v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/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= @@ -451,6 +494,7 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX 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= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -464,17 +508,27 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/imroc/req/v3 v3.25.0 h1:W3hFvD4PB8nNySxHuESbEuU2sY2/oBi14q2mlOlo+U8= github.com/imroc/req/v3 v3.25.0/go.mod h1:EluRnkfh8A39BmrCARYhcUrfGyR8qPw+O0BZyTy4j9k= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= +github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= +github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= +github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= @@ -494,18 +548,35 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 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/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= 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/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= +github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= +github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= +github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= +github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= +github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= +github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= +github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= 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/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= 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.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kortschak/utter v1.0.1/go.mod h1:vSmSjbyrlKjjsL71193LmzBOKgwePk9DH6uFaWHIInc= @@ -514,13 +585,17 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= +github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= 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= @@ -530,23 +605,22 @@ github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/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/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/lucas-clemente/quic-go v0.28.1/go.mod h1:oGz5DKK41cJt5+773+BSO9BXDsREY4HLf7+0odGAPO0= github.com/lucas-clemente/quic-go v0.30.0 h1:nwLW0h8ahVQ5EPTIM7uhl/stHqQDea15oRlYKZmw2O0= github.com/lucas-clemente/quic-go v0.30.0/go.mod h1:ssOrRsOmdxa768Wr78vnh2B8JozgLsMzG/g+0qEC7uk= github.com/lunixbochs/vtclean v1.0.0/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/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -570,26 +644,36 @@ github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1/go.mod h1:5HTDWtVudo/WFsHKRN github.com/marten-seemann/qtls-go1-19 v0.1.1 h1:mnbxeq3oEyQxQXwI4ReCgW9DPoPR94sNlqWoDZnjRIE= github.com/marten-seemann/qtls-go1-19 v0.1.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/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.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-oci8 v0.1.1/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= +github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= +github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= 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/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= @@ -629,12 +713,19 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -642,11 +733,12 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/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.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -665,8 +757,8 @@ github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3 github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE= github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= +github.com/otiai10/copy v1.9.0 h1:7KFNiCgZ91Ru4qW4CWPf/7jqtxLagGRmIxWldPP9VY4= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= @@ -678,11 +770,13 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= 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-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -705,13 +799,14 @@ github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQ github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/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/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= 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.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -742,7 +837,9 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rubenv/sql-migrate v1.1.1 h1:haR5Hn8hbW9/SpAICrXoZqXnywS7Q5WijwkQENPeNWY= github.com/rubenv/sql-migrate v1.1.1/go.mod h1:/7TZymwxN8VWumcIxw1jjHEcR1djpdkMHQPT4FWdnbQ= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= @@ -750,6 +847,9 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/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/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +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/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= @@ -800,34 +900,35 @@ 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/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= +github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= 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/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.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.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= +github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= +github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify 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= @@ -835,8 +936,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -849,12 +951,20 @@ github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pA github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/vmware-tanzu/velero v1.9.0 h1:QGgmYmNycyMcVvaa6glkDQv9U/QzC+EgLSw4pHQMHpc= @@ -866,8 +976,13 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1: 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/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= +github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -914,7 +1029,6 @@ go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.starlark.net v0.0.0-20201006213952-227f4aabceb5 h1:ApvY/1gw+Yiqb/FKeks3KnVPWpkR3xzij82XPKLjJVw= go.starlark.net v0.0.0-20201006213952-227f4aabceb5/go.mod h1:f0znQkUKRrkk36XxWbGjMqQM8wGv/xHBVE2qc3B5oFU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -922,7 +1036,6 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.5.1 h1:e1YG66Lrk73dn4qhg8WFSvhF0JuFQF0ERIp4rpuV8Qk= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -933,26 +1046,30 @@ golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+ 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-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/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-20190313024323-a1f597ede03a/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-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-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/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-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= +golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= 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= @@ -993,8 +1110,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1008,6 +1125,7 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r 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-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/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= @@ -1047,6 +1165,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1054,8 +1173,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1073,8 +1192,8 @@ golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1087,8 +1206,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1097,7 +1217,9 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1106,11 +1228,12 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/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-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1162,6 +1285,7 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1174,12 +1298,12 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1189,25 +1313,29 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/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-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/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-20180828015842-6cd1fcedba52/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-20181030000716-a0a13e073c7b/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-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/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-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/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= @@ -1259,12 +1387,13 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1305,6 +1434,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/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1355,10 +1485,12 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e h1:S9GbmC1iCgvbLyAokVCwiO6tVIrU9Y7c5oMx1V/ki/Y= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1384,9 +1516,8 @@ google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1400,7 +1531,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1412,12 +1542,16 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +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/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.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1434,6 +1568,7 @@ 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-20191120175047-4206685974f2/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-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -1454,27 +1589,24 @@ 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/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= -k8s.io/api v0.24.7 h1:UU9XB38BLUEzGoC45387FiblblIbRQkEUAG6nZoddqE= -k8s.io/api v0.24.7/go.mod h1:tt+TFsvj8um6tsywVsTdwGdPvQ4IDCMLZXFH5C2BRlU= +k8s.io/api v0.25.4 h1:3YO8J4RtmG7elEgaWMb4HgmpS2CfY1QlaOz9nwB+ZSs= +k8s.io/api v0.25.4/go.mod h1:IG2+RzyPQLllQxnhzD8KQNEu4c4YvyDTpSMztf4A0OQ= k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apimachinery v0.24.7 h1:CYJ+iRJkNFWWdUz5XodHkA6Yk5nRTbudvvQDVGxtuqc= -k8s.io/apimachinery v0.24.7/go.mod h1:WR5z9Lpw2mOAeDg20iSSrEBRQMY0p2YXVdYpUIgSr4o= +k8s.io/apimachinery v0.25.4 h1:CtXsuaitMESSu339tfhVXhQrPET+EiWnIY1rcurKnAc= +k8s.io/apimachinery v0.25.4/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= k8s.io/apiserver v0.24.2 h1:orxipm5elPJSkkFNlwH9ClqaKEDJJA3yR2cAAlCnyj4= k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= -k8s.io/cli-runtime v0.24.7 h1:rsUnGmohbeK0NjcHrywpRYRPwJHRqCkMH8i1TuPFcS8= -k8s.io/cli-runtime v0.24.7/go.mod h1:8uP24DXJAA8jIG4W/Ze2bPXTbIIiO91n4o5k6zrY4fM= +k8s.io/cli-runtime v0.25.4 h1:GTSBN7aKBrc2LqpdO30CmHQqJtRmotxV7XsMSP+QZIk= +k8s.io/cli-runtime v0.25.4/go.mod h1:JGOw1CR8v4Mcz6cEKA7bFQe0bPrNn1l5sGAX1/Ke4Eg= k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= -k8s.io/client-go v0.24.7 h1:K4rTkxc94ctXfaDXfa5IflsflPYmguG/3zb3iJY4dQA= -k8s.io/client-go v0.24.7/go.mod h1:UoQaKAGHRRE77THP0jGUehwqt5javBlv1AoKdpfz3JA= +k8s.io/client-go v0.25.4 h1:3RNRDffAkNU56M/a7gUfXaEzdhZlYhoW8dgViGy5fn8= +k8s.io/client-go v0.25.4/go.mod h1:8trHCAC83XKY0wsBIpbirZU4NTUpbuhc2JnI7OruGZw= k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/code-generator v0.24.7/go.mod h1:1B92gyaTHWnignKkQzbHIyV3hiyRlZ+prNqD6nbajPA= k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= -k8s.io/component-base v0.24.7 h1:zQ3SiqZucS1thDB/5UnRV3DQ71eXvmHaLY9GPB9YJYk= -k8s.io/component-base v0.24.7/go.mod h1:ce5M3pIoOY3DoFbcQ+Y8BMEsRFd3KcrAEjrZIZf0xqw= -k8s.io/component-helpers v0.24.7/go.mod h1:lPOMDO8oRUPwIMva5d1/4W6WM0/4agk6ZVDsO+USxkM= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/component-base v0.25.4 h1:n1bjg9Yt+G1C0WnIDJmg2fo6wbEU1UGMRiQSjmj7hNQ= +k8s.io/component-base v0.25.4/go.mod h1:nnZJU8OP13PJEm6/p5V2ztgX2oyteIaAGKGMYb2L2cY= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/helm v2.17.0+incompatible h1:Bpn6o1wKLYqKM3+Osh8e+1/K2g/GsQJ4F4yNF2+deao= @@ -1484,18 +1616,17 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 h1:yEQKdMCjzAOvGeiTwG4hO/hNVNtDOuUFvMUZ0OlaIzs= -k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8/go.mod h1:mbJ+NSUoAhuR14N0S63bPkh8MGVSo3VYSGZtH/mfMe0= -k8s.io/kubectl v0.24.7 h1:N2mP8+IyMkCx7Kp6Bdl5beDRYifHIctKLmXALPb8yrw= -k8s.io/kubectl v0.24.7/go.mod h1:DqzwrhwKm/C7L0YJLLKR3UEn7Qq6St9u72SpZE5/Y58= -k8s.io/metrics v0.24.7 h1:TVT37bThNAlNyB0XoQp3IRfKI0zQnqIKOaF14xOMPdo= -k8s.io/metrics v0.24.7/go.mod h1:VMNVp32maNQL9bcOhuW5tFbunPOci9MDCIqpn4wcVVs= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= +k8s.io/kubectl v0.25.4 h1:O3OA1z4V1ZyvxCvScjq0pxAP7ABgznr8UvnVObgI6Dc= +k8s.io/kubectl v0.25.4/go.mod h1:CKMrQ67Bn2YCP26tZStPQGq62zr9pvzEf65A0navm8k= +k8s.io/metrics v0.25.4 h1:Kq2vLaeKkksyYCuvEjg5kJbTb/BAawUgci3xasfL+nA= +k8s.io/metrics v0.25.4/go.mod h1:cFxN3gbdb0nld4IGHHM51qKHUCcXvzkKh3z1g2YriL8= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220713171938-56c0de1e6f5e h1:W1yba+Bpkwb5BatGKZALQ1yylhwnuD6CkYmrTibyLDM= -k8s.io/utils v0.0.0-20220713171938-56c0de1e6f5e/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= moul.io/http2curl v1.0.0 h1:6XwpyZOYsgZJrU8exnG87ncVkU1FVCcTRpwzOkTDUi8= moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= oras.land/oras-go v1.2.0 h1:yoKosVIbsPoFMqAIFHTnrmOuafHal+J/r+I5bdbVWu4= @@ -1509,15 +1640,14 @@ sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+ sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.11.4 h1:/0Mr3kfBBNcNPOW5Qwk/3eb8zkswCwnqQxxKtmrTkRo= -sigs.k8s.io/kustomize/api v0.11.4/go.mod h1:k+8RsqYbgpkIrJ4p9jcdPqe8DprLxFUUO0yNOq8C+xI= -sigs.k8s.io/kustomize/cmd/config v0.10.6/go.mod h1:/S4A4nUANUa4bZJ/Edt7ZQTyKOY9WCER0uBS1SW2Rco= -sigs.k8s.io/kustomize/kustomize/v4 v4.5.4/go.mod h1:Zo/Xc5FKD6sHl0lilbrieeGeZHVYCA4BzxeAaLI05Bg= -sigs.k8s.io/kustomize/kyaml v0.13.6 h1:eF+wsn4J7GOAXlvajv6OknSunxpcOBQQqsnPxObtkGs= -sigs.k8s.io/kustomize/kyaml v0.13.6/go.mod h1:yHP031rn1QX1lr/Xd934Ri/xdVNG8BE2ECa78Ht/kEg= +sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= +sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= +sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= +sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/backend/hack/scripts/gendocs.sh b/backend/hack/scripts/gendocs.sh index 3daad215..50ed7ec6 100755 --- a/backend/hack/scripts/gendocs.sh +++ b/backend/hack/scripts/gendocs.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -which swag && swag init -g cmd/main.go +which swag && swag init -g cmd/main.go diff --git a/backend/internal/app/model/system.go b/backend/internal/app/model/system.go index e6fd8d01..f18dc734 100644 --- a/backend/internal/app/model/system.go +++ b/backend/internal/app/model/system.go @@ -15,3 +15,10 @@ type ReqSmtpAuth struct { User string `json:"user"` Pass string `json:"pass"` } + +// ReqSystemQLB 负载均衡配置 +type ReqSystemQLB struct { + QueryNamespace + Name string `json:"name"` + IPPool string `json:"ippool"` +} diff --git a/backend/internal/app/router/router.go b/backend/internal/app/router/router.go index 0f2ae640..7cb22cc1 100644 --- a/backend/internal/app/router/router.go +++ b/backend/internal/app/router/router.go @@ -102,6 +102,8 @@ func Config(r *gin.Engine) { api.POST("/system/update", SystemUpdate) api.GET("/system/app-full-list", FindAllApps) api.POST("/system/smtp/validator", AuthMailServer) + api.GET("/system/qlb/config", GetLoadBalancer) + api.POST("/system/qlb/config", ConfigLoadBalancer) api.GET("/snippet", ListSnippets) api.GET("/snippet/read", ReadSnippet) diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index 735c1877..bad6fe04 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -10,7 +10,9 @@ import ( "net" "net/http" "net/smtp" + "strings" + "github.com/ergoapi/util/exnet" "github.com/gin-gonic/gin" "github.com/spf13/viper" @@ -156,3 +158,98 @@ func AuthMailServer(c *gin.Context) { renderSuccess(c, http.StatusOK) } + +// GetLoadBalancer 配置负载均衡 +// @Summary 配置负载均衡 +// @Tags 系统 +// @Description 配置负载均衡 +// @Accept json +// @Produce json +// @Param Authorization header string false "jwtToken" +// @Param X-Auth-Token header string false "staticToken" +// @Security ApiKeyAuth +// @Param namespace query string false "namespace" +// @Param cluster query string false "cluster" +// @Param name query string true "name" +// @Success 201 {object} response2xx +// @Failure 500 {object} response5xx +// @Router /api/cne/system/qlb/config [get] +func GetLoadBalancer(c *gin.Context) { + var ( + err error + ctx = c.Request.Context() + ) + + namespace := c.DefaultQuery("namespace", "cne-system") + cluster := c.DefaultQuery("cluster", "") + name := c.DefaultQuery("name", "default-qlb-pool") + + logger := getLogger(ctx) + logger = logger.WithField("qlb", name) + ippool, err := service.Components(ctx, cluster).GetQLBConfig(name, namespace) + if err != nil { + logger.WithError(err).Error("fetch qlb config failed") + renderError(c, http.StatusInternalServerError, err) + return + } + renderJson(c, http.StatusOK, map[string]string{ + "ippool": ippool, + }) +} + +// ConfigLoadBalancer 配置负载均衡 +// @Summary 配置负载均衡 +// @Tags 系统 +// @Description 配置负载均衡 +// @Accept json +// @Produce json +// @Param Authorization header string false "jwtToken" +// @Param X-Auth-Token header string false "staticToken" +// @Security ApiKeyAuth +// @Param body body model.ReqSystemQLB true "meta" +// @Success 201 {object} response2xx +// @Failure 500 {object} response5xx +// @Router /api/cne/system/qlb/config [post] +func ConfigLoadBalancer(c *gin.Context) { + var ( + err error + ctx = c.Request.Context() + body model.ReqSystemQLB + ) + + if err = c.ShouldBindJSON(&body); err != nil { + renderError(c, http.StatusBadRequest, err) + return + } + + if len(body.Name) == 0 { + body.Name = "default-qlb-pool" + } + logger := getLogger(ctx) + logger = logger.WithField("qlb", body.Name) + // 校验是否合法 + if strings.Contains(body.IPPool, "-") { + pools := strings.Split(body.IPPool, "-") + if len(pools) != 2 { + renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool")) + return + } + if net.ParseIP(pools[0]) == nil || net.ParseIP(pools[1]) == nil { + renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool")) + return + } + } else if net.ParseIP(body.IPPool) == nil { + renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool")) + return + } + + if err = service.Components(ctx, body.Cluster).UpdateQLBConfig(body.Name, body.Namespace, body.IPPool); err != nil { + logger.WithError(err).Error("update qlb config failed") + renderError(c, http.StatusInternalServerError, err) + return + } + + logger.Info("update qlb config failed successful") + logger.Infof("lb pool name: %s, address: %s", body.Name, body.IPPool) + renderSuccess(c, http.StatusOK) +} diff --git a/backend/internal/app/service/component/component.go b/backend/internal/app/service/component/component.go index e3538673..f7bd5af2 100644 --- a/backend/internal/app/service/component/component.go +++ b/backend/internal/app/service/component/component.go @@ -11,6 +11,10 @@ import ( quchengv1beta1 "github.com/easysoft/quickon-api/qucheng/v1beta1" "github.com/sirupsen/logrus" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/intstr" "gitlab.zcorp.cc/pangu/cne-api/internal/pkg/constant" @@ -272,3 +276,59 @@ func fromBool(b *bool) bool { } return *b } + +// CreateQLBConfig 更新负载均衡配置, 若没有则配置 +func (m *Manager) UpdateQLBConfig(name, namespace, ippool string) error { + gvr := schema.GroupVersionResource{Group: "metallb.io", Version: "v1beta1", Resource: "ipaddresspools"} + dc := m.ks.Store.Clients.Dynamic.Resource(gvr).Namespace(namespace) + found, err := dc.Get(context.TODO(), name, metav1.GetOptions{}) + if err != nil { + if apierrors.IsNotFound(err) { + object := &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": "metallb.io/v1beta1", + "kind": "IPAddressPool", + "metadata": map[string]interface{}{ + "name": name, + "namespace": namespace, + }, + "spec": map[string]interface{}{ + "addresses": []interface{}{ + ippool, + }, + }, + }, + } + _, err = dc.Create(context.TODO(), object, metav1.CreateOptions{}) + return err + } + return err + } + // 存在更新 + newipPool := []interface{}{ + ippool, + } + if err := unstructured.SetNestedSlice(found.Object, newipPool, "spec", "addresses"); err != nil { + return err + } + _, err = dc.Update(context.TODO(), found, metav1.UpdateOptions{}) + return err +} + +// GetQLBConfig 查询负载均衡配置 +func (m *Manager) GetQLBConfig(name, namespace string) (string, error) { + gvr := schema.GroupVersionResource{Group: "metallb.io", Version: "v1beta1", Resource: "ipaddresspools"} + dc := m.ks.Store.Clients.Dynamic.Resource(gvr).Namespace(namespace) + found, err := dc.Get(context.TODO(), name, metav1.GetOptions{}) + if err != nil { + return "", err + } + data, exist, err := unstructured.NestedSlice(found.Object, "spec", "addresses") + if err != nil { + return "", err + } + if !exist || len(data) == 0 { + return "", fmt.Errorf("not exist addresses filed") + } + return data[0].(string), nil +} diff --git a/backend/internal/pkg/kube/store/store.go b/backend/internal/pkg/kube/store/store.go index db5db1df..0c6dd720 100644 --- a/backend/internal/pkg/kube/store/store.go +++ b/backend/internal/pkg/kube/store/store.go @@ -25,6 +25,7 @@ import ( metanetworkv1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/dynamic" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" appsv1 "k8s.io/client-go/listers/apps/v1" @@ -120,9 +121,10 @@ type Lister struct { } type Clients struct { - Base *kubernetes.Clientset - Cne *quchengclientset.Clientset - Velero *veleroclientset.Clientset + Base *kubernetes.Clientset + Cne *quchengclientset.Clientset + Velero *veleroclientset.Clientset + Dynamic dynamic.Interface } type Storer struct { @@ -210,6 +212,12 @@ func NewStorer(config rest.Config) *Storer { s.listers.VolumeBackups = factory.Velero().V1().PodVolumeBackups().Lister() } + if cs, err := dynamic.NewForConfig(&config); err != nil { + logger.WithError(err).Error("failed to prepare dynamic kubeclient") + } else { + s.Clients.Dynamic = cs + } + return s } From 9c2f9b168c479b7945b25692c94ac63e91cf620a Mon Sep 17 00:00:00 2001 From: qishiyao Date: Tue, 13 Dec 2022 14:13:44 +0800 Subject: [PATCH 07/43] * Add ret code for certificate --- backend/internal/app/router/system.go | 25 ++++++++++++++++++--- backend/internal/pkg/retcode/errors.go | 30 ++++++++++++++++++++++++++ backend/pkg/utils/tls/error.go | 8 ++++--- 3 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 backend/internal/pkg/retcode/errors.go diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index 0035f783..178cd839 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -7,6 +7,8 @@ package router import ( "crypto/tls" "fmt" + "github.com/pkg/errors" + "gitlab.zcorp.cc/pangu/cne-api/internal/pkg/retcode" "net" "net/http" "net/smtp" @@ -181,13 +183,17 @@ func UploadTLS(c *gin.Context) { } if err = t.Valid(); err != nil { - renderError(c, http.StatusBadRequest, err) + renderError(c, translateError(err), err) return } + err = service.Apps(ctx, "", viper.GetString(constant.FlagRuntimeNamespace)).UploadTLS(body.Name, body.CertificatePem, body.PrivateKeyPem) + if err != nil { + renderError(c, http.StatusInternalServerError, err) + return + } renderJson(c, http.StatusOK, t.GetCertInfo()) - service.Apps(ctx, "", viper.GetString(constant.FlagRuntimeNamespace)).UploadTLS(body.Name, body.CertificatePem, body.PrivateKeyPem) } func ReadTLSInfo(c *gin.Context) { @@ -207,8 +213,21 @@ func ReadTLSInfo(c *gin.Context) { info, err := service.Apps(ctx, "", viper.GetString(constant.FlagRuntimeNamespace)).ReadTLSCertInfo(query.Name) if err != nil { - renderError(c, http.StatusInternalServerError, err) + renderError(c, translateError(err), err) return } renderJson(c, http.StatusOK, info) } + +func translateError(e error) int { + var code = retcode.DefaultCode + if errors.Is(e, utiltls.ErrUnmatchedCertificate) { + code = retcode.UnmatchedCertificate + } else if errors.Is(e, utiltls.ErrExpiredCertificate) { + code = retcode.ExpiredCertificate + } else if errors.Is(e, utiltls.ErrIncompleteCertificateChain) { + code = retcode.IncompleteCertificateChain + } + + return int(code) +} diff --git a/backend/internal/pkg/retcode/errors.go b/backend/internal/pkg/retcode/errors.go new file mode 100644 index 00000000..a4a9c56d --- /dev/null +++ b/backend/internal/pkg/retcode/errors.go @@ -0,0 +1,30 @@ +package retcode + +type Error struct { + err error + code RetCode +} + +func NewError(e error, c int) *Error { + return &Error{ + err: e, code: RetCode(c), + } +} + +func (e *Error) Error() string { + return e.Error() +} + +type RetCode int + +const DefaultCode RetCode = 40000 + +// Define app errors + +// Define system errors + +const ( + ExpiredCertificate RetCode = iota + 41001 // 证书过期 + UnmatchedCertificate // 证书不匹配 + IncompleteCertificateChain // 证书链不完整 +) diff --git a/backend/pkg/utils/tls/error.go b/backend/pkg/utils/tls/error.go index d8ee48b7..5a74bc2d 100644 --- a/backend/pkg/utils/tls/error.go +++ b/backend/pkg/utils/tls/error.go @@ -1,7 +1,9 @@ package tls +import "errors" + var ( - ErrUnmatchedCertificate error - ErrExpiredCertificate error - ErrIncompleteCertificateChain error + ErrUnmatchedCertificate = errors.New("certificate chain not matched") + ErrExpiredCertificate = errors.New("certificate is expired") + ErrIncompleteCertificateChain = errors.New("certificate chain is uncompleted") ) From 45dfd03d6e392910a1acebac4766ca9694c70ff2 Mon Sep 17 00:00:00 2001 From: qishiyao Date: Tue, 13 Dec 2022 16:21:48 +0800 Subject: [PATCH 08/43] * Fix merge code. --- backend/internal/app/router/router.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/internal/app/router/router.go b/backend/internal/app/router/router.go index 5cede871..3b5c6ea5 100644 --- a/backend/internal/app/router/router.go +++ b/backend/internal/app/router/router.go @@ -102,13 +102,10 @@ func Config(r *gin.Engine) { api.POST("/system/update", SystemUpdate) api.GET("/system/app-full-list", FindAllApps) api.POST("/system/smtp/validator", AuthMailServer) -<<<<<<< HEAD api.POST("/system/tls/upload", UploadTLS) api.GET("/system/tls/info", ReadTLSInfo) -======= api.GET("/system/qlb/config", GetLoadBalancer) api.POST("/system/qlb/config", ConfigLoadBalancer) ->>>>>>> test api.GET("/snippet", ListSnippets) api.GET("/snippet/read", ReadSnippet) From d1fa29b2541c55a79ebfb9a8dd56cc70a7420963 Mon Sep 17 00:00:00 2001 From: ysbot Date: Tue, 13 Dec 2022 17:42:08 +0800 Subject: [PATCH 09/43] feat(lb): fix lb valid fix lb valid Signed-off-by: ysbot --- backend/internal/app/router/system.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index f0318f26..a23af917 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -7,15 +7,16 @@ package router import ( "crypto/tls" "fmt" - "github.com/gin-gonic/gin" - "github.com/pkg/errors" - "github.com/spf13/viper" - "gitlab.zcorp.cc/pangu/cne-api/internal/pkg/retcode" "net" "net/http" "net/smtp" "strings" + "github.com/gin-gonic/gin" + "github.com/pkg/errors" + "github.com/spf13/viper" + "gitlab.zcorp.cc/pangu/cne-api/internal/pkg/retcode" + "gitlab.zcorp.cc/pangu/cne-api/internal/app/model" "gitlab.zcorp.cc/pangu/cne-api/internal/app/service" "gitlab.zcorp.cc/pangu/cne-api/internal/pkg/constant" @@ -229,19 +230,22 @@ func ConfigLoadBalancer(c *gin.Context) { logger := getLogger(ctx) logger = logger.WithField("qlb", body.Name) // 校验是否合法 + logger.Infof("valid ip pool: %s(%s)", body.Name, body.IPPool) if strings.Contains(body.IPPool, "-") { pools := strings.Split(body.IPPool, "-") if len(pools) != 2 { - renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool")) + renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool failed, like 192.168.1.1-192.168.1.100")) return } if net.ParseIP(pools[0]) == nil || net.ParseIP(pools[1]) == nil { - renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool")) + renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool failed, ip is invalid")) + return + } + } else { + if _, _, err := net.ParseCIDR(body.IPPool); err != nil { + renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool failed: %v, like 192.168.1.1/24", err)) return } - } else if net.ParseIP(body.IPPool) == nil { - renderError(c, http.StatusInternalServerError, fmt.Errorf("valid ip pool")) - return } if err = service.Components(ctx, body.Cluster).UpdateQLBConfig(body.Name, body.Namespace, body.IPPool); err != nil { From 47ac0378ab772e995cf30891ddebb99a79d0294a Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Tue, 13 Dec 2022 20:31:41 +0800 Subject: [PATCH 10/43] * Finish uploading https certificate. --- frontend/module/cne/lang/zh-cn.php | 9 ++- frontend/module/cne/model.php | 70 +++++++++++++++++ frontend/module/instance/model.php | 20 ++++- .../module/space/view/browsebycard.html.php | 2 +- frontend/module/system/control.php | 70 ++++++++++++++++- frontend/module/system/js/editdomain.js | 22 ++++++ frontend/module/system/js/ossview.js | 2 +- frontend/module/system/lang/zh-cn.php | 16 +++- frontend/module/system/model.php | 75 ++++++++++++++++--- .../module/system/view/domainview.html.php | 5 ++ .../module/system/view/editdomain.html.php | 12 +-- frontend/module/system/view/editslb.html.php | 56 ++++++++++++++ frontend/module/system/view/index.html.php | 6 ++ frontend/module/system/view/slbview.html.php | 38 ++++++++++ 14 files changed, 374 insertions(+), 29 deletions(-) create mode 100644 frontend/module/system/view/editslb.html.php create mode 100644 frontend/module/system/view/slbview.html.php diff --git a/frontend/module/cne/lang/zh-cn.php b/frontend/module/cne/lang/zh-cn.php index 21391d39..f9f8ef2d 100644 --- a/frontend/module/cne/lang/zh-cn.php +++ b/frontend/module/cne/lang/zh-cn.php @@ -16,5 +16,10 @@ $lang->CNE->statusIcons['unknown'] = ""; $lang->CNE->errorList = array(); -$lang->CNE->errorList[400] = '不能包含特殊字符'; -$lang->CNE->errorList[404] = '服务不存在'; +//$lang->CNE->errorList[400] = '不能包含特殊字符'; +$lang->CNE->errorList[400] = '请求集群接口失败'; +$lang->CNE->errorList[404] = '服务不存在'; +$lang->CNE->errorList[41001] = '证书过期'; +$lang->CNE->errorList[41002] = '证书不匹配'; +$lang->CNE->errorList[41003] = '证书链不完整'; +$lang->CNE->errorList[41004] = '私钥与证书不匹配'; diff --git a/frontend/module/cne/model.php b/frontend/module/cne/model.php index 733fd62c..030fb970 100644 --- a/frontend/module/cne/model.php +++ b/frontend/module/cne/model.php @@ -166,6 +166,76 @@ public function updateConfig($instance, $settings) return false; } + /** + * Config QLB (Server Load Balancing). + * + * @param object $settings + * @param string $channel + * @access public + * @return bool + */ + public function configQLB($settings, $channel = '') + { + $apiParams = array(); + $apiParams['cluster'] = ''; + $apiParams['channel'] = empty($channel) ? $this->config->CNE->api->channel : $channel; + $apiParams['namespace'] = $settings->namespace; + $apiParams['name'] = $settings->name; + $apiParams['ippool'] = $settings->ippool; + + $apiUrl = "/api/cne/system/qlb/config"; + $result = $this->apiPost($apiUrl, $apiParams, $this->config->CNE->api->headers); + if($result && $result->code == 200) return true; + + return false; + } + + /** + * Upload cert + * + * @param object $cert + * @param string $channel + * @access public + * @return object + */ + public function uploadCert($cert, $channel = '') + { + $apiParams = array(); + $apiParams['cluster'] = ''; + $apiParams['channel'] = empty($channel) ? $this->config->CNE->api->channel : $channel; + $apiParams['name'] = $cert->name; + $apiParams['certificate_pem'] = $cert->certificate_pem; + $apiParams['private_key_pem'] = $cert->private_key_pem; + + $apiUrl = "/api/cne/system/tls/upload"; + $result = $this->apiPost($apiUrl, $apiParams, $this->config->CNE->api->headers); + //if($result && $result->code == 200) return $result->data; + + return $result; + } + + /** + * Upload cert + * + * @param string $certName + * @param string $channel + * @access public + * @return object|null success: return cert info, fail: return null. + */ + public function certInfo($certName, $channel = '') + { + $apiParams = array(); + $apiParams['cluster'] = ''; + $apiParams['channel'] = empty($channel) ? $this->config->CNE->api->channel : $channel; + $apiParams['name'] = $certName; + + $apiUrl = "/api/cne/system/tls/info"; + $result = $this->apiPost($apiUrl, $apiParams, $this->config->CNE->api->headers); + if($result && $result->code == 200) return $result->data; + + return null; + } + /** * Get default username and password of app. * diff --git a/frontend/module/instance/model.php b/frontend/module/instance/model.php index f8aa6426..80b77be1 100644 --- a/frontend/module/instance/model.php +++ b/frontend/module/instance/model.php @@ -438,6 +438,22 @@ public function canDo($action, $instance) } } + /** + * Get URL for visiting instance service. + * + * @param object $instance + * @access public + * @return string + */ + public function url($instance) + { + $url = "//" . $instance->domain; + $port = getenv('APP_HTTPS_PORT'); + if($port and $port != '443') $url .= ":$port/"; + + return $url; + } + /** * Create third domain. * @@ -1577,7 +1593,7 @@ public function printIconActions($instance) if($instance->domain) { $disableVisit = !$this->canDo('visit', $instance); - $actionHtml .= html::a('//' . $instance->domain, '', '_blank', "title='{$this->lang->instance->visit}' class='btn btn-lg btn-action btn-link'" . ($disableVisit ? ' disabled style="pointer-events: none;"' : '')); + $actionHtml .= html::a($this->url($instance), '', '_blank', "title='{$this->lang->instance->visit}' class='btn btn-lg btn-action btn-link'" . ($disableVisit ? ' disabled style="pointer-events: none;"' : '')); } echo $actionHtml; @@ -1606,7 +1622,7 @@ public function printTextActions($instance) if($instance->domain) { $disableVisit = !$this->canDo('visit', $instance); - $actionHtml .= html::a('//' . $instance->domain, $this->lang->instance->visit, '_blank', "title='{$this->lang->instance->visit}' class='btn btn-primary label-lg'" . ($disableVisit ? ' disabled style="pointer-events: none;"' : '')); + $actionHtml .= html::a($this->url($instance), $this->lang->instance->visit, '_blank', "title='{$this->lang->instance->visit}' class='btn btn-primary label-lg'" . ($disableVisit ? ' disabled style="pointer-events: none;"' : '')); } echo $actionHtml; diff --git a/frontend/module/space/view/browsebycard.html.php b/frontend/module/space/view/browsebycard.html.php index ae56ed16..c8448cf1 100644 --- a/frontend/module/space/view/browsebycard.html.php +++ b/frontend/module/space/view/browsebycard.html.php @@ -41,7 +41,7 @@
instance->canDo('visit', $instance);?> - domain, $lang->instance->visit, '_blank', "class='btn btn-primary' title='{$lang->instance->visit}'". ($canVisit ? '' : ' disabled style="pointer-events: none;"'));?> + instance->url($instance), $lang->instance->visit, '_blank', "class='btn btn-primary' title='{$lang->instance->visit}'". ($canVisit ? '' : ' disabled style="pointer-events: none;"'));?> latestVersion)):?> id", '', true), "" . $lang->space->upgrade, '', "class='btn btn-link iframe' title='{$lang->space->upgrade}' data-width='500' data-app='space'");?> diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 900dc4dc..9fc5f9d6 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -238,7 +238,6 @@ public function ossView() $ossAccount = $this->cne->getDefaultAccount($minioInstance, '', 'minio'); $ossDomain = $this->cne->getDomain($minioInstance, '', 'minio'); - $this->lang->switcherMenu = $this->system->getOssSwitcher(); $this->view->title = $this->lang->system->oss->common; @@ -419,8 +418,66 @@ public function ajaxUpdatingDomainProgress() */ public function domainView() { + $domainSettings = $this->system->getDomainSettings(); + $certName = str_replace('.', '-', $domainSettings->customDomain); + $cert = $this->loadModel('cne')->certInfo($certName); + $this->view->title = $this->lang->system->domain->common; - $this->view->domainSettings = $this->system->getDomainSettings(); + $this->view->domainSettings = $domainSettings; + $this->view->cert = $cert; + + $this->display(); + } + + /** + * Config Server Load Balancing. + * + * @access public + * @return void + */ + public function configSLB() + { + $slbSettings = $this->system->getSLBSettings(); + if($slbSettings->name) return print(js::locate($this->inLink('slbView'))); + + return print(js::locate($this->inLink('editSLB'))); + } + + /** + * Edit SLB. + * + * @access public + * @return void + */ + public function editSLB() + { + if($_POST) + { + $this->system->saveSLBSettings(); + if(dao::isError()) + { + return $this->send(array('result' => 'fail', 'message' => dao::getError())); + } + + return $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->configSLBSuccess, 'locate' => $this->inLink('SLBView'))); + } + + $this->view->title = $this->lang->system->SLB->common; + $this->view->SLBSettings = $this->system->getSLBSettings(); + + $this->display(); + } + + /** + * SLB View. + * + * @access public + * @return void + */ + public function SLBView() + { + $this->view->title = $this->lang->system->SLB->common; + $this->view->slbSettings = $this->system->getSLBSettings(); $this->display(); } @@ -487,7 +544,7 @@ public function ajaxLdapInfo() $password = openssl_decrypt($ldapSetting->auth->password, 'DES-ECB', $secretKey); if(!$password) $password = openssl_decrypt($ldapSetting->auth->password, 'DES-ECB', $ldapInstance->createdAt); // Secret key was createdAt field value less v2.2. - $this->send(array('result' => 'success', 'message' => '', 'data' => array('domain' => $ldapInstance->domain, 'account' => $ldapSetting->auth->username, 'pass' => $password))); + $this->send(array('result' => 'success', 'message' => '', 'data' => array('domain' => $this->instance->url($ldapInstance), 'account' => $ldapSetting->auth->username, 'pass' => $password))); } /** @@ -504,8 +561,13 @@ public function ajaxOssInfo() $minioInstance->spaceData->k8space = 'cne-system'; $ossAccount = $this->loadModel('cne')->getDefaultAccount($minioInstance, '', 'minio'); + $ossDomain = $this->cne->getDomain($minioInstance, '', 'minio'); - if($ossAccount and $ossAccount) return $this->send(array('result' => 'success', 'message' => '', 'data' => array('account' => $ossAccount, 'domain' => $ossDomain))); + $ossDomain->domain = $ossDomain->access_host; + + $url = $this->loadModel('instance')->url($ossDomain); + + if($ossAccount and $ossAccount) return $this->send(array('result' => 'success', 'message' => '', 'data' => array('account' => $ossAccount, 'url' => $url))); $this->send(array('result' => 'fail', 'message' => $this->lang->system->errors->failGetOssAccount)); } diff --git a/frontend/module/system/js/editdomain.js b/frontend/module/system/js/editdomain.js index acfca7c2..7c7325b7 100644 --- a/frontend/module/system/js/editdomain.js +++ b/frontend/module/system/js/editdomain.js @@ -1,5 +1,27 @@ $(function() { + function toggleCertBox() + { + $showCert = $("#httpstrue[type=checkbox]:checked").length > 0; + if($showCert) + { + $('#cert-box').show(); + } + else + { + $('#cert-box').hide(); + } + + } + + toggleCertBox(); + + $("#httpstrue[type=checkbox]").on('change', function() + { + toggleCertBox(); + }); + + var timerID = 0; /** diff --git a/frontend/module/system/js/ossview.js b/frontend/module/system/js/ossview.js index b03be4c8..66c388bc 100644 --- a/frontend/module/system/js/ossview.js +++ b/frontend/module/system/js/ossview.js @@ -9,7 +9,7 @@ $(function() { $('#ossAdmin').text(res.data.account.username); $('#ossPassword').val(res.data.account.password); - $('#ossVisitUrl').attr('href', '//' + res.data.domain.access_host); + $('#ossVisitUrl').attr('href', res.data.url); $('#ossAccountModal').modal('show'); } }); diff --git a/frontend/module/system/lang/zh-cn.php b/frontend/module/system/lang/zh-cn.php index bd7dab54..ebc7b5fd 100644 --- a/frontend/module/system/lang/zh-cn.php +++ b/frontend/module/system/lang/zh-cn.php @@ -69,8 +69,8 @@ /* Domain */ $lang->system->customDomain = '新域名'; -$lang->system->publicKey = '公钥'; -$lang->system->privateKey = '私钥'; +$lang->system->certPem = '公钥'; +$lang->system->certKey = '私钥'; $lang->system->domain = new stdclass; $lang->system->domain->common = '域名管理'; @@ -79,8 +79,7 @@ $lang->system->domain->currentDomain = '当前域名'; $lang->system->domain->oldDomain = '旧域名'; $lang->system->domain->newDomain = '新域名'; -$lang->system->domain->publicKey = '公钥'; -$lang->system->domain->privateKey = '私钥'; +$lang->system->domain->expiredDate = '过期时间'; $lang->system->domain->uploadCert = '上传证书(仅支持泛域名证书)'; $lang->system->domain->notReuseOldDomain = '使用自定义域名后无法改回默认域名'; @@ -91,6 +90,13 @@ $lang->system->domain->updatingProgress = '更新中...,剩余 %s 个,'; $lang->system->domain->updating = '更新中...'; +$lang->system->SLB = new stdclass; +$lang->system->SLB->common = '负载均衡'; +$lang->system->SLB->config = '配置负载均衡'; +$lang->system->SLB->edit = '修改负载均衡'; +$lang->system->SLB->ipPool = 'IP段'; +$lang->system->SLB->ipPoolExample = '示例:192.168.10.0/24或者192.168.10.0-192.168.10.100'; + $lang->system->notices = new stdclass; $lang->system->notices->success = '成功'; $lang->system->notices->fail = '失败'; @@ -110,6 +116,7 @@ $lang->system->notices->pleaseCheckSMTPInfo = '校验失败!请检查用户名和密码是否正确'; $lang->system->notices->confirmUpdateDomain = '修改域名后,会自动更新已安装服务的域名,确定要修改吗?'; $lang->system->notices->updateDomainSuccess = '域名修改成功。'; +$lang->system->notices->configSLBSuccess = '配置负载均衡成功。'; $lang->system->errors = new stdclass; $lang->system->errors->notFoundDB = '找不到该数据库'; @@ -136,3 +143,4 @@ $lang->system->errors->failToUpdateDomain = '更新域名失败'; $lang->system->errors->forbiddenOriginalDomain = '不能修改为平台默认域名'; $lang->system->errors->newDomainIsSameWithOld = '新域名不能与原域名相同'; +$lang->system->errors->failedToConfigSLB = '配置负载均衡失败'; diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index e4400842..adf6a7b0 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -590,8 +590,8 @@ public function getDomainSettings() $settings = new stdclass; $settings->customDomain = $this->setting->getItem('owner=system&module=common§ion=domain&key=customDomain'); $settings->https = $this->setting->getItem('owner=system&module=common§ion=domain&key=https'); - $settings->publicKey = $this->setting->getItem('owner=system&module=common§ion=domain&key=publicKey'); - $settings->privateKey = $this->setting->getItem('owner=system&module=common§ion=domain&key=privateKey'); + $settings->certPem = ''; // + $settings->certKey = ''; // return $settings; } @@ -608,14 +608,14 @@ public function saveDomainSettings() ->setDefault('customDomain', '') ->setDefault('https', 'false') ->setIf(is_array($this->post->https) && in_array('true', $this->post->https), 'https', 'true') - ->setDefault('publicKey', '') - ->setDefault('privateKey', '') + ->setDefault('certPem', '') + ->setDefault('certKey', '') ->get(); $this->dao->from('system')->data($settings) - ->check('customDomain', 'notempty'); - //->check('publicKey', '', ) - //->check('privateKey', '', ); + ->check('customDomain', 'notempty') + ->checkIf($settings->https == 'true', 'certPem', 'notempty') + ->checkIf($settings->https == 'true', 'certKey', 'notempty'); if(dao::isError()) return; if(!validater::checkREG($settings->customDomain, '/^((?!-)[a-z0-9-]{1,63}(?name = 'tls-' . str_replace('.', '-', $settings->customDomain); + $cert->certificate_pem = $settings->certPem; + $cert->private_key_pem = $settings->certKey; + $certResult = $this->loadModel('cne')->uploadCert($cert); + if($certResult->code != 200) + { + dao::$errors[] = $result->message; + return; + } + $oldSettings = $this->getDomainSettings(); if($settings->customDomain == $oldSettings->customDomain) { @@ -644,8 +657,6 @@ public function saveDomainSettings() $this->setting->setItem('system.common.domain.customDomain', zget($settings, 'customDomain', '')); $this->setting->setItem('system.common.domain.https', zget($settings, 'https', 'false')); - $this->setting->setItem('system.common.domain.publicKey', zget($settings, 'publicKey', '')); - $this->setting->setItem('system.common.domain.privateKey', zget($settings, 'privateKey', '')); $this->loadModel('instance')->updateInstancesDomain(); @@ -679,6 +690,52 @@ public function updateMinioDomain() $this->cne->updateConfig($minioInstance, $settings); } + /** + * Get SLB settings. + * + * @access public + * @return object + */ + public function getSLBSettings() + { + $settings = new stdclass; + $settings->name = $this->setting->getItem('owner=system&module=common§ion=slb&key=name'); + $settings->ippool = $this->setting->getItem('owner=system&module=common§ion=slb&key=ippool'); + + return $settings; + } + + /** + * Save SLB settings. + * + * @access public + * @return void + */ + public function saveSLBSettings() + { + $settings = fixer::input('post') + ->setDefault('ippool', '') + ->get(); + + //validater::checkIP(''); + //if(dao::isError()) + + $settings->name = 'qlb-quickon'; + $settings->namespace = 'cne-system'; + + //a($settings); + + $success = $this->loadModel('cne')->configQLB($settings); + if(!$success) + { + dao::$errors[] = $this->lang->system->errors->failedToConfigSLB; + return; + } + + $this->setting->setItem('system.common.slb.name', zget($settings, 'name', '')); + $this->setting->setItem('system.common.slb.ippool', zget($settings, 'ippool', '')); + } + /** * Print edit SMTP button. * diff --git a/frontend/module/system/view/domainview.html.php b/frontend/module/system/view/domainview.html.php index 6acfe278..9d86bbda 100644 --- a/frontend/module/system/view/domainview.html.php +++ b/frontend/module/system/view/domainview.html.php @@ -31,6 +31,11 @@ + + system->domain->expiredDate;?> + + +
diff --git a/frontend/module/system/view/editdomain.html.php b/frontend/module/system/view/editdomain.html.php index d431cd19..55864239 100644 --- a/frontend/module/system/view/editdomain.html.php +++ b/frontend/module/system/view/editdomain.html.php @@ -44,7 +44,7 @@ - +

@@ -56,16 +56,16 @@ - +
- - + + - - + + diff --git a/frontend/module/system/view/editslb.html.php b/frontend/module/system/view/editslb.html.php new file mode 100644 index 00000000..ca8ead31 --- /dev/null +++ b/frontend/module/system/view/editslb.html.php @@ -0,0 +1,56 @@ + + * @package system + * @version $Id$ + * @link https://www.qucheng.com + */ +?> +app->getModuleRoot() . '/common/view/header.html.php';?> + +system->errors);?> +system->notices);?> + +
+
+
+

system->SLB->config;?>

+
+
+
system->domain->publicKey;?>system->certPem;?>
system->domain->privateKey;?>system->certKey;?>
+ + + + + + + +
system->SLB->ipPool;?> + system->SLB->ipPoolExample}'");?> +
+
save);?>
+ +

+
+ +app->getModuleRoot() . '/common/view/footer.html.php';?> + diff --git a/frontend/module/system/view/index.html.php b/frontend/module/system/view/index.html.php index 1b809abe..8bf3e87f 100644 --- a/frontend/module/system/view/index.html.php +++ b/frontend/module/system/view/index.html.php @@ -50,6 +50,12 @@ system->domain->common;?> + diff --git a/frontend/module/system/view/slbview.html.php b/frontend/module/system/view/slbview.html.php new file mode 100644 index 00000000..28da2501 --- /dev/null +++ b/frontend/module/system/view/slbview.html.php @@ -0,0 +1,38 @@ + + * @package system + * @version $Id$ + * @link https://www.qucheng.com + */ +?> +app->getModuleRoot() . '/common/view/header.html.php';?> + +
+
+
+

system->SLB->common;?>

+
+ inLink('editSLB'), $lang->system->SLB->edit, '', "class='btn btn-primary'");?> +
+
+ + + + + + + + +
system->SLB->ipPool;?>
+
+
+app->getModuleRoot() . '/common/view/footer.html.php';?> From c2ab3c91987695efceba8d8ba11e827c7dc20084 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Wed, 14 Dec 2022 10:24:25 +0800 Subject: [PATCH 11/43] * Validate SLB ip pool. --- frontend/module/system/lang/zh-cn.php | 1 + frontend/module/system/model.php | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/module/system/lang/zh-cn.php b/frontend/module/system/lang/zh-cn.php index ebc7b5fd..b3aa34b6 100644 --- a/frontend/module/system/lang/zh-cn.php +++ b/frontend/module/system/lang/zh-cn.php @@ -144,3 +144,4 @@ $lang->system->errors->forbiddenOriginalDomain = '不能修改为平台默认域名'; $lang->system->errors->newDomainIsSameWithOld = '新域名不能与原域名相同'; $lang->system->errors->failedToConfigSLB = '配置负载均衡失败'; +$lang->system->errors->wrongIPRange = 'IP段格式错误,请参照示例格式,' . $lang->system->SLB->ipPoolExample; diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index adf6a7b0..9577d94d 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -717,8 +717,13 @@ public function saveSLBSettings() ->setDefault('ippool', '') ->get(); - //validater::checkIP(''); - //if(dao::isError()) + $reg1Result = validater::checkREG($settings->ippool, '/^((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}\/\d{1,2}$/'); + $reg2Result = validater::checkREG($settings->ippool, '/^(((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3})-(((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3})$/'); + if($reg1Result === false && $reg2Result === false) + { + dao::$errors[] = $this->lang->system->errors->wrongIPRange; + return; + } $settings->name = 'qlb-quickon'; $settings->namespace = 'cne-system'; From b1dab1e19c97f1c00d668c5cebc3ef6b6f176855 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 15 Dec 2022 11:16:55 +0800 Subject: [PATCH 12/43] + Improve css of search input. --- frontend/module/space/css/browse.css | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/module/space/css/browse.css b/frontend/module/space/css/browse.css index 9c0dca57..773abb54 100644 --- a/frontend/module/space/css/browse.css +++ b/frontend/module/space/css/browse.css @@ -1,4 +1,5 @@ #dropMenu .col-left {padding-bottom: 0;} +input.search-input#search {padding:5px;} .q-card-title { border-left-style: solid; border-left-width: 4px; padding-left: 10px; margin-left: -15px; line-height: 18px; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; } #cardsContainer .row {min-height: calc(100vh - 160px);} #cardsContainer .panel{border-radius: 2px;} From 9a76d458acdc40c9f8a751cfa210dd92f4110ecd Mon Sep 17 00:00:00 2001 From: qishiyao Date: Thu, 15 Dec 2022 16:06:39 +0800 Subject: [PATCH 13/43] * Domain api support loadbalancer service. * Setup ingress-controller after tls upload. * Fix nil values helm release update issue. --- backend/internal/app/model/app_response.go | 7 ++++--- backend/internal/app/router/system.go | 20 ++++++++++++++++++- .../app/service/app/instance/domain.go | 15 +++++++++++--- .../app/service/app/instance/update.go | 5 +++++ backend/pkg/utils/tls/tls.go | 7 +++---- 5 files changed, 43 insertions(+), 11 deletions(-) diff --git a/backend/internal/app/model/app_response.go b/backend/internal/app/model/app_response.go index dca9cc4a..4306f965 100644 --- a/backend/internal/app/model/app_response.go +++ b/backend/internal/app/model/app_response.go @@ -153,7 +153,8 @@ type AppCustomSetting struct { } type AppResDomain struct { - InternalHost string `json:"internal_host"` - AccessHost string `json:"access_host"` - ExtraHosts map[string]string `json:"extra_hosts"` + InternalHost string `json:"internal_host"` + AccessHost string `json:"access_host"` + ExtraHosts map[string]string `json:"extra_hosts"` + LoadBalancerIPS map[string]string `json:"load_balancer_ips"` } diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index a23af917..b4eabc27 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -286,11 +286,29 @@ func UploadTLS(c *gin.Context) { return } - err = service.Apps(ctx, "", viper.GetString(constant.FlagRuntimeNamespace)).UploadTLS(body.Name, body.CertificatePem, body.PrivateKeyPem) + runtimeNs := viper.GetString(constant.FlagRuntimeNamespace) + + err = service.Apps(ctx, "", runtimeNs).UploadTLS(body.Name, body.CertificatePem, body.PrivateKeyPem) if err != nil { renderError(c, http.StatusInternalServerError, err) return } + + setting := model.StringSetting{ + Key: "extraArgs.default-ssl-certificate", + Val: fmt.Sprintf("%s/%s", runtimeNs, body.Name), + } + ingressController, err := service.Apps(ctx, "", runtimeNs).GetApp("ingress") + if err == nil { + err = ingressController.PatchSettings("nginx-ingress-controller", model.AppCreateOrUpdateModel{ + Channel: "stable", + Settings: []model.StringSetting{setting}, + }, nil, nil) + if err != nil { + renderError(c, http.StatusInternalServerError, err) + return + } + } renderJson(c, http.StatusOK, t.GetCertInfo()) } diff --git a/backend/internal/app/service/app/instance/domain.go b/backend/internal/app/service/app/instance/domain.go index 626e93d8..c0c35ab9 100644 --- a/backend/internal/app/service/app/instance/domain.go +++ b/backend/internal/app/service/app/instance/domain.go @@ -5,6 +5,7 @@ package instance import ( + v1 "k8s.io/api/core/v1" "strings" "gitlab.zcorp.cc/pangu/cne-api/internal/app/model" @@ -41,6 +42,7 @@ func (i *Instance) GetDomains(component string) (interface{}, error) { } var extraHosts = make(map[string]string, 0) + var lbIps = make(map[string]string, 0) var accessHost string var internalHost string @@ -95,13 +97,20 @@ func (i *Instance) GetDomains(component string) (interface{}, error) { if componentName == filterComponentName { internalHost = strings.Join([]string{svc.Name, svc.Namespace, "svc"}, ".") } + + if svc.Spec.Type == v1.ServiceTypeLoadBalancer { + if len(svc.Status.LoadBalancer.Ingress) > 0 { + lbIps[componentName] = svc.Status.LoadBalancer.Ingress[0].IP + } + } } // build response data := model.AppResDomain{ - InternalHost: internalHost, - AccessHost: accessHost, - ExtraHosts: extraHosts, + InternalHost: internalHost, + AccessHost: accessHost, + ExtraHosts: extraHosts, + LoadBalancerIPS: lbIps, } return data, nil diff --git a/backend/internal/app/service/app/instance/update.go b/backend/internal/app/service/app/instance/update.go index 9f3f61cb..667322bd 100644 --- a/backend/internal/app/service/app/instance/update.go +++ b/backend/internal/app/service/app/instance/update.go @@ -154,6 +154,9 @@ func (i *Instance) PatchSettings(chart string, body model.AppCreateOrUpdateModel if err != nil { return err } + if vals == nil { + vals = make(map[string]interface{}) + } // remove values from the release's current values if delSettings != nil { @@ -184,6 +187,8 @@ func (i *Instance) PatchSettings(chart string, body model.AppCreateOrUpdateModel ValueFiles: []string{lastValFile}, } + i.logger.Debugf("options is %+v", options) + if len(snippetSettings) > 0 { snippetValueFile, err := writeValuesFile(snippetSettings) if err != nil { diff --git a/backend/pkg/utils/tls/tls.go b/backend/pkg/utils/tls/tls.go index 78d418c8..719f1df2 100644 --- a/backend/pkg/utils/tls/tls.go +++ b/backend/pkg/utils/tls/tls.go @@ -65,7 +65,6 @@ func parseKey(key []byte) (*rsa.PrivateKey, error) { func validCertificates(certs []*x509.Certificate) error { domainCert := certs[0] if time.Now().After(domainCert.NotAfter) { - //return ErrExpiredCertificate(fmt.Sprintf("Expired at %s", domainCert.NotAfter.Format(time.RFC3339))) return ErrExpiredCertificate } @@ -79,9 +78,9 @@ func validCertificates(certs []*x509.Certificate) error { lastCert = *cert } - if !lastCert.IsCA { - return ErrIncompleteCertificateChain - } + //if !lastCert.IsCA { + // return ErrIncompleteCertificateChain + //} return nil } From 0d763180896762761438c91ff28783ec789fd736 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 15 Dec 2022 11:16:55 +0800 Subject: [PATCH 14/43] + Improve css of search input. --- frontend/module/space/css/browse.css | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/module/space/css/browse.css b/frontend/module/space/css/browse.css index 9c0dca57..773abb54 100644 --- a/frontend/module/space/css/browse.css +++ b/frontend/module/space/css/browse.css @@ -1,4 +1,5 @@ #dropMenu .col-left {padding-bottom: 0;} +input.search-input#search {padding:5px;} .q-card-title { border-left-style: solid; border-left-width: 4px; padding-left: 10px; margin-left: -15px; line-height: 18px; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; } #cardsContainer .row {min-height: calc(100vh - 160px);} #cardsContainer .panel{border-radius: 2px;} From d00b6de4156bdbe15de03e3574c25b8f4fbff557 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 15 Dec 2022 17:08:53 +0800 Subject: [PATCH 15/43] * Fix wrong variable name. --- frontend/module/system/css/index.css | 1 + frontend/module/system/model.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/module/system/css/index.css b/frontend/module/system/css/index.css index 88a1dbfc..bb3b7523 100644 --- a/frontend/module/system/css/index.css +++ b/frontend/module/system/css/index.css @@ -1,3 +1,4 @@ +.plug-container > div{margin-bottom: 20px;} .plug-container a {display: inline-block; width: 150px;} .plug-container a:hover { text-decoration: none; box-shadow: 0 1px 5px rgb(0 0 0 / 18%);} .logo { display: inline-block; padding: 10px;} diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index 9577d94d..c4c8dd45 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -633,7 +633,7 @@ public function saveDomainSettings() $certResult = $this->loadModel('cne')->uploadCert($cert); if($certResult->code != 200) { - dao::$errors[] = $result->message; + dao::$errors[] = $certResult->message; return; } From 62b5e6f8499b8f6a7711cfea315e739658a0b681 Mon Sep 17 00:00:00 2001 From: qishiyao Date: Thu, 15 Dec 2022 16:06:39 +0800 Subject: [PATCH 16/43] * Domain api support loadbalancer service. * Setup ingress-controller after tls upload. * Fix nil values helm release update issue. --- backend/internal/app/model/app_response.go | 7 ++++--- backend/internal/app/router/system.go | 20 ++++++++++++++++++- .../app/service/app/instance/domain.go | 15 +++++++++++--- .../app/service/app/instance/update.go | 5 +++++ backend/pkg/utils/tls/tls.go | 7 +++---- 5 files changed, 43 insertions(+), 11 deletions(-) diff --git a/backend/internal/app/model/app_response.go b/backend/internal/app/model/app_response.go index dca9cc4a..4306f965 100644 --- a/backend/internal/app/model/app_response.go +++ b/backend/internal/app/model/app_response.go @@ -153,7 +153,8 @@ type AppCustomSetting struct { } type AppResDomain struct { - InternalHost string `json:"internal_host"` - AccessHost string `json:"access_host"` - ExtraHosts map[string]string `json:"extra_hosts"` + InternalHost string `json:"internal_host"` + AccessHost string `json:"access_host"` + ExtraHosts map[string]string `json:"extra_hosts"` + LoadBalancerIPS map[string]string `json:"load_balancer_ips"` } diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index a23af917..b4eabc27 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -286,11 +286,29 @@ func UploadTLS(c *gin.Context) { return } - err = service.Apps(ctx, "", viper.GetString(constant.FlagRuntimeNamespace)).UploadTLS(body.Name, body.CertificatePem, body.PrivateKeyPem) + runtimeNs := viper.GetString(constant.FlagRuntimeNamespace) + + err = service.Apps(ctx, "", runtimeNs).UploadTLS(body.Name, body.CertificatePem, body.PrivateKeyPem) if err != nil { renderError(c, http.StatusInternalServerError, err) return } + + setting := model.StringSetting{ + Key: "extraArgs.default-ssl-certificate", + Val: fmt.Sprintf("%s/%s", runtimeNs, body.Name), + } + ingressController, err := service.Apps(ctx, "", runtimeNs).GetApp("ingress") + if err == nil { + err = ingressController.PatchSettings("nginx-ingress-controller", model.AppCreateOrUpdateModel{ + Channel: "stable", + Settings: []model.StringSetting{setting}, + }, nil, nil) + if err != nil { + renderError(c, http.StatusInternalServerError, err) + return + } + } renderJson(c, http.StatusOK, t.GetCertInfo()) } diff --git a/backend/internal/app/service/app/instance/domain.go b/backend/internal/app/service/app/instance/domain.go index 626e93d8..c0c35ab9 100644 --- a/backend/internal/app/service/app/instance/domain.go +++ b/backend/internal/app/service/app/instance/domain.go @@ -5,6 +5,7 @@ package instance import ( + v1 "k8s.io/api/core/v1" "strings" "gitlab.zcorp.cc/pangu/cne-api/internal/app/model" @@ -41,6 +42,7 @@ func (i *Instance) GetDomains(component string) (interface{}, error) { } var extraHosts = make(map[string]string, 0) + var lbIps = make(map[string]string, 0) var accessHost string var internalHost string @@ -95,13 +97,20 @@ func (i *Instance) GetDomains(component string) (interface{}, error) { if componentName == filterComponentName { internalHost = strings.Join([]string{svc.Name, svc.Namespace, "svc"}, ".") } + + if svc.Spec.Type == v1.ServiceTypeLoadBalancer { + if len(svc.Status.LoadBalancer.Ingress) > 0 { + lbIps[componentName] = svc.Status.LoadBalancer.Ingress[0].IP + } + } } // build response data := model.AppResDomain{ - InternalHost: internalHost, - AccessHost: accessHost, - ExtraHosts: extraHosts, + InternalHost: internalHost, + AccessHost: accessHost, + ExtraHosts: extraHosts, + LoadBalancerIPS: lbIps, } return data, nil diff --git a/backend/internal/app/service/app/instance/update.go b/backend/internal/app/service/app/instance/update.go index 9f3f61cb..667322bd 100644 --- a/backend/internal/app/service/app/instance/update.go +++ b/backend/internal/app/service/app/instance/update.go @@ -154,6 +154,9 @@ func (i *Instance) PatchSettings(chart string, body model.AppCreateOrUpdateModel if err != nil { return err } + if vals == nil { + vals = make(map[string]interface{}) + } // remove values from the release's current values if delSettings != nil { @@ -184,6 +187,8 @@ func (i *Instance) PatchSettings(chart string, body model.AppCreateOrUpdateModel ValueFiles: []string{lastValFile}, } + i.logger.Debugf("options is %+v", options) + if len(snippetSettings) > 0 { snippetValueFile, err := writeValuesFile(snippetSettings) if err != nil { diff --git a/backend/pkg/utils/tls/tls.go b/backend/pkg/utils/tls/tls.go index 78d418c8..719f1df2 100644 --- a/backend/pkg/utils/tls/tls.go +++ b/backend/pkg/utils/tls/tls.go @@ -65,7 +65,6 @@ func parseKey(key []byte) (*rsa.PrivateKey, error) { func validCertificates(certs []*x509.Certificate) error { domainCert := certs[0] if time.Now().After(domainCert.NotAfter) { - //return ErrExpiredCertificate(fmt.Sprintf("Expired at %s", domainCert.NotAfter.Format(time.RFC3339))) return ErrExpiredCertificate } @@ -79,9 +78,9 @@ func validCertificates(certs []*x509.Certificate) error { lastCert = *cert } - if !lastCert.IsCA { - return ErrIncompleteCertificateChain - } + //if !lastCert.IsCA { + // return ErrIncompleteCertificateChain + //} return nil } From 555afced87c8071ac7ae7fcf805a3e3efff40c2d Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 15 Dec 2022 17:08:53 +0800 Subject: [PATCH 17/43] * Fix wrong variable name. --- frontend/module/system/css/index.css | 1 + frontend/module/system/model.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/module/system/css/index.css b/frontend/module/system/css/index.css index 88a1dbfc..bb3b7523 100644 --- a/frontend/module/system/css/index.css +++ b/frontend/module/system/css/index.css @@ -1,3 +1,4 @@ +.plug-container > div{margin-bottom: 20px;} .plug-container a {display: inline-block; width: 150px;} .plug-container a:hover { text-decoration: none; box-shadow: 0 1px 5px rgb(0 0 0 / 18%);} .logo { display: inline-block; padding: 10px;} diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index 9577d94d..c4c8dd45 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -633,7 +633,7 @@ public function saveDomainSettings() $certResult = $this->loadModel('cne')->uploadCert($cert); if($certResult->code != 200) { - dao::$errors[] = $result->message; + dao::$errors[] = $certResult->message; return; } From b2ac5b8e67afe0c261b4f1579cb988cef3260d04 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 15 Dec 2022 21:41:15 +0800 Subject: [PATCH 18/43] * Show load balancer of instance in view page. --- frontend/module/instance/control.php | 1 + frontend/module/instance/lang/zh-cn.php | 1 + .../module/instance/view/advance.html.php | 16 +++++++++++++++ frontend/module/system/model.php | 20 ++++++++++--------- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/frontend/module/instance/control.php b/frontend/module/instance/control.php index 9771da66..d81b4912 100644 --- a/frontend/module/instance/control.php +++ b/frontend/module/instance/control.php @@ -98,6 +98,7 @@ public function view($id, $recTotal = 0, $recPerPage = 20, $pageID = 1, $tab ='b $this->view->hasRestoreLog = $hasRestoreLog; $this->view->latestBackup = $latestBackup; $this->view->dbList = $dbList; + $this->view->domain = $this->cne->getDomain($instance); $this->view->tab = $tab; $this->view->pager = $pager; diff --git a/frontend/module/instance/lang/zh-cn.php b/frontend/module/instance/lang/zh-cn.php index 0975bf3a..08ca6f90 100644 --- a/frontend/module/instance/lang/zh-cn.php +++ b/frontend/module/instance/lang/zh-cn.php @@ -8,6 +8,7 @@ $lang->instance->mem = '内存'; $lang->instance->space = '空间'; $lang->instance->domain = '域名'; +$lang->instance->SLB = '负载均衡'; $lang->instance->dbType = '数据库'; $lang->instance->advanceOption = '高级选项'; $lang->instance->baseInfo = '基本信息'; diff --git a/frontend/module/instance/view/advance.html.php b/frontend/module/instance/view/advance.html.php index bc4c51f4..709ece4f 100644 --- a/frontend/module/instance/view/advance.html.php +++ b/frontend/module/instance/view/advance.html.php @@ -1,4 +1,20 @@
+ + +
+
instance->SLB;?>
+
+
+ + $value):?> + + + + + +
+
+
instance->mem;?>
diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index c4c8dd45..be459ead 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -624,17 +624,19 @@ public function saveDomainSettings() return; } - /* Upload Certificate to CNE. */ - $cert = new stdclass; - $cert->name = 'tls-' . str_replace('.', '-', $settings->customDomain); - $cert->certificate_pem = $settings->certPem; - $cert->private_key_pem = $settings->certKey; - $certResult = $this->loadModel('cne')->uploadCert($cert); - if($certResult->code != 200) + if($settings->https == 'true') { - dao::$errors[] = $certResult->message; - return; + $cert = new stdclass; + $cert->name = 'tls-' . str_replace('.', '-', $settings->customDomain); + $cert->certificate_pem = $settings->certPem; + $cert->private_key_pem = $settings->certKey; + $certResult = $this->loadModel('cne')->uploadCert($cert); + if($certResult->code != 200) + { + dao::$errors[] = $certResult->message; + return; + } } $oldSettings = $this->getDomainSettings(); From f703f755e80bbaa0efe75ac248ff4c983489cf13 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Fri, 16 Dec 2022 09:28:02 +0800 Subject: [PATCH 19/43] * Improve css of advance page of instance. --- frontend/module/instance/lang/zh-cn.php | 2 +- frontend/module/instance/view/advance.html.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/module/instance/lang/zh-cn.php b/frontend/module/instance/lang/zh-cn.php index 08ca6f90..e5f4e13b 100644 --- a/frontend/module/instance/lang/zh-cn.php +++ b/frontend/module/instance/lang/zh-cn.php @@ -8,7 +8,7 @@ $lang->instance->mem = '内存'; $lang->instance->space = '空间'; $lang->instance->domain = '域名'; -$lang->instance->SLB = '负载均衡'; +$lang->instance->visitIP = '访问方式'; $lang->instance->dbType = '数据库'; $lang->instance->advanceOption = '高级选项'; $lang->instance->baseInfo = '基本信息'; diff --git a/frontend/module/instance/view/advance.html.php b/frontend/module/instance/view/advance.html.php index 709ece4f..c52fd551 100644 --- a/frontend/module/instance/view/advance.html.php +++ b/frontend/module/instance/view/advance.html.php @@ -2,10 +2,10 @@
-
instance->SLB;?>
+
instance->visitIP;?>
- +
$value):?> From 77bcc5edaf740d99a77c2b4c9c18d4436bdfd0fd Mon Sep 17 00:00:00 2001 From: qishiyao Date: Fri, 16 Dec 2022 10:08:43 +0800 Subject: [PATCH 20/43] + Add tls validator api. --- backend/internal/app/router/router.go | 1 + backend/internal/app/router/system.go | 35 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/backend/internal/app/router/router.go b/backend/internal/app/router/router.go index 3b5c6ea5..ac6c2097 100644 --- a/backend/internal/app/router/router.go +++ b/backend/internal/app/router/router.go @@ -102,6 +102,7 @@ func Config(r *gin.Engine) { api.POST("/system/update", SystemUpdate) api.GET("/system/app-full-list", FindAllApps) api.POST("/system/smtp/validator", AuthMailServer) + api.POST("/system/tls/validator", TLSValidator) api.POST("/system/tls/upload", UploadTLS) api.GET("/system/tls/info", ReadTLSInfo) api.GET("/system/qlb/config", GetLoadBalancer) diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index b4eabc27..08ab7f7e 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -259,6 +259,36 @@ func ConfigLoadBalancer(c *gin.Context) { renderSuccess(c, http.StatusOK) } +func TLSValidator(c *gin.Context) { + var ( + err error + ctx = c.Request.Context() + body model.ReqTLSUpload + ) + + if err = c.ShouldBindJSON(&body); err != nil { + renderError(c, http.StatusBadRequest, err) + return + } + + logger := getLogger(ctx) + logger.Debugf("certificate: %s", body.CertificatePem) + logger.Debugf("privateKey: %s", body.PrivateKeyPem) + + t, err := utiltls.Parse([]byte(body.CertificatePem), []byte(body.PrivateKeyPem)) + if err != nil { + renderError(c, http.StatusBadRequest, err) + return + } + + if err = t.Valid(); err != nil { + renderError(c, translateError(err), err) + return + } + renderJson(c, http.StatusOK, t.GetCertInfo()) + +} + func UploadTLS(c *gin.Context) { var ( err error @@ -298,6 +328,8 @@ func UploadTLS(c *gin.Context) { Key: "extraArgs.default-ssl-certificate", Val: fmt.Sprintf("%s/%s", runtimeNs, body.Name), } + + logger.Info("upgrade app ingress to change default ssl certificate") ingressController, err := service.Apps(ctx, "", runtimeNs).GetApp("ingress") if err == nil { err = ingressController.PatchSettings("nginx-ingress-controller", model.AppCreateOrUpdateModel{ @@ -305,9 +337,12 @@ func UploadTLS(c *gin.Context) { Settings: []model.StringSetting{setting}, }, nil, nil) if err != nil { + logger.WithError(err).Error("patch ingress settings failed") renderError(c, http.StatusInternalServerError, err) return } + } else { + logger.WithError(err).Error("get ingress app failed") } renderJson(c, http.StatusOK, t.GetCertInfo()) From 007a9d198c6b2ebbb512ce7e09af88630e284c92 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Fri, 16 Dec 2022 17:56:15 +0800 Subject: [PATCH 21/43] * Improve system SLB. --- frontend/module/cne/model.php | 45 +++++++++++++++++ frontend/module/instance/model.php | 50 +++++++++++++++---- frontend/module/store/model.php | 2 +- frontend/module/system/control.php | 2 +- frontend/module/system/lang/zh-cn.php | 54 ++++++++++---------- frontend/module/system/model.php | 72 +++++++++++++++++++++++++-- 6 files changed, 183 insertions(+), 42 deletions(-) diff --git a/frontend/module/cne/model.php b/frontend/module/cne/model.php index 030fb970..9fc17395 100644 --- a/frontend/module/cne/model.php +++ b/frontend/module/cne/model.php @@ -190,6 +190,51 @@ public function configQLB($settings, $channel = '') return false; } + /** + * Get Qucheng Load Balancer Info + * + * @param object $slbInstance + * @access public + * @return object + */ + public function getQLBInfo($slbInstance) + { + $apiParams = array(); + $apiParams['cluster'] = ''; + $apiParams['channel'] = empty($channel) ? $this->config->CNE->api->channel : $channel; + $apiParams['namespace'] = $slbInstance->spaceData->k8space; + $apiParams['name'] = $slbInstance->k8name; + + $apiUrl = "/api/cne/system/qlb/config"; + $result = $this->apiGet($apiUrl, $apiParams, $this->config->CNE->api->headers); + if($result && $result->code == 200) return $result->data; + + return null; + } + + /** + * Valid Certificate. + * + * @param object $name + * @param object $pem + * @param object $key + * @access public + * @return object + */ + public function validCert($name, $pem, $key) + { + $apiParams = array(); + $apiParams['name'] = $name; + $apiParams['certificate_pem'] = $pem; + $apiParams['private_key_pem'] = $key; + + $apiUrl = "/api/cne/system/tls/upload"; + $result = $this->apiPost($apiUrl, $apiParams, $this->config->CNE->api->headers); + //if($result && $result->code == 200) return $result->data; + + return $result; + } + /** * Upload cert * diff --git a/frontend/module/instance/model.php b/frontend/module/instance/model.php index 80b77be1..c2bb71f2 100644 --- a/frontend/module/instance/model.php +++ b/frontend/module/instance/model.php @@ -618,11 +618,43 @@ public function install($app, $dbInfo, $customData, $spaceID = null) if(!$instance) return false; $settingMap = $this->installationSettingsMap($customData, $dbInfo, $app, $instance); - return $this->doCneInstall($app, $instance, $space, $settingMap, $snippets); + return $this->doCneInstall($instance, $space, $settingMap, $snippets, $app); } /** - * install global SMTP proxy service. + * Install System SLB component. + * + * @param object $app + * @param string $k8name + * @param string $channel + * @access public + * @return object + */ + public function installSysSLB($app, $k8name = 'cne-lb', $channel = 'stable') + { + $this->app->loadLang('system'); + + $space = $this->loadModel('space')->getSystemSpace($this->app->user->account); + + $instance = $this->createInstance($app, $space, '', '', $k8name, $channel); + if(!$instance) + { + dao::$errors[] = $this->lang->system->errors->failToInstallLDAP; + return false; + } + + $instance = $this->doCneInstall($instance, $space, (new stdclass), array(), $app); + if(!$instance) + { + dao::$errors[] = $this->lang->system->errors->failToInstallLDAP; + return false; + } + + return $instance; + } + + /** + install global SMTP proxy service. * * @param object $app * @param object $smtpSettings @@ -658,7 +690,7 @@ public function installSysSMTP($app, $smtpSettings, $instanceName = '', $k8name $settingsMap->env->SMTP_PASS = $smtpSettings->pass; $settingsMap->env->AUTHENTICATE_CODE = helper::randStr(24); - $instance = $this->doCneInstall($app, $instance, $space, $settingsMap); + $instance = $this->doCneInstall($instance, $space, $settingsMap, array(), $app); if(!$instance) { dao::$errors[] = $this->lang->system->errors->failToInstallSMTP; @@ -739,7 +771,7 @@ public function installLDAP($app, $thirdDomain = '', $instanceName = '', $k8name $settingMap->auth->password = helper::randStr(16); $settingMap->auth->root = 'dc=quickon,dc=org'; - $instance = $this->doCneInstall($app, $instance, $space, $settingMap); + $instance = $this->doCneInstall($instance, $space, $settingMap, array(), $app); if(!$instance) { dao::$errors[] = $this->lang->system->errors->failToInstallLDAP; @@ -818,7 +850,7 @@ public function apiInstall($app, $thirdDomain = '', $name = '', $k8name = '', $c if(!$instance) return false; $settingMap = $this->installationSettingsMap($customData, $dbInfo, $app, $instance); - return $this->doCneInstall($app, $instance, $space, $settingMap); + return $this->doCneInstall($instance, $space, $settingMap, array(), $app); } /** @@ -840,7 +872,7 @@ public function createInstance($app, $space, $thirdDomain, $name = '', $k8name = $instanceData = new stdclass; $instanceData->appId = $app->id; $instanceData->appName = $app->alias; - $instanceData->name = !empty($name) ? $name : $app->alias; + $instanceData->name = !empty($name) ? $name : $app->alias; $instanceData->domain = !empty($thirdDomain) ? $this->fullDomain($thirdDomain) : ''; $instanceData->logo = $app->logo; $instanceData->desc = $app->desc; @@ -868,15 +900,15 @@ public function createInstance($app, $space, $thirdDomain, $name = '', $k8name = /** * Create app instance on CNE platform. * - * @param object $app * @param object $instance * @param object $space * @param object $settingMap * @param array $snippets + * @param object $app * @access private * @return object|bool */ - private function doCneInstall($app, $instance, $space, $settingMap, $snippets = array()) + private function doCneInstall($instance, $space, $settingMap, $snippets = array(), $app = array()) { $apiParams = new stdclass; $apiParams->userame = $instance->createdBy; @@ -889,7 +921,7 @@ private function doCneInstall($app, $instance, $space, $settingMap, $snippets = $apiParams->settings_map = $settingMap; $apiParams->settings_snippets = array_values($snippets); - if(strtolower($this->config->CNE->app->domain) == 'demo.haogs.cn') $apiParams->settings_snippets = array('quickon_saas'); + if(strtolower($this->config->CNE->app->domain) == 'demo.haogs.cn') $apiParams->settings_snippets = array('quickon_saas'); // Only for demo enviroment. $result = $this->cne->installApp($apiParams); if($result->code != 200) diff --git a/frontend/module/store/model.php b/frontend/module/store/model.php index 99e77db3..1e21a46f 100644 --- a/frontend/module/store/model.php +++ b/frontend/module/store/model.php @@ -60,7 +60,7 @@ public function searchApps($sortBy = '', $keyword = '', $categories = array(), $ /** * Get app info by App chart from cloud market. * - * @param string $chart + @param string $chart * @param string $channel * @param bool $analysis * @param string $version diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 9fc5f9d6..c97ea23b 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -419,7 +419,7 @@ public function ajaxUpdatingDomainProgress() public function domainView() { $domainSettings = $this->system->getDomainSettings(); - $certName = str_replace('.', '-', $domainSettings->customDomain); + $certName = 'tls-' . str_replace('.', '-', $domainSettings->customDomain); $cert = $this->loadModel('cne')->certInfo($certName); $this->view->title = $this->lang->system->domain->common; diff --git a/frontend/module/system/lang/zh-cn.php b/frontend/module/system/lang/zh-cn.php index b3aa34b6..9f110340 100644 --- a/frontend/module/system/lang/zh-cn.php +++ b/frontend/module/system/lang/zh-cn.php @@ -119,29 +119,31 @@ $lang->system->notices->configSLBSuccess = '配置负载均衡成功。'; $lang->system->errors = new stdclass; -$lang->system->errors->notFoundDB = '找不到该数据库'; -$lang->system->errors->notFoundLDAP = '找不到LDAP数据'; -$lang->system->errors->dbNameIsEmpty = '数据库名为空'; -$lang->system->errors->notSupportedLDAP = '暂不支持该类型的LDAP'; -$lang->system->errors->failToInstallLDAP = '安装内置LDAP失败'; -$lang->system->errors->failToInstallExtraLDAP = '对接外部LDAP失败'; -$lang->system->errors->failToUpdateExtraLDAP = '更新外部LDAP失败'; -$lang->system->errors->failToUninstallQuChengLDAP = '卸载渠成内部LDAP失败'; -$lang->system->errors->failToUninstallExtraLDAP = '卸载外部LDAP失败'; -$lang->system->errors->failToDeleteLDAPSnippet = '删除LDAP片段失败'; -$lang->system->errors->verifyLDAPFailed = '校验LDAP失败'; -$lang->system->errors->LDAPLinked = '有服务已经关联了LDAP'; -$lang->system->errors->SMTPLinked = '有服务已经关联了SMTP服务'; -$lang->system->errors->failGetOssAccount = '获取对象存储账号失败'; -$lang->system->errors->failToInstallSMTP = '安装SMTP失败'; -$lang->system->errors->failToUninstallSMTP = '卸载SMTP失败'; -$lang->system->errors->verifySMTPFailed = '校验SMTP失败'; -$lang->system->errors->notFoundSMTPApp = '找不到SMTP代理应用'; -$lang->system->errors->notFoundSMTPService = '找不到SMTP代理服务'; -$lang->system->errors->domainIsRequired = '必须填写域名'; -$lang->system->errors->invalidDomain = '无效的域名或格式错误。域名只允许小写字母、数字、点(.)和中横线(-)'; -$lang->system->errors->failToUpdateDomain = '更新域名失败'; -$lang->system->errors->forbiddenOriginalDomain = '不能修改为平台默认域名'; -$lang->system->errors->newDomainIsSameWithOld = '新域名不能与原域名相同'; -$lang->system->errors->failedToConfigSLB = '配置负载均衡失败'; -$lang->system->errors->wrongIPRange = 'IP段格式错误,请参照示例格式,' . $lang->system->SLB->ipPoolExample; +$lang->system->errors->notFoundDB = '找不到该数据库'; +$lang->system->errors->notFoundLDAP = '找不到LDAP数据'; +$lang->system->errors->dbNameIsEmpty = '数据库名为空'; +$lang->system->errors->notSupportedLDAP = '暂不支持该类型的LDAP'; +$lang->system->errors->failToInstallLDAP = '安装内置LDAP失败'; +$lang->system->errors->failToInstallExtraLDAP = '对接外部LDAP失败'; +$lang->system->errors->failToUpdateExtraLDAP = '更新外部LDAP失败'; +$lang->system->errors->failToUninstallQuChengLDAP = '卸载渠成内部LDAP失败'; +$lang->system->errors->failToUninstallExtraLDAP = '卸载外部LDAP失败'; +$lang->system->errors->failToDeleteLDAPSnippet = '删除LDAP片段失败'; +$lang->system->errors->verifyLDAPFailed = '校验LDAP失败'; +$lang->system->errors->LDAPLinked = '有服务已经关联了LDAP'; +$lang->system->errors->SMTPLinked = '有服务已经关联了SMTP服务'; +$lang->system->errors->failGetOssAccount = '获取对象存储账号失败'; +$lang->system->errors->failToInstallSMTP = '安装SMTP失败'; +$lang->system->errors->failToUninstallSMTP = '卸载SMTP失败'; +$lang->system->errors->verifySMTPFailed = '校验SMTP失败'; +$lang->system->errors->notFoundSMTPApp = '找不到SMTP代理应用'; +$lang->system->errors->notFoundSMTPService = '找不到SMTP代理服务'; +$lang->system->errors->domainIsRequired = '必须填写域名'; +$lang->system->errors->invalidDomain = '无效的域名或格式错误。域名只允许小写字母、数字、点(.)和中横线(-)'; +$lang->system->errors->failToUpdateDomain = '更新域名失败'; +$lang->system->errors->forbiddenOriginalDomain = '不能修改为平台默认域名'; +$lang->system->errors->newDomainIsSameWithOld = '新域名不能与原域名相同'; +$lang->system->errors->failedToConfigSLB = '配置负载均衡失败'; +$lang->system->errors->wrongIPRange = 'IP段格式错误,请参照示例格式,' . $lang->system->SLB->ipPoolExample; +$lang->system->errors->failedToInstallSLBComponent = '安装负载均衡组件失败'; +$lang->system->errors->tryReinstallSLB = $lang->system->errors->failedToInstallSLBComponent . ',请重试。'; diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index be459ead..ebd89db7 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -701,8 +701,12 @@ public function updateMinioDomain() public function getSLBSettings() { $settings = new stdclass; - $settings->name = $this->setting->getItem('owner=system&module=common§ion=slb&key=name'); - $settings->ippool = $this->setting->getItem('owner=system&module=common§ion=slb&key=ippool'); + $settings->instanceID = $this->setting->getItem('owner=system&module=common§ion=slb&key=instanceID'); + $settings->name = $this->setting->getItem('owner=system&module=common§ion=slb&key=name'); + $settings->ippool = $this->setting->getItem('owner=system&module=common§ion=slb&key=ippool'); + + //$slbInstance = $this->loadModel('instance')->getByID($settings->instanceID); + //$result = $this->loadmodel('cne')->getQLBinfo($slbInstance); return $settings; } @@ -727,11 +731,39 @@ public function saveSLBSettings() return; } - $settings->name = 'qlb-quickon'; - $settings->namespace = 'cne-system'; + $instanceID = $this->setting->getItem('owner=system&module=common§ion=slb&key=instanceID'); + if(!$instanceID) + { + /* 1. Install SLB component metallb at first time. */ + $slbInstance = $this->installSLBInstance(); + if(!$slbInstance) return; - //a($settings); + $instanceID = $slbInstance->id; + $this->setting->setItem('system.common.slb.instanceID', $slbInstance->id); + } + + $instance = $this->loadModel('instance')->getByID($instanceID); + $status = ''; + for($times = 0; $times < 5; $times++) + { + sleep(3); + $statusResponse = $this->loadModel('cne')->queryStatus($instance); + if($statusResponse->code != 200) continue; + + $status = $statusResponse->data->status; + if($status == 'running') break; // @todo What's the value of $status? + } + + //@todo How to cofirm SLB instance has been installed and ready. + if(empty($status)) + { + dao::$errors[] = $this->lang->system->errors->tryReinstallSLB; + return; + } + /* 2. Config SLB. */ + $settings->name = 'qlb-quickon'; + $settings->namespace = 'cne-system'; $success = $this->loadModel('cne')->configQLB($settings); if(!$success) { @@ -743,6 +775,36 @@ public function saveSLBSettings() $this->setting->setItem('system.common.slb.ippool', zget($settings, 'ippool', '')); } + /** + * Install SLB instance. + * + * @access private + * @return object|null + */ + private function installSLBInstance() + { + $channel = $this->app->session->cloudChannel ? $this->app->session->cloudChannel : $this->config->cloud->api->channel; + + $slbApp = new stdclass; + $slbApp->name = 'metallb'; + $slbApp->alias = 'metallb'; + $slbApp->desc = 'metallb'; + $slbApp->chart = 'metallb'; + $slbApp->app_version = ''; + $slbApp->version = ''; + $slbApp->id = ''; + $slbApp->logo = ''; + + $slbInstance = $this->loadModel('instance')->installSysSLB($slbApp, 'cne-lb', $channel); + if(!$slbInstance) + { + dao::$errors[] = $this->lang->system->errors->failedToInstallSLBComponent; + return; + } + + return $slbInstance; + } + /** * Print edit SMTP button. * From 076e90014dae574eda366f3a2dd311dfb75f15e2 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Sat, 17 Dec 2022 20:10:08 +0800 Subject: [PATCH 22/43] * Install system SLB service. --- frontend/module/cne/model.php | 2 +- frontend/module/system/control.php | 17 ++++++ frontend/module/system/js/editdomain.js | 56 +++++++++++++++++++ frontend/module/system/lang/zh-cn.php | 1 + .../module/system/view/editdomain.html.php | 8 +++ 5 files changed, 83 insertions(+), 1 deletion(-) diff --git a/frontend/module/cne/model.php b/frontend/module/cne/model.php index 9fc17395..9be1d23b 100644 --- a/frontend/module/cne/model.php +++ b/frontend/module/cne/model.php @@ -228,7 +228,7 @@ public function validCert($name, $pem, $key) $apiParams['certificate_pem'] = $pem; $apiParams['private_key_pem'] = $key; - $apiUrl = "/api/cne/system/tls/upload"; + $apiUrl = "/api/cne/system/tls/validator"; $result = $this->apiPost($apiUrl, $apiParams, $this->config->CNE->api->headers); //if($result && $result->code == 200) return $result->data; diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index c97ea23b..63e104d9 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -396,6 +396,23 @@ public function editDomain() $this->display(); } + /** + * AjaxValidCert + * + * @access public + * @return void + */ + public function ajaxValidateCert() + { + $certData = fixer::input('post')->get(); + + $certName = 'tls-' . str_replace('.', '-',$certData->domain); + $result = $this->loadModel('cne')->validCert($certName, $certData->certPem, $certData->certKey); + if($result->code == 200) return $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->validCert)); + + return $this->send(array('result' => 'fail', 'message' => $result->message)); + } + /** * Show progress of updating domains. * diff --git a/frontend/module/system/js/editdomain.js b/frontend/module/system/js/editdomain.js index 7c7325b7..b24f9750 100644 --- a/frontend/module/system/js/editdomain.js +++ b/frontend/module/system/js/editdomain.js @@ -1,5 +1,37 @@ $(function() { + /** + * Fresh submitBtn status. + * + * @access public + * @return void + */ + function freshSubmitBtn() + { + if($('#httpstrue:checked').length == 0) + { + $('#submitBtn').attr('disabled', false); + return; + } + var pass = $('#validCertBtn').attr('pass') == 'true'; + if(pass) + { + $('#submitBtn').attr('disabled', false); + } + else + { + $('#submitBtn').attr('disabled', true); + } + } + + freshSubmitBtn(); + + /** + * Toggle certificate textarea. + * + * @access public + * @return void + */ function toggleCertBox() { $showCert = $("#httpstrue[type=checkbox]:checked").length > 0; @@ -12,6 +44,7 @@ $(function() $('#cert-box').hide(); } + freshSubmitBtn(); } toggleCertBox(); @@ -21,6 +54,29 @@ $(function() toggleCertBox(); }); + $('#validateCertBtn').on('click', function() + { + var certData = {}; + certData.domain = $('#customDomain').val(); + certData.certPem = $('#certPem').val(); + certData.certKey = $('#certKey').val(); + $.post(createLink('system', 'ajaxValidateCert'), certData).done(function(response) + { + var res = JSON.parse(response); + $('#validateMsg').html(res.message); + if(res.result == 'success') + { + $('#validateCertBtn').attr('pass', 'true'); + $('#validateMsg').removeClass('text-red').addClass('text-green'); + } + else + { + $('#validateCertBtn').attr('pass', 'false'); + $('#validateMsg').removeClass('text-green').addClass('text-red'); + } + freshSubmitBtn(); + }); + }); var timerID = 0; diff --git a/frontend/module/system/lang/zh-cn.php b/frontend/module/system/lang/zh-cn.php index 9f110340..d9e91823 100644 --- a/frontend/module/system/lang/zh-cn.php +++ b/frontend/module/system/lang/zh-cn.php @@ -117,6 +117,7 @@ $lang->system->notices->confirmUpdateDomain = '修改域名后,会自动更新已安装服务的域名,确定要修改吗?'; $lang->system->notices->updateDomainSuccess = '域名修改成功。'; $lang->system->notices->configSLBSuccess = '配置负载均衡成功。'; +$lang->system->notices->validCert = '校验成功'; $lang->system->errors = new stdclass; $lang->system->errors->notFoundDB = '找不到该数据库'; diff --git a/frontend/module/system/view/editdomain.html.php b/frontend/module/system/view/editdomain.html.php index 55864239..a21e44c5 100644 --- a/frontend/module/system/view/editdomain.html.php +++ b/frontend/module/system/view/editdomain.html.php @@ -68,6 +68,14 @@ + + + + +
+ system->verify, "id='validateCertBtn'");?> + +
save, "id='submitBtn'", "btn btn-primary");?>
From 85a01596dcf060913cbd137c1d12fe222837388c Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Sun, 18 Dec 2022 08:26:05 +0800 Subject: [PATCH 23/43] * Validate cert info. --- frontend/module/system/control.php | 9 +++++++++ frontend/module/system/js/editdomain.js | 7 ++++++- frontend/module/system/view/editdomain.html.php | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 63e104d9..8532ff01 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -406,6 +406,15 @@ public function ajaxValidateCert() { $certData = fixer::input('post')->get(); + $this->dao->select('system')->data($certData) + ->batchCheck('domain,certPem,certKey', 'notempty'); + if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::$errors)); + + if(!validater::checkREG($certData->domain, '/^((?!-)[a-z0-9-]{1,63}(?send(array('result' => 'fail', 'message' => $this->lang->system->errors->invalidDomain)); + } + $certName = 'tls-' . str_replace('.', '-',$certData->domain); $result = $this->loadModel('cne')->validCert($certName, $certData->certPem, $certData->certKey); if($result->code == 200) return $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->validCert)); diff --git a/frontend/module/system/js/editdomain.js b/frontend/module/system/js/editdomain.js index b24f9750..fa9295e9 100644 --- a/frontend/module/system/js/editdomain.js +++ b/frontend/module/system/js/editdomain.js @@ -63,16 +63,21 @@ $(function() $.post(createLink('system', 'ajaxValidateCert'), certData).done(function(response) { var res = JSON.parse(response); - $('#validateMsg').html(res.message); if(res.result == 'success') { $('#validateCertBtn').attr('pass', 'true'); $('#validateMsg').removeClass('text-red').addClass('text-green'); + $('#validateMsg').html(res.message); } else { $('#validateCertBtn').attr('pass', 'false'); $('#validateMsg').removeClass('text-green').addClass('text-red'); + var errMessage = res.message; + if(res.message instanceof Array) errMessage = res.message.join(' '); + if(res.message instanceof Object) errMessage = Object.values(res.message).join(' '); + + $('#validateMsg').html(errMessage); } freshSubmitBtn(); }); diff --git a/frontend/module/system/view/editdomain.html.php b/frontend/module/system/view/editdomain.html.php index a21e44c5..5d6766fd 100644 --- a/frontend/module/system/view/editdomain.html.php +++ b/frontend/module/system/view/editdomain.html.php @@ -70,7 +70,7 @@ - + system->verify, "id='validateCertBtn'");?> From 86c855f67a35f90277db29c504ff0d0cc4323fee Mon Sep 17 00:00:00 2001 From: qishiyao Date: Mon, 19 Dec 2022 11:29:11 +0800 Subject: [PATCH 24/43] + Add new tls error. --- backend/internal/app/router/system.go | 12 ++++++++---- backend/internal/app/service/app/manage.go | 2 +- backend/internal/pkg/retcode/errors.go | 2 ++ backend/pkg/utils/tls/error.go | 2 ++ backend/pkg/utils/tls/tls.go | 9 ++++++--- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index 08ab7f7e..04f8e3df 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -275,9 +275,9 @@ func TLSValidator(c *gin.Context) { logger.Debugf("certificate: %s", body.CertificatePem) logger.Debugf("privateKey: %s", body.PrivateKeyPem) - t, err := utiltls.Parse([]byte(body.CertificatePem), []byte(body.PrivateKeyPem)) + t, err := utiltls.Parse([]byte(body.CertificatePem), []byte(body.PrivateKeyPem), logger) if err != nil { - renderError(c, http.StatusBadRequest, err) + renderError(c, translateError(err), err) return } @@ -305,9 +305,9 @@ func UploadTLS(c *gin.Context) { logger.Debugf("certificate: %s", body.CertificatePem) logger.Debugf("privateKey: %s", body.PrivateKeyPem) - t, err := utiltls.Parse([]byte(body.CertificatePem), []byte(body.PrivateKeyPem)) + t, err := utiltls.Parse([]byte(body.CertificatePem), []byte(body.PrivateKeyPem), logger) if err != nil { - renderError(c, http.StatusBadRequest, err) + renderError(c, translateError(err), err) return } @@ -379,6 +379,10 @@ func translateError(e error) int { code = retcode.ExpiredCertificate } else if errors.Is(e, utiltls.ErrIncompleteCertificateChain) { code = retcode.IncompleteCertificateChain + } else if errors.Is(e, utiltls.ErrParseCertificate) { + code = retcode.ParseCertificate + } else if errors.Is(e, utiltls.ErrParsePrivateKey) { + code = retcode.ParsePrivateKey } return int(code) diff --git a/backend/internal/app/service/app/manage.go b/backend/internal/app/service/app/manage.go index d16d2253..cf5a1e71 100644 --- a/backend/internal/app/service/app/manage.go +++ b/backend/internal/app/service/app/manage.go @@ -161,7 +161,7 @@ func (m *Manager) ReadTLSCertInfo(name string) (*tls.CertInfo, error) { return nil, err } - t, err := tls.Parse(secret.Data[v1.TLSCertKey], secret.Data[v1.TLSPrivateKeyKey]) + t, err := tls.Parse(secret.Data[v1.TLSCertKey], secret.Data[v1.TLSPrivateKeyKey], m.logger) if err != nil { return nil, err } diff --git a/backend/internal/pkg/retcode/errors.go b/backend/internal/pkg/retcode/errors.go index a4a9c56d..5932a205 100644 --- a/backend/internal/pkg/retcode/errors.go +++ b/backend/internal/pkg/retcode/errors.go @@ -27,4 +27,6 @@ const ( ExpiredCertificate RetCode = iota + 41001 // 证书过期 UnmatchedCertificate // 证书不匹配 IncompleteCertificateChain // 证书链不完整 + ParseCertificate // 证书解析失败 + ParsePrivateKey // 密钥解析失败 ) diff --git a/backend/pkg/utils/tls/error.go b/backend/pkg/utils/tls/error.go index 5a74bc2d..fe08c335 100644 --- a/backend/pkg/utils/tls/error.go +++ b/backend/pkg/utils/tls/error.go @@ -6,4 +6,6 @@ var ( ErrUnmatchedCertificate = errors.New("certificate chain not matched") ErrExpiredCertificate = errors.New("certificate is expired") ErrIncompleteCertificateChain = errors.New("certificate chain is uncompleted") + ErrParseCertificate = errors.New("parse certificate failed") + ErrParsePrivateKey = errors.New("parse private key failed") ) diff --git a/backend/pkg/utils/tls/tls.go b/backend/pkg/utils/tls/tls.go index 719f1df2..d3232bf3 100644 --- a/backend/pkg/utils/tls/tls.go +++ b/backend/pkg/utils/tls/tls.go @@ -7,6 +7,7 @@ import ( "crypto/x509" "encoding/pem" "github.com/pkg/errors" + "github.com/sirupsen/logrus" "time" ) @@ -18,7 +19,7 @@ type tlsKeyPair struct { PrivateKey *rsa.PrivateKey } -func Parse(cert, key []byte) (*tlsKeyPair, error) { +func Parse(cert, key []byte, logger logrus.FieldLogger) (*tlsKeyPair, error) { t := &tlsKeyPair{ certificate: cert, privateKey: key, @@ -28,12 +29,14 @@ func Parse(cert, key []byte) (*tlsKeyPair, error) { t.Certificates, err = parseCertificate(cert) if err != nil { - return nil, err + logger.WithError(err).Error("parse certificate failed") + return nil, ErrParseCertificate } t.PrivateKey, err = parseKey(key) if err != nil { - return nil, err + logger.WithError(err).Error("parse private key failed") + return nil, ErrParsePrivateKey } return t, nil From e3b0b40b61a85dcf8f18461b55dddbfbfd973e64 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Mon, 19 Dec 2022 14:53:54 +0800 Subject: [PATCH 25/43] * Improve system config SLB. --- frontend/module/cne/lang/zh-cn.php | 3 ++ frontend/module/cne/model.php | 39 ++++++++++++++------ frontend/module/system/control.php | 2 +- frontend/module/system/js/editdomain.js | 2 +- frontend/module/system/js/editslb.js | 34 +++++++++++++++++ frontend/module/system/lang/zh-cn.php | 5 ++- frontend/module/system/model.php | 20 ++++++---- frontend/module/system/view/editslb.html.php | 10 +++-- 8 files changed, 89 insertions(+), 26 deletions(-) create mode 100644 frontend/module/system/js/editslb.js diff --git a/frontend/module/cne/lang/zh-cn.php b/frontend/module/cne/lang/zh-cn.php index f9f8ef2d..57539e51 100644 --- a/frontend/module/cne/lang/zh-cn.php +++ b/frontend/module/cne/lang/zh-cn.php @@ -19,7 +19,10 @@ //$lang->CNE->errorList[400] = '不能包含特殊字符'; $lang->CNE->errorList[400] = '请求集群接口失败'; $lang->CNE->errorList[404] = '服务不存在'; +$lang->CNE->errorList[40004] = '证书与域名不匹配'; $lang->CNE->errorList[41001] = '证书过期'; $lang->CNE->errorList[41002] = '证书不匹配'; $lang->CNE->errorList[41003] = '证书链不完整'; $lang->CNE->errorList[41004] = '私钥与证书不匹配'; +$lang->CNE->errorList[41005] = '证书解析失败'; +$lang->CNE->errorList[41006] = '密钥解析失败'; diff --git a/frontend/module/cne/model.php b/frontend/module/cne/model.php index 9be1d23b..51761670 100644 --- a/frontend/module/cne/model.php +++ b/frontend/module/cne/model.php @@ -193,17 +193,18 @@ public function configQLB($settings, $channel = '') /** * Get Qucheng Load Balancer Info * - * @param object $slbInstance + * @param string $name + * @param string $namespace * @access public * @return object */ - public function getQLBInfo($slbInstance) + public function getQLBInfo($name, $namespace) { $apiParams = array(); $apiParams['cluster'] = ''; $apiParams['channel'] = empty($channel) ? $this->config->CNE->api->channel : $channel; - $apiParams['namespace'] = $slbInstance->spaceData->k8space; - $apiParams['name'] = $slbInstance->k8name; + $apiParams['namespace'] = $namespace; + $apiParams['name'] = $name; $apiUrl = "/api/cne/system/qlb/config"; $result = $this->apiGet($apiUrl, $apiParams, $this->config->CNE->api->headers); @@ -215,22 +216,38 @@ public function getQLBInfo($slbInstance) /** * Valid Certificate. * - * @param object $name - * @param object $pem - * @param object $key + * @param string $certName + * @param string $pem + * @param string $key + * @param string $domain * @access public - * @return object + * @return bool */ - public function validCert($name, $pem, $key) + public function validateCert($certName, $pem, $key, $domain) { $apiParams = array(); - $apiParams['name'] = $name; + $apiParams['name'] = $certName; $apiParams['certificate_pem'] = $pem; $apiParams['private_key_pem'] = $key; $apiUrl = "/api/cne/system/tls/validator"; $result = $this->apiPost($apiUrl, $apiParams, $this->config->CNE->api->headers); - //if($result && $result->code == 200) return $result->data; + if($result && $result->code != 200) return $result; + + $match = false; + foreach($result->data->sans as $domainPattern) + { + if(stripos($domainPattern, $domain) !== false) + { + $match = true; + break; + } + } + if(!$match) + { + $result->code = 40004; + $result->message = zget($this->lang->CNE->errorList, 40004); + } return $result; } diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 8532ff01..9f20ba5e 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -416,7 +416,7 @@ public function ajaxValidateCert() } $certName = 'tls-' . str_replace('.', '-',$certData->domain); - $result = $this->loadModel('cne')->validCert($certName, $certData->certPem, $certData->certKey); + $result = $this->loadModel('cne')->validateCert($certName, $certData->certPem, $certData->certKey, $certData->domain); if($result->code == 200) return $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->validCert)); return $this->send(array('result' => 'fail', 'message' => $result->message)); diff --git a/frontend/module/system/js/editdomain.js b/frontend/module/system/js/editdomain.js index fa9295e9..bb4bc469 100644 --- a/frontend/module/system/js/editdomain.js +++ b/frontend/module/system/js/editdomain.js @@ -13,7 +13,7 @@ $(function() $('#submitBtn').attr('disabled', false); return; } - var pass = $('#validCertBtn').attr('pass') == 'true'; + var pass = $('#validateCertBtn').attr('pass') == 'true'; if(pass) { $('#submitBtn').attr('disabled', false); diff --git a/frontend/module/system/js/editslb.js b/frontend/module/system/js/editslb.js new file mode 100644 index 00000000..c1e98ad4 --- /dev/null +++ b/frontend/module/system/js/editslb.js @@ -0,0 +1,34 @@ +$(function() +{ + var overtime = 30; + var timerID = 0; + $("#submitBtn").on('click', function() + { + $('#waiting').modal('show'); + timerID = setInterval(function() + { + $('#timer').text(overtime); + overtime--; + }, 1000); + + var slbData = {}; + slbData.ippool = $('#ippool').val(); + $.post(createLink('system', 'editSLB'), slbData).done(function(response) + { + $('#waiting').modal('hide'); + clearInterval(timerID); + overtime = 30; + + var res = JSON.parse(response); + if(res.result == 'success'){ + parent.window.location.href = res.locate; + }else{ + bootbox.alert( + { + title: notices.fail, + message: res.message, + }); + } + }); + }); +}); diff --git a/frontend/module/system/lang/zh-cn.php b/frontend/module/system/lang/zh-cn.php index d9e91823..83cbdacf 100644 --- a/frontend/module/system/lang/zh-cn.php +++ b/frontend/module/system/lang/zh-cn.php @@ -96,6 +96,9 @@ $lang->system->SLB->edit = '修改负载均衡'; $lang->system->SLB->ipPool = 'IP段'; $lang->system->SLB->ipPoolExample = '示例:192.168.10.0/24或者192.168.10.0-192.168.10.100'; +$lang->system->SLB->installing = '正在配置负载均衡'; +$lang->system->SLB->leftSeconds = '预计剩余'; +$lang->system->SLB->second = '秒'; $lang->system->notices = new stdclass; $lang->system->notices->success = '成功'; @@ -147,4 +150,4 @@ $lang->system->errors->failedToConfigSLB = '配置负载均衡失败'; $lang->system->errors->wrongIPRange = 'IP段格式错误,请参照示例格式,' . $lang->system->SLB->ipPoolExample; $lang->system->errors->failedToInstallSLBComponent = '安装负载均衡组件失败'; -$lang->system->errors->tryReinstallSLB = $lang->system->errors->failedToInstallSLBComponent . ',请重试。'; +$lang->system->errors->tryReinstallSLB = '安装负载均衡组件超时,请重试。'; diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index ebd89db7..e8619125 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -703,10 +703,15 @@ public function getSLBSettings() $settings = new stdclass; $settings->instanceID = $this->setting->getItem('owner=system&module=common§ion=slb&key=instanceID'); $settings->name = $this->setting->getItem('owner=system&module=common§ion=slb&key=name'); - $settings->ippool = $this->setting->getItem('owner=system&module=common§ion=slb&key=ippool'); + $settings->ippool = ''; - //$slbInstance = $this->loadModel('instance')->getByID($settings->instanceID); - //$result = $this->loadmodel('cne')->getQLBinfo($slbInstance); + if($settings->instanceID) + { + $slbInstance = $this->loadModel('instance')->getByID($settings->instanceID); + + $qlbInfo = $this->loadmodel('cne')->getQLBinfo($settings->name, $slbInstance->spaceData->k8space); // QLB: Qucheng load balancer. + if($qlbInfo) $settings->ippool = $qlbInfo->ippool; + } return $settings; } @@ -744,18 +749,18 @@ public function saveSLBSettings() $instance = $this->loadModel('instance')->getByID($instanceID); $status = ''; - for($times = 0; $times < 5; $times++) + /* Wait 30 seconds at most for SLB instance ready. */ + for($times = 0; $times < 10; $times++) { sleep(3); $statusResponse = $this->loadModel('cne')->queryStatus($instance); if($statusResponse->code != 200) continue; $status = $statusResponse->data->status; - if($status == 'running') break; // @todo What's the value of $status? + if($status == 'running') break; } - //@todo How to cofirm SLB instance has been installed and ready. - if(empty($status)) + if($status != 'running') { dao::$errors[] = $this->lang->system->errors->tryReinstallSLB; return; @@ -772,7 +777,6 @@ public function saveSLBSettings() } $this->setting->setItem('system.common.slb.name', zget($settings, 'name', '')); - $this->setting->setItem('system.common.slb.ippool', zget($settings, 'ippool', '')); } /** diff --git a/frontend/module/system/view/editslb.html.php b/frontend/module/system/view/editslb.html.php index ca8ead31..b31992d5 100644 --- a/frontend/module/system/view/editslb.html.php +++ b/frontend/module/system/view/editslb.html.php @@ -24,7 +24,7 @@

system->SLB->config;?>

-
+ @@ -36,7 +36,7 @@
-
save);?>
+
save, "id='submitBtn'", 'btn btn-wide btn-primary');?>
@@ -44,9 +44,11 @@ @@ -44,9 +44,11 @@ -
system->ldapUpdate : $lang->system->ldapInstall);?>
+
system->LDAP->ldapUpdate : $lang->system->LDAP->ldapInstall, "id='submitBtn'", "btn btn-primary btn-wide");?>
+ diff --git a/frontend/module/system/view/ldapview.html.php b/frontend/module/system/view/ldapview.html.php index 35cc51d5..503d3702 100644 --- a/frontend/module/system/view/ldapview.html.php +++ b/frontend/module/system/view/ldapview.html.php @@ -22,7 +22,7 @@
-

system->LDAPInfo;?>

+

system->LDAP->info;?>

system->printEditLDAPBtn();?> @@ -37,16 +37,16 @@ - - + + - + - + @@ -59,45 +59,45 @@
system->ldapSource;?>system->ldapTypeList, $activeLDAP, '');?>system->LDAP->ldapSource;?>system->LDAP->ldapTypeList, $activeLDAP, '');?>
system->ldapUsername;?>system->LDAP->ldapUsername;?> auth, 'username', '');?>
system->ldapRoot;?>system->LDAP->ldapRoot;?> auth, 'root', '');?>
- + - + - + - + - + - + - + - + - + - + @@ -110,10 +110,10 @@ - + From dcb6adac1bb20328b74a2deedbb8f49ea3ab3623 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Tue, 20 Dec 2022 21:35:21 +0800 Subject: [PATCH 32/43] * Update LDAP. --- frontend/module/instance/control.php | 7 +- frontend/module/instance/js/install.js | 2 +- frontend/module/instance/model.php | 20 +++++ frontend/module/system/control.php | 32 ++++---- frontend/module/system/js/editdomain.js | 6 +- frontend/module/system/js/editldap.js | 73 +++++++++++++++++-- frontend/module/system/lang/zh-cn.php | 51 +++++++------ frontend/module/system/model.php | 54 ++++++++++++-- .../module/system/view/editdomain.html.php | 9 +-- frontend/module/system/view/ldapform.html.php | 50 ++++++++----- frontend/module/system/view/ldapview.html.php | 36 ++++----- 11 files changed, 242 insertions(+), 98 deletions(-) diff --git a/frontend/module/instance/control.php b/frontend/module/instance/control.php index d81b4912..18b405d6 100644 --- a/frontend/module/instance/control.php +++ b/frontend/module/instance/control.php @@ -365,10 +365,11 @@ public function install($appID) { $sharedDB = zget($pgList, $customData->dbService); } - $result = $this->instance->install($cloudApp, $sharedDB, $customData); - if(!$result) return $this->send(array('result' => 'fail', 'message' => $this->lang->instance->notices['installFail'])); + $instance = $this->instance->install($cloudApp, $sharedDB, $customData); + if(!$instance) return $this->send(array('result' => 'fail', 'message' => $this->lang->instance->notices['installFail'])); - $this->send(array('result' => 'success', 'message' => $this->lang->instance->notices['installSuccess'], 'locate' => $this->createLink('space', 'browse'), 'target' => 'parent')); + unset($_GET['onlybody']); + $this->send(array('result' => 'success', 'message' => $this->lang->instance->notices['installSuccess'], 'locate' => $this->createLink('instance', 'view', "id=$instance->id", '', false))); } $this->lang->switcherMenu = $this->instance->getInstallSwitcher($cloudApp); diff --git a/frontend/module/instance/js/install.js b/frontend/module/instance/js/install.js index 015bc042..9871b0da 100644 --- a/frontend/module/instance/js/install.js +++ b/frontend/module/instance/js/install.js @@ -17,7 +17,7 @@ $(function() if(res.result == 'success') { config.onlybody = 'no'; - window.parent.$.apps.open(createLink('space', 'browse'), 'space'); + window.parent.$.apps.open(res.locate, 'space'); } else { diff --git a/frontend/module/instance/model.php b/frontend/module/instance/model.php index c2bb71f2..1a082cdb 100644 --- a/frontend/module/instance/model.php +++ b/frontend/module/instance/model.php @@ -107,6 +107,26 @@ public function getByAccount($account = '', $pager = null, $pinned = '', $search return $instances; } + /** + * Get instance list that has been enabled LDAP. + * + * @access public + * @return array + */ + public function getListEnabledLDAP() + { + $instances = $this->dao->select('*')->from(TABLE_INSTANCE)->where('deleted')->eq(0)->andWhere('length(ldapSnippetName) > 0')->fetchAll('id'); + + $spaces = $this->dao->select('*')->from(TABLE_SPACE) + ->where('deleted')->eq(0) + ->andWhere('id')->in(array_column($instances, 'space')) + ->fetchAll('id'); + + foreach($instances as $instance) $instance->spaceData = zget($spaces, $instance->space, new stdclass); + + return $instances; + } + /** * Count instance which is enabled LDAP. * diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 9f20ba5e..a6b6f3e0 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -83,7 +83,7 @@ public function installLDAP() } else if($postData->source == 'extra') { - $this->system->installExtraLDAP((object)$postData->extra); + $this->system->configExtraLDAP((object)$postData->extra); } else { @@ -118,16 +118,8 @@ public function editLDAP() $ldapApp = $this->loadModel('store')->getAppInfoByChart('openldap', $channel, false); if($_POST) { - $postData = fixer::input('post')->setDefault('source', 'qucheng')->get(); - if($postData->source == 'qucheng') - { - $this->system->updateQuchengLDAP($ldapApp, $channel); - } - else if($postData->source == 'extra') - { - $this->system->installExtraLDAP((object)$postData->extra); - } - + session_write_close(); + $this->system->updateLDAP($channel); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->ldapUpdateSuccess, 'locate' => $this->inLink('ldapView'))); @@ -142,6 +134,20 @@ public function editLDAP() $this->display(); } + /** + * ajaxUpdatingLDAPProgress + * + * @access public + * @return void + */ + public function ajaxUpdatingLDAPProgress() + { + session_write_close(); + + $number = $this->loadModel('setting')->getItem('owner=system&module=common§ion=ldap&key=updatingProgress'); + echo sprintf($this->lang->system->LDAP->updatingProgress, intval($number)); + } + /** * LDAP view. * @@ -406,8 +412,8 @@ public function ajaxValidateCert() { $certData = fixer::input('post')->get(); - $this->dao->select('system')->data($certData) - ->batchCheck('domain,certPem,certKey', 'notempty'); + $this->dao->select('*')->from('system')->data($certData) + ->batchCheck('customDomain,certPem,certKey', 'notempty'); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::$errors)); if(!validater::checkREG($certData->domain, '/^((?!-)[a-z0-9-]{1,63}(? 0; @@ -11,14 +17,16 @@ $(function() if(enableLDAP && ldapCheckPass) { - $('#LDAPForm button[type=submit]').attr('disabled', false); + $('#LDAPForm #submitBtn').attr('disabled', false); } else { - $('#LDAPForm button[type=submit]').attr('disabled', true); + $('#LDAPForm #submitBtn').attr('disabled', true); } } + freshSubmitBtn(); + $('#LDAPForm input[type=checkbox]').on('change', function(event) { freshSubmitBtn(); @@ -87,12 +95,61 @@ $(function() }); }); - freshSubmitBtn(); + var timerID = 0; - if(disableEdit) + /** + * Show updating LDAP progress modal. + * + * @access public + * @return void + */ + function showProgressModal() { - $('#LDAPForm input').attr('disabled', true); - $('#LDAPForm select').attr('disabled', true); - $('#LDAPForm button').attr('disabled', true); - } + $('#waiting').modal('show'); + timerID = setInterval(function() + { + $.get(createLink('system', 'ajaxUpdatingLDAPProgress'), function(data) + { + $('#waiting #message').html(data); + }); + }, 1000); + }; + + $('#submitBtn').on('click', function() + { + bootbox.confirm(notices.confirmUpdateLDAP, function(result) + { + if(!result) return; + + showProgressModal(); + $('#submitBtn').attr('disabled', true); + + var ldapData = $('#LDAPForm').serializeArray(); + $.post(createLink('system', 'editLDAP'), ldapData).done(function(response) + { + $('#submitBtn').attr('disabled', false); + + var res = JSON.parse(response); + if(res.result == 'success') + { + parent.window.location.href = res.locate; + } + else + { + $('#waiting').modal('hide'); + clearInterval(timerID); + + var errMessage = res.message; + if(res.message instanceof Array) errMessage = res.message.join('
'); + if(res.message instanceof Object) errMessage = Object.values(res.message).join('
'); + + bootbox.alert( + { + title: notices.fail, + message: errMessage, + }); + } + }); + }); + }); }); diff --git a/frontend/module/system/lang/zh-cn.php b/frontend/module/system/lang/zh-cn.php index 83cbdacf..42aa8279 100644 --- a/frontend/module/system/lang/zh-cn.php +++ b/frontend/module/system/lang/zh-cn.php @@ -15,29 +15,34 @@ $lang->system->LDAPInfo = 'LDAP信息'; $lang->system->advance = '高级'; $lang->system->verify = '校验'; +$lang->system->copy = '复制'; +$lang->system->copySuccess = '已复制到剪切板'; /* LDAP */ -$lang->system->ldapEnabled = '启用LDAP'; -$lang->system->ldapQucheng = '渠成内置'; -$lang->system->ldapSource = '来源'; -$lang->system->ldapInstall = '安装并启用'; -$lang->system->ldapUpdate = '更新'; -$lang->system->accountInfo = '账号信息'; -$lang->system->account = '账号'; -$lang->system->password = '密码'; -$lang->system->ldapUsername = '用户名'; -$lang->system->ldapName = '名称'; -$lang->system->host = '主机'; -$lang->system->port = '端口'; -$lang->system->account = '账号'; -$lang->system->password = '密码'; -$lang->system->ldapRoot = '根节点'; -$lang->system->filterUser = '用户过滤'; -$lang->system->email = '邮件字段'; -$lang->system->extraAccount = '用户名字段'; -$lang->system->ldapAdvance = '高级设置'; -$lang->system->copy = '复制'; -$lang->system->copySuccess = '已复制到剪切板'; +$lang->system->LDAP = new stdclass; +$lang->system->LDAP->info = 'LDAP信息'; +$lang->system->LDAP->ldapEnabled = '启用LDAP'; +$lang->system->LDAP->ldapQucheng = '渠成内置'; +$lang->system->LDAP->ldapSource = '来源'; +$lang->system->LDAP->ldapInstall = '安装并启用'; +$lang->system->LDAP->ldapUpdate = '更新'; +$lang->system->LDAP->accountInfo = '账号信息'; +$lang->system->LDAP->account = '账号'; +$lang->system->LDAP->password = '密码'; +$lang->system->LDAP->ldapUsername = '用户名'; +$lang->system->LDAP->ldapName = '名称'; +$lang->system->LDAP->host = '主机'; +$lang->system->LDAP->port = '端口'; +$lang->system->LDAP->account = '账号'; +$lang->system->LDAP->password = '密码'; +$lang->system->LDAP->ldapRoot = '根节点'; +$lang->system->LDAP->filterUser = '用户过滤'; +$lang->system->LDAP->email = '邮件字段'; +$lang->system->LDAP->extraAccount = '用户名字段'; +$lang->system->LDAP->ldapAdvance = '高级设置'; +$lang->system->LDAP->updateLDAP = '更新LDAP'; +$lang->system->LDAP->updateInstance = '更新已关联LDAP的服务'; +$lang->system->LDAP->updatingProgress = '更新中...剩余 %s 个服务。'; $lang->system->ldapTypeList = array(); $lang->system->ldapTypeList['qucheng'] = '渠成内置'; @@ -105,9 +110,10 @@ $lang->system->notices->fail = '失败'; $lang->system->notices->attention = '注意'; $lang->system->notices->noLDAP = '找不到LDAP配置数据'; -$lang->system->notices->ldapUsed = '已经有服务关联了LDAP'; +$lang->system->notices->ldapUsed = '%s个服务已关联了LDAP'; $lang->system->notices->ldapInstallSuccess = 'LDAP安装成功'; $lang->system->notices->ldapUpdateSuccess = 'LDAP更新成功'; +$lang->system->notices->confirmUpdateLDAP = '修改LDAP后,会自动更新并重启已关联的服务,确定要修改吗?'; $lang->system->notices->verifyLDAPSuccess = '校验LDAP成功!'; $lang->system->notices->fillAllRequiredFields = '请填写全部必填项!'; $lang->system->notices->smtpInstallSuccess = 'LDAP安装成功'; @@ -149,5 +155,6 @@ $lang->system->errors->newDomainIsSameWithOld = '新域名不能与原域名相同'; $lang->system->errors->failedToConfigSLB = '配置负载均衡失败'; $lang->system->errors->wrongIPRange = 'IP段格式错误,请参照示例格式,' . $lang->system->SLB->ipPoolExample; +$lang->system->errors->ippoolRequired = 'IP段不能为空'; $lang->system->errors->failedToInstallSLBComponent = '安装负载均衡组件失败'; $lang->system->errors->tryReinstallSLB = '安装负载均衡组件超时,请重试。'; diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index e8619125..c8cc6247 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -83,28 +83,33 @@ public function printDBAction($db) echo $btnHtml; } + /** + * Print edit LDAP button. + * + * @access public + * @return void + */ public function printEditLDAPBtn() { $this->loadModel('instance'); - $disableEdit = false; $title = $this->lang->system->editLDAP; $toolTips = ''; $count = $this->instance->countLDAP(); if($count) { - $disableEdit = true; - $title = $this->lang->system->notices->ldapUsed; + $title = sprintf($this->lang->system->notices->ldapUsed, $count); $toolTips = "data-toggle='tooltip' data-placement='bottom'"; } $buttonHtml = ''; $buttonHtml .= ""; - $buttonHtml .= html::a(inLink('editLDAP'), $this->lang->system->editLDAP, '', ($disableEdit ? 'disabled' : '') . " title='{$title}' class='btn-edit btn label label-outline label-primary label-lg'"); + $buttonHtml .= html::a(inLink('editLDAP'), $this->lang->system->editLDAP, '', "title='{$title}' class='btn-edit btn label label-outline label-primary label-lg'"); $buttonHtml .= ""; echo $buttonHtml; } + /** * Print LDAP buttons. * @@ -188,7 +193,7 @@ public function updateQuchengLDAP($ldapApp, $channel) * @access protected * @return bool */ - public function installExtraLDAP($settings) + public function configExtraLDAP($settings) { if(!$this->testLDAPConnection($settings)) { @@ -249,6 +254,40 @@ public function installExtraLDAP($settings) return true; } + /** + * Update LDAP config and update instance. + * + * @access public + * @return void + */ + public function updateLDAP() + { + $postData = fixer::input('post')->setDefault('source', 'qucheng')->get(); + if($postData->source == 'qucheng') + { + $success = $this->updateQuchengLDAP($ldapApp, $channel); + } + else if($postData->source == 'extra') + { + $success = $this->configExtraLDAP((object)$postData->extra); + } + + if(!$success) return false; + + /* Update instances that has been enabled LDAP. */ + $instanceList = $this->loadModel('instance')->getListEnabledLDAP(); + $counter = count($instanceList); + foreach($instanceList as $instance) + { + $this->loadModel('setting')->setItem('system.common.ldap.updatingProgress', $counter); + $this->instance->switchLDAP($instance, true); + $counter-- ; + } + + $this->loadModel('setting')->deleteItems('owner=system&module=common§ion=ldap&key=updatingProgress'); + return true; + } + /** * Uninstall QuCheng LDAP. * @@ -727,6 +766,11 @@ public function saveSLBSettings() $settings = fixer::input('post') ->setDefault('ippool', '') ->get(); + if(empty($settings->ippool)) + { + dao::$errors[] = $this->lang->system->errors->ippoolRequired; + return; + } $reg1Result = validater::checkREG($settings->ippool, '/^((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}\/\d{1,2}$/'); $reg2Result = validater::checkREG($settings->ippool, '/^(((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3})-(((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3})$/'); diff --git a/frontend/module/system/view/editdomain.html.php b/frontend/module/system/view/editdomain.html.php index 5d6766fd..03ad29d6 100644 --- a/frontend/module/system/view/editdomain.html.php +++ b/frontend/module/system/view/editdomain.html.php @@ -29,12 +29,12 @@
- + - - - + -
system->ldapSource;?>system->LDAP->ldapSource;?> system->ldapTypeList, $activeLDAP, '');?>
system->host;?>system->LDAP->host;?>
system->port;?>system->LDAP->port;?>
system->ldapUsername;?>system->LDAP->ldapUsername;?>
system->password;?>system->LDAP->password;?>
system->ldapRoot;?>system->LDAP->ldapRoot;?>
system->ldapAdvance;?>system->LDAP->ldapAdvance;?>
system->filterUser;?>system->LDAP->filterUser;?>
system->email;?>system->LDAP->email;?>
system->extraAccount;?>system->LDAP->extraAccount;?>
system->LDAP->ldapSource;?>system->LDAP->ldapTypeList, $activeLDAP, '');?>system->ldapTypeList, $activeLDAP, '');?>
system->domain->oldDomain;?>loadModel('cne')->sysDomain();?> system->domain->notReuseOldDomain;?>loadModel('cne')->sysDomain();?> system->domain->notReuseOldDomain;?>
system->domain->newDomain;?> +
system->domain->setDNS;?> @@ -42,11 +42,10 @@
+

$lang->system->domain->uploadCert), $domainSettings->https, ($domainUsed ? "onclick='return false;'" : ''));?> diff --git a/frontend/module/system/view/ldapform.html.php b/frontend/module/system/view/ldapform.html.php index 466721a4..7ee05b2b 100644 --- a/frontend/module/system/view/ldapform.html.php +++ b/frontend/module/system/view/ldapform.html.php @@ -1,13 +1,13 @@

system->hasSystemLDAP();?> - $lang->system->ldapEnabled), $enableLDAP ? 'true' : '', (($ldapLinked or $activeLDAP) ? "onclick='return false;'" : '')); ?> + $lang->system->LDAP->ldapEnabled), $enableLDAP ? 'true' : '', (($ldapLinked or $activeLDAP) ? "onclick='return false;'" : '')); ?>

- - + + @@ -15,11 +15,11 @@
system->ldapSource;?>system->ldapTypeList, $activeLDAP, ($ldapLinked ? 'disabled' : '') . " class='form-control'");?>system->LDAP->ldapSource;?>system->ldapTypeList, $activeLDAP,"class='form-control'");?>
- + - + @@ -28,47 +28,47 @@
system->ldapUsername?>system->LDAP->ldapUsername?> account->username;?>
system->ldapRoot;?>system->LDAP->ldapRoot;?>
- + - + - + - + - + - + - + - + - + - +
system->host;?>system->LDAP->host;?>
system->port;?>system->LDAP->port;?>
system->ldapUsername;?>system->LDAP->ldapUsername;?>
system->password;?>system->LDAP->password;?>
system->ldapRoot;?>system->LDAP->ldapRoot;?>
-
system->ldapAdvance . "", '', "data-toggle='collapse'");?>
+
system->LDAP->ldapAdvance . "", '', "data-toggle='collapse'");?>
- + - + - + @@ -84,5 +84,15 @@
system->filterUser;?>system->LDAP->filterUser;?>
system->email;?>system->LDAP->email;?>
system->extraAccount;?>system->LDAP->extraAccount;?>
-
system->ldapUpdate : $lang->system->ldapInstall);?>
+
system->LDAP->ldapUpdate : $lang->system->LDAP->ldapInstall, "id='submitBtn'", "btn btn-primary btn-wide");?>
+ diff --git a/frontend/module/system/view/ldapview.html.php b/frontend/module/system/view/ldapview.html.php index 35cc51d5..503d3702 100644 --- a/frontend/module/system/view/ldapview.html.php +++ b/frontend/module/system/view/ldapview.html.php @@ -22,7 +22,7 @@
-

system->LDAPInfo;?>

+

system->LDAP->info;?>

system->printEditLDAPBtn();?> @@ -37,16 +37,16 @@ - - + + - + - + @@ -59,45 +59,45 @@
system->ldapSource;?>system->ldapTypeList, $activeLDAP, '');?>system->LDAP->ldapSource;?>system->LDAP->ldapTypeList, $activeLDAP, '');?>
system->ldapUsername;?>system->LDAP->ldapUsername;?> auth, 'username', '');?>
system->ldapRoot;?>system->LDAP->ldapRoot;?> auth, 'root', '');?>
- + - + - + - + - + - + - + - + - + - + @@ -110,10 +110,10 @@ - + From 6ada23b56ceddd9058f99f5ec2f348cc4a423d5b Mon Sep 17 00:00:00 2001 From: qishiyao Date: Wed, 21 Dec 2022 10:21:17 +0800 Subject: [PATCH 34/43] * Fix ingress-controller always upgrade to latest. --- backend/internal/app/router/system.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/app/router/system.go b/backend/internal/app/router/system.go index 04f8e3df..45e8b5be 100644 --- a/backend/internal/app/router/system.go +++ b/backend/internal/app/router/system.go @@ -333,7 +333,7 @@ func UploadTLS(c *gin.Context) { ingressController, err := service.Apps(ctx, "", runtimeNs).GetApp("ingress") if err == nil { err = ingressController.PatchSettings("nginx-ingress-controller", model.AppCreateOrUpdateModel{ - Channel: "stable", + Channel: "stable", Version: "latest", Settings: []model.StringSetting{setting}, }, nil, nil) if err != nil { From 68169bcf0862955c0b35aa39ed6af980ad0bdbde Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Wed, 21 Dec 2022 11:04:58 +0800 Subject: [PATCH 35/43] * Fix bug: does not display domain expired date. --- frontend/module/cne/model.php | 2 +- frontend/module/system/control.php | 9 ++++++--- frontend/module/system/view/domainview.html.php | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/module/cne/model.php b/frontend/module/cne/model.php index 51761670..cc0154c6 100644 --- a/frontend/module/cne/model.php +++ b/frontend/module/cne/model.php @@ -292,7 +292,7 @@ public function certInfo($certName, $channel = '') $apiParams['name'] = $certName; $apiUrl = "/api/cne/system/tls/info"; - $result = $this->apiPost($apiUrl, $apiParams, $this->config->CNE->api->headers); + $result = $this->apiGet($apiUrl, $apiParams, $this->config->CNE->api->headers); if($result && $result->code == 200) return $result->data; return null; diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 7b124adc..7ce98843 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -416,13 +416,13 @@ public function ajaxValidateCert() ->batchCheck('customDomain,certPem,certKey', 'notempty'); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::$errors)); - if(!validater::checkREG($certData->domain, '/^((?!-)[a-z0-9-]{1,63}(?customDomain, '/^((?!-)[a-z0-9-]{1,63}(?send(array('result' => 'fail', 'message' => $this->lang->system->errors->invalidDomain)); } - $certName = 'tls-' . str_replace('.', '-',$certData->domain); - $result = $this->loadModel('cne')->validateCert($certName, $certData->certPem, $certData->certKey, $certData->domain); + $certName = 'tls-' . str_replace('.', '-',$certData->customDomain); + $result = $this->loadModel('cne')->validateCert($certName, $certData->certPem, $certData->certKey, $certData->customDomain); if($result->code == 200) return $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->validCert)); return $this->send(array('result' => 'fail', 'message' => $result->message)); @@ -454,6 +454,9 @@ public function domainView() $certName = 'tls-' . str_replace('.', '-', $domainSettings->customDomain); $cert = $this->loadModel('cne')->certInfo($certName); + $notAfter = zget($cert, 'not_after', ''); + if($notAfter) $cert->expiredDate = date('Y-m-d H:i:s', $notAfter); + $this->view->title = $this->lang->system->domain->common; $this->view->domainSettings = $domainSettings; $this->view->cert = $cert; diff --git a/frontend/module/system/view/domainview.html.php b/frontend/module/system/view/domainview.html.php index 9d86bbda..dbf06aa2 100644 --- a/frontend/module/system/view/domainview.html.php +++ b/frontend/module/system/view/domainview.html.php @@ -33,7 +33,7 @@ - + From 308846d642cc68888a8ebdb6ad814420d6f3b759 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Wed, 21 Dec 2022 11:04:58 +0800 Subject: [PATCH 36/43] * Fix bug: does not display domain expired date. --- frontend/module/cne/model.php | 2 +- frontend/module/system/control.php | 9 ++++++--- frontend/module/system/view/domainview.html.php | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/module/cne/model.php b/frontend/module/cne/model.php index 51761670..cc0154c6 100644 --- a/frontend/module/cne/model.php +++ b/frontend/module/cne/model.php @@ -292,7 +292,7 @@ public function certInfo($certName, $channel = '') $apiParams['name'] = $certName; $apiUrl = "/api/cne/system/tls/info"; - $result = $this->apiPost($apiUrl, $apiParams, $this->config->CNE->api->headers); + $result = $this->apiGet($apiUrl, $apiParams, $this->config->CNE->api->headers); if($result && $result->code == 200) return $result->data; return null; diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 7b124adc..7ce98843 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -416,13 +416,13 @@ public function ajaxValidateCert() ->batchCheck('customDomain,certPem,certKey', 'notempty'); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::$errors)); - if(!validater::checkREG($certData->domain, '/^((?!-)[a-z0-9-]{1,63}(?customDomain, '/^((?!-)[a-z0-9-]{1,63}(?send(array('result' => 'fail', 'message' => $this->lang->system->errors->invalidDomain)); } - $certName = 'tls-' . str_replace('.', '-',$certData->domain); - $result = $this->loadModel('cne')->validateCert($certName, $certData->certPem, $certData->certKey, $certData->domain); + $certName = 'tls-' . str_replace('.', '-',$certData->customDomain); + $result = $this->loadModel('cne')->validateCert($certName, $certData->certPem, $certData->certKey, $certData->customDomain); if($result->code == 200) return $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->validCert)); return $this->send(array('result' => 'fail', 'message' => $result->message)); @@ -454,6 +454,9 @@ public function domainView() $certName = 'tls-' . str_replace('.', '-', $domainSettings->customDomain); $cert = $this->loadModel('cne')->certInfo($certName); + $notAfter = zget($cert, 'not_after', ''); + if($notAfter) $cert->expiredDate = date('Y-m-d H:i:s', $notAfter); + $this->view->title = $this->lang->system->domain->common; $this->view->domainSettings = $domainSettings; $this->view->cert = $cert; diff --git a/frontend/module/system/view/domainview.html.php b/frontend/module/system/view/domainview.html.php index 9d86bbda..dbf06aa2 100644 --- a/frontend/module/system/view/domainview.html.php +++ b/frontend/module/system/view/domainview.html.php @@ -33,7 +33,7 @@ - + From eb7282d3c77586a01b0cdc4b822fe5f0f0adf7f2 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Wed, 21 Dec 2022 16:53:41 +0800 Subject: [PATCH 37/43] * Edit SMTP. --- frontend/module/instance/model.php | 12 +-- frontend/module/system/control.php | 8 +- frontend/module/system/lang/zh-cn.php | 2 +- frontend/module/system/model.php | 88 ++++++------------- frontend/module/system/view/smtpview.html.php | 1 - 5 files changed, 39 insertions(+), 72 deletions(-) diff --git a/frontend/module/instance/model.php b/frontend/module/instance/model.php index 1a082cdb..963461d6 100644 --- a/frontend/module/instance/model.php +++ b/frontend/module/instance/model.php @@ -710,7 +710,7 @@ public function installSysSMTP($app, $smtpSettings, $instanceName = '', $k8name $settingsMap->env->SMTP_PASS = $smtpSettings->pass; $settingsMap->env->AUTHENTICATE_CODE = helper::randStr(24); - $instance = $this->doCneInstall($instance, $space, $settingsMap, array(), $app); + $instance = $this->doCn eInstall($instance, $space, $settingsMap, array(), $app); if(!$instance) { dao::$errors[] = $this->lang->system->errors->failToInstallSMTP; @@ -729,8 +729,8 @@ public function installSysSMTP($app, $smtpSettings, $instanceName = '', $k8name $snippetSettings->values->mail->smtp = new stdclass; $snippetSettings->values->mail->smtp->host = "{$instance->k8name}.{$snippetSettings->namespace}.svc"; $snippetSettings->values->mail->smtp->port = '1025'; - $snippetSettings->values->mail->smtp->user = $settingsMap->env->SMTP_USER; - $snippetSettings->values->mail->smtp->pass = $settingsMap->env->AUTHENTICATE_CODE; + $snippetSettings->values->mail->smtp->user = 'smtp-bot@quickon.local'; // This is fake value. + $snippetSettings->values->mail->smtp->pass = $settingsMap->env->AUTHENTICATE_CODE; // This is fake value. $snippetResult = $this->loadModel('cne')->addSnippet($snippetSettings); if($snippetResult->code != 200) @@ -922,13 +922,13 @@ public function createInstance($app, $space, $thirdDomain, $name = '', $k8name = * * @param object $instance * @param object $space - * @param object $settingMap + * @param object $settingsMap * @param array $snippets * @param object $app * @access private * @return object|bool */ - private function doCneInstall($instance, $space, $settingMap, $snippets = array(), $app = array()) + private function doCneInstall($instance, $space, $settingsMap, $snippets = array(), $app = array()) { $apiParams = new stdclass; $apiParams->userame = $instance->createdBy; @@ -938,7 +938,7 @@ private function doCneInstall($instance, $space, $settingMap, $snippets = array( $apiParams->chart = $instance->chart; $apiParams->version = $instance->version; $apiParams->channel = $instance->channel; - $apiParams->settings_map = $settingMap; + $apiParams->settings_map = $settingsMap; $apiParams->settings_snippets = array_values($snippets); if(strtolower($this->config->CNE->app->domain) == 'demo.haogs.cn') $apiParams->settings_snippets = array('quickon_saas'); // Only for demo enviroment. diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 7ce98843..85145c10 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -296,13 +296,13 @@ public function editSMTP() if($_POST) { - $channel = $this->app->session->cloudChannel ? $this->app->session->cloudChannel : $this->config->cloud->api->channel; + $channel = $this->app->session->cloudChannel ? $this->app->session->cloudChannel : $this->config->cloud->api->channel; $postData = fixer::input('post')->setDefault('source', 'qucheng')->get(); - $this->system->updateSMTPSettings($ldapApp, $channel); + $this->system->updateSMTPSettings(); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); - $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->ldapUpdateSuccess, 'locate' => $this->inLink('ldapView'))); + $this->send(array('result' => 'success', 'message' => $this->lang->system->notices->smtpUpdateSuccess, 'locate' => $this->inLink('smtpView'))); } $this->lang->switcherMenu = $this->system->getSMTPSwitcher(); @@ -310,7 +310,7 @@ public function editSMTP() $this->view->title = $this->lang->system->SMTP->editSMTP; $this->view->smtpSettings = $this->system->getSMTPSettings(); $this->view->smtpLinked = $this->instance->countSMTP(); - $this->view->activeSMTP = false; + $this->view->activeSMTP = zget($this->view->smtpSettings, 'enabled', false); $this->display(); } diff --git a/frontend/module/system/lang/zh-cn.php b/frontend/module/system/lang/zh-cn.php index 42aa8279..49a8173d 100644 --- a/frontend/module/system/lang/zh-cn.php +++ b/frontend/module/system/lang/zh-cn.php @@ -120,7 +120,7 @@ $lang->system->notices->smtpUpdateSuccess = 'LDAP更新成功'; $lang->system->notices->smtpWhiteList = '为防止邮件被屏蔽,请在邮件服务器里面将发信邮箱设为白名单'; $lang->system->notices->smtpAuthCode = '有些邮箱要填写单独申请的授权码,具体请到邮箱相关设置查询'; -$lang->system->notices->smtpUsed = '已经有服务关联了SMTP'; +$lang->system->notices->smtpUsed = '%s 个服务关联了SMTP'; $lang->system->notices->verifySMTPSuccess = '校验成功!'; $lang->system->notices->pleaseCheckSMTPInfo = '校验失败!请检查用户名和密码是否正确'; $lang->system->notices->confirmUpdateDomain = '修改域名后,会自动更新已安装服务的域名,确定要修改吗?'; diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index 317eb881..e5d004e0 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -148,7 +148,6 @@ public function printLDAPButtons($ldapInstance) $buttonHtml .= ""; echo $buttonHtml; - } /** @@ -496,59 +495,54 @@ public function getSMTPSettings() return $settings; } + /** + * Update SMTP settings. + * + * @access public + * @return void + */ public function updateSMTPSettings() { $this->loadModel('cne'); $this->loadModel('instance'); - $smtpSettings = fixer::input('pos')->get(); + $channel = $this->app->session->cloudChannel ? $this->app->session->cloudChannel : $this->config->cloud->api->channel; + + $smtpSettings = fixer::input('post')->get(); $instanceID = $this->setting->getItem('owner=system&module=common§ion=smtp&key=instanceID'); $instance = $this->instance->getByID($instanceID); - if($instance) + if(!$instance) { - + dao::$errors[] = $this->lang->system->errors->notFoundSMTPService; + return false; } + $instance->version = 'latest'; // Update and upgrade SMTP proxy instance. + /* 1. Update SMTP service settings. */ $settingsMap = json_decode($this->setting->getItem('owner=system&module=common§ion=smtp&key=settingsMap')); + $settingsMap->env->SMTP_HOST = $smtpSettings->host; + $settingsMap->env->SMTP_PORT = strval($smtpSettings->port); + $settingsMap->env->SMTP_USER = $smtpSettings->user; + $settingsMap->env->SMTP_PASS = $smtpSettings->pass; - $settingsMap->env->SMTP_HOST = $smtpSettings->host; - $settingsMap->env->SMTP_PORT = strval($smtpSettings->port); - $settingsMap->env->SMTP_USER = $smtpSettings->user; - $settingsMap->env->SMTP_PASS = $smtpSettings->pass; - //$settingsMap->env->AUTHENTICATE_CODE = helper::randStr(24); - - $this-> - - /* 2. Update SMTP snippet settings. */ - $snippetSettings = json_decode($this->setting->getItem('owner=system&module=common§ion=smtp&key=snippetSettings')); - - $snippetSettings->values->mail->smtp->user = $settingsMap->env->SMTP_USER; - $snippetSettings->values->mail->smtp->pass = $settingsMap->env->AUTHENTICATE_CODE; + $settings = new stdclass; + $settings->settings_map = $settingsMap; - $snippetResult = $this->loadModel('cne')->addSnippet($snippetSettings); + $snippetResult = $this->loadModel('cne')->updateConfig($instance, $settings); if($snippetResult->code != 200) { dao::$errors[] = $this->lang->system->errors->failToInstallSMTP; return false; } - /* Save LDAP account. */ + /* 2. Save SMTP account. */ $secretKey = helper::readKey(); - $settingsMap->env->SMTP_PASS = openssl_encrypt($settingsMap->env->SMTP_PASS, 'DES-ECB', $secretKey); - $settingsMap->env->AUTHENTICATE_CODE = openssl_encrypt($settingsMap->env->AUTHENTICATE_CODE, 'DES-ECB', $secretKey); - - $snippetSettings->values->mail->smtp->pass = $settingsMap->env->AUTHENTICATE_CODE; + $settingsMap->env->SMTP_PASS = openssl_encrypt($settingsMap->env->SMTP_PASS, 'DES-ECB', $secretKey); $this->loadModel('setting'); - $this->setting->setItem('system.common.smtp.enabled', true); - $this->setting->setItem('system.common.smtp.instanceID', $instance->id); - $this->setting->setItem('system.common.smtp.snippetName', $snippetSettings->name); $this->setting->setItem('system.common.smtp.settingsMap', json_encode($settingsMap)); - $this->setting->setItem('system.common.smtp.snippetSettings', json_encode($snippetSettings)); - - $this->loadModel('cne')->updateSnippet(); return true; } @@ -860,35 +854,6 @@ private function installSLBInstance() return $slbInstance; } - /** - * Print edit SMTP button. - * - * @access public - * @return string - */ - public function printEditSMTPBtn() - { - $this->loadModel('instance'); - - $disableEdit = false; - $title = $this->lang->system->SMTP->edit; - $toolTips = ''; - $count = $this->instance->countSMTP(); - if($count) - { - $disableEdit = true; - $title = $this->lang->system->notices->smtpUsed; - $toolTips = "data-toggle='tooltip' data-placement='bottom'"; - } - - $buttonHtml = ''; - $buttonHtml .= ""; - $buttonHtml .= html::a(inLink('editSMTP'), $this->lang->system->SMTP->edit, '', ($disableEdit ? 'disabled' : '') . " title='{$title}' class='btn-edit btn label label-outline label-primary label-lg'"); - $buttonHtml .= ""; - - echo $buttonHtml; - } - /** * Print SMTP buttons. * @@ -911,17 +876,20 @@ public function printSMTPButtons($smtpInstance) $count = $this->instance->countSMTP(); if($count) { - $title = $this->lang->system->notices->smtpUsed; + $title = sprintf($this->lang->system->notices->smtpUsed, $count); $toolTips = "data-toggle='tooltip' data-placement='bottom' runat='server'"; } + $buttonHtml .= ""; + $buttonHtml .= html::a(inLink('editSMTP'), $this->lang->system->SMTP->edit, '', "title='{$title}' class='btn-edit btn label label-outline label-primary label-lg'"); + $buttonHtml .= ""; + $disableStop = $count > 0 || !$this->instance->canDo('stop', $smtpInstance); $buttonHtml .= ""; $buttonHtml .= html::commonButton($this->lang->instance->stop, "instance-id='{$smtpInstance->id}' title='{$title}'" . ($disableStop ? ' disabled ' : ''), 'btn-stop btn label label-outline label-danger label-lg'); $buttonHtml .= ""; echo $buttonHtml; - } } diff --git a/frontend/module/system/view/smtpview.html.php b/frontend/module/system/view/smtpview.html.php index aafcb5ba..1efc99e4 100644 --- a/frontend/module/system/view/smtpview.html.php +++ b/frontend/module/system/view/smtpview.html.php @@ -23,7 +23,6 @@

system->SMTP->common;?>

- system->printEditSMTPBtn();?> system->printSMTPButtons($smtpInstance);?>
From 1961e856226a4dd7c9dcd181f54c7d29d0ab4e18 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Wed, 21 Dec 2022 17:07:31 +0800 Subject: [PATCH 38/43] * Finish Edit SMTP. --- frontend/module/instance/model.php | 2 +- frontend/module/system/lang/zh-cn.php | 1 + frontend/module/system/model.php | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/module/instance/model.php b/frontend/module/instance/model.php index 963461d6..5efb4aa2 100644 --- a/frontend/module/instance/model.php +++ b/frontend/module/instance/model.php @@ -710,7 +710,7 @@ public function installSysSMTP($app, $smtpSettings, $instanceName = '', $k8name $settingsMap->env->SMTP_PASS = $smtpSettings->pass; $settingsMap->env->AUTHENTICATE_CODE = helper::randStr(24); - $instance = $this->doCn eInstall($instance, $space, $settingsMap, array(), $app); + $instance = $this->doCneInstall($instance, $space, $settingsMap, array(), $app); if(!$instance) { dao::$errors[] = $this->lang->system->errors->failToInstallSMTP; diff --git a/frontend/module/system/lang/zh-cn.php b/frontend/module/system/lang/zh-cn.php index 49a8173d..7187a7ce 100644 --- a/frontend/module/system/lang/zh-cn.php +++ b/frontend/module/system/lang/zh-cn.php @@ -145,6 +145,7 @@ $lang->system->errors->failGetOssAccount = '获取对象存储账号失败'; $lang->system->errors->failToInstallSMTP = '安装SMTP失败'; $lang->system->errors->failToUninstallSMTP = '卸载SMTP失败'; +$lang->system->errors->failToUpdateSMTP = '更新SMTP失败'; $lang->system->errors->verifySMTPFailed = '校验SMTP失败'; $lang->system->errors->notFoundSMTPApp = '找不到SMTP代理应用'; $lang->system->errors->notFoundSMTPService = '找不到SMTP代理服务'; diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index e5d004e0..66ab2527 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -530,10 +530,10 @@ public function updateSMTPSettings() $settings = new stdclass; $settings->settings_map = $settingsMap; - $snippetResult = $this->loadModel('cne')->updateConfig($instance, $settings); - if($snippetResult->code != 200) + $success = $this->loadModel('cne')->updateConfig($instance, $settings); + if(!$success) { - dao::$errors[] = $this->lang->system->errors->failToInstallSMTP; + dao::$errors[] = $this->lang->system->errors->failToUpdateSMTP; return false; } From 464c9c4623788f9f085e4049c87a92646fe23543 Mon Sep 17 00:00:00 2001 From: qishiyao Date: Wed, 21 Dec 2022 17:11:55 +0800 Subject: [PATCH 39/43] * Fix version validator support latest. --- backend/internal/app/validator/field/field.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/internal/app/validator/field/field.go b/backend/internal/app/validator/field/field.go index 3a635994..224a8438 100644 --- a/backend/internal/app/validator/field/field.go +++ b/backend/internal/app/validator/field/field.go @@ -35,6 +35,9 @@ func namespaceExist(fl validator.FieldLevel) bool { func versionFormat(fl validator.FieldLevel) bool { val := fl.Field().String() if val != "" { + if val == "latest" { + return true + } return versionRegexSemantic.MatchString(val) } return true From cdbef459cb26230ae08e851d30bdf35319c4a536 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 22 Dec 2022 13:19:01 +0800 Subject: [PATCH 40/43] * Hide LDAP password in view page. --- frontend/module/system/css/ldapview.css | 2 +- frontend/module/system/js/ldapview.js | 13 +++++++++++++ frontend/module/system/view/ldapview.html.php | 7 ++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/frontend/module/system/css/ldapview.css b/frontend/module/system/css/ldapview.css index c854da8e..b449e569 100644 --- a/frontend/module/system/css/ldapview.css +++ b/frontend/module/system/css/ldapview.css @@ -4,4 +4,4 @@ .edit-tools-tips {display: inline-block; margin: 0 10px;} #ldapAccountModal .modal-content {padding-bottom: 20px;} input#ldapPassword {border:none;} - +#ldapPassBtn {border:none;} diff --git a/frontend/module/system/js/ldapview.js b/frontend/module/system/js/ldapview.js index fe347afd..995143f5 100644 --- a/frontend/module/system/js/ldapview.js +++ b/frontend/module/system/js/ldapview.js @@ -15,6 +15,19 @@ $(function() }); }); + $('#ldapPassBtn').on('click', function(event){ + var inputTyep = $('#ldap_password').attr('type'); + if(inputTyep == 'text'){ + $('#ldap_password').attr('type', 'password'); + $('#ldapPassBtn').find('.icon').removeClass('icon-eye').addClass('icon-eye-off'); + } + else + { + $('#ldap_password').attr('type', 'text'); + $('#ldapPassBtn').find('.icon').addClass('icon-eye').removeClass('icon-eye-off'); + } + }); + $('#copyPassBtn').on('click', function(event) { $('#ldapPassword').select(); diff --git a/frontend/module/system/view/ldapview.html.php b/frontend/module/system/view/ldapview.html.php index 563b9d69..048c9021 100644 --- a/frontend/module/system/view/ldapview.html.php +++ b/frontend/module/system/view/ldapview.html.php @@ -77,7 +77,12 @@
- + From 19015b6bb934844b8804bc7e702508065928ce09 Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 22 Dec 2022 14:37:55 +0800 Subject: [PATCH 41/43] * Install LDAP by ajax. --- frontend/module/system/control.php | 1 - frontend/module/system/js/installldap.js | 44 ++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/frontend/module/system/control.php b/frontend/module/system/control.php index 85145c10..5b6b034e 100644 --- a/frontend/module/system/control.php +++ b/frontend/module/system/control.php @@ -88,7 +88,6 @@ public function installLDAP() else { dao::$errors[] = $this->lang->system->notSupportedLDAP; - return false; } if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); diff --git a/frontend/module/system/js/installldap.js b/frontend/module/system/js/installldap.js index e69cb1c4..fe5297b8 100644 --- a/frontend/module/system/js/installldap.js +++ b/frontend/module/system/js/installldap.js @@ -1,5 +1,11 @@ $(function() { + /** + * Fresh submit button. + * + * @access public + * @return void + */ function freshSubmitBtn() { var enableLDAP = $('#LDAPForm input[type=checkbox]:checked').length > 0; @@ -11,14 +17,16 @@ $(function() if(enableLDAP && ldapCheckPass) { - $('#LDAPForm button[type=submit]').attr('disabled', false); + $('#LDAPForm #submitBtn').attr('disabled', false); } else { - $('#LDAPForm button[type=submit]').attr('disabled', true); + $('#LDAPForm #submitBtn').attr('disabled', true); } } + freshSubmitBtn(); + $('#LDAPForm input[type=checkbox]').on('change', function(event) { freshSubmitBtn(); @@ -87,5 +95,35 @@ $(function() }); }); - freshSubmitBtn(); + $('#submitBtn').on('click', function() + { + $('#submitBtn').attr('disabled', true); + + var ldapData = $('#LDAPForm').serializeArray(); + $.post(createLink('system', 'installLDAP'), ldapData).done(function(response) + { + $('#submitBtn').attr('disabled', false); + + var res = JSON.parse(response); + if(res.result == 'success') + { + parent.window.location.href = res.locate; + } + else + { + $('#waiting').modal('hide'); + clearInterval(timerID); + + var errMessage = res.message; + if(res.message instanceof Array) errMessage = res.message.join('
'); + if(res.message instanceof Object) errMessage = Object.values(res.message).join('
'); + + bootbox.alert( + { + title: notices.fail, + message: errMessage, + }); + } + }); + }); }); From 7d7812eece83a31847b5d10460523e41904bd1bb Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 22 Dec 2022 15:19:43 +0800 Subject: [PATCH 42/43] * Adjust parameters of updating SMTP. --- frontend/module/system/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/module/system/model.php b/frontend/module/system/model.php index 66ab2527..232c6652 100644 --- a/frontend/module/system/model.php +++ b/frontend/module/system/model.php @@ -521,7 +521,8 @@ public function updateSMTPSettings() $instance->version = 'latest'; // Update and upgrade SMTP proxy instance. /* 1. Update SMTP service settings. */ - $settingsMap = json_decode($this->setting->getItem('owner=system&module=common§ion=smtp&key=settingsMap')); + $settingsMap = new stdclass; + $settingsMap->env = new stdclass; $settingsMap->env->SMTP_HOST = $smtpSettings->host; $settingsMap->env->SMTP_PORT = strval($smtpSettings->port); $settingsMap->env->SMTP_USER = $smtpSettings->user; From dcad692cd5651ecc09d9c577e47a10d5005fc9ad Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Thu, 22 Dec 2022 15:49:48 +0800 Subject: [PATCH 43/43] * Force restart instance after updating LDAP. --- frontend/module/instance/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/module/instance/model.php b/frontend/module/instance/model.php index 5efb4aa2..7d3df64a 100644 --- a/frontend/module/instance/model.php +++ b/frontend/module/instance/model.php @@ -245,6 +245,7 @@ public function switchLDAP($instance, $enableLDAP) $snippetName = $this->system->ldapSnippetName(); $settings = new stdclass; + $settings->force_restart = true; if($enableLDAP) { $settings->settings_snippets = [$snippetName];
system->ldapSource;?>system->LDAP->ldapSource;?> system->ldapTypeList, $activeLDAP, '');?>
system->host;?>system->LDAP->host;?>
system->port;?>system->LDAP->port;?>
system->ldapUsername;?>system->LDAP->ldapUsername;?>
system->password;?>system->LDAP->password;?>
system->ldapRoot;?>system->LDAP->ldapRoot;?>
system->ldapAdvance;?>system->LDAP->ldapAdvance;?>
system->filterUser;?>system->LDAP->filterUser;?>
system->email;?>system->LDAP->email;?>
system->extraAccount;?>system->LDAP->extraAccount;?>
system->LDAP->ldapSource;?>system->LDAP->ldapTypeList, $activeLDAP, '');?>system->ldapTypeList, $activeLDAP, '');?>
system->domain->expiredDate;?>
system->domain->expiredDate;?>
system->LDAP->password;?> +
+ + +
+
system->LDAP->ldapRoot;?>