mirror of https://github.com/kubevela/velaux.git
Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
|
9c8cc5d816 | |
|
0d00d92f55 | |
|
021024e4af | |
|
d9b7ae102f | |
|
8e11f93ed7 | |
|
5704854899 | |
|
73334e7516 | |
|
127f5325e9 | |
|
d5ea29f5ab | |
|
2ab672c09a | |
|
4579408f62 | |
|
d14a2b6538 | |
|
7937d098d5 | |
|
8438aa72e9 | |
|
27b45c265c | |
|
d0b2a3b995 |
|
@ -15,7 +15,7 @@ on:
|
|||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.19'
|
||||
GO_VERSION: '1.22.0'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -23,13 +23,13 @@ permissions:
|
|||
jobs:
|
||||
|
||||
detect-noop:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
noop: ${{ steps.noop.outputs.should_skip }}
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281
|
||||
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
|
@ -37,23 +37,23 @@ jobs:
|
|||
continue-on-error: true
|
||||
|
||||
arm64-build-test:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
needs: detect-noop
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
||||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
with:
|
||||
submodules: true
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4
|
||||
- name: Build linux/arm64 image
|
||||
id: docker_build_2
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
|
||||
with:
|
||||
context: ./
|
||||
build-args: |
|
||||
|
|
|
@ -7,16 +7,16 @@ on:
|
|||
jobs:
|
||||
# align with crossplane's choice https://github.com/crossplane/crossplane/blob/master/.github/workflows/backport.yml
|
||||
open-pr:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.event.pull_request.merged
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Open Backport PR
|
||||
uses: zeebe-io/backport-action@v0.0.6
|
||||
uses: zeebe-io/backport-action@v0.0.9
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_workspace: ${{ github.workspace }}
|
||||
|
|
|
@ -24,18 +24,18 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
queries: +security-and-quality
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{ matrix.language }}"
|
||||
|
|
|
@ -11,9 +11,11 @@ on:
|
|||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: thehanimo/pr-title-checker@v1.4.0
|
||||
- uses: thehanimo/pr-title-checker@v1.4.2
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
pass_on_octokit_error: true
|
||||
configuration_path: ".github/pr-title-checker-config.json"
|
||||
configuration_path: '.github/pr-title-checker-config.json'
|
||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
|
||||
- name: Build Vela Core image from Dockerfile
|
||||
run: |
|
||||
|
@ -23,7 +23,7 @@ jobs:
|
|||
output: 'trivy-results.sarif'
|
||||
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
|
|
|
@ -10,18 +10,18 @@ permissions:
|
|||
|
||||
jobs:
|
||||
bot:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
|
||||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
with:
|
||||
repository: "oam-dev/kubevela-github-actions"
|
||||
path: ./actions
|
||||
ref: v0.4.2
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
|
||||
with:
|
||||
node-version: '14'
|
||||
node-version: '16'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: ./actions/package-lock.json
|
||||
- name: Install Dependencies
|
||||
|
@ -51,7 +51,7 @@ jobs:
|
|||
allow-edits: "false"
|
||||
permission-level: read
|
||||
- name: Handle Command
|
||||
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
||||
env:
|
||||
VERSION: ${{ steps.command.outputs.command-arguments }}
|
||||
with:
|
||||
|
@ -72,11 +72,11 @@ jobs:
|
|||
})
|
||||
console.log("Added '" + label + "' label.")
|
||||
- name: Checkout
|
||||
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
|
||||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Open Backport PR
|
||||
uses: zeebe-io/backport-action@a759fd2d7d3314c9bb57d97a0350a12e878d3c7a
|
||||
uses: zeebe-io/backport-action@v0.0.9
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_workspace: ${{ github.workspace }}
|
||||
|
@ -91,7 +91,7 @@ jobs:
|
|||
issues: write
|
||||
steps:
|
||||
- name: Retest the current pull request
|
||||
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
||||
env:
|
||||
PULL_REQUEST_ID: ${{ github.event.issue.number }}
|
||||
COMMENT_ID: ${{ github.event.comment.id }}
|
||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: |
|
||||
|
@ -25,18 +25,18 @@ jobs:
|
|||
run: |
|
||||
echo "git_revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v3.2.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/setup-qemu-action@v3.1.0
|
||||
- uses: docker/setup-buildx-action@v3.4.0
|
||||
with:
|
||||
driver-opts: image=moby/buildkit:master
|
||||
- name: Build docker image
|
||||
id: acr_build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v6.3.0
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
|
|
|
@ -15,7 +15,7 @@ on:
|
|||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.19'
|
||||
GO_VERSION: '1.22.0'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -23,13 +23,13 @@ permissions:
|
|||
jobs:
|
||||
|
||||
detect-noop:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
noop: ${{ steps.noop.outputs.should_skip }}
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281
|
||||
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
|
@ -37,24 +37,24 @@ jobs:
|
|||
continue-on-error: true
|
||||
|
||||
server-unit-tests:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
needs: detect-noop
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
||||
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
||||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Cache Go Dependencies
|
||||
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .work/pkg
|
||||
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
|
||||
|
@ -72,18 +72,26 @@ jobs:
|
|||
mysql database: 'kubevela'
|
||||
mysql root password: 'kubevelaSQL123'
|
||||
|
||||
- name: Set up Postgres
|
||||
uses: Harmon758/postgresql-action@v1
|
||||
with:
|
||||
postgresql version: '11'
|
||||
postgresql db: 'kubevela'
|
||||
postgresql user: 'kubevela'
|
||||
postgresql password: 'Kubevela-123'
|
||||
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@d26215f71b2ce60420a2a3776a25893d11a65f85 # 1.9.0
|
||||
uses: supercharge/mongodb-github-action@5a87bd81f88e2a8b195f8b7b656f5cda1350815a # 1.11.0
|
||||
with:
|
||||
mongodb-version: '5.0'
|
||||
|
||||
# TODO need update action version to resolve node 12 deprecated.
|
||||
- name: install Kubebuilder
|
||||
uses: RyanSiu1995/kubebuilder-action@ff52bff1bae252239223476e5ab0d71d6ba02343
|
||||
uses: RyanSiu1995/kubebuilder-action@e7e4de1c1eaf1d089b9a186f7526239acadf0b40
|
||||
with:
|
||||
version: 3.1.0
|
||||
kubebuilderOnly: false
|
||||
kubernetesVersion: v1.21.2
|
||||
kubernetesVersion: v1.26.0
|
||||
|
||||
- name: Run api server unit test
|
||||
run: make unit-test-server
|
||||
|
@ -97,30 +105,30 @@ jobs:
|
|||
name: codecov-umbrella
|
||||
|
||||
server-e2e-tests:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [ detect-noop ]
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
k8s-version: ["v1.21", "v1.26"]
|
||||
k8s-version: ["v1.26"]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
||||
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
||||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build docker image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
|
||||
with:
|
||||
context: ./
|
||||
build-args: |
|
||||
|
@ -185,7 +193,7 @@ jobs:
|
|||
make enable-addon
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
|
||||
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: /tmp/e2e_apiserver_test.out
|
||||
|
|
|
@ -12,17 +12,17 @@ on:
|
|||
- release-*
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.19'
|
||||
GO_VERSION: '1.22.0'
|
||||
|
||||
jobs:
|
||||
detect-noop:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
noop: ${{ steps.noop.outputs.should_skip }}
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@v3.3.0
|
||||
uses: fkirc/skip-duplicate-actions@v5.3.1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
|
@ -30,17 +30,20 @@ jobs:
|
|||
concurrent_skipping: false
|
||||
|
||||
check:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
|
||||
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: 'yarn'
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
||||
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
id: go
|
||||
- name: Install Yarn
|
||||
run: npm install --global yarn
|
||||
- name: upgrade yarn
|
||||
run: yarn set version 3.6.0
|
||||
- run: yarn install
|
||||
|
|
2
Makefile
2
Makefile
|
@ -27,7 +27,7 @@ ifeq (, $(shell which staticcheck))
|
|||
@{ \
|
||||
set -e ;\
|
||||
echo 'installing honnef.co/go/tools/cmd/staticcheck ' ;\
|
||||
go install honnef.co/go/tools/cmd/staticcheck@d7e217c1ff411395475b2971c0824e1e7cc1af98 ;\
|
||||
go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 ;\
|
||||
}
|
||||
STATICCHECK=$(GOBIN)/staticcheck
|
||||
else
|
||||
|
|
|
@ -46,7 +46,7 @@ func NewAPIServerCommand() *cobra.Command {
|
|||
Long: `The KubeVela API server validates and configures data for the API objects.
|
||||
The API Server services REST operations and provides the frontend to the
|
||||
cluster's shared state through which all other components interact.`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive,unused
|
||||
if err := s.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ cluster's shared state through which all other components interact.`,
|
|||
buildSwaggerCmd := &cobra.Command{
|
||||
Use: "build-swagger",
|
||||
Short: "Build swagger documentation of KubeVela apiserver",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive,unused
|
||||
name := "docs/apidoc/latest-swagger.json"
|
||||
if len(args) > 0 {
|
||||
name = args[0]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
50
go.mod
50
go.mod
|
@ -1,6 +1,6 @@
|
|||
module github.com/kubevela/velaux
|
||||
|
||||
go 1.19
|
||||
go 1.22
|
||||
|
||||
require (
|
||||
cuelang.org/go v0.5.0
|
||||
|
@ -30,7 +30,7 @@ require (
|
|||
github.com/form3tech-oss/jwt-go v3.2.5+incompatible
|
||||
github.com/getkin/kin-openapi v0.118.0
|
||||
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
|
||||
github.com/go-git/go-git/v5 v5.6.1 // indirect
|
||||
github.com/go-git/go-git/v5 v5.7.0 // indirect
|
||||
github.com/go-logr/logr v1.2.4 // indirect
|
||||
github.com/go-openapi/spec v0.20.7
|
||||
github.com/go-playground/validator/v10 v10.9.0
|
||||
|
@ -53,11 +53,11 @@ require (
|
|||
github.com/oam-dev/cluster-gateway v1.9.0-alpha.2
|
||||
github.com/oam-dev/cluster-register v1.0.4-0.20230424040021-147f7c1fefe5 // indirect
|
||||
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28 // indirect
|
||||
github.com/oam-dev/terraform-controller v0.7.10
|
||||
github.com/oam-dev/terraform-controller v0.7.11
|
||||
github.com/onsi/gomega v1.27.8
|
||||
github.com/openkruise/kruise-api v1.4.0 // indirect
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/prometheus/client_golang v1.15.1 // indirect
|
||||
github.com/prometheus/client_golang v1.16.0 // indirect
|
||||
github.com/prometheus/client_model v0.4.0 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
|
@ -66,14 +66,14 @@ require (
|
|||
github.com/stretchr/testify v1.8.4
|
||||
github.com/tidwall/gjson v1.14.4
|
||||
github.com/wercker/stern v0.0.0-20190705090245-4fa46dd6987f // indirect
|
||||
github.com/xanzy/go-gitlab v0.85.0 // indirect
|
||||
github.com/xanzy/go-gitlab v0.86.0 // indirect
|
||||
github.com/xlab/treeprint v1.2.0 // indirect
|
||||
go.mongodb.org/mongo-driver v1.11.2
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
golang.org/x/crypto v0.10.0
|
||||
golang.org/x/oauth2 v0.8.0
|
||||
golang.org/x/term v0.9.0 // indirect
|
||||
golang.org/x/text v0.10.0 // indirect
|
||||
golang.org/x/crypto v0.11.0
|
||||
golang.org/x/oauth2 v0.10.0
|
||||
golang.org/x/term v0.10.0 // indirect
|
||||
golang.org/x/text v0.11.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gotest.tools v2.2.0+incompatible
|
||||
|
@ -93,8 +93,8 @@ require (
|
|||
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5
|
||||
open-cluster-management.io/api v0.10.1 // indirect
|
||||
sigs.k8s.io/controller-runtime v0.14.6
|
||||
sigs.k8s.io/gateway-api v0.7.0 // indirect
|
||||
sigs.k8s.io/kind v0.18.0 // indirect
|
||||
sigs.k8s.io/gateway-api v0.7.1 // indirect
|
||||
sigs.k8s.io/kind v0.20.0 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
||||
|
@ -106,8 +106,9 @@ require (
|
|||
github.com/grafana/grafana v1.9.2-0.20230216173926-a0bea04a0274
|
||||
github.com/julienschmidt/httprouter v1.3.0
|
||||
github.com/kubevela/workflow v0.6.0
|
||||
github.com/oam-dev/kubevela v1.9.1
|
||||
github.com/oam-dev/kubevela v1.9.4
|
||||
github.com/onsi/ginkgo/v2 v2.11.0
|
||||
gorm.io/driver/postgres v1.5.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
@ -124,6 +125,9 @@ require (
|
|||
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
||||
github.com/jackc/pgx/v5 v5.4.2 // indirect
|
||||
github.com/jellydator/ttlcache/v3 v3.0.1 // indirect
|
||||
github.com/perimeterx/marshmallow v1.1.4 // indirect
|
||||
github.com/tjfoc/gmsm v1.3.2 // indirect
|
||||
|
@ -141,7 +145,7 @@ require (
|
|||
github.com/Masterminds/squirrel v1.5.3 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.4 // indirect
|
||||
github.com/agext/levenshtein v1.2.3 // indirect
|
||||
github.com/alessio/shellescape v1.4.1 // indirect
|
||||
|
@ -171,7 +175,7 @@ require (
|
|||
github.com/fluxcd/pkg/apis/meta v1.0.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/go-errors/errors v1.0.1 // indirect
|
||||
github.com/go-git/gcfg v1.5.0 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.4.1 // indirect
|
||||
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
|
@ -214,7 +218,7 @@ require (
|
|||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.14 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
|
@ -239,12 +243,12 @@ require (
|
|||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/pquerna/cachecontrol v0.1.0 // indirect
|
||||
github.com/prometheus/common v0.42.0 // indirect
|
||||
github.com/prometheus/procfs v0.9.0 // indirect
|
||||
github.com/prometheus/procfs v0.10.1 // indirect
|
||||
github.com/rivo/uniseg v0.4.3 // indirect
|
||||
github.com/rubenv/sql-migrate v1.3.1 // indirect
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/shopspring/decimal v1.3.1 // indirect
|
||||
github.com/skeema/knownhosts v1.1.0 // indirect
|
||||
github.com/skeema/knownhosts v1.1.1 // indirect
|
||||
github.com/spf13/cast v1.5.0
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.0 // indirect
|
||||
|
@ -268,15 +272,15 @@ require (
|
|||
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
|
||||
go.starlark.net v0.0.0-20221020143700-22309ac47eac // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/mod v0.11.0 // indirect
|
||||
golang.org/x/net v0.11.0 // indirect
|
||||
golang.org/x/mod v0.12.0 // indirect
|
||||
golang.org/x/net v0.12.0 // indirect
|
||||
golang.org/x/sync v0.3.0 // indirect
|
||||
golang.org/x/sys v0.9.0 // indirect
|
||||
golang.org/x/sys v0.10.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.10.0 // indirect
|
||||
golang.org/x/tools v0.11.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/grpc v1.53.0 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
google.golang.org/protobuf v1.31.0 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
|
@ -284,7 +288,7 @@ require (
|
|||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gorm.io/gorm v1.25.1
|
||||
gorm.io/gorm v1.25.2
|
||||
k8s.io/klog v1.0.0 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
|
||||
oras.land/oras-go v1.2.2 // indirect
|
||||
|
|
164
go.sum
164
go.sum
|
@ -1,8 +1,10 @@
|
|||
cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y=
|
||||
cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A=
|
||||
cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow=
|
||||
cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY=
|
||||
cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg=
|
||||
cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
|
||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
|
||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||
cuelang.org/go v0.5.0 h1:D6N0UgTGJCOxFKU8RU+qYvavKNsVc/+ZobmifStVJzU=
|
||||
|
@ -28,6 +30,7 @@ github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak
|
|||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
|
||||
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
|
||||
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
|
||||
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
|
||||
|
@ -49,17 +52,19 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v
|
|||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek=
|
||||
github.com/Microsoft/hcsshim v0.10.0-rc.8/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
|
||||
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
|
||||
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw=
|
||||
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 h1:ZK3C5DtzV2nVAQTx5S5jQvMeDqWtD1By5mOoyY/xJek=
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE=
|
||||
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/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs=
|
||||
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
|
||||
github.com/a8m/expect v1.0.0/go.mod h1:4IwSCMumY49ScypDnjNbYEjgVeqy1/U2cEs3Lat96eA=
|
||||
github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ=
|
||||
github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
|
||||
|
@ -136,6 +141,7 @@ github.com/barnettZQG/inject v0.0.1/go.mod h1:o83X2SlEKFliJx6UHai8bzFj+5isdBfOZs
|
|||
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/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
|
||||
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
|
@ -149,11 +155,15 @@ github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2y
|
|||
github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4Pt2A=
|
||||
github.com/briandowns/spinner v1.23.0/go.mod h1:rPG4gmXeN3wQV/TsAY4w8lPdIM6RX3yqeBQJSrbXjuE=
|
||||
github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70=
|
||||
github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
|
||||
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
|
||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng=
|
||||
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
|
||||
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ=
|
||||
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
|
||||
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o=
|
||||
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
|
||||
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
||||
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
||||
|
@ -196,9 +206,11 @@ github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h
|
|||
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
|
||||
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
|
||||
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
|
||||
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
|
||||
github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo=
|
||||
github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI=
|
||||
github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU=
|
||||
github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k=
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
|
@ -221,6 +233,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
|
|||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
|
||||
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
|
||||
github.com/crossplane/crossplane-runtime v0.19.2 h1:9qBnhpqKN4x6apF2siaQ6PvgxqBXbGcKmgeD8mSIDO8=
|
||||
github.com/crossplane/crossplane-runtime v0.19.2/go.mod h1:OJQ1NxtQK2ZTRmvtnQPoy8LsXsARTnVydRVDQEgIuz4=
|
||||
github.com/cue-exp/kubevelafix v0.0.0-20220922150317-aead819d979d h1:VNJA1nSKA8Xna5wjUIMItHlWmEej8Bb9fZ3vCNtIAX0=
|
||||
|
@ -234,6 +247,7 @@ github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27N
|
|||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc=
|
||||
github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI=
|
||||
github.com/docker/cli v20.10.9+incompatible h1:OJ7YkwQA+k2Oi51lmCojpjiygKpi76P7bg91b2eJxYU=
|
||||
github.com/docker/cli v20.10.9+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
|
||||
|
@ -243,16 +257,19 @@ github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNk
|
|||
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
||||
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8=
|
||||
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA=
|
||||
github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8=
|
||||
github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw=
|
||||
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
|
||||
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/elazarl/goproxy v0.0.0-20220115173737-adb46da277ac h1:XDAn206aIqKPdF5YczuuJXSQPx+WOen0Pxbxp5Fq8Pg=
|
||||
github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0=
|
||||
github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
|
||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful-openapi/v2 v2.9.1 h1:Of8B1rXdG81il5TTiSY+9Qrh7pYOr8aLdynHIpvo7fM=
|
||||
|
@ -260,6 +277,7 @@ github.com/emicklei/go-restful-openapi/v2 v2.9.1/go.mod h1:VKNgZyYviM1hnyrjD9RDz
|
|||
github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw=
|
||||
github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw=
|
||||
github.com/emicklei/proto v1.10.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A=
|
||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
|
@ -281,10 +299,13 @@ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2Vvl
|
|||
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/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0=
|
||||
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
|
||||
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A=
|
||||
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg=
|
||||
github.com/facebookgo/structtag v0.0.0-20150214074306-217e25fb9691 h1:KnnwHN59Jxec0htA2pe/i0/WI9vxXLQifdhBrP3lqcQ=
|
||||
github.com/facebookgo/structtag v0.0.0-20150214074306-217e25fb9691/go.mod h1:sKLL1iua/0etWfo/nPCmyz+v2XDMXy+Ho53W7RAuZNY=
|
||||
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk=
|
||||
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
|
||||
github.com/fatih/color v0.0.0-20180516100307-2d684516a886/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
|
@ -316,7 +337,9 @@ github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5
|
|||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
|
||||
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
|
||||
github.com/gdamore/tcell/v2 v2.6.0 h1:OKbluoP9VYmJwZwq/iLb4BxwKcwGthaa1YNBJIyCySg=
|
||||
github.com/gdamore/tcell/v2 v2.6.0/go.mod h1:be9omFATkdr0D9qewWW3d+MEvl5dha+Etb5y65J2H8Y=
|
||||
github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg=
|
||||
github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM=
|
||||
github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc=
|
||||
|
@ -328,15 +351,14 @@ github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
|
|||
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
|
||||
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
|
||||
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
|
||||
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
|
||||
github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4=
|
||||
github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo=
|
||||
github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk=
|
||||
github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo=
|
||||
github.com/go-git/go-git/v5 v5.7.0 h1:t9AudWVLmqzlo+4bqdf7GY+46SUuRsx59SboFxkq2aE=
|
||||
github.com/go-git/go-git/v5 v5.7.0/go.mod h1:coJHKEOk5kUClpsNlXrUvPrDxY3w3gjHvhcZd8Fodw8=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gorp/gorp/v3 v3.0.5/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw=
|
||||
github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs=
|
||||
|
@ -454,6 +476,7 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
|
|||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
|
||||
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
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=
|
||||
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
|
||||
|
@ -511,6 +534,7 @@ github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97Dwqy
|
|||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
|
||||
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
|
||||
github.com/gorilla/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=
|
||||
|
@ -546,6 +570,7 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
|
|||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM=
|
||||
github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
|
@ -564,6 +589,7 @@ github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA
|
|||
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=
|
||||
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
|
@ -596,12 +622,17 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
|
|||
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc=
|
||||
github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||
github.com/jackc/pgx/v5 v5.4.2 h1:u1gmGDwbdRUZiwisBm/Ky2M14uQyUP65bG8+20nnyrg=
|
||||
github.com/jackc/pgx/v5 v5.4.2/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||
github.com/jellydator/ttlcache/v3 v3.0.1 h1:cHgCSMS7TdQcoprXnWUptJZzyFsqs18Lt8VVhRuZYVU=
|
||||
github.com/jellydator/ttlcache/v3 v3.0.1/go.mod h1:WwTaEmcXQ3MTjOm4bsZoDFiCu/hMvNWLO1w67RXz6h4=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
|
@ -616,6 +647,7 @@ github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Cc
|
|||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
|
||||
github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg=
|
||||
github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
|
||||
|
@ -660,6 +692,7 @@ github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3x
|
|||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
|
||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
|
@ -684,6 +717,7 @@ 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/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
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=
|
||||
|
@ -702,6 +736,7 @@ github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI=
|
|||
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
|
||||
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
|
||||
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
|
@ -719,11 +754,12 @@ github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPn
|
|||
github.com/mattn/go-isatty v0.0.17/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.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
|
||||
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
|
||||
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||
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/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||
|
@ -756,7 +792,6 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
|
|||
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
|
||||
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM=
|
||||
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
|
||||
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
|
||||
github.com/moby/moby v20.10.20+incompatible h1:x7tLy/H63mylLX/1d75N8NCuYcXBqJAzATrMXHie5+I=
|
||||
|
@ -764,6 +799,7 @@ github.com/moby/moby v20.10.20+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBm
|
|||
github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
|
||||
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
||||
github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78=
|
||||
github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI=
|
||||
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A=
|
||||
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw=
|
||||
github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw=
|
||||
|
@ -806,14 +842,14 @@ github.com/oam-dev/cluster-gateway v1.9.0-alpha.2 h1:412Yhe6BoNVgeomv0tvJaOeKl6v
|
|||
github.com/oam-dev/cluster-gateway v1.9.0-alpha.2/go.mod h1:MbBn0E1eGWXqSsnrOb2aKLnGcyvg34Lz9/Q+B1uGEpE=
|
||||
github.com/oam-dev/cluster-register v1.0.4-0.20230424040021-147f7c1fefe5 h1:LJbb+5T9SyykRbni1jwcj9DvqhP60m5OexrF0vzzRcg=
|
||||
github.com/oam-dev/cluster-register v1.0.4-0.20230424040021-147f7c1fefe5/go.mod h1:Xc5oAAnLOjH7xYSQL0AGHPobFiShL7EYhV/4j9rrwXg=
|
||||
github.com/oam-dev/kubevela v1.9.1 h1:Zf4/mJzcu3NDWjA/MU/IDH3EDHnv3tGNABiAIU5o7Zc=
|
||||
github.com/oam-dev/kubevela v1.9.1/go.mod h1:ony10dvzbFco8njvGT/oYAnf0qHw1H/zKLtnm0zgOn4=
|
||||
github.com/oam-dev/kubevela v1.9.4 h1:ZZmmkvi7mdShfbdnrf3kSQGuFI/hdEmktE7olHNCA0o=
|
||||
github.com/oam-dev/kubevela v1.9.4/go.mod h1:6zWuQRLNatpVKVSkpqlMOiy7tRKt1QjG4enciusYhHg=
|
||||
github.com/oam-dev/stern v1.13.2 h1:jlGgtJbKmIVhzkH44ft5plkgs8XEfvxbFrQdX60CQR4=
|
||||
github.com/oam-dev/stern v1.13.2/go.mod h1:0pLjZt0amXE/ErF16Rdrgd98H2owN8Hmn3/7CX5+AeA=
|
||||
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28 h1:tD8HiFKnt0jnwdTWjeqUnfnUYLD/+Nsmj8ZGIxqDWiU=
|
||||
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28/go.mod h1:Mu8i0/DdplvnjwRbAYPsc8+LRR27n/mp8VWdkN10GzE=
|
||||
github.com/oam-dev/terraform-controller v0.7.10 h1:e2STz6Od53S4Ra4+QQs65lujF50vIb6eQtTMuvvofjk=
|
||||
github.com/oam-dev/terraform-controller v0.7.10/go.mod h1:xvgChKG0pij0WEKRrX7w30SdVBPVOlRl/+Mv7+2C1cI=
|
||||
github.com/oam-dev/terraform-controller v0.7.11 h1:uucdSBLL0PUz60hOZfjsAe/ivrd/K/2u0Iko8nVQIE0=
|
||||
github.com/oam-dev/terraform-controller v0.7.11/go.mod h1:xvgChKG0pij0WEKRrX7w30SdVBPVOlRl/+Mv7+2C1cI=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
|
@ -869,6 +905,7 @@ github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0V
|
|||
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/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
|
||||
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
|
||||
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
|
@ -899,8 +936,8 @@ github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr
|
|||
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
|
||||
github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
|
||||
github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y=
|
||||
github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI=
|
||||
github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk=
|
||||
github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
|
||||
github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
|
||||
github.com/prometheus/client_model v0.0.0-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=
|
||||
|
@ -929,11 +966,13 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
|
|||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
|
||||
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
|
||||
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
|
||||
github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg=
|
||||
github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b h1:zd/2RNzIRkoGGMjE+YIsZ85CnDIz672JK2F3Zl4vux4=
|
||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b/go.mod h1:KjY0wibdYKc4DYkerHSbguaf3JeIPGhNJBp2BNiFH78=
|
||||
github.com/rivo/tview v0.0.0-20221128165837-db36428c92d9 h1:ccTgRxA37ypj3q8zB8G4k3xGPfBbIaMwrf3Yw6k50NY=
|
||||
github.com/rivo/tview v0.0.0-20221128165837-db36428c92d9/go.mod h1:YX2wUZOcJGOIycErz2s9KvDaP0jnWwRCirQMPLPpQ+Y=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw=
|
||||
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
|
@ -945,6 +984,7 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE
|
|||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||
github.com/rubenv/sql-migrate v1.3.1 h1:Vx+n4Du8X8VTYuXbhNxdEUoh6wiJERA0GlWocR5FrbA=
|
||||
github.com/rubenv/sql-migrate v1.3.1/go.mod h1:YzG/Vh82CwyhTFXy+Mf5ahAiiEOpAlHurg+23VEzcsk=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
|
@ -953,7 +993,6 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
|
|||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
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/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
|
||||
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
|
@ -968,8 +1007,8 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic
|
|||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0=
|
||||
github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag=
|
||||
github.com/skeema/knownhosts v1.1.1 h1:MTk78x9FPgDFVFkDLTrsnnfCJl7g1C/nnKvePgrIngE=
|
||||
github.com/skeema/knownhosts v1.1.1/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
|
@ -1044,8 +1083,8 @@ github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN
|
|||
github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck=
|
||||
github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY=
|
||||
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
||||
github.com/xanzy/go-gitlab v0.85.0 h1:E/wjnsd/mM5kV6O9y5+i6zxjx+wfAwa97sgcT1ETNwk=
|
||||
github.com/xanzy/go-gitlab v0.85.0/go.mod h1:5ryv+MnpZStBH8I/77HuQBsMbBGANtVpLWC15qOjWAw=
|
||||
github.com/xanzy/go-gitlab v0.86.0 h1:jR8V9cK9jXRQDb46KOB20NCF3ksY09luaG0IfXE6p7w=
|
||||
github.com/xanzy/go-gitlab v0.86.0/go.mod h1:5ryv+MnpZStBH8I/77HuQBsMbBGANtVpLWC15qOjWAw=
|
||||
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
|
||||
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
|
||||
|
@ -1077,14 +1116,18 @@ github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
|
|||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
|
||||
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
|
||||
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
|
||||
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
|
||||
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY=
|
||||
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
|
||||
github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
|
||||
github.com/zclconf/go-cty v1.13.0 h1:It5dfKTTZHe9aeppbNOda3mN7Ag7sg6QkBNm6TkyFa0=
|
||||
github.com/zclconf/go-cty v1.13.0/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
|
||||
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
|
||||
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
||||
go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c h1:/RwRVN9EdXAVtdHxP7Ndn/tfmM9/goiwU0QTnLBgS4w=
|
||||
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
|
||||
go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0=
|
||||
|
@ -1112,6 +1155,7 @@ go.mongodb.org/mongo-driver v1.11.2/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sf
|
|||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E=
|
||||
|
@ -1172,6 +1216,7 @@ go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ
|
|||
go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||
go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo=
|
||||
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
|
||||
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
|
||||
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/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
|
@ -1183,7 +1228,6 @@ go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
|
|||
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
|
||||
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
|
||||
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
|
||||
golang.org/x/arch v0.1.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
|
@ -1206,15 +1250,13 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y
|
|||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
|
||||
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
|
||||
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
||||
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-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
|
@ -1237,8 +1279,8 @@ golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2
|
|||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=
|
||||
golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
||||
golang.org/x/mod v0.12.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-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -1285,16 +1327,16 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su
|
|||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
||||
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
|
||||
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
|
||||
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
|
||||
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
@ -1306,8 +1348,8 @@ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ
|
|||
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/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||
golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8=
|
||||
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
|
||||
golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8=
|
||||
golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
@ -1388,9 +1430,7 @@ golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/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-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
@ -1399,24 +1439,25 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
|
||||
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
|
||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
|
||||
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
||||
golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28=
|
||||
golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo=
|
||||
golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c=
|
||||
golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
|
@ -1427,9 +1468,10 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
|||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
|
||||
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
|
||||
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
|
@ -1470,8 +1512,8 @@ golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E
|
|||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg=
|
||||
golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM=
|
||||
golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8=
|
||||
golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8=
|
||||
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=
|
||||
|
@ -1561,8 +1603,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
|
|||
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/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
||||
|
@ -1613,8 +1655,11 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
|||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw=
|
||||
gorm.io/driver/mysql v1.5.1/go.mod h1:Jo3Xu7mMhCyj8dlrb3WoCaRd1FhsVh+yMXb1jUInf5o=
|
||||
gorm.io/gorm v1.25.1 h1:nsSALe5Pr+cM3V1qwwQ7rOkw+6UeLrX5O4v3llhHa64=
|
||||
gorm.io/driver/postgres v1.5.2 h1:ytTDxxEv+MplXOfFe3Lzm7SjG09fcdb3Z/c056DTBx0=
|
||||
gorm.io/driver/postgres v1.5.2/go.mod h1:fmpX0m2I1PKuR7mKZiEluwrP3hbs+ps7JIGMUBpCgl8=
|
||||
gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
|
||||
gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho=
|
||||
gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
|
||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
|
||||
|
@ -1706,7 +1751,6 @@ open-cluster-management.io/api v0.10.1 h1:/qv1qfIkAVSz6RQmKGehSv6zYI34Xmb8hK7sIU
|
|||
open-cluster-management.io/api v0.10.1/go.mod h1:6BB/Y6r3hXlPjpJgDwIs6Ubxyx/kXXOg6D9Cntg1I9E=
|
||||
oras.land/oras-go v1.2.2 h1:0E9tOHUfrNH7TCDk5KU0jVBEzCqbfdyuVfGmJ7ZeRPE=
|
||||
oras.land/oras-go v1.2.2/go.mod h1:Apa81sKoZPpP7CDciE006tSZ0x3Q3+dOoBcMZ/aNxvw=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
sigs.k8s.io/apiserver-network-proxy v0.0.30 h1:Zr5Zqd2GymcYUwijHUDEaQ1I3Dx0giTIWaD80N6j2mE=
|
||||
sigs.k8s.io/apiserver-network-proxy v0.0.30/go.mod h1:0wSWl5ohhp7kYl5XOP0w1IZSWTHhe9TojjDGityZxnc=
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36 h1:PUuX1qIFv309AT8hF/CdPKDmsG/hn/L8zRX7VvISM3A=
|
||||
|
@ -1716,14 +1760,14 @@ sigs.k8s.io/apiserver-runtime v1.1.2-0.20221118041430-0a6394f6dda3/go.mod h1:HxS
|
|||
sigs.k8s.io/controller-runtime v0.11.1/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA=
|
||||
sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA=
|
||||
sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0=
|
||||
sigs.k8s.io/gateway-api v0.7.0 h1:/mG8yyJNBifqvuVLW5gwlI4CQs0NR/5q4BKUlf1bVdY=
|
||||
sigs.k8s.io/gateway-api v0.7.0/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso=
|
||||
sigs.k8s.io/gateway-api v0.7.1 h1:Tts2jeepVkPA5rVG/iO+S43s9n7Vp7jCDhZDQYtPigQ=
|
||||
sigs.k8s.io/gateway-api v0.7.1/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso=
|
||||
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY=
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k=
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/kind v0.18.0 h1:ahgZdVV1pdhXlYe1f+ztISakT23KdrBl/NFY9JMygzs=
|
||||
sigs.k8s.io/kind v0.18.0/go.mod h1:Qqp8AiwOlMZmJWs37Hgs31xcbiYXjtXlRBSftcnZXQk=
|
||||
sigs.k8s.io/kind v0.20.0 h1:f0sc3v9mQbGnjBUaqSFST1dwIuiikKVGgoTwpoP33a8=
|
||||
sigs.k8s.io/kind v0.20.0/go.mod h1:aBlbxg08cauDgZ612shr017/rZwqd7AS563FvpWKPVs=
|
||||
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=
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SHELL := /bin/bash
|
||||
|
||||
GOLANGCILINT_VERSION ?= 1.53.3
|
||||
GOLANGCILINT_VERSION ?= 1.59.1
|
||||
|
||||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
||||
ifeq (,$(shell go env GOBIN))
|
||||
|
|
|
@ -14,6 +14,8 @@ const HelmValueShow: React.FC<Props> = (props: Props) => {
|
|||
const [valueFile, setValueFile] = React.useState<string>('values.yaml');
|
||||
return (
|
||||
<Dialog
|
||||
style={{ width: '60vw' }}
|
||||
closeMode={["close", "mask"]}
|
||||
className={'helmValueDialog'}
|
||||
overflowScroll={true}
|
||||
visible={true}
|
||||
|
|
|
@ -109,7 +109,7 @@ class EditPlatFormUserDialog extends Component<Props, State> {
|
|||
{
|
||||
required: true,
|
||||
pattern: checkName,
|
||||
message: <Translation>You must input a valid name</Translation>,
|
||||
message: <Translation>You must input a valid name with alphanumeric character only</Translation>,
|
||||
},
|
||||
],
|
||||
})}
|
||||
|
@ -139,7 +139,7 @@ class EditPlatFormUserDialog extends Component<Props, State> {
|
|||
pattern: checkUserPassword,
|
||||
message: (
|
||||
<Translation>
|
||||
Password should be 8-16 bits and contain at least one number and one letter
|
||||
Password must be alphanumeric, contain at least one letter and one number, and be 8-16 characters long
|
||||
</Translation>
|
||||
),
|
||||
},
|
||||
|
|
|
@ -329,6 +329,7 @@
|
|||
"Only support github repo url(master branch)": "仅支持 GitHub repo(主分支) 链接",
|
||||
"Are you sure to delete?": "确认要删除吗?",
|
||||
"Please enter a valid name": "请输入一个有效的名称",
|
||||
"Please enter a valid name having alphanumeric characters only": "请输入仅包含字母数字字符的有效名称",
|
||||
"This addon is experimental, please don't use it in production": "本插件是试用性,请不要在生产环境中使用",
|
||||
"Dependencies": "依赖",
|
||||
"Enable the addon to obtain the following extension capabilities": "启用插件以使用如下扩展能力",
|
||||
|
@ -534,6 +535,7 @@
|
|||
"Environment binding deleted successfully": "成功移除环境绑定",
|
||||
"Retry": "重试",
|
||||
"Password should be 8-16 bits and contain at least one number and one letter": "密码应为8-16位, 并至少包含一个数字和一个字母",
|
||||
"Password must be alphanumeric, contain at least one letter and one number, and be 8-16 characters long": "密码必须是字母数字,至少包含一个字母和一个数字,长度为 8-16 个字符",
|
||||
"Please input a valid email": "请输入有效的电子邮件地址",
|
||||
"Please input a email": "请输入电子邮箱地址",
|
||||
"User updated successfully": "用户更新成功",
|
||||
|
@ -652,4 +654,4 @@
|
|||
"Click me to open the dex login page": "点击我打开 Dex 登录页面",
|
||||
"Setting the default projects for the dex login user": "设置 Dex 登录用户的默认项目",
|
||||
"Join Time": "加入时间"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ class AddonDetailDialog extends React.Component<Props, State> {
|
|||
schema
|
||||
? [
|
||||
<Button
|
||||
style={{ marginTop: '-12px', alignItems: 'center', display: 'flex' }}
|
||||
style={{ alignItems: 'center', display: 'flex' }}
|
||||
onClick={() => {
|
||||
if (propertiesMode === 'native') {
|
||||
this.setState({ propertiesMode: 'code' });
|
||||
|
|
|
@ -195,14 +195,28 @@ class TraitDialog extends React.Component<Props, State> {
|
|||
.then((re) => {
|
||||
if (re) {
|
||||
this.setState({ definitionDetail: re, definitionLoading: false });
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
this.setDefaultProperties(re)
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => this.setState({ definitionLoading: false }));
|
||||
};
|
||||
|
||||
setDefaultProperties = (definitionDetail: any) => {
|
||||
const properties = definitionDetail.schema?.properties;
|
||||
if (properties) {
|
||||
const defaultValues: Record<string, any> = {};
|
||||
for (const key in properties) {
|
||||
if (properties[key].default !== undefined) {
|
||||
defaultValues[key] = properties[key].default;
|
||||
}
|
||||
}
|
||||
this.field.setValues({ properties: defaultValues });
|
||||
}
|
||||
};
|
||||
|
||||
handleTypeChange = (value: string) => {
|
||||
this.removeProperties();
|
||||
this.field.setValues({ type: value });
|
||||
|
|
|
@ -55,7 +55,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
|||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
onClose = () => {
|
||||
this.props.onClose();
|
||||
this.resetField();
|
||||
|
@ -69,13 +69,13 @@ class AddClusterDialog extends React.Component<Props, State> {
|
|||
}
|
||||
if (editMode) {
|
||||
updateCluster({
|
||||
name: cluster.name,
|
||||
name: cluster?.name,
|
||||
alias: values.alias,
|
||||
icon: cluster.icon,
|
||||
icon: cluster?.icon,
|
||||
description: values.description,
|
||||
dashboardURL: values.dashboardURL,
|
||||
kubeConfig: values.kubeConfig,
|
||||
labels: cluster.labels,
|
||||
labels: cluster?.labels,
|
||||
}).then((re: any) => {
|
||||
if (re) {
|
||||
Message.success(<Translation>cluster update success</Translation>);
|
||||
|
@ -140,7 +140,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
|||
};
|
||||
const init = this.field.init;
|
||||
const values: { kubeConfig: string } = this.field.getValues();
|
||||
const valueInfo = cluster.kubeConfig || values.kubeConfig || '';
|
||||
const valueInfo = cluster?.kubeConfig || values.kubeConfig || '';
|
||||
return (
|
||||
<Dialog
|
||||
locale={locale().Dialog}
|
||||
|
@ -170,7 +170,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
|||
name="name"
|
||||
disabled={editMode}
|
||||
{...init('name', {
|
||||
initValue: cluster.name,
|
||||
initValue: cluster?.name || editClusterName,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
|
@ -187,7 +187,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
|||
<Input
|
||||
name="alias"
|
||||
{...init('alias', {
|
||||
initValue: cluster.alias,
|
||||
initValue: cluster?.alias,
|
||||
rules: [
|
||||
{
|
||||
minLength: 2,
|
||||
|
@ -204,10 +204,10 @@ class AddClusterDialog extends React.Component<Props, State> {
|
|||
<Col span={12} style={{ padding: '0 8px' }}>
|
||||
<FormItem label={<Translation>Description</Translation>}>
|
||||
<Input
|
||||
defaultValue={cluster.description}
|
||||
defaultValue={cluster?.description}
|
||||
name="description"
|
||||
{...init('description', {
|
||||
initValue: cluster.description,
|
||||
initValue: cluster?.description,
|
||||
rules: [
|
||||
{
|
||||
maxLength: 256,
|
||||
|
@ -223,7 +223,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
|||
<Input
|
||||
name="dashboardURL"
|
||||
{...init('dashboardURL', {
|
||||
initValue: cluster.dashboardURL,
|
||||
initValue: cluster?.dashboardURL,
|
||||
rules: [
|
||||
{
|
||||
required: false,
|
||||
|
@ -252,7 +252,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
|||
language={'yaml'}
|
||||
readOnly={false}
|
||||
{...init('kubeConfig', {
|
||||
initValue: cluster.kubeConfig,
|
||||
initValue: cluster?.kubeConfig,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
|
|
|
@ -101,7 +101,7 @@ class Cluster extends React.Component<Props, State> {
|
|||
(enableAddon || []).forEach((ele: { name: string; phase: boolean }) => {
|
||||
addonList.forEach((item: Addon) => {
|
||||
const isMatchName = ele.name === item.name;
|
||||
const deploy = item.deployTo || { runtimeCluster: false, runtime_cluster: false };
|
||||
const deploy = item.deployTo || { runtimeCluster: false };
|
||||
if (isMatchName && deploy.runtimeCluster) {
|
||||
addonMessage.push({ name: item.name, path: item.url || '' });
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ class CreateUser extends React.Component<Props, State> {
|
|||
{
|
||||
required: true,
|
||||
pattern: checkName,
|
||||
message: <Translation>Please enter a valid name</Translation>,
|
||||
message: <Translation>Please enter a valid name having alphanumeric characters only</Translation>,
|
||||
},
|
||||
],
|
||||
})}
|
||||
|
@ -209,7 +209,7 @@ class CreateUser extends React.Component<Props, State> {
|
|||
pattern: checkUserPassword,
|
||||
message: (
|
||||
<Translation>
|
||||
Password should be 8-16 bits and contain at least one number and one letter
|
||||
Password must be alphanumeric, contain at least one letter and one number, and be 8-16 characters long
|
||||
</Translation>
|
||||
),
|
||||
},
|
||||
|
|
|
@ -117,7 +117,7 @@ class ResetPassword extends React.Component<Props, State> {
|
|||
pattern: checkUserPassword,
|
||||
message: (
|
||||
<Translation>
|
||||
Password should be 8-16 bits and contain at least one number and one letter
|
||||
Password must be alphanumeric, contain at least one letter and one number, and be 8-16 characters long
|
||||
</Translation>
|
||||
),
|
||||
},
|
||||
|
|
|
@ -58,6 +58,9 @@ type Config struct {
|
|||
PluginConfig PluginConfig
|
||||
|
||||
DexServerURL string
|
||||
|
||||
// ExitOnLostLeader will exit the process if this server lost the leader election, set this to true for debugging
|
||||
ExitOnLostLeader bool
|
||||
}
|
||||
|
||||
// PluginConfig the plugin directory config
|
||||
|
@ -95,7 +98,8 @@ func NewConfig() *Config {
|
|||
CorePluginPath: "core-plugins",
|
||||
CustomPluginPath: []string{"plugins"},
|
||||
},
|
||||
DexServerURL: "http://dex.vela-system:5556",
|
||||
DexServerURL: "http://dex.vela-system:5556",
|
||||
ExitOnLostLeader: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,7 +107,7 @@ func NewConfig() *Config {
|
|||
func (s *Config) Validate() []error {
|
||||
var errs []error
|
||||
|
||||
if s.Datastore.Type != "mongodb" && s.Datastore.Type != "kubeapi" {
|
||||
if s.Datastore.Type != "mongodb" && s.Datastore.Type != "kubeapi" && s.Datastore.Type != "postgres" {
|
||||
errs = append(errs, fmt.Errorf("not support datastore type %s", s.Datastore.Type))
|
||||
}
|
||||
|
||||
|
@ -127,5 +131,6 @@ func (s *Config) AddFlags(fs *pflag.FlagSet, c *Config) {
|
|||
fs.StringVar(&s.WorkflowVersion, "workflow-version", c.WorkflowVersion, "the version of workflow to meet controller requirement.")
|
||||
fs.StringVar(&s.DexServerURL, "dex-server", c.DexServerURL, "the URL of the dex server.")
|
||||
fs.StringArrayVar(&s.PluginConfig.CustomPluginPath, "plugin-path", c.PluginConfig.CustomPluginPath, "the path of the plugin directory")
|
||||
fs.BoolVar(&s.ExitOnLostLeader, "exit-on-lost-leader", c.ExitOnLostLeader, "exit the process if this server lost the leader election")
|
||||
profiling.AddFlags(fs)
|
||||
}
|
||||
|
|
|
@ -1669,12 +1669,13 @@ func (c *applicationServiceImpl) DryRunAppOrRevision(ctx context.Context, appMod
|
|||
}
|
||||
|
||||
func genWebhookToken() string {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
source := rand.NewSource(time.Now().UnixNano()) //nolint:gosec
|
||||
rng := rand.New(source) //nolint:gosec
|
||||
runes := []rune("abcdefghijklmnopqrstuvwxyz0123456789")
|
||||
|
||||
b := make([]rune, defaultTokenLen)
|
||||
for i := range b {
|
||||
b[i] = runes[rand.Intn(len(runes))] // #nosec
|
||||
b[i] = runes[rng.Intn(len(runes))] //nolint:gosec
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ func (a *authenticationServiceImpl) RefreshToken(_ context.Context, refreshToken
|
|||
|
||||
// ParseToken parses and verifies a token
|
||||
func ParseToken(tokenString string) (*model.CustomClaims, error) {
|
||||
token, err := jwt.ParseWithClaims(tokenString, &model.CustomClaims{}, func(token *jwt.Token) (interface{}, error) {
|
||||
token, err := jwt.ParseWithClaims(tokenString, &model.CustomClaims{}, func(token *jwt.Token) (interface{}, error) { //nolint:revive,unused
|
||||
return []byte(signedKey), nil
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -449,6 +449,14 @@ func (a *authenticationServiceImpl) GetLoginType(ctx context.Context) (*apisv1.G
|
|||
}, nil
|
||||
}
|
||||
|
||||
func getUserName(sub string) string {
|
||||
username := strings.ToLower(sub)
|
||||
if len(sub) > datastore.PrimaryKeyMaxLength {
|
||||
return sub[:datastore.PrimaryKeyMaxLength]
|
||||
}
|
||||
return username
|
||||
}
|
||||
|
||||
func (d *dexHandlerImpl) login(ctx context.Context) (*apisv1.UserBase, error) {
|
||||
var claims struct {
|
||||
Email string `json:"email"`
|
||||
|
@ -492,14 +500,8 @@ func (d *dexHandlerImpl) login(ctx context.Context) (*apisv1.UserBase, error) {
|
|||
klog.Errorf("failed to get the system info %s", err.Error())
|
||||
}
|
||||
user := &model.User{
|
||||
Email: claims.Email,
|
||||
Name: func() string {
|
||||
sub := strings.ToLower(claims.Sub)
|
||||
if len(sub) > datastore.PrimaryKeyMaxLength {
|
||||
return sub[:datastore.PrimaryKeyMaxLength]
|
||||
}
|
||||
return sub
|
||||
}(),
|
||||
Email: claims.Email,
|
||||
Name: getUserName(claims.Sub),
|
||||
DexSub: claims.Sub,
|
||||
Alias: claims.Name,
|
||||
LastLoginTime: time.Now(),
|
||||
|
@ -514,7 +516,7 @@ func (d *dexHandlerImpl) login(ctx context.Context) (*apisv1.UserBase, error) {
|
|||
if systemInfo != nil {
|
||||
for _, project := range systemInfo.DexUserDefaultProjects {
|
||||
_, err := d.projectService.AddProjectUser(ctx, project.Name, apisv1.AddProjectUserRequest{
|
||||
UserName: strings.ToLower(claims.Sub),
|
||||
UserName: getUserName(claims.Sub),
|
||||
UserRoles: project.Roles,
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
@ -381,7 +381,7 @@ func (c *cloudShellServiceImpl) newCloudShell(ctx context.Context) (*v1alpha1.Cl
|
|||
|
||||
func checkReadOnly(projectName string, permissions []*model.Permission) bool {
|
||||
ra := &RequestResourceAction{}
|
||||
ra.SetResourceWithName("project:{projectName}/application:*", func(name string) string {
|
||||
ra.SetResourceWithName("project:{projectName}/application:*", func(name string) string { //nolint:revive,unused
|
||||
return projectName
|
||||
})
|
||||
ra.SetActions([]string{"deploy"})
|
||||
|
|
|
@ -48,6 +48,17 @@ type ConfigService interface {
|
|||
ListConfigDistributions(ctx context.Context, project string) ([]*config.Distribution, error)
|
||||
}
|
||||
|
||||
var (
|
||||
// GlobalConfigNamespace is the namespace for global config, global config should be seen by all projects
|
||||
GlobalConfigNamespace = types.DefaultKubeVelaNS
|
||||
// NoProject is the project name to pass when query global config
|
||||
NoProject = ""
|
||||
)
|
||||
|
||||
func isGlobal(project string) bool {
|
||||
return project == NoProject
|
||||
}
|
||||
|
||||
// NewConfigService returns a config use case
|
||||
func NewConfigService() ConfigService {
|
||||
return &configServiceImpl{}
|
||||
|
@ -62,8 +73,8 @@ type configServiceImpl struct {
|
|||
|
||||
// ListTemplates list the config templates
|
||||
func (u *configServiceImpl) ListTemplates(ctx context.Context, project, scope string) ([]*apis.ConfigTemplate, error) {
|
||||
listCtx := utils.WithProject(ctx, "")
|
||||
queryTemplates, err := u.Factory.ListTemplates(listCtx, types.DefaultKubeVelaNS, scope)
|
||||
listCtx := utils.WithProject(ctx, NoProject)
|
||||
queryTemplates, err := u.Factory.ListTemplates(listCtx, GlobalConfigNamespace, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -99,9 +110,9 @@ func (u *configServiceImpl) ListTemplates(ctx context.Context, project, scope st
|
|||
// GetTemplate detail a template
|
||||
func (u *configServiceImpl) GetTemplate(ctx context.Context, tem config.NamespacedName) (*apis.ConfigTemplateDetail, error) {
|
||||
if tem.Namespace == "" {
|
||||
tem.Namespace = types.DefaultKubeVelaNS
|
||||
tem.Namespace = GlobalConfigNamespace
|
||||
}
|
||||
getCtx := utils.WithProject(ctx, "")
|
||||
getCtx := utils.WithProject(ctx, NoProject)
|
||||
template, err := u.Factory.LoadTemplate(getCtx, tem.Name, tem.Namespace)
|
||||
if err != nil {
|
||||
if errors.Is(err, config.ErrTemplateNotFound) {
|
||||
|
@ -128,8 +139,8 @@ func (u *configServiceImpl) GetTemplate(ctx context.Context, tem config.Namespac
|
|||
}
|
||||
|
||||
func (u *configServiceImpl) CreateConfig(ctx context.Context, project string, req apis.CreateConfigRequest) (*apis.Config, error) {
|
||||
ns := types.DefaultKubeVelaNS
|
||||
if project != "" {
|
||||
ns := GlobalConfigNamespace
|
||||
if !isGlobal(project) {
|
||||
pro, err := u.ProjectService.GetProject(ctx, project)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -138,7 +149,7 @@ func (u *configServiceImpl) CreateConfig(ctx context.Context, project string, re
|
|||
}
|
||||
exist, err := u.Factory.IsExist(ctx, ns, req.Name)
|
||||
if err != nil {
|
||||
klog.Errorf("check config name is exist failure %s", err.Error())
|
||||
klog.Errorf("check config name exist fail %s", err.Error())
|
||||
return nil, bcode.ErrConfigExist
|
||||
}
|
||||
if exist {
|
||||
|
@ -149,7 +160,7 @@ func (u *configServiceImpl) CreateConfig(ctx context.Context, project string, re
|
|||
return nil, err
|
||||
}
|
||||
if req.Template.Namespace == "" {
|
||||
req.Template.Namespace = types.DefaultKubeVelaNS
|
||||
req.Template.Namespace = GlobalConfigNamespace
|
||||
}
|
||||
configItem, err := u.Factory.ParseConfig(ctx, config.NamespacedName(req.Template), config.Metadata{
|
||||
NamespacedName: config.NamespacedName{Name: req.Name, Namespace: ns},
|
||||
|
@ -169,8 +180,8 @@ func (u *configServiceImpl) CreateConfig(ctx context.Context, project string, re
|
|||
}
|
||||
|
||||
func (u *configServiceImpl) UpdateConfig(ctx context.Context, project string, name string, req apis.UpdateConfigRequest) (*apis.Config, error) {
|
||||
ns := types.DefaultKubeVelaNS
|
||||
if project != "" {
|
||||
ns := GlobalConfigNamespace
|
||||
if !isGlobal(project) {
|
||||
pro, err := u.ProjectService.GetProject(ctx, project)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -217,8 +228,8 @@ func (u *configServiceImpl) ListConfigs(ctx context.Context, project string, tem
|
|||
var list []*apis.Config
|
||||
scope := ""
|
||||
var projectNamespace string
|
||||
listCtx := utils.WithProject(ctx, "")
|
||||
if project != "" {
|
||||
listCtx := utils.WithProject(ctx, NoProject)
|
||||
if !isGlobal(project) {
|
||||
scope = "project"
|
||||
pro, err := u.ProjectService.GetProject(ctx, project)
|
||||
if err != nil {
|
||||
|
@ -235,7 +246,7 @@ func (u *configServiceImpl) ListConfigs(ctx context.Context, project string, tem
|
|||
}
|
||||
}
|
||||
|
||||
configs, err := u.Factory.ListConfigs(listCtx, types.DefaultKubeVelaNS, template, scope, true)
|
||||
configs, err := u.Factory.ListConfigs(listCtx, GlobalConfigNamespace, template, scope, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -283,7 +294,7 @@ func (u *configServiceImpl) CreateConfigDistribution(ctx context.Context, projec
|
|||
})
|
||||
}
|
||||
|
||||
// ListDistributeConfigs list the all distributions
|
||||
// ListConfigDistributions list the all distributions
|
||||
func (u *configServiceImpl) ListConfigDistributions(ctx context.Context, project string) ([]*config.Distribution, error) {
|
||||
pro, err := u.ProjectService.GetProject(ctx, project)
|
||||
if err != nil {
|
||||
|
@ -324,8 +335,8 @@ func convertConfig(project string, config config.Config) *apis.Config {
|
|||
}
|
||||
|
||||
func (u *configServiceImpl) GetConfig(ctx context.Context, project, name string) (*apis.Config, error) {
|
||||
ns := types.DefaultKubeVelaNS
|
||||
if project != "" {
|
||||
ns := GlobalConfigNamespace
|
||||
if !isGlobal(project) {
|
||||
pro, err := u.ProjectService.GetProject(ctx, project)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -335,21 +346,25 @@ func (u *configServiceImpl) GetConfig(ctx context.Context, project, name string)
|
|||
|
||||
it, err := u.Factory.GetConfig(ctx, ns, name, true)
|
||||
if err != nil {
|
||||
if errors.Is(err, config.ErrSensitiveConfig) {
|
||||
switch {
|
||||
case errors.Is(err, config.ErrSensitiveConfig):
|
||||
return nil, bcode.ErrSensitiveConfig
|
||||
}
|
||||
if errors.Is(err, config.ErrConfigNotFound) {
|
||||
case errors.Is(err, config.ErrConfigNotFound):
|
||||
if !isGlobal(project) {
|
||||
// Try to get global config if the config is not found in the project scope.
|
||||
return u.GetConfig(ctx, NoProject, name)
|
||||
}
|
||||
return nil, bcode.ErrConfigNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return convertConfig(project, *it), nil
|
||||
}
|
||||
|
||||
func (u *configServiceImpl) DeleteConfig(ctx context.Context, project, name string) error {
|
||||
ns := types.DefaultKubeVelaNS
|
||||
if project != "" {
|
||||
ns := GlobalConfigNamespace
|
||||
if !isGlobal(project) {
|
||||
pro, err := u.ProjectService.GetProject(ctx, project)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -101,6 +101,69 @@ template: {
|
|||
}
|
||||
}
|
||||
`
|
||||
var (
|
||||
helmTemplateName = "helm-repository"
|
||||
helmTemplate = `
|
||||
import (
|
||||
"vela/config"
|
||||
)
|
||||
|
||||
metadata: {
|
||||
name: "helm-repository"
|
||||
alias: "Helm Repository"
|
||||
description: "Config information to authenticate helm chart repository"
|
||||
sensitive: false
|
||||
scope: "project"
|
||||
}
|
||||
|
||||
template: {
|
||||
output: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
name: context.name
|
||||
namespace: context.namespace
|
||||
labels: {
|
||||
"config.oam.dev/catalog": "velacore-config"
|
||||
"config.oam.dev/type": "helm-repository"
|
||||
"config.oam.dev/multi-cluster": "true"
|
||||
"config.oam.dev/sub-type": "helm"
|
||||
}
|
||||
}
|
||||
type: "Opaque"
|
||||
stringData: {
|
||||
url: parameter.url
|
||||
if parameter.username != _|_ {
|
||||
username: parameter.username
|
||||
}
|
||||
if parameter.password != _|_ {
|
||||
password: parameter.password
|
||||
}
|
||||
|
||||
}
|
||||
data: {
|
||||
if parameter.caFile != _|_ {
|
||||
caFile: parameter.caFile
|
||||
}
|
||||
}
|
||||
}
|
||||
// skip the validation here for config.#HelmRepository requires the repository actually exists which can be flaky in unit test
|
||||
//validation: config.#HelmRepository & {
|
||||
// $params: parameter
|
||||
//}
|
||||
|
||||
parameter: {
|
||||
// +usage=The public url of the helm chart repository.
|
||||
url: string
|
||||
// +usage=The username of basic auth repo.
|
||||
username?: string
|
||||
// +usage=The password of basic auth repo.
|
||||
password?: string
|
||||
// +usage=The ca certificate of helm repository. Please encode this data with base64.
|
||||
caFile?: string
|
||||
}
|
||||
}`
|
||||
)
|
||||
|
||||
var _ = Describe("Test config service", func() {
|
||||
var factory config.Factory
|
||||
|
@ -180,9 +243,42 @@ var _ = Describe("Test config service", func() {
|
|||
Expect(len(list)).To(Equal(0))
|
||||
})
|
||||
|
||||
It("Test detail a config", func() {
|
||||
_, err := configService.GetConfig(context.TODO(), "", "alibaba-test")
|
||||
Expect(err).To(Equal(bcode.ErrSensitiveConfig))
|
||||
Context("Test get config", func() {
|
||||
It("Simple get", func() {
|
||||
_, err := configService.GetConfig(context.TODO(), "", "alibaba-test")
|
||||
Expect(err).To(Equal(bcode.ErrSensitiveConfig))
|
||||
})
|
||||
|
||||
It("Get config in project and fall back to get global config", func() {
|
||||
By("apply helm template")
|
||||
tem, err := factory.ParseTemplate(helmTemplateName, []byte(helmTemplate))
|
||||
Expect(err).To(BeNil())
|
||||
Expect(factory.CreateOrUpdateConfigTemplate(context.Background(), types.DefaultKubeVelaNS, tem)).To(BeNil())
|
||||
|
||||
By("create a project")
|
||||
_, err = projectService.CreateProject(context.TODO(), v1.CreateProjectRequest{Name: "some-project"})
|
||||
Expect(err).To(BeNil())
|
||||
defer func() {
|
||||
Expect(projectService.DeleteProject(context.Background(), "some-project")).To(BeNil())
|
||||
}()
|
||||
By("create a common global config")
|
||||
_, err = configService.CreateConfig(context.TODO(), NoProject, v1.CreateConfigRequest{
|
||||
Name: "helm-test",
|
||||
Template: v1.NamespacedName{
|
||||
Name: helmTemplateName,
|
||||
},
|
||||
Properties: `{"username":"test","password":"test","url":"https://helm.kubevela.com/charts"}`,
|
||||
})
|
||||
Expect(err).To(BeNil())
|
||||
defer func() {
|
||||
Expect(configService.DeleteConfig(context.Background(), NoProject, "helm-test")).To(BeNil())
|
||||
}()
|
||||
By("try to get the config in project, should success")
|
||||
config, err := configService.GetConfig(context.TODO(), "some-project", "helm-test")
|
||||
Expect(err).To(BeNil())
|
||||
Expect(config.Name).To(Equal("helm-test"))
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
It("Test delete a config", func() {
|
||||
|
|
|
@ -175,10 +175,10 @@ func (d defaultHelmImpl) ListChartRepo(ctx context.Context, projectName string)
|
|||
url, ok := item.Properties["url"].(string)
|
||||
if ok {
|
||||
res = append(res, &v1.ChartRepoResponse{URL: url, SecretName: item.Name})
|
||||
continue
|
||||
}
|
||||
}
|
||||
// Compatible with historical data
|
||||
if url, ok := item.Secret.Data["url"]; ok {
|
||||
} else if url, ok := item.Secret.Data["url"]; ok {
|
||||
// Compatible with historical data
|
||||
res = append(res, &v1.ChartRepoResponse{URL: string(url), SecretName: item.Name})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -696,7 +696,7 @@ func getResourceLogs(ctx context.Context, config *rest.Config, cli client.Client
|
|||
|
||||
order := make([]string, 0)
|
||||
sort.Strings(order)
|
||||
logMap.Range(func(key, value any) bool {
|
||||
logMap.Range(func(key, value any) bool { //nolint:revive,unused
|
||||
order = append(order, key.(string))
|
||||
return true
|
||||
})
|
||||
|
|
|
@ -32,7 +32,7 @@ func guaranteePolicyExist(c []string, policy string) ([]string, bool) {
|
|||
return append(c, policy), true
|
||||
}
|
||||
|
||||
// guaranteePolicyNotExist check the slice whether caontain the target policy, if yes delete
|
||||
// guaranteePolicyNotExist check the slice whether contain the target policy, if yes delete
|
||||
// and tell invoker whether should update the policy
|
||||
func guaranteePolicyNotExist(c []string, policy string) ([]string, bool) {
|
||||
res := make([]string, len(c))
|
||||
|
|
|
@ -445,7 +445,7 @@ func (w *workflowServiceImpl) SyncWorkflowRecord(ctx context.Context, appPrimary
|
|||
record.Finished = "true"
|
||||
record.Status = model.RevisionStatusFail
|
||||
if err := w.Store.Put(ctx, record); err != nil {
|
||||
return fmt.Errorf(("failed to set the record status to terminated: %s"), err.Error())
|
||||
return fmt.Errorf("failed to set the record status to terminated: %s", err.Error())
|
||||
}
|
||||
return bcode.ErrApplicationRevisionNotExist
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ func (i *InfoCalculateCronJob) start(cronSpec string) {
|
|||
_, _ = c.AddFunc(cronSpec, func() {
|
||||
|
||||
// ExponentialBackoff retry this job
|
||||
err := retry.OnError(waitBackOff, func(err error) bool {
|
||||
err := retry.OnError(waitBackOff, func(err error) bool { //nolint:revive,unused
|
||||
// always retry
|
||||
return true
|
||||
}, func() error {
|
||||
|
|
|
@ -97,7 +97,14 @@ func (a *ApplicationSync) Start(ctx context.Context, errorChan chan error) {
|
|||
}
|
||||
app := item.(*v1beta1.Application)
|
||||
if err := cu.AddOrUpdate(ctx, app); err != nil {
|
||||
klog.Errorf("fail to add or update application %s: %s", app.Name, err.Error())
|
||||
failTimes := a.Queue.NumRequeues(app)
|
||||
klog.Errorf("fail to add or update application %s: %s, requeue times: %d", app.Name, err.Error(), failTimes)
|
||||
if failTimes < 5 {
|
||||
a.Queue.AddRateLimited(app)
|
||||
} else {
|
||||
klog.Errorf("fail to add or update application %s: %s, requeue times reach the limit(%d), give up", app.Name, err.Error(), failTimes)
|
||||
a.Queue.Forget(app)
|
||||
}
|
||||
}
|
||||
a.Queue.Done(app)
|
||||
}
|
||||
|
@ -115,7 +122,7 @@ func (a *ApplicationSync) Start(ctx context.Context, errorChan chan error) {
|
|||
AddFunc: func(obj interface{}) {
|
||||
addOrUpdateHandler(obj)
|
||||
},
|
||||
UpdateFunc: func(oldObj, obj interface{}) {
|
||||
UpdateFunc: func(oldObj, obj interface{}) { //nolint:revive,unused
|
||||
addOrUpdateHandler(obj)
|
||||
},
|
||||
DeleteFunc: func(obj interface{}) {
|
||||
|
|
|
@ -31,6 +31,7 @@ import (
|
|||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
mysqlgorm "gorm.io/driver/mysql"
|
||||
postgresorm "gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
|
@ -44,6 +45,7 @@ import (
|
|||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/kubeapi"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/mongodb"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/mysql"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/postgres"
|
||||
)
|
||||
|
||||
func initMysqlTestDs() (datastore.DataStore, error) {
|
||||
|
@ -67,6 +69,27 @@ func initMysqlTestDs() (datastore.DataStore, error) {
|
|||
return mysqlDriver, nil
|
||||
}
|
||||
|
||||
func initPostgresTestDs() (datastore.DataStore, error) {
|
||||
db, err := gorm.Open(postgresorm.Open("postgres://kubevela:Kubevela-123@127.0.0.1:5432/kubevela?sslmode=disable&client_encoding=UTF-8&connect_timeout=1"), &gorm.Config{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, v := range model.GetRegisterModels() {
|
||||
err := db.Migrator().DropTable(&v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
postgresDriver, err := postgres.New(context.TODO(), datastore.Config{
|
||||
URL: "postgres://kubevela:Kubevela-123@127.0.0.1:5432/kubevela?sslmode=disable&client_encoding=UTF-8&connect_timeout=1",
|
||||
Database: "kubevela",
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return postgresDriver, nil
|
||||
}
|
||||
|
||||
func initKubeapiTestDs() (datastore.DataStore, error) {
|
||||
var testScheme = runtime.NewScheme()
|
||||
testEnv := &envtest.Environment{
|
||||
|
@ -151,6 +174,7 @@ var _ = Describe("Test datastore methods", func() {
|
|||
DriverTest(initMysqlTestDs)
|
||||
DriverTest(initMongodbTestDs)
|
||||
DriverTest(initKubeapiTestDs)
|
||||
DriverTest(initPostgresTestDs)
|
||||
})
|
||||
|
||||
func DriverTest(initTestDs func() (datastore.DataStore, error)) {
|
||||
|
|
|
@ -18,25 +18,19 @@ package mysql
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
mysqlgorm "gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
"gorm.io/gorm/logger"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"github.com/kubevela/velaux/pkg/server/domain/model"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/sql"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/sqlnamer"
|
||||
)
|
||||
|
||||
type mysql struct {
|
||||
client gorm.DB
|
||||
database string
|
||||
sql.Driver
|
||||
}
|
||||
|
||||
// New new mysql datastore instance
|
||||
|
@ -44,6 +38,7 @@ func New(ctx context.Context, cfg datastore.Config) (datastore.DataStore, error)
|
|||
db, err := gorm.Open(mysqlgorm.Open(cfg.URL), &gorm.Config{
|
||||
NamingStrategy: sqlnamer.SQLNamer{},
|
||||
Logger: logger.Default.LogMode(logger.Silent),
|
||||
TranslateError: true,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -56,262 +51,9 @@ func New(ctx context.Context, cfg datastore.Config) (datastore.DataStore, error)
|
|||
}
|
||||
|
||||
m := &mysql{
|
||||
client: *db.WithContext(ctx),
|
||||
database: cfg.Database,
|
||||
Driver: sql.Driver{
|
||||
Client: *db.WithContext(ctx),
|
||||
},
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Add add data model
|
||||
func (m *mysql) Add(ctx context.Context, entity datastore.Entity) error {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return datastore.ErrTableNameEmpty
|
||||
}
|
||||
entity.SetCreateTime(time.Now())
|
||||
entity.SetUpdateTime(time.Now())
|
||||
|
||||
if dbAdd := m.client.WithContext(ctx).Create(entity); dbAdd.Error != nil {
|
||||
if match := errors.Is(dbAdd.Error, gorm.ErrDuplicatedKey); match {
|
||||
return datastore.ErrRecordExist
|
||||
}
|
||||
return datastore.NewDBError(dbAdd.Error)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// BatchAdd batch add entity, this operation has some atomicity.
|
||||
func (m *mysql) BatchAdd(ctx context.Context, entities []datastore.Entity) error {
|
||||
notRollback := make(map[string]bool)
|
||||
for i, saveEntity := range entities {
|
||||
if err := m.Add(ctx, saveEntity); err != nil {
|
||||
if errors.Is(err, datastore.ErrRecordExist) {
|
||||
notRollback[saveEntity.PrimaryKey()] = true
|
||||
}
|
||||
for _, deleteEntity := range entities[:i] {
|
||||
if _, exit := notRollback[deleteEntity.PrimaryKey()]; !exit {
|
||||
if err := m.Delete(ctx, deleteEntity); err != nil {
|
||||
if !errors.Is(err, datastore.ErrRecordNotExist) {
|
||||
klog.Errorf("rollback delete entity failure %w", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return datastore.NewDBError(fmt.Errorf("save entities occur error, %w", err))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get get data model
|
||||
func (m *mysql) Get(ctx context.Context, entity datastore.Entity) error {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return datastore.ErrTableNameEmpty
|
||||
}
|
||||
|
||||
if dbGet := m.client.WithContext(ctx).First(entity); dbGet.Error != nil {
|
||||
if errors.Is(dbGet.Error, gorm.ErrRecordNotFound) {
|
||||
return datastore.ErrRecordNotExist
|
||||
}
|
||||
return datastore.NewDBError(dbGet.Error)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Put update data model
|
||||
func (m *mysql) Put(ctx context.Context, entity datastore.Entity) error {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return datastore.ErrTableNameEmpty
|
||||
}
|
||||
entity.SetUpdateTime(time.Now())
|
||||
if dbPut := m.client.WithContext(ctx).Model(entity).Updates(entity); dbPut.Error != nil {
|
||||
if errors.Is(dbPut.Error, gorm.ErrRecordNotFound) {
|
||||
return datastore.ErrRecordNotExist
|
||||
}
|
||||
return datastore.NewDBError(dbPut.Error)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsExist determine whether data exists.
|
||||
func (m *mysql) IsExist(ctx context.Context, entity datastore.Entity) (bool, error) {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return false, datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return false, datastore.ErrTableNameEmpty
|
||||
}
|
||||
|
||||
if dbExist := m.client.WithContext(ctx).First(entity); dbExist.Error != nil {
|
||||
if errors.Is(dbExist.Error, gorm.ErrRecordNotFound) {
|
||||
return false, nil
|
||||
}
|
||||
return false, datastore.NewDBError(dbExist.Error)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Delete delete data
|
||||
func (m *mysql) Delete(ctx context.Context, entity datastore.Entity) error {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return datastore.ErrTableNameEmpty
|
||||
}
|
||||
// check entity is exist
|
||||
if err := m.Get(ctx, entity); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if dbDelete := m.client.WithContext(ctx).Model(entity).Delete(entity); dbDelete.Error != nil {
|
||||
klog.Errorf("delete document failure %w", dbDelete.Error)
|
||||
return datastore.NewDBError(dbDelete.Error)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// _toColumnName converts keys of the models to lowercase as the column name are in lowercase in the database
|
||||
func _toColumnName(columnName string) string {
|
||||
return strings.ToLower(columnName)
|
||||
}
|
||||
|
||||
func _applyFilterOptions(clauses []clause.Expression, filterOptions datastore.FilterOptions) []clause.Expression {
|
||||
for _, queryOp := range filterOptions.Queries {
|
||||
clauses = append(clauses, clause.Like{
|
||||
Column: _toColumnName(queryOp.Key),
|
||||
Value: fmt.Sprintf("%%%s%%", queryOp.Query),
|
||||
})
|
||||
}
|
||||
for _, queryOp := range filterOptions.In {
|
||||
values := make([]interface{}, len(queryOp.Values))
|
||||
for i, v := range queryOp.Values {
|
||||
values[i] = v
|
||||
}
|
||||
clauses = append(clauses, clause.IN{
|
||||
Column: _toColumnName(queryOp.Key),
|
||||
Values: values,
|
||||
})
|
||||
}
|
||||
for _, queryOp := range filterOptions.IsNotExist {
|
||||
clauses = append(clauses, clause.Eq{
|
||||
Column: _toColumnName(queryOp.Key),
|
||||
Value: "",
|
||||
})
|
||||
}
|
||||
return clauses
|
||||
}
|
||||
|
||||
// List list entity function
|
||||
func (m *mysql) List(ctx context.Context, entity datastore.Entity, op *datastore.ListOptions) ([]datastore.Entity, error) {
|
||||
if entity.TableName() == "" {
|
||||
return nil, datastore.ErrTableNameEmpty
|
||||
}
|
||||
var (
|
||||
clauses []clause.Expression
|
||||
exprs []clause.Expression
|
||||
limit int
|
||||
offset int
|
||||
)
|
||||
if op != nil && op.PageSize > 0 && op.Page > 0 {
|
||||
limit = op.PageSize
|
||||
offset = op.PageSize * (op.Page - 1)
|
||||
clauses = append(clauses, clause.Limit{
|
||||
Limit: &limit,
|
||||
Offset: offset,
|
||||
})
|
||||
}
|
||||
for k, v := range entity.Index() {
|
||||
exprs = append(exprs, clause.Eq{
|
||||
Column: strings.ToLower(k),
|
||||
Value: v,
|
||||
})
|
||||
}
|
||||
if op != nil {
|
||||
exprs = _applyFilterOptions(exprs, op.FilterOptions)
|
||||
}
|
||||
if len(exprs) > 0 {
|
||||
clauses = append(clauses, clause.Where{
|
||||
Exprs: exprs,
|
||||
})
|
||||
}
|
||||
if op != nil && op.SortBy != nil {
|
||||
var sortOption []clause.OrderByColumn
|
||||
for _, v := range op.SortBy {
|
||||
sortOption = append(sortOption, clause.OrderByColumn{
|
||||
Column: clause.Column{
|
||||
Name: strings.ToLower(v.Key),
|
||||
},
|
||||
Desc: v.Order == datastore.SortOrderDescending,
|
||||
})
|
||||
}
|
||||
clauses = append(clauses, clause.OrderBy{
|
||||
Columns: sortOption,
|
||||
})
|
||||
}
|
||||
var list []datastore.Entity
|
||||
rows, err := m.client.WithContext(ctx).Model(entity).Clauses(clauses...).Rows()
|
||||
if err != nil {
|
||||
return nil, datastore.NewDBError(err)
|
||||
}
|
||||
defer func() {
|
||||
if err := rows.Close(); err != nil {
|
||||
klog.Warningf("close rows failure %s", err.Error())
|
||||
}
|
||||
}()
|
||||
for rows.Next() {
|
||||
item, err := datastore.NewEntity(entity)
|
||||
if err != nil {
|
||||
return nil, datastore.NewDBError(err)
|
||||
}
|
||||
err = m.client.WithContext(ctx).ScanRows(rows, &item)
|
||||
if err != nil {
|
||||
return nil, datastore.NewDBError(fmt.Errorf("row scan failure %w", err))
|
||||
}
|
||||
list = append(list, item)
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, datastore.NewDBError(err)
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
|
||||
// Count counts entities
|
||||
func (m *mysql) Count(ctx context.Context, entity datastore.Entity, filterOptions *datastore.FilterOptions) (int64, error) {
|
||||
if entity.TableName() == "" {
|
||||
return 0, datastore.ErrTableNameEmpty
|
||||
}
|
||||
var (
|
||||
count int64
|
||||
exprs []clause.Expression
|
||||
clauses []clause.Expression
|
||||
)
|
||||
for k, v := range entity.Index() {
|
||||
exprs = append(exprs, clause.Eq{
|
||||
Column: strings.ToLower(k),
|
||||
Value: v,
|
||||
})
|
||||
}
|
||||
if filterOptions != nil {
|
||||
exprs = _applyFilterOptions(exprs, *filterOptions)
|
||||
}
|
||||
if len(exprs) > 0 {
|
||||
clauses = append(clauses, clause.Where{
|
||||
Exprs: exprs,
|
||||
})
|
||||
}
|
||||
if dbCount := m.client.WithContext(ctx).Model(entity).Clauses(clauses...).Count(&count); dbCount.Error != nil {
|
||||
return 0, datastore.NewDBError(dbCount.Error)
|
||||
}
|
||||
return count, nil
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
postgresorm "gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/logger"
|
||||
|
||||
"github.com/kubevela/velaux/pkg/server/domain/model"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/sql"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/sqlnamer"
|
||||
)
|
||||
|
||||
type postgres struct {
|
||||
sql.Driver
|
||||
}
|
||||
|
||||
// New postgres datastore instance
|
||||
func New(ctx context.Context, cfg datastore.Config) (datastore.DataStore, error) {
|
||||
|
||||
db, err := gorm.Open(postgresorm.Open(cfg.URL), &gorm.Config{
|
||||
NamingStrategy: sqlnamer.SQLNamer{},
|
||||
DisableForeignKeyConstraintWhenMigrating: true,
|
||||
Logger: logger.Default.LogMode(logger.Error),
|
||||
TranslateError: true,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, v := range model.GetRegisterModels() {
|
||||
if err := db.WithContext(ctx).AutoMigrate(v); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
p := &postgres{
|
||||
Driver: sql.Driver{
|
||||
Client: *db.WithContext(ctx),
|
||||
},
|
||||
}
|
||||
return p, nil
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore"
|
||||
)
|
||||
|
||||
func TestPostgres(t *testing.T) {
|
||||
_, err := New(context.TODO(), datastore.Config{
|
||||
URL: "postgres://kubevela:Kubevela-123@127.0.0.1:5432/kubevela?sslmode=disable&client_encoding=UTF-8&connect_timeout=1",
|
||||
Database: "kubevela",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Postgres Suite")
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package postgres
|
||||
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import (
|
||||
"context"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
postgresgorm "gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/kubevela/velaux/pkg/server/domain/model"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore"
|
||||
)
|
||||
|
||||
var postgresDriver datastore.DataStore
|
||||
var _ = BeforeSuite(func(ctx SpecContext) {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
By("bootstrapping postgres test environment")
|
||||
db, err := gorm.Open(postgresgorm.Open("postgres://kubevela:Kubevela-123@127.0.0.1:5432/kubevela?sslmode=disable&client_encoding=UTF-8&connect_timeout=1"), &gorm.Config{})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
for _, v := range model.GetRegisterModels() {
|
||||
err := db.Migrator().DropTable(&v)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
}
|
||||
postgresDriver, err = New(context.TODO(), datastore.Config{
|
||||
URL: "postgres://kubevela:Kubevela-123@127.0.0.1:5432/kubevela?sslmode=disable&client_encoding=UTF-8&connect_timeout=1",
|
||||
Database: "kubevela",
|
||||
})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(postgresDriver).ToNot(BeNil())
|
||||
By("create postgres driver success")
|
||||
}, NodeTimeout(2*time.Minute))
|
|
@ -0,0 +1,290 @@
|
|||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package sql
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore"
|
||||
)
|
||||
|
||||
// Driver is a unified implementation of SQL driver of datastore
|
||||
type Driver struct {
|
||||
Client gorm.DB
|
||||
}
|
||||
|
||||
// Add data model
|
||||
func (m *Driver) Add(ctx context.Context, entity datastore.Entity) error {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return datastore.ErrTableNameEmpty
|
||||
}
|
||||
entity.SetCreateTime(time.Now())
|
||||
entity.SetUpdateTime(time.Now())
|
||||
|
||||
if dbAdd := m.Client.WithContext(ctx).Create(entity); dbAdd.Error != nil {
|
||||
if match := errors.Is(dbAdd.Error, gorm.ErrDuplicatedKey); match {
|
||||
return datastore.ErrRecordExist
|
||||
}
|
||||
return datastore.NewDBError(dbAdd.Error)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// BatchAdd batch add entity, this operation has some atomicity.
|
||||
func (m *Driver) BatchAdd(ctx context.Context, entities []datastore.Entity) error {
|
||||
notRollback := make(map[string]bool)
|
||||
for i, saveEntity := range entities {
|
||||
if err := m.Add(ctx, saveEntity); err != nil {
|
||||
if errors.Is(err, datastore.ErrRecordExist) {
|
||||
notRollback[saveEntity.PrimaryKey()] = true
|
||||
}
|
||||
for _, deleteEntity := range entities[:i] {
|
||||
if _, exit := notRollback[deleteEntity.PrimaryKey()]; !exit {
|
||||
if err := m.Delete(ctx, deleteEntity); err != nil {
|
||||
if !errors.Is(err, datastore.ErrRecordNotExist) {
|
||||
klog.Errorf("rollback delete entity failure %w", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return datastore.NewDBError(fmt.Errorf("save entities occur error, %w", err))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get get data model
|
||||
func (m *Driver) Get(ctx context.Context, entity datastore.Entity) error {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return datastore.ErrTableNameEmpty
|
||||
}
|
||||
|
||||
if dbGet := m.Client.WithContext(ctx).First(entity); dbGet.Error != nil {
|
||||
if errors.Is(dbGet.Error, gorm.ErrRecordNotFound) {
|
||||
return datastore.ErrRecordNotExist
|
||||
}
|
||||
return datastore.NewDBError(dbGet.Error)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Put update data model
|
||||
func (m *Driver) Put(ctx context.Context, entity datastore.Entity) error {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return datastore.ErrTableNameEmpty
|
||||
}
|
||||
entity.SetUpdateTime(time.Now())
|
||||
if dbPut := m.Client.WithContext(ctx).Model(entity).Updates(entity); dbPut.Error != nil {
|
||||
if errors.Is(dbPut.Error, gorm.ErrRecordNotFound) {
|
||||
return datastore.ErrRecordNotExist
|
||||
}
|
||||
return datastore.NewDBError(dbPut.Error)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsExist determine whether data exists.
|
||||
func (m *Driver) IsExist(ctx context.Context, entity datastore.Entity) (bool, error) {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return false, datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return false, datastore.ErrTableNameEmpty
|
||||
}
|
||||
|
||||
if dbExist := m.Client.WithContext(ctx).First(entity); dbExist.Error != nil {
|
||||
if errors.Is(dbExist.Error, gorm.ErrRecordNotFound) {
|
||||
return false, nil
|
||||
}
|
||||
return false, datastore.NewDBError(dbExist.Error)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Delete delete data
|
||||
func (m *Driver) Delete(ctx context.Context, entity datastore.Entity) error {
|
||||
if entity.PrimaryKey() == "" {
|
||||
return datastore.ErrPrimaryEmpty
|
||||
}
|
||||
if entity.TableName() == "" {
|
||||
return datastore.ErrTableNameEmpty
|
||||
}
|
||||
// check entity is existed
|
||||
if err := m.Get(ctx, entity); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if dbDelete := m.Client.WithContext(ctx).Model(entity).Delete(entity); dbDelete.Error != nil {
|
||||
klog.Errorf("delete document failure %w", dbDelete.Error)
|
||||
return datastore.NewDBError(dbDelete.Error)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// _toColumnName converts keys of the models to lowercase as the column name are in lowercase in the database
|
||||
func _toColumnName(columnName string) string {
|
||||
return strings.ToLower(columnName)
|
||||
}
|
||||
|
||||
func _applyFilterOptions(clauses []clause.Expression, filterOptions datastore.FilterOptions) []clause.Expression {
|
||||
for _, queryOp := range filterOptions.Queries {
|
||||
clauses = append(clauses, clause.Like{
|
||||
Column: _toColumnName(queryOp.Key),
|
||||
Value: fmt.Sprintf("%%%s%%", queryOp.Query),
|
||||
})
|
||||
}
|
||||
for _, queryOp := range filterOptions.In {
|
||||
values := make([]interface{}, len(queryOp.Values))
|
||||
for i, v := range queryOp.Values {
|
||||
values[i] = v
|
||||
}
|
||||
clauses = append(clauses, clause.IN{
|
||||
Column: _toColumnName(queryOp.Key),
|
||||
Values: values,
|
||||
})
|
||||
}
|
||||
for _, queryOp := range filterOptions.IsNotExist {
|
||||
clauses = append(clauses, clause.Eq{
|
||||
Column: _toColumnName(queryOp.Key),
|
||||
Value: "",
|
||||
})
|
||||
}
|
||||
return clauses
|
||||
}
|
||||
|
||||
// List list entity function
|
||||
func (m *Driver) List(ctx context.Context, entity datastore.Entity, op *datastore.ListOptions) ([]datastore.Entity, error) {
|
||||
if entity.TableName() == "" {
|
||||
return nil, datastore.ErrTableNameEmpty
|
||||
}
|
||||
var (
|
||||
clauses []clause.Expression
|
||||
exprs []clause.Expression
|
||||
limit int
|
||||
offset int
|
||||
)
|
||||
if op != nil && op.PageSize > 0 && op.Page > 0 {
|
||||
limit = op.PageSize
|
||||
offset = op.PageSize * (op.Page - 1)
|
||||
clauses = append(clauses, clause.Limit{
|
||||
Limit: &limit,
|
||||
Offset: offset,
|
||||
})
|
||||
}
|
||||
for k, v := range entity.Index() {
|
||||
exprs = append(exprs, clause.Eq{
|
||||
Column: strings.ToLower(k),
|
||||
Value: v,
|
||||
})
|
||||
}
|
||||
if op != nil {
|
||||
exprs = _applyFilterOptions(exprs, op.FilterOptions)
|
||||
}
|
||||
if len(exprs) > 0 {
|
||||
clauses = append(clauses, clause.Where{
|
||||
Exprs: exprs,
|
||||
})
|
||||
}
|
||||
if op != nil && op.SortBy != nil {
|
||||
var sortOption []clause.OrderByColumn
|
||||
for _, v := range op.SortBy {
|
||||
sortOption = append(sortOption, clause.OrderByColumn{
|
||||
Column: clause.Column{
|
||||
Name: strings.ToLower(v.Key),
|
||||
},
|
||||
Desc: v.Order == datastore.SortOrderDescending,
|
||||
})
|
||||
}
|
||||
clauses = append(clauses, clause.OrderBy{
|
||||
Columns: sortOption,
|
||||
})
|
||||
}
|
||||
var list []datastore.Entity
|
||||
rows, err := m.Client.WithContext(ctx).Model(entity).Clauses(clauses...).Rows()
|
||||
if err != nil {
|
||||
return nil, datastore.NewDBError(err)
|
||||
}
|
||||
defer func() {
|
||||
if err := rows.Close(); err != nil {
|
||||
klog.Warningf("close rows failure %s", err.Error())
|
||||
}
|
||||
}()
|
||||
for rows.Next() {
|
||||
item, err := datastore.NewEntity(entity)
|
||||
if err != nil {
|
||||
return nil, datastore.NewDBError(err)
|
||||
}
|
||||
err = m.Client.WithContext(ctx).ScanRows(rows, &item)
|
||||
if err != nil {
|
||||
return nil, datastore.NewDBError(fmt.Errorf("row scan failure %w", err))
|
||||
}
|
||||
list = append(list, item)
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, datastore.NewDBError(err)
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
|
||||
// Count counts entities
|
||||
func (m *Driver) Count(ctx context.Context, entity datastore.Entity, filterOptions *datastore.FilterOptions) (int64, error) {
|
||||
if entity.TableName() == "" {
|
||||
return 0, datastore.ErrTableNameEmpty
|
||||
}
|
||||
var (
|
||||
count int64
|
||||
exprs []clause.Expression
|
||||
clauses []clause.Expression
|
||||
)
|
||||
for k, v := range entity.Index() {
|
||||
exprs = append(exprs, clause.Eq{
|
||||
Column: strings.ToLower(k),
|
||||
Value: v,
|
||||
})
|
||||
}
|
||||
if filterOptions != nil {
|
||||
exprs = _applyFilterOptions(exprs, *filterOptions)
|
||||
}
|
||||
if len(exprs) > 0 {
|
||||
clauses = append(clauses, clause.Where{
|
||||
Exprs: exprs,
|
||||
})
|
||||
}
|
||||
if dbCount := m.Client.WithContext(ctx).Model(entity).Clauses(clauses...).Count(&count); dbCount.Error != nil {
|
||||
return 0, datastore.NewDBError(dbCount.Error)
|
||||
}
|
||||
return count, nil
|
||||
}
|
|
@ -466,7 +466,7 @@ func (c *application) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.QueryParameter("page", "query the page number").DataType("integer")).
|
||||
Param(ws.QueryParameter("pageSize", "query the page size number").DataType("integer")).
|
||||
Returns(200, "OK", apis.ListWorkflowRecordsResponse{}).
|
||||
Writes(apis.ListWorkflowRecordsResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.ListWorkflowRecordsResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.GET("/{appName}/workflows").To(c.WorkflowAPI.listApplicationWorkflows).
|
||||
Doc("list application workflow").
|
||||
|
@ -475,7 +475,7 @@ func (c *application) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.PathParameter("appName", "identifier of the application.").DataType("string").Required(true)).
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Returns(200, "OK", apis.ListWorkflowResponse{}).
|
||||
Writes(apis.ListWorkflowResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.ListWorkflowResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.POST("/{appName}/workflows").To(c.WorkflowAPI.createOrUpdateApplicationWorkflow).
|
||||
Doc("create application workflow").
|
||||
|
@ -486,7 +486,7 @@ func (c *application) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.PathParameter("appName", "identifier of the application.").DataType("string").Required(true)).
|
||||
Returns(200, "create success", apis.DetailWorkflowResponse{}).
|
||||
Returns(400, "create failure", bcode.Bcode{}).
|
||||
Writes(apis.DetailWorkflowResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailWorkflowResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.GET("/{appName}/workflows/{workflowName}").To(c.WorkflowAPI.detailWorkflow).
|
||||
Doc("detail application workflow").
|
||||
|
@ -494,11 +494,11 @@ func (c *application) GetWebServiceRoute() *restful.WebService {
|
|||
Filter(c.appCheckFilter).
|
||||
Filter(c.WorkflowAPI.workflowCheckFilter).
|
||||
Param(ws.PathParameter("appName", "identifier of the application.").DataType("string").Required(true)).
|
||||
Param(ws.PathParameter("workflowName", "identifier of the workfloc.").DataType("string")).
|
||||
Param(ws.PathParameter("workflowName", "identifier of the workflow.").DataType("string")).
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(c.WorkflowAPI.workflowCheckFilter).
|
||||
Returns(200, "create success", apis.DetailWorkflowResponse{}).
|
||||
Writes(apis.DetailWorkflowResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailWorkflowResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.PUT("/{appName}/workflows/{workflowName}").To(c.WorkflowAPI.updateWorkflow).
|
||||
Doc("update application workflow config").
|
||||
|
@ -510,17 +510,16 @@ func (c *application) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.PathParameter("workflowName", "identifier of the workflow").DataType("string")).
|
||||
Reads(apis.UpdateWorkflowRequest{}).
|
||||
Returns(200, "OK", apis.DetailWorkflowResponse{}).
|
||||
Writes(apis.DetailWorkflowResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailWorkflowResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.DELETE("/{appName}/workflows/{workflowName}").To(c.WorkflowAPI.deleteWorkflow).
|
||||
Doc("deletet workflow").
|
||||
Doc("delete workflow").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(c.RbacService.CheckPerm("application/workflow", "delete")).
|
||||
Filter(c.appCheckFilter).
|
||||
Filter(c.WorkflowAPI.workflowCheckFilter).
|
||||
Param(ws.PathParameter("appName", "identifier of the application.").DataType("string").Required(true)).
|
||||
Param(ws.PathParameter("workflowName", "identifier of the workflow").DataType("string")).
|
||||
Returns(200, "OK", apis.EmptyResponse{}).
|
||||
Writes(apis.EmptyResponse{}).Do(returns200, returns500))
|
||||
|
||||
ws.Route(ws.GET("/{appName}/workflows/{workflowName}/records").To(c.WorkflowAPI.listWorkflowRecords).
|
||||
|
@ -534,7 +533,7 @@ func (c *application) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.QueryParameter("page", "query the page number").DataType("integer")).
|
||||
Param(ws.QueryParameter("pageSize", "query the page size number").DataType("integer")).
|
||||
Returns(200, "OK", apis.ListWorkflowRecordsResponse{}).
|
||||
Writes(apis.ListWorkflowRecordsResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.ListWorkflowRecordsResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.GET("/{appName}/workflows/{workflowName}/records/{record}").To(c.WorkflowAPI.detailWorkflowRecord).
|
||||
Doc("query application workflow execution record detail").
|
||||
|
@ -546,7 +545,7 @@ func (c *application) GetWebServiceRoute() *restful.WebService {
|
|||
Filter(c.appCheckFilter).
|
||||
Filter(c.WorkflowAPI.workflowCheckFilter).
|
||||
Returns(200, "OK", apis.DetailWorkflowRecordResponse{}).
|
||||
Writes(apis.DetailWorkflowRecordResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailWorkflowRecordResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.GET("/{appName}/workflows/{workflowName}/records/{record}/resume").To(c.WorkflowAPI.resumeWorkflowRecord).
|
||||
Doc("resume suspend workflow record").
|
||||
|
@ -684,16 +683,19 @@ func (c *application) createApplication(req *restful.Request, res *restful.Respo
|
|||
// Verify the validity of parameters
|
||||
var createReq apis.CreateApplicationRequest
|
||||
if err := req.ReadEntity(&createReq); err != nil {
|
||||
klog.Info("param err ", err)
|
||||
bcode.ReturnError(req, res, err)
|
||||
return
|
||||
}
|
||||
if err := validate.Struct(&createReq); err != nil {
|
||||
klog.Info("validate struct err ", err)
|
||||
bcode.ReturnError(req, res, err)
|
||||
return
|
||||
}
|
||||
// Call the domain layer code
|
||||
appBase, err := c.ApplicationService.CreateApplication(req.Request.Context(), createReq)
|
||||
if err != nil {
|
||||
klog.Info("Failure: ", err.Error())
|
||||
klog.Errorf("create application failure %s", err.Error())
|
||||
bcode.ReturnError(req, res, err)
|
||||
return
|
||||
|
|
|
@ -59,13 +59,12 @@ func (c *CloudShell) GetWebServiceRoute() *restful.WebService {
|
|||
Filter(c.RbacService.CheckPerm("cloudshell", "create")).
|
||||
Returns(200, "OK", apis.CloudShellPrepareResponse{}).
|
||||
Returns(400, "Bad Request", bcode.Bcode{}).
|
||||
Writes(apis.CloudShellPrepareResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.CloudShellPrepareResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.DELETE("/").To(c.destroyCloudShell).
|
||||
Doc("destroy the user's cloud shell environment").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(c.RbacService.CheckPerm("cloudshell", "delete")).
|
||||
Returns(200, "OK", apis.EmptyResponse{}).
|
||||
Returns(400, "Bad Request", bcode.Bcode{}).
|
||||
Writes(apis.EmptyResponse{}).Do(returns200, returns500))
|
||||
|
||||
|
@ -128,7 +127,6 @@ func (c *CloudShellView) GetWebServiceRoute() *restful.WebService {
|
|||
Doc("prepare the user's cloud shell environment").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(c.RbacService.CheckPerm("cloudshell", "create")).
|
||||
Returns(200, "OK", apis.EmptyResponse{}).
|
||||
Returns(400, "Bad Request", bcode.Bcode{}).
|
||||
Writes(apis.EmptyResponse{}).Do(returns200, returns500))
|
||||
|
||||
|
@ -138,7 +136,6 @@ func (c *CloudShellView) GetWebServiceRoute() *restful.WebService {
|
|||
Operation("proxyPath").
|
||||
Param(ws.PathParameter("subpath", "subpath").DataType("string")).
|
||||
Filter(c.RbacService.CheckPerm("cloudshell", "create")).
|
||||
Returns(200, "OK", apis.EmptyResponse{}).
|
||||
Returns(400, "Bad Request", bcode.Bcode{}).
|
||||
Writes(apis.EmptyResponse{}).Do(returns200, returns500))
|
||||
|
||||
|
@ -164,7 +161,7 @@ func (c *CloudShellView) proxy(req *restful.Request, res *restful.Response) {
|
|||
proxy.Upgrader = &websocket.Upgrader{
|
||||
ReadBufferSize: 1024,
|
||||
WriteBufferSize: 1024,
|
||||
CheckOrigin: func(req *http.Request) bool {
|
||||
CheckOrigin: func(req *http.Request) bool { //nolint:revive,unused
|
||||
return true
|
||||
},
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ func (c *Cluster) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.QueryParameter("pageSize", "PageSize for paging").DataType("integer").DefaultValue("20")).
|
||||
Returns(200, "OK", apis.ListClusterResponse{}).
|
||||
Returns(400, "Bad Request", bcode.Bcode{}).
|
||||
Writes(apis.ListClusterResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.ListClusterResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.POST("/").To(c.createKubeCluster).
|
||||
Doc("create cluster").
|
||||
|
|
|
@ -54,7 +54,7 @@ func (d *definition) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.QueryParameter("ownerAddon", "query by which addon created the definition").DataType("string")).
|
||||
Param(ws.QueryParameter("scope", "query by the specified scope like WorkflowRun or Application").DataType("string")).
|
||||
Returns(200, "OK", apis.ListDefinitionResponse{}).
|
||||
Writes(apis.ListDefinitionResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.ListDefinitionResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.GET("/{definitionName}").To(d.detailDefinition).
|
||||
Doc("Detail a definition").
|
||||
|
@ -63,7 +63,7 @@ func (d *definition) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.QueryParameter("type", "query the definition type").DataType("string")).
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Returns(200, "create successfully", apis.DetailDefinitionResponse{}).
|
||||
Writes(apis.DetailDefinitionResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailDefinitionResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.PUT("/{definitionName}/uischema").To(d.updateUISchema).
|
||||
Doc("Update the UI schema for a definition").
|
||||
|
@ -72,7 +72,7 @@ func (d *definition) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.PathParameter("definitionName", "identifier of the definition").DataType("string").Required(true)).
|
||||
Reads(apis.UpdateUISchemaRequest{}).
|
||||
Returns(200, "update successfully", schema.UISchema{}).
|
||||
Writes(apis.DetailDefinitionResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailDefinitionResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.PUT("/{definitionName}/status").To(d.updateDefinitionStatus).
|
||||
Doc("Update the status for a definition").
|
||||
|
@ -81,7 +81,7 @@ func (d *definition) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.PathParameter("definitionName", "identifier of the definition").DataType("string").Required(true)).
|
||||
Reads(apis.UpdateDefinitionStatusRequest{}).
|
||||
Returns(200, "update successfully", schema.UISchema{}).
|
||||
Writes(apis.DetailDefinitionResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailDefinitionResponse{}).Do(returns500))
|
||||
|
||||
ws.Filter(authCheckFilter)
|
||||
return ws
|
||||
|
|
|
@ -61,13 +61,14 @@ func (p *Plugin) GetWebServiceRoute() *restful.WebService {
|
|||
Doc("List the enabled plugins").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Returns(200, "OK", apis.ListPluginResponse{}).
|
||||
Writes(apis.ListPluginResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.ListPluginResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.GET("/{pluginId}").To(p.detailPlugin).
|
||||
Doc("Detail an installed plugin").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Param(ws.PathParameter("pluginId", "identifier of the plugin.").DataType("string")).
|
||||
Returns(200, "OK", apis.PluginDTO{}).
|
||||
Writes(apis.PluginDTO{}).Do(returns200, returns500))
|
||||
Writes(apis.PluginDTO{}).Do(returns500))
|
||||
|
||||
ws.Filter(authCheckFilter)
|
||||
return ws
|
||||
|
@ -88,51 +89,57 @@ func (p *ManagePlugin) GetWebServiceRoute() *restful.WebService {
|
|||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(p.RBACService.CheckPerm("managePlugin", "list")).
|
||||
Returns(200, "OK", apis.ListPluginResponse{}).
|
||||
Writes(apis.ListManagedPluginResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.ListPluginResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.GET("/{pluginId}").To(p.detailPlugin).
|
||||
Doc("Detail an installed plugin").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(p.RBACService.CheckPerm("managePlugin", "detail")).
|
||||
Param(ws.PathParameter("pluginId", "identifier of the plugin.").DataType("string")).
|
||||
Returns(200, "OK", apis.ManagedPluginDTO{}).
|
||||
Writes(apis.PluginDTO{}).Do(returns200, returns500))
|
||||
Writes(apis.PluginDTO{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.POST("/{pluginId}/setting").To(p.pluginSetting).
|
||||
Doc("Set an installed plugin").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(p.RBACService.CheckPerm("managePlugin", "update")).
|
||||
Param(ws.PathParameter("pluginId", "identifier of the plugin.").DataType("string")).
|
||||
Returns(200, "OK", apis.ManagedPluginDTO{}).
|
||||
Writes(apis.PluginDTO{}).Do(returns200, returns500))
|
||||
Writes(apis.PluginDTO{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.POST("/{pluginId}/install").To(p.installPlugin).
|
||||
Doc("Install one specific plugin").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Reads(apis.InstallPluginRequest{}).
|
||||
Filter(p.RBACService.CheckPerm("managePlugin", "enable")).
|
||||
Param(ws.PathParameter("pluginId", "identifier of the plugin.").DataType("string")).
|
||||
Returns(200, "OK", apis.ManagedPluginDTO{}).
|
||||
Writes(apis.PluginDTO{}).Do(returns200, returns500))
|
||||
Writes(apis.PluginDTO{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.POST("/{pluginId}/uninstall").To(p.uninstallPlugin).
|
||||
Doc("Uninstall one specific plugin").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(p.RBACService.CheckPerm("managePlugin", "enable")).
|
||||
Returns(200, "OK", struct{}{}).
|
||||
Writes(apis.PluginDTO{}).Do(returns200, returns500))
|
||||
Param(ws.PathParameter("pluginId", "identifier of the plugin.").DataType("string")).
|
||||
Returns(200, "OK", apis.EmptyResponse{}).
|
||||
Writes(apis.PluginDTO{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.POST("/{pluginId}/enable").To(p.enablePlugin).
|
||||
Doc("Enable an installed plugin").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Reads(apis.PluginEnableRequest{}).
|
||||
Filter(p.RBACService.CheckPerm("managePlugin", "enable")).
|
||||
Param(ws.PathParameter("pluginId", "identifier of the plugin.").DataType("string")).
|
||||
Returns(200, "OK", apis.ManagedPluginDTO{}).
|
||||
Writes(apis.PluginDTO{}).Do(returns200, returns500))
|
||||
Writes(apis.PluginDTO{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.POST("/{pluginId}/disable").To(p.disablePlugin).
|
||||
Doc("Disable an installed plugin").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(p.RBACService.CheckPerm("managePlugin", "enable")).
|
||||
Param(ws.PathParameter("pluginId", "identifier of the plugin.").DataType("string")).
|
||||
Returns(200, "OK", apis.ManagedPluginDTO{}).
|
||||
Writes(apis.PluginDTO{}).Do(returns200, returns500))
|
||||
Writes(apis.PluginDTO{}).Do(returns500))
|
||||
|
||||
ws.Filter(authCheckFilter)
|
||||
return ws
|
||||
|
@ -205,6 +212,7 @@ func (p *ManagePlugin) uninstallPlugin(req *restful.Request, res *restful.Respon
|
|||
}
|
||||
|
||||
func (p *ManagePlugin) detailPlugin(req *restful.Request, res *restful.Response) {
|
||||
|
||||
plugin, err := p.PluginService.DetailInstalledPlugin(req.Request.Context(), req.PathParameter("pluginId"))
|
||||
if err != nil {
|
||||
bcode.ReturnError(req, res, err)
|
||||
|
|
|
@ -115,7 +115,7 @@ func (h repository) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.PathParameter("version", "version of the helm chart").DataType("string").Required(true)).
|
||||
Param(ws.QueryParameter("repoUrl", "helm repository url").DataType("string")).
|
||||
Param(ws.QueryParameter("secretName", "secret of the repo").DataType("string")).
|
||||
Returns(200, "OK", map[string]interface{}{}).
|
||||
Returns(200, "OK", v1.Properties{}).
|
||||
Returns(400, "Bad Request", bcode.Bcode{}).
|
||||
Writes(map[string]interface{}{}))
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ func (dt *Target) GetWebServiceRoute() *restful.WebService {
|
|||
Param(ws.QueryParameter("pageSize", "PageSize for paging").DataType("integer")).
|
||||
Param(ws.QueryParameter("project", "list targets by project name").DataType("string")).
|
||||
Returns(200, "OK", apis.ListTargetResponse{}).
|
||||
Writes(apis.ListTargetResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.ListTargetResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.POST("/").To(dt.createTarget).
|
||||
Doc("create Target").
|
||||
|
@ -73,7 +73,7 @@ func (dt *Target) GetWebServiceRoute() *restful.WebService {
|
|||
Filter(dt.RbacService.CheckPerm("target", "create")).
|
||||
Returns(200, "create success", apis.DetailTargetResponse{}).
|
||||
Returns(400, "create failure", bcode.Bcode{}).
|
||||
Writes(apis.DetailTargetResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailTargetResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.GET("/{targetName}").To(dt.detailTarget).
|
||||
Doc("detail Target").
|
||||
|
@ -82,7 +82,7 @@ func (dt *Target) GetWebServiceRoute() *restful.WebService {
|
|||
Filter(dt.targetCheckFilter).
|
||||
Filter(dt.RbacService.CheckPerm("target", "detail")).
|
||||
Returns(200, "create success", apis.DetailTargetResponse{}).
|
||||
Writes(apis.DetailTargetResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailTargetResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.PUT("/{targetName}").To(dt.updateTarget).
|
||||
Doc("update application Target config").
|
||||
|
@ -92,15 +92,14 @@ func (dt *Target) GetWebServiceRoute() *restful.WebService {
|
|||
Reads(apis.UpdateTargetRequest{}).
|
||||
Filter(dt.RbacService.CheckPerm("target", "update")).
|
||||
Returns(200, "OK", apis.DetailTargetResponse{}).
|
||||
Writes(apis.DetailTargetResponse{}).Do(returns200, returns500))
|
||||
Writes(apis.DetailTargetResponse{}).Do(returns500))
|
||||
|
||||
ws.Route(ws.DELETE("/{targetName}").To(dt.deleteTarget).
|
||||
Doc("deletet Target").
|
||||
Doc("delete Target").
|
||||
Metadata(restfulspec.KeyOpenAPITags, tags).
|
||||
Filter(dt.targetCheckFilter).
|
||||
Filter(dt.RbacService.CheckPerm("target", "delete")).
|
||||
Param(ws.PathParameter("targetName", "identifier of the Target").DataType("string")).
|
||||
Returns(200, "OK", apis.EmptyResponse{}).
|
||||
Writes(apis.EmptyResponse{}).Do(returns200, returns500))
|
||||
|
||||
ws.Filter(authCheckFilter)
|
||||
|
|
|
@ -55,6 +55,7 @@ import (
|
|||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/kubeapi"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/mongodb"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/mysql"
|
||||
"github.com/kubevela/velaux/pkg/server/infrastructure/datastore/postgres"
|
||||
"github.com/kubevela/velaux/pkg/server/interfaces/api"
|
||||
"github.com/kubevela/velaux/pkg/server/utils"
|
||||
"github.com/kubevela/velaux/pkg/server/utils/bcode"
|
||||
|
@ -147,6 +148,11 @@ func (s *restServer) buildIoCContainer() error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("create mysql datastore instance failure %w", err)
|
||||
}
|
||||
case "postgres":
|
||||
ds, err = postgres.New(context.Background(), s.cfg.Datastore)
|
||||
if err != nil {
|
||||
return fmt.Errorf("create postgres datastore instance failure %w", err)
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("not support datastore type %s", s.cfg.Datastore.Type)
|
||||
}
|
||||
|
@ -247,7 +253,9 @@ func (s *restServer) setupLeaderElection(errChan chan error) (*leaderelection.Le
|
|||
go event.StartEventWorker(ctx, errChan)
|
||||
},
|
||||
OnStoppedLeading: func() {
|
||||
errChan <- fmt.Errorf("leader lost %s", s.cfg.LeaderConfig.ID)
|
||||
if s.cfg.ExitOnLostLeader {
|
||||
errChan <- fmt.Errorf("leader lost %s", s.cfg.LeaderConfig.ID)
|
||||
}
|
||||
},
|
||||
OnNewLeader: func(identity string) {
|
||||
if identity == s.cfg.LeaderConfig.ID {
|
||||
|
|
|
@ -14541,9 +14541,9 @@ __metadata:
|
|||
linkType: hard
|
||||
|
||||
"get-func-name@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "get-func-name@npm:2.0.0"
|
||||
checksum: 8d82e69f3e7fab9e27c547945dfe5cc0c57fc0adf08ce135dddb01081d75684a03e7a0487466f478872b341d52ac763ae49e660d01ab83741f74932085f693c3
|
||||
version: 2.0.2
|
||||
resolution: "get-func-name@npm:2.0.2"
|
||||
checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
Loading…
Reference in New Issue