Compare commits

..

7 Commits
main ... v1.8.1

Author SHA1 Message Date
github-actions[bot] d3710a66ca
[Backport release-1.8] Fix: User can't be updated (#806)
* Fix: User can't be updated

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 5917812775)

* Fix: Remove the unuseful code

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 75a9ddaebc)

---------

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-28 11:58:11 +08:00
github-actions[bot] cedb5774bc
Fix: Check the permission before request the compare API (#805)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 778901f946)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-28 11:57:59 +08:00
github-actions[bot] 74695e5d4f
Fix: Show policy type when editing the policy (#804)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit c3d817f6dc)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-28 11:57:47 +08:00
github-actions[bot] 108069563d
[Backport release-1.8] Fix: Application Graph displays exception stack trace (#801)
* Application Graph displays exception stack trace

Signed-off-by: liyanfang <liyanfang@cmss.chinamobile.com>
(cherry picked from commit 95b182e59f)

* Fix: Application Graph displays exception stack trace

Signed-off-by: liyanfang <liyanfang@cmss.chinamobile.com>
(cherry picked from commit 67b0e38e8d)

---------

Co-authored-by: liyanfang <liyanfang@cmss.chinamobile.com>
2023-04-28 10:09:07 +08:00
github-actions[bot] b959214ca7
Fix: Modifying Memory Units (#794)
Signed-off-by: jiaxiaolei <584736476@qq.com>
(cherry picked from commit 3c1dd6b378)

Co-authored-by: jiaxiaolei <584736476@qq.com>
2023-04-27 10:09:46 +08:00
github-actions[bot] a61257617a
Fix: Remove the label confluct checking (#789)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit ed1eb1123e)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-24 17:28:07 +08:00
github-actions[bot] d342b28cd0
Fix: The sub length of the dex user more than 31 (#788)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 00e3717021)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-24 17:27:52 +08:00
402 changed files with 3690 additions and 28040 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -1 +1 @@
**/node_modules/
node_modules

View File

@ -39,7 +39,7 @@ module.exports = {
},
],
'no-duplicate-imports': 'off',
"import/no-duplicates": "warn",
'@typescript-eslint/no-duplicate-imports': 'warn',
'react/no-deprecated': 'off',
'react/no-unknown-property': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',

6
.github/CODEOWNERS vendored
View File

@ -1,7 +1,7 @@
# This file is a github code protect rule follow the codeowners https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#example-of-a-codeowners-file
* @barnettZQG @wonderflow @chivalryq
* @barnettZQG @wonderflow
pkg @barnettZQG @chivalryq @wangyikewxgm @yangsoon @FogDong
pkg @barnettZQG @yangsoon @FogDong
packages @barnettZQG @chivalryq
packages @barnettZQG

View File

@ -1,11 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

View File

@ -15,7 +15,7 @@ on:
env:
# Common versions
GO_VERSION: '1.22.0'
GO_VERSION: '1.19'
permissions:
contents: read
@ -23,13 +23,13 @@ permissions:
jobs:
detect-noop:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281
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-22.04
runs-on: ubuntu-20.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4
uses: docker/setup-buildx-action@v2
- name: Build linux/arm64 image
id: docker_build_2
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
uses: docker/build-push-action@v2
with:
context: ./
build-args: |

View File

@ -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-22.04
runs-on: ubuntu-20.04
if: github.event.pull_request.merged
steps:
- name: Checkout
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Open Backport PR
uses: zeebe-io/backport-action@v0.0.9
uses: zeebe-io/backport-action@v0.0.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}

View File

@ -1,4 +1,4 @@
name: Static Check
name: staticcheck
on:
push:
@ -12,43 +12,40 @@ on:
- release-*
env:
# Common versions
GO_VERSION: '1.22.0'
GO_VERSION: '1.19'
jobs:
detect-noop:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v5.3.1
uses: fkirc/skip-duplicate-actions@v3.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false
check:
runs-on: ubuntu-22.04
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'yarn'
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
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 set version berry
- run: yarn install
- run: yarn lint
name: Check Frontend Code Style
- run: yarn test
- run: make check-diff
name: Check Server Code Style
name: Check Server Code Style

View File

@ -24,18 +24,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"

View File

@ -11,11 +11,9 @@ on:
jobs:
check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: thehanimo/pr-title-checker@v1.4.2
- uses: thehanimo/pr-title-checker@v1.3.1
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"

View File

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
uses: actions/checkout@v2
- 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@v3
uses: github/codeql-action/upload-sarif@v1
if: always()
with:
sarif_file: 'trivy-results.sarif'
sarif_file: 'trivy-results.sarif'

View File

@ -10,18 +10,18 @@ permissions:
jobs:
bot:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: Checkout Actions
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
repository: "oam-dev/kubevela-github-actions"
path: ./actions
ref: v0.4.2
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: '16'
node-version: '14'
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@60a0d83039c74a4aee543508d2ffcb1c3799cdea
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
env:
VERSION: ${{ steps.command.outputs.command-arguments }}
with:
@ -72,70 +72,11 @@ jobs:
})
console.log("Added '" + label + "' label.")
- name: Checkout
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
fetch-depth: 0
- name: Open Backport PR
uses: zeebe-io/backport-action@v0.0.9
uses: zeebe-io/backport-action@a759fd2d7d3314c9bb57d97a0350a12e878d3c7a
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}
retest:
runs-on: ubuntu-22.04
if: github.event.issue.pull_request && contains(github.event.comment.body, '/retest')
permissions:
actions: write
contents: write
pull-requests: write
issues: write
steps:
- name: Retest the current pull request
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
env:
PULL_REQUEST_ID: ${{ github.event.issue.number }}
COMMENT_ID: ${{ github.event.comment.id }}
COMMENT_BODY: ${{ github.event.comment.body }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pull_request_id = process.env.PULL_REQUEST_ID
const comment_id = process.env.COMMENT_ID
const comment_body = process.env.COMMENT_BODY
console.log("retest pr: #" + pull_request_id + " comment: " + comment_body)
const {data: pr} = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pull_request_id,
})
console.log("pr: " + JSON.stringify(pr))
const action = comment_body.split(" ")[0]
let workflow_ids = comment_body.split(" ").slice(1).filter(line => line.length > 0).map(line => line + ".yml")
if (workflow_ids.length == 0) workflow_ids = ["staticcheck.yml", "server-test.yml", "arm64-build-test.yml"]
for (let i = 0; i < workflow_ids.length; i++) {
const workflow_id = workflow_ids[i]
const {data: runs} = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: workflow_id,
head_sha: pr.head.sha,
})
console.log("runs for " + workflow_id + ": ", JSON.stringify(runs))
runs.workflow_runs.forEach((workflow_run) => {
if (workflow_run.status === "in_progress") return
let handler = github.rest.actions.reRunWorkflow
if (action === "/retest-failed") handler = github.rest.actions.reRunWorkflowFailedJobs
handler({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: workflow_run.id
})
})
}
github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment_id,
content: "eyes",
});

View File

@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- uses: actions/checkout@v2
- name: Get the version
id: get_version
run: |
@ -25,18 +25,24 @@ jobs:
run: |
echo "git_revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Login to DockerHub
uses: docker/login-action@v3.2.0
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3.1.0
- uses: docker/setup-buildx-action@v3.4.0
- name: Login to Aliyun Container Registry (ACR)
uses: docker/login-action@v1
with:
registry: acr.kubevela.net
username: "${{ secrets.ACR_USERNAME }}"
password: "${{ secrets.ACR_PASSWORD }}"
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
with:
driver-opts: image=moby/buildkit:master
- name: Build docker image
id: acr_build
uses: docker/build-push-action@v6.3.0
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
@ -47,4 +53,5 @@ jobs:
VERSION=${{ steps.get_version.outputs.VERSION }}
GOPROXY=https://proxy.golang.org
tags: |-
acr.kubevela.net/oamdev/velaux:${{ steps.get_version.outputs.VERSION }}
oamdev/velaux:${{ steps.get_version.outputs.VERSION }}

View File

@ -15,7 +15,7 @@ on:
env:
# Common versions
GO_VERSION: '1.22.0'
GO_VERSION: '1.19'
permissions:
contents: read
@ -23,13 +23,13 @@ permissions:
jobs:
detect-noop:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281
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-22.04
runs-on: ubuntu-20.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v4
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@ -66,32 +66,18 @@ jobs:
sudo apt-get update
sudo apt-get install -y golang-ginkgo-dev
- name : Set up MySQL
uses: mirromutth/mysql-action@v1.1
with:
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@5a87bd81f88e2a8b195f8b7b656f5cda1350815a # 1.11.0
uses: supercharge/mongodb-github-action@d26215f71b2ce60420a2a3776a25893d11a65f85 # 1.9.0
with:
mongodb-version: '5.0'
# TODO need update action version to resolve node 12 deprecated.
- name: install Kubebuilder
uses: RyanSiu1995/kubebuilder-action@e7e4de1c1eaf1d089b9a186f7526239acadf0b40
uses: RyanSiu1995/kubebuilder-action@ff52bff1bae252239223476e5ab0d71d6ba02343
with:
version: 3.1.0
kubebuilderOnly: false
kubernetesVersion: v1.26.0
kubernetesVersion: v1.21.2
- name: Run api server unit test
run: make unit-test-server
@ -105,30 +91,30 @@ jobs:
name: codecov-umbrella
server-e2e-tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
needs: [ detect-noop ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.26"]
k8s-version: ["v1.20","v1.24"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
submodules: true
- name: Build docker image
id: docker_build
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
uses: docker/build-push-action@v2
with:
context: ./
build-args: |
@ -146,7 +132,7 @@ jobs:
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.26 ]]; then
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
@ -193,7 +179,7 @@ jobs:
make enable-addon
- name: Upload coverage report
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/e2e_apiserver_test.out
@ -201,4 +187,4 @@ jobs:
name: codecov-umbrella
- name: Clean e2e profile
run: rm /tmp/e2e_apiserver_test.out
run: rm /tmp/e2e_apiserver_test.out

3
.gitignore vendored
View File

@ -42,5 +42,4 @@ tsconfig.tsbuildinfo
e2e-plugins
npm-artifacts
bin
npm-artifacts

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
nodeLinker: pnp
yarnPath: .yarn/releases/yarn-3.6.0.cjs
yarnPath: .yarn/releases/yarn-3.5.0.cjs

View File

@ -1,7 +1,30 @@
include makefiles/const.mk
include makefiles/build.mk
GOLANGCILINT_VERSION ?= 1.49.0
all: docker-build
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
GLOBAL_GOLANGCILINT := $(shell which golangci-lint)
GOBIN_GOLANGCILINT:= $(shell which $(GOBIN)/golangci-lint)
TIME_LONG = `date +%Y-%m-%d' '%H:%M:%S`
TIME_SHORT = `date +%H:%M:%S`
TIME = $(TIME_SHORT)
BLUE := $(shell printf "\033[34m")
YELLOW := $(shell printf "\033[33m")
RED := $(shell printf "\033[31m")
GREEN := $(shell printf "\033[32m")
CNone := $(shell printf "\033[0m")
INFO = echo ${TIME} ${BLUE}[INFO]${CNone}
WARN = echo ${TIME} ${YELLOW}[WARN]${CNone}
ERR = echo ${TIME} ${RED}[FAIL]${CNone}
OK = echo ${TIME} ${GREEN}[ OK ]${CNone}
FAIL = (echo ${TIME} ${RED}[FAIL]${CNone} && false)
.PHONY: golangci
golangci:
@ -27,7 +50,7 @@ ifeq (, $(shell which staticcheck))
@{ \
set -e ;\
echo 'installing honnef.co/go/tools/cmd/staticcheck ' ;\
go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 ;\
go install honnef.co/go/tools/cmd/staticcheck@d7e217c1ff411395475b2971c0824e1e7cc1af98 ;\
}
STATICCHECK=$(GOBIN)/staticcheck
else
@ -51,9 +74,9 @@ e2e-setup-core: install-vela install-core install-addon
.PHONY: install-vela
install-vela:
curl -fsSl https://kubevela.io/script/install.sh | bash -s v1.9.0-alpha.3
curl -fsSl https://kubevela.io/script/install.sh | bash
install-core:
vela install -v v1.9.0-alpha.2 -y
vela install -y
install-addon:
vela addon enable fluxcd
vela addon enable vela-workflow --override-definitions
@ -81,16 +104,6 @@ e2e-server-test:
unit-test-server:
go test -gcflags=all=-l -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/...)
setup-test-server:
curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/$(shell go env GOOS)/$(shell go env GOARCH)
chmod +x kubebuilder
sudo mv kubebuilder /usr/local/bin/
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
${eval OUTPUT = $(shell ${GOBIN}/setup-envtest --bin-dir /tmp use)}
${eval BIN_PATH=$(lastword $(subst Path:, ,${OUTPUT}))}
sudo mkdir -p /usr/local/kubebuilder/bin
sudo mv ${BIN_PATH}/* /usr/local/kubebuilder/bin
build-swagger:
go run ./cmd/server/main.go build-swagger ./docs/apidoc/swagger.json

View File

@ -2,7 +2,6 @@ import (
"encoding/base64"
"encoding/json"
"strconv"
"vela/config"
)
metadata: {
@ -53,10 +52,6 @@ template: {
}
}
validation: config.#ImageRegistry & {
$params: parameter
}
parameter: {
// +usage=Image registry FQDN, such as: index.docker.io
registry: *"index.docker.io" | string

View File

@ -24,8 +24,6 @@ import (
"os/signal"
"syscall"
"github.com/kubevela/pkg/util/profiling"
restfulspec "github.com/emicklei/go-restful-openapi/v2"
"github.com/fatih/color"
"github.com/go-openapi/spec"
@ -35,6 +33,7 @@ import (
"github.com/kubevela/velaux/cmd/server/app/options"
"github.com/kubevela/velaux/pkg/server"
"github.com/oam-dev/kubevela/pkg/utils"
"github.com/oam-dev/kubevela/version"
)
@ -46,7 +45,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 { //nolint:revive,unused
RunE: func(cmd *cobra.Command, args []string) error {
if err := s.Validate(); err != nil {
return err
}
@ -64,7 +63,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 { //nolint:revive,unused
RunE: func(cmd *cobra.Command, args []string) error {
name := "docs/apidoc/latest-swagger.json"
if len(args) > 0 {
name = args[0]
@ -112,7 +111,9 @@ func Run(s *options.ServerRunOptions) error {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go profiling.StartProfilingServer(errChan)
if s.GenericServerRunOptions.PprofAddr != "" {
go utils.EnablePprof(s.GenericServerRunOptions.PprofAddr, errChan)
}
go func() {
if err := run(ctx, s, errChan); err != nil {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -78,12 +78,6 @@ make reviewable
### Test the code
For testing server kubebuilder and its dependency tools are required. To install them you can use:
```shell
make setup-test-server
```
Frontend:
```shell

View File

@ -1,7 +0,0 @@
name: bar
version: 1.0.0
description: Vela test addon named bar
icon: https://www.nar.com/icon
url: https://www.bar.com

View File

@ -1,5 +1,5 @@
name: mock-dep-addon
version: 1.0.0
version: v1.0.0
description: Vela test addon named mock-dep-addon
icon: https://www.test.com/icon
url: https://www.test.com

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,8 +7,8 @@ entries:
icon: https://www.test.com
name: mock-be-dep-addon
urls:
- http://127.0.0.1:9098/helm/mock-be-dep-addon-1.0.0.tgz
version: 1.0.0
- http://127.0.0.1:9098/helm/mock-be-dep-addon-v1.0.0.tgz
version: v1.0.0
foo:
- created: "2022-10-29T09:11:16.865230605Z"
description: Vela test addon named foo
@ -16,8 +16,8 @@ entries:
icon: https://www.foo.com
name: foo
urls:
- http://127.0.0.1:9098/helm/foo-1.0.0.tgz
version: 1.0.0
- http://127.0.0.1:9098/helm/foo-v1.0.0.tgz
version: v1.0.0
bar:
- created: "2022-10-29T09:11:16.865230605Z"
description: Vela test addon named bar
@ -25,14 +25,14 @@ entries:
icon: https://www.bar.com
name: foo
urls:
- http://127.0.0.1:9098/helm/bar-1.0.0.tgz
version: 1.0.0
- http://127.0.0.1:9098/helm/bar-v1.0.0.tgz
version: v1.0.0
- created: "2022-10-29T09:11:16.865230605Z"
description: Vela test addon named bar
home: https://www.bar.com/icon
icon: https://www.bar.com
name: foo
urls:
- http://127.0.0.1:9098/helm/bar-2.0.0.tgz
version: 2.0.0
- http://127.0.0.1:9098/helm/bar-v2.0.0.tgz
version: v2.0.0
generated: "2022-06-15T13:17:04.733573+08:00"

View File

@ -114,26 +114,44 @@ var helmHandler http.HandlerFunc = func(rw http.ResponseWriter, req *http.Reques
_, _ = rw.Write([]byte(err.Error()))
}
_, _ = rw.Write(file)
case strings.Contains(req.URL.Path, "foo-1.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/foo-1.0.0.tgz")
case strings.Contains(req.URL.Path, "fluxcd-test-version-1.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/fluxcd-test-version-1.0.0.tgz")
if err != nil {
_, _ = rw.Write([]byte(err.Error()))
}
_, _ = rw.Write(file)
case strings.Contains(req.URL.Path, "bar-1.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/bar-1.0.0.tgz")
case strings.Contains(req.URL.Path, "fluxcd-test-version-2.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/fluxcd-test-version-2.0.0.tgz")
if err != nil {
_, _ = rw.Write([]byte(err.Error()))
}
_, _ = rw.Write(file)
case strings.Contains(req.URL.Path, "bar-2.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/bar-2.0.0.tgz")
case strings.Contains(req.URL.Path, "vela-workflow-v0.3.5.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/vela-workflow-v0.3.5.tgz")
if err != nil {
_, _ = rw.Write([]byte(err.Error()))
}
_, _ = rw.Write(file)
case strings.Contains(req.URL.Path, "mock-be-dep-addon-1.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/mock-be-dep-addon-1.0.0.tgz")
case strings.Contains(req.URL.Path, "foo-v1.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/foo-v1.0.0.tgz")
if err != nil {
_, _ = rw.Write([]byte(err.Error()))
}
_, _ = rw.Write(file)
case strings.Contains(req.URL.Path, "bar-v1.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/bar-v1.0.0.tgz")
if err != nil {
_, _ = rw.Write([]byte(err.Error()))
}
_, _ = rw.Write(file)
case strings.Contains(req.URL.Path, "bar-v2.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/bar-v2.0.0.tgz")
if err != nil {
_, _ = rw.Write([]byte(err.Error()))
}
_, _ = rw.Write(file)
case strings.Contains(req.URL.Path, "mock-be-dep-addon-v1.0.0.tgz"):
file, err := os.ReadFile("./e2e-test/addon/testrepo/helm-repo/mock-be-dep-addon-v1.0.0.tgz")
if err != nil {
_, _ = rw.Write([]byte(err.Error()))
}

View File

@ -23,7 +23,7 @@ import (
"strings"
"time"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/oam-dev/kubevela/pkg/addon"
@ -229,7 +229,7 @@ var _ = Describe("Test addon rest api", func() {
var newaddonStatus apisv1.AddonStatusResponse
g.Expect(decodeResponseBody(status, &newaddonStatus)).Should(Succeed())
g.Expect(newaddonStatus.Name).Should(BeEquivalentTo("bar"))
g.Expect(newaddonStatus.InstalledVersion).Should(BeEquivalentTo("1.0.0"))
g.Expect(newaddonStatus.InstalledVersion).Should(BeEquivalentTo("v1.0.0"))
}, 30*time.Second, 300*time.Millisecond).Should(Succeed())
})
})
@ -248,7 +248,7 @@ var _ = Describe("Test addon rest api", func() {
var newaddonStatus apisv1.AddonStatusResponse
g.Expect(decodeResponseBody(status, &newaddonStatus)).Should(Succeed())
g.Expect(newaddonStatus.Name).Should(BeEquivalentTo("mock-dep-addon"))
g.Expect(newaddonStatus.InstalledVersion).Should(BeEquivalentTo("1.0.0"))
g.Expect(newaddonStatus.InstalledVersion).Should(BeEquivalentTo("v1.0.0"))
g.Expect(newaddonStatus.Phase).Should(BeEquivalentTo(apisv1.AddonPhaseEnabled))
}, 30*time.Second, 300*time.Millisecond).Should(Succeed())
})

View File

@ -22,7 +22,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"

View File

@ -22,7 +22,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/types"

View File

@ -22,7 +22,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/types"

View File

@ -21,7 +21,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/kubevela/workflow/api/v1alpha1"

View File

@ -21,7 +21,7 @@ import (
"os"
"time"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/kubevela/pkg/util/rand"

View File

@ -20,7 +20,7 @@ import (
"context"
"fmt"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/oam-dev/kubevela/apis/types"

View File

@ -20,7 +20,7 @@ import (
"context"
"fmt"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"

View File

@ -21,7 +21,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/oam-dev/kubevela/pkg/multicluster"

View File

@ -23,7 +23,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"sigs.k8s.io/controller-runtime/pkg/client"

View File

@ -24,7 +24,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/kubevela/workflow/api/v1alpha1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"

View File

@ -17,10 +17,8 @@ limitations under the License.
package e2e_test
import (
"fmt"
"cuelang.org/go/pkg/strings"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
@ -28,15 +26,10 @@ import (
"github.com/kubevela/velaux/pkg/server/utils/bcode"
)
func enablePlugin(id string) {
res := post(fmt.Sprintf("/manage/plugins/%s/enable", id), nil)
var dto apisv1.PluginDTO
Expect(decodeResponseBody(res, &dto)).Should(Succeed())
Expect(dto.ID).Should(Equal(id))
}
var _ = Describe("Test the plugin rest api", func() {
Context("Test manage plugin API. Request to /manage/plugins", func() {
Context("Test manage plugin API", func() {
By("Request to /manage/plugins")
It("Test list installed plugins", func() {
defer GinkgoRecover()
res := get("/manage/plugins")
@ -107,7 +100,9 @@ var _ = Describe("Test the plugin rest api", func() {
})
})
Context("Test plugin API. Request to /proxy/plugins", func() {
Context("Test plugin API", func() {
By("Request to /proxy/plugins")
It("Test to request the kube API", func() {
defer GinkgoRecover()
By("Before enable the plugin, request the plugin API should return 400")
@ -119,7 +114,11 @@ var _ = Describe("Test the plugin rest api", func() {
Expect(strings.Contains(err.Error(), "the plugin is not enabled")).Should(BeTrue())
By("After enable the plugin, request the plugin API should return 200")
enablePlugin("node-dashboard")
res = post("/manage/plugins/node-dashboard/enable", nil)
var dto apisv1.PluginDTO
Expect(decodeResponseBody(res, &dto)).Should(Succeed())
Expect(dto.ID).Should(Equal("node-dashboard"))
res = get(baseDomain + "/proxy/plugins/node-dashboard/api/v1/nodes")
Expect(decodeResponseBody(res, &nodeList)).Should(Succeed())
@ -127,7 +126,9 @@ var _ = Describe("Test the plugin rest api", func() {
})
})
Context("Test to request the plugin static files. Request to /public/plugins", func() {
Context("Test to request the plugin static files", func() {
By("Request to /public/plugins")
It("Test to get the module file", func() {
defer GinkgoRecover()
res := get(baseDomain + "/public/plugins/app-demo/module.js")

View File

@ -21,7 +21,7 @@ import (
"time"
"github.com/google/go-cmp/cmp"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
apisv1 "github.com/kubevela/velaux/pkg/server/interfaces/api/dto/v1"

View File

@ -19,7 +19,7 @@ package e2e_test
import (
"io"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

View File

@ -29,7 +29,7 @@ import (
"time"
"github.com/google/uuid"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
@ -147,7 +147,7 @@ var _ = BeforeSuite(func() {
err = json.NewDecoder(resp.Body).Decode(code)
Expect(err).Should(BeNil())
return fmt.Errorf("rest service not ready code:%d message:%s", resp.StatusCode, code.Message)
}).WithTimeout(time.Second * 60).WithPolling(time.Millisecond * 200).Should(Succeed())
}, time.Second*60, time.Millisecond*200).Should(Succeed())
var err error
k8sClient, err = clients.GetKubeClient()
Expect(err).ShouldNot(HaveOccurred())

View File

@ -17,7 +17,7 @@ limitations under the License.
package e2e_test
import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
apisv1 "github.com/kubevela/velaux/pkg/server/interfaces/api/dto/v1"

View File

@ -19,7 +19,7 @@ package e2e_test
import (
"fmt"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
apisv1 "github.com/kubevela/velaux/pkg/server/interfaces/api/dto/v1"

View File

@ -24,10 +24,10 @@ import (
types2 "github.com/oam-dev/kubevela/pkg/velaql/providers/query/types"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/pkg/errors"
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
@ -227,7 +227,7 @@ var _ = Describe("Test velaQL rest api", func() {
return nil
}, 3*time.Second).WithTimeout(time.Minute).Should(BeNil())
newWorkload := new(batchv1.CronJob)
newWorkload := new(batchv1beta1.CronJob)
Eventually(func() error {
return k8sClient.Get(context.Background(), client.ObjectKey{Name: component2Name, Namespace: namespace}, newWorkload)
}, 3*time.Second).WithTimeout(time.Minute).Should(BeNil())
@ -499,7 +499,7 @@ spec:
cue:
template: |
output: {
apiVersion: "batch/v1"
apiVersion: "batch/v1beta1"
kind: "CronJob"
metadata: name: context.name
spec: {

307
go.mod
View File

@ -1,155 +1,149 @@
module github.com/kubevela/velaux
go 1.22
go 1.19
require (
cuelang.org/go v0.5.0
cuelang.org/go v0.5.0-beta.5
github.com/AlecAivazis/survey/v2 v2.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/agiledragon/gomonkey/v2 v2.4.0
github.com/alibabacloud-go/cs-20151215/v3 v3.0.32 // indirect
github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.4 // indirect
github.com/alibabacloud-go/tea v1.1.20 // indirect
github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b // indirect
github.com/barnettZQG/inject v0.0.1
github.com/briandowns/spinner v1.23.0 // indirect
github.com/chartmuseum/helm-push v0.10.4 // indirect
github.com/cloudtty/cloudtty v0.5.0
github.com/containerd/containerd v1.7.2 // indirect
github.com/briandowns/spinner v1.11.1 // indirect
github.com/chartmuseum/helm-push v0.10.2 // indirect
github.com/cloudtty/cloudtty v0.2.0
github.com/containerd/containerd v1.6.18 // indirect
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/crossplane/crossplane-runtime v0.19.2 // indirect
github.com/crossplane/crossplane-runtime v0.16.1 // indirect
github.com/cue-exp/kubevelafix v0.0.0-20220922150317-aead819d979d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect
github.com/emicklei/go-restful-openapi/v2 v2.9.1
github.com/emicklei/go-restful/v3 v3.10.2
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/facebookgo/structtag v0.0.0-20150214074306-217e25fb9691 // indirect
github.com/fatih/color v1.15.0
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fluxcd/helm-controller/api v0.32.2 // indirect
github.com/fatih/color v1.13.0
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fluxcd/helm-controller/api v0.21.0 // indirect
github.com/fluxcd/source-controller/api v0.24.4 // indirect
github.com/form3tech-oss/jwt-go v3.2.5+incompatible
github.com/getkin/kin-openapi v0.118.0
github.com/form3tech-oss/jwt-go v3.2.3+incompatible
github.com/getkin/kin-openapi v0.107.0
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/go-git/go-git/v5 v5.7.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-git/go-git/v5 v5.6.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/spec v0.20.7
github.com/go-playground/validator/v10 v10.9.0
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/go-cmp v0.5.9
github.com/google/go-containerregistry v0.15.2
github.com/google/go-containerregistry v0.13.0
github.com/google/go-github/v32 v32.1.0 // indirect
github.com/google/uuid v1.3.0
github.com/gorilla/websocket v1.5.0
github.com/gosuri/uitable v0.0.4 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.17.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/hashicorp/hcl/v2 v2.16.2 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/koding/websocketproxy v0.0.0-20181220232114-7ed82d81a28c
github.com/kubevela/pkg v1.8.1-0.20230613075152-2cef0c31b14e
github.com/kubevela/prism v1.7.0-alpha.1.0.20230403030519-b7e45f7f842e
github.com/kubevela/pkg v0.0.0-20230316114047-e2b41b377bac
github.com/kubevela/prism v1.7.0-alpha.1
github.com/kubevela/workflow v0.5.1-0.20230412142923-1f15ba091699
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
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/cluster-gateway v1.7.0-alpha.1
github.com/oam-dev/cluster-register v1.0.4-0.20220928064144-5f76a9d7ca8c // indirect
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28 // indirect
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/oam-dev/terraform-controller v0.7.10
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.27.0
github.com/openkruise/kruise-api v1.3.0 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.7.0
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.8.2
github.com/tidwall/gjson v1.14.4
github.com/wercker/stern v0.0.0-20190705090245-4fa46dd6987f // indirect
github.com/xanzy/go-gitlab v0.86.0 // indirect
github.com/wonderflow/cert-manager-api v1.0.4-0.20210304051430-e08aa76f6c5f // indirect
github.com/xanzy/go-gitlab v0.80.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.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
go.uber.org/zap v1.21.0 // indirect
golang.org/x/crypto v0.6.0
golang.org/x/oauth2 v0.6.0
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools v2.2.0+incompatible
helm.sh/helm/v3 v3.11.2
k8s.io/api v0.26.3
k8s.io/apiextensions-apiserver v0.26.3
k8s.io/apimachinery v0.26.3
k8s.io/apiserver v0.26.3
k8s.io/cli-runtime v0.26.3 // indirect
k8s.io/client-go v0.26.3
k8s.io/component-base v0.26.3
helm.sh/helm/v3 v3.10.3
istio.io/client-go v1.13.4 // indirect
k8s.io/api v0.25.3
k8s.io/apiextensions-apiserver v0.25.3
k8s.io/apimachinery v0.25.3
k8s.io/apiserver v0.25.3
k8s.io/cli-runtime v0.25.3 // indirect
k8s.io/client-go v0.25.3
k8s.io/component-base v0.25.3
k8s.io/helm v2.17.0+incompatible // indirect
k8s.io/klog/v2 v2.100.1
k8s.io/kube-aggregator v0.26.3 // indirect
k8s.io/kubectl v0.26.3 // indirect
k8s.io/metrics v0.26.3 // indirect
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.1 // indirect
sigs.k8s.io/kind v0.20.0 // indirect
k8s.io/klog/v2 v2.90.0
k8s.io/kube-aggregator v0.25.3 // indirect
k8s.io/kubectl v0.25.3 // indirect
k8s.io/metrics v0.25.3 // indirect
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
open-cluster-management.io/api v0.10.0 // indirect
sigs.k8s.io/controller-runtime v0.12.3
sigs.k8s.io/gateway-api v0.4.3 // indirect
sigs.k8s.io/kind v0.17.0 // indirect
sigs.k8s.io/yaml v1.3.0
)
require github.com/oam-dev/kubevela v1.8.1-0.20230418085840-007901f9f1d5
require (
github.com/alibabacloud-go/cs-20151215/v3 v3.0.35
github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.4
github.com/alibabacloud-go/tea v1.2.0
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
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.4
github.com/onsi/ginkgo/v2 v2.11.0
gorm.io/driver/postgres v1.5.2
)
require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect
github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect
github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect
github.com/alibabacloud-go/openapi-util v0.1.0 // indirect
github.com/alibabacloud-go/tea-utils v1.3.1 // indirect
github.com/alibabacloud-go/tea-utils/v2 v2.0.1 // indirect
github.com/alibabacloud-go/tea-xml v1.1.2 // indirect
github.com/aliyun/credentials-go v1.1.2 // indirect
github.com/clbanning/mxj/v2 v2.5.5 // indirect
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
github.com/vbatts/tar-split v0.11.3 // indirect
)
require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
github.com/Masterminds/squirrel v1.5.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // 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
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect
github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect
github.com/alibabacloud-go/endpoint-util v1.1.1 // indirect
github.com/alibabacloud-go/openapi-util v0.1.0 // indirect
github.com/alibabacloud-go/tea-utils v1.4.5 // indirect
github.com/alibabacloud-go/tea-utils/v2 v2.0.1 // indirect
github.com/alibabacloud-go/tea-xml v1.1.2 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 // indirect
github.com/aliyun/credentials-go v1.1.2 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/beorn7/perks v1.0.1 // indirect
@ -157,37 +151,38 @@ require (
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/clbanning/mxj/v2 v2.5.5 // indirect
github.com/cloudflare/circl v1.1.0 // indirect
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
github.com/docker/cli v23.0.5+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v23.0.5+incompatible // indirect
github.com/docker/cli v20.10.20+incompatible // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v20.10.21+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fluxcd/pkg/apis/acl v0.0.3 // indirect
github.com/fluxcd/pkg/apis/kustomize v1.0.0 // indirect
github.com/fluxcd/pkg/apis/meta v1.0.0 // indirect
github.com/fluxcd/pkg/apis/kustomize v0.3.3 // indirect
github.com/fluxcd/pkg/apis/meta v0.13.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.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/gcfg v1.5.0 // 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-gorp/gorp/v3 v3.0.2 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang-jwt/jwt/v4 v4.4.3 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
@ -198,18 +193,17 @@ require (
github.com/gorilla/mux v1.8.0 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.1-0.20191002090509-6af20e3a5340 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmoiron/sqlx v1.3.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/compress v1.15.13 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
@ -218,7 +212,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.15 // indirect
github.com/mattn/go-runewidth v0.0.14 // 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
@ -227,7 +221,7 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
@ -235,66 +229,75 @@ require (
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
github.com/openshift/library-go v0.0.0-20230327085348-8477ec72b725 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/openshift/library-go v0.0.0-20221111030555-73ed40c0a938 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
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.10.1 // indirect
github.com/prometheus/common v0.39.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rubenv/sql-migrate v1.3.1 // indirect
github.com/rubenv/sql-migrate v1.1.2 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/skeema/knownhosts v1.1.1 // indirect
github.com/spf13/cast v1.5.0
github.com/shopspring/decimal v1.2.0 // indirect
github.com/skeema/knownhosts v1.1.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tjfoc/gmsm v1.3.2 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
github.com/zclconf/go-cty v1.13.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.5 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
go.etcd.io/etcd/client/v3 v3.5.5 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
github.com/zclconf/go-cty v1.12.1 // indirect
go.etcd.io/etcd/api/v3 v3.5.4 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect
go.etcd.io/etcd/client/v3 v3.5.4 // indirect
go.opentelemetry.io/contrib v0.20.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
go.opentelemetry.io/otel/metric v0.34.0 // indirect
go.opentelemetry.io/otel/sdk v1.11.2 // indirect
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
go.opentelemetry.io/otel/trace v1.11.2 // indirect
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.12.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.10.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.11.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/protobuf v1.28.1 // 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
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gorm.io/gorm v1.25.2
istio.io/api v0.0.0-20220512212136-561ffec82582 // indirect
istio.io/gogo-genproto v0.0.0-20211208193508-5ab4acc9eb1e // indirect
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
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
oras.land/oras-go v1.2.0 // indirect
sigs.k8s.io/apiserver-network-proxy v0.0.30 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36 // indirect
sigs.k8s.io/apiserver-runtime v1.1.2-0.20221118041430-0a6394f6dda3 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.33 // indirect
sigs.k8s.io/apiserver-runtime v1.1.2-0.20221102045245-fb656940062f // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/kustomize/api v0.12.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
@ -302,35 +305,25 @@ require (
)
require (
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
cloud.google.com/go/compute v1.13.0 // indirect
cloud.google.com/go/compute/metadata v0.2.2 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/cel-go v0.12.6 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.1 // indirect
github.com/invopop/yaml v0.1.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/nacos-group/nacos-sdk-go/v2 v2.2.2 // indirect
github.com/openkruise/rollouts v0.3.0 // indirect
github.com/nacos-group/nacos-sdk-go/v2 v2.1.0 // indirect
github.com/openkruise/rollouts v0.1.1-0.20220622054609-149e5a48da5e // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gorm.io/driver/mysql v1.5.1
k8s.io/kms v0.26.3 // indirect
)
replace (
@ -339,6 +332,12 @@ replace (
github.com/docker/docker => github.com/moby/moby v20.10.20+incompatible
github.com/emicklei/go-restful/v3 => github.com/emicklei/go-restful/v3 v3.8.0
github.com/wercker/stern => github.com/oam-dev/stern v1.13.2
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0
go.opentelemetry.io/otel => go.opentelemetry.io/otel v0.20.0
go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v0.20.0
go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v0.20.0
go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v0.20.0
go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v0.7.0
go.uber.org/atomic => go.uber.org/atomic v1.9.0
sigs.k8s.io/apiserver-network-proxy/konnectivity-client => sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36
sigs.k8s.io/apiserver-network-proxy/konnectivity-client => sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.31-0.20220502234555-5308cea56b78
)

1060
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
# Build the docker image
.PHONY: docker-build
docker-build:
docker build --build-arg=VERSION=$(VELAUX_VERSION) --build-arg=GITVERSION=$(GIT_COMMIT) -t $(VELAUX_IMAGE) .

View File

@ -1,39 +0,0 @@
SHELL := /bin/bash
GOLANGCILINT_VERSION ?= 1.59.1
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
GLOBAL_GOLANGCILINT := $(shell which golangci-lint)
GOBIN_GOLANGCILINT:= $(shell which $(GOBIN)/golangci-lint)
# VelaUX version
VELAUX_VERSION ?= main
# Repo info
GIT_COMMIT ?= git-$(shell git rev-parse --short HEAD)
GIT_COMMIT_LONG ?= $(shell git rev-parse HEAD)
VELAUX_IMAGE ?= velaux:$(VELAUX_VERSION)
VELAUX_VERSION_KEY := github.com/kubevela/velaux/version.VelaVersion
VELAUX_GITVERSION_KEY := github.com/kubevela/velaux/version.GitRevision
LDFLAGS ?= "-s -w -X $(VELAUX_VERSION_KEY)=$(VELAUX_VERSION) -X $(VELAUX_GITVERSION_KEY)=$(GIT_COMMIT)"
TIME_LONG = `date +%Y-%m-%d' '%H:%M:%S`
TIME_SHORT = `date +%H:%M:%S`
TIME = $(TIME_SHORT)
BLUE := $(shell printf "\033[34m")
YELLOW := $(shell printf "\033[33m")
RED := $(shell printf "\033[31m")
GREEN := $(shell printf "\033[32m")
CNone := $(shell printf "\033[0m")
INFO = echo ${TIME} ${BLUE}[INFO]${CNone}
WARN = echo ${TIME} ${YELLOW}[WARN]${CNone}
ERR = echo ${TIME} ${RED}[FAIL]${CNone}
OK = echo ${TIME} ${GREEN}[ OK ]${CNone}
FAIL = (echo ${TIME} ${RED}[FAIL]${CNone} && false)

View File

@ -28,7 +28,6 @@
]
},
"dependencies": {
"@alifd/next": "^1.26.15",
"history": "4.10.1",
"react": "^17.0.2",
"react-dom": "^17.0.0",
@ -107,5 +106,5 @@
"engines": {
"node": ">= 16"
},
"packageManager": "yarn@3.6.0"
"packageManager": "yarn@3.5.0"
}

View File

@ -1,16 +1 @@
export * from './addon';
export * from './application';
export * from './cluster';
export * from './component';
export * from './configs';
export * from './definitions';
export * from './env';
export * from './kubernetes';
export * from './observation';
export * from './project';
export * from './pipeline';
export * from './repository';
export * from './roles';
export * from './system';
export * from './target';
export * from './user';

View File

@ -1,6 +1,6 @@
import { ComponentType } from 'react';
import { PluginMeta, VelaUXPlugin } from './types';
import { KeyValue } from '../types';
import { PluginMeta, VelaUXPlugin } from '.';
import { KeyValue } from '../types/data';
export interface AppPluginMeta<T extends KeyValue = KeyValue> extends PluginMeta<T> {
// TODO anything specific to apps?

View File

@ -1,12 +1,10 @@
import { ComponentType } from 'react';
import { KeyValue, MenuType, ResourceAction, Workspace } from '..';
import { Addon } from '../api'
export enum PluginType {
PageApp = 'page-app',
Definition = 'definition',
}
interface PluginMetaInfoLink {
name: string;
url: string;
@ -52,7 +50,7 @@ export interface PluginInclude {
catalog?: string;
}
export interface PluginMeta<T extends KeyValue = {}> extends PluginLink, SourceAddon {
export interface PluginMeta<T extends KeyValue = {}> {
id: string;
name: string;
type: PluginType;
@ -69,7 +67,7 @@ export interface PluginMeta<T extends KeyValue = {}> extends PluginLink, SourceA
includes?: PluginInclude[];
// Filled in by the backend
jsonSetting?: T;
jsonData?: T;
secureJsonData?: KeyValue;
secureJsonFields?: KeyValue<boolean>;
enabled?: boolean;
@ -80,27 +78,9 @@ export interface PluginMeta<T extends KeyValue = {}> extends PluginLink, SourceA
live?: boolean;
}
/**
* Represents a plugin and link to get plugin tarball
*/
export interface PluginLink {
name: string
url: string
}
/**
* Represents a plugin linked to
*/
export interface SourceAddon {
addon: Addon
}
export interface PluginConfigPageProps<T extends PluginMeta> {
plugin: VelaUXPlugin<T>;
query: KeyValue; // The URL query parameters
onJSONDataChange: (key: string, value: any) => void;
onSecureJSONDataChange: (key: string, value: any) => void;
}
export interface PluginConfigPage<T extends PluginMeta> {
@ -120,11 +100,14 @@ export class VelaUXPlugin<T extends PluginMeta = PluginMeta> {
loadError?: boolean;
// Show configuration tabs on the plugin page
configPages?: PluginConfigPage<T>;
configPages?: Array<PluginConfigPage<T>>;
// Tabs on the plugin page
addConfigPage(tab: PluginConfigPage<T>) {
this.configPages = tab;
if (!this.configPages) {
this.configPages = [];
}
this.configPages.push(tab);
return this;
}
@ -132,19 +115,3 @@ export class VelaUXPlugin<T extends PluginMeta = PluginMeta> {
this.meta = {} as T;
}
}
export type PluginEnableRequest = {
id: string
jsonData: KeyValue
secureJsonData: KeyValue
}
export type PluginInstallRequest = {
id: string
url: string
}
export type UXPlugin = {
id: string
url: string
}

View File

@ -1,9 +1 @@
export type KeyValue<T = any> = Record<string, T>;
export function unmarshal<T>(kv: KeyValue): T {
return kv as T;
}
export function marshal<T>(obj: T): KeyValue {
return obj as KeyValue;
}

View File

@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": "./src",
"declarationDir": "./compiled",
"emitDeclarationOnly": true,
"isolatedModules": true,
@ -15,4 +14,4 @@
"include": [
"src/**/*.ts*",
]
}
}

View File

@ -1,4 +1,4 @@
import type { EnableAddonRequest } from '@velaux/data';
import type { EnableAddonRequest } from '../interface/addon';
import { getDomain } from '../utils/common';
import { addons, addonRegistries, enabledAddon } from './productionLink';

View File

@ -9,7 +9,7 @@ import type {
UpdatePolicyRequest,
UpdateTriggerRequest,
CreateTriggerRequest,
} from '@velaux/data';
} from '../interface/application';
import { getDomain } from '../utils/common';
import { application } from './productionLink';

View File

@ -1,4 +1,4 @@
import type { CreateCluster } from '@velaux/data';
import type { CreateCluster } from '../interface/cluster';
import { getDomain } from '../utils/common';
import {

View File

@ -3,7 +3,8 @@ import type {
CreateConfigRequest,
NamespacedName,
UpdateConfigRequest,
ProjectName } from '@velaux/data';
} from '../interface/configs';
import type { ProjectName } from '../interface/project';
import { getDomain } from '../utils/common';
import { configs, configTemplates, project } from './productionLink';

View File

@ -1,4 +1,4 @@
import type { UIParam } from '@velaux/data';
import type { UIParam } from '../interface/application';
import { getDomain } from '../utils/common';
import { definition } from './productionLink';

View File

@ -1,4 +1,4 @@
import type { CreateEnvRequest } from '@velaux/data';
import type { CreateEnvRequest } from '../interface/env';
import type { QueryTarget } from '../model/target';
import { getDomain } from '../utils/common';

View File

@ -1,2 +0,0 @@
export * from './plugin';
export * from './pipeline';

View File

@ -1,4 +1,4 @@
import type { CreatePipelineRequest } from '@velaux/data';
import type { CreatePipelineRequest } from '../interface/pipeline';
import { getDomain } from '../utils/common';
import { get, post, put, rdelete } from './request';

View File

@ -1,36 +0,0 @@
import { getDomain } from '../utils/common';
import { managePlugin } from './productionLink';
import { get, post } from './request';
import { PluginEnableRequest, PluginInstallRequest } from "@velaux/data";
const baseURLOject = getDomain();
const base = baseURLOject.MOCK || baseURLOject.APIBASE;
export function getPluginList(params: any) {
return get(base + managePlugin, { params: params }).then((res) => res);
}
export function detailPlugin(params: { id: string }) {
return get(`${base + managePlugin}/${params.id}`, { params: params }).then((res) => res);
}
export function enablePlugin(params: PluginEnableRequest) {
return post(`${base + managePlugin}/${params.id}/enable`, params);
}
export function disablePlugin(params: { id: string }) {
return post(`${base + managePlugin}/${params.id}/disable`, params);
}
export function setPlugin(params: PluginEnableRequest) {
return post(`${base + managePlugin}/${params.id}/setting`, params);
}
export function installPlugin(params: PluginInstallRequest) {
return post(`${base + managePlugin}/${params.id}/install`, { url: params.url });
}
export function uninstallPlugin(params: { id: string }) {
return post(`${base + managePlugin}/${params.id}/uninstall`, {});
}

View File

@ -23,5 +23,3 @@ export const platformPermissions = `/api/v1/permissions`;
export const configs = `/api/v1/configs`;
export const configTemplates = `/api/v1/config_templates`;
export const cloudShell = `/api/v1/cloudshell`;
export const plugin = `/api/v1/plugins`;
export const managePlugin = `/api/v1/manage/plugins`;

View File

@ -7,7 +7,7 @@ import type {
ProjectRole,
ProjectUserCreate,
ProjectUserQuery,
} from '@velaux/data';
} from '../interface/project';
import { getDomain } from '../utils/common';
import { project_mock } from './devLink';

View File

@ -1,4 +1,4 @@
import { RolesCreateBase } from '@velaux/data';
import { RolesCreateBase } from '../interface/roles';
import { getDomain } from '../utils/common';
import { project_mock } from './devLink';

View File

@ -1,4 +1,4 @@
import type { UpdateSystemInfo } from '@velaux/data';
import type { UpdateSystemInfo } from '../interface/system';
import { getDomain } from '../utils/common';
import { get, put } from './request';

View File

@ -1,4 +1,4 @@
import type { Target } from '@velaux/data';
import type { Target } from '../interface/target';
import type { QueryTarget } from '../model/target';
import { getDomain } from '../utils/common';

View File

@ -1,4 +1,4 @@
import type { User } from '@velaux/data';
import type { User } from '../interface/user';
import { users, cloudShell } from './productionLink';
import { post, get, rdelete, put } from './request';

View File

@ -1,4 +1,4 @@
import type { UpdateWorkflowRequest } from '@velaux/data';
import type { UpdateWorkflowRequest } from '../interface/application';
import { getDomain } from '../utils/common';
import { application, definition } from './productionLink';

View File

@ -1,7 +1,7 @@
import { Button, Dialog, Message } from '@alifd/next';
import * as React from 'react';
import type { ApplicationCompareResponse } from '@velaux/data';
import type { ApplicationCompareResponse } from '../../interface/application';
import './index.less';
import { DiffEditor } from '../DiffEditor';
import { If } from '../If';

View File

@ -1,7 +1,7 @@
import { Dialog } from '@alifd/next';
import * as React from 'react';
import type { ApplicationDryRunResponse } from '@velaux/data';
import type { ApplicationDryRunResponse } from '../../interface/application';
import './index.less';
import { v4 as uuid } from 'uuid';

View File

@ -14,8 +14,6 @@ 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}

View File

@ -1,7 +1,7 @@
import { connect } from 'dva';
import type React from 'react';
import type { LoginUserInfo } from '@velaux/data';
import type { LoginUserInfo } from '../../interface/user';
import type { ResourceAction } from '../../utils/permission';
import { checkPermission } from '../../utils/permission';

View File

@ -1,6 +1,6 @@
import React from 'react';
import type { WorkflowStepStatus } from '@velaux/data';
import type { WorkflowStepStatus } from '../../../interface/application';
export function renderStepStatusIcon(status: WorkflowStepStatus) {
switch (status.phase) {

View File

@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { useState } from 'react';
import type { WorkflowStepStatus } from '@velaux/data';
import type { WorkflowStepStatus } from '../../../interface/application';
import { timeDiff } from '../../../utils/common';
import { If } from '../../If';

View File

@ -1,7 +1,7 @@
import React from 'react';
import Draggable from 'react-draggable';
import type { WorkflowStepStatus } from '@velaux/data';
import type { WorkflowStepStatus } from '../../interface/application';
import './index.less';
import { Step } from './components/step';

View File

@ -5,8 +5,7 @@ import { BiCopyAlt } from 'react-icons/bi';
import { deletePipelineContext, listPipelineContexts, runPipeline } from '../../api/pipeline';
import i18n from '../../i18n';
import type { PipelineListItem } from '@velaux/data';
import type { KeyValue, PipelineListItem } from '../../interface/pipeline';
import './index.less';
import { locale } from '../../utils/locale';
import { If } from '../If';
@ -18,7 +17,6 @@ import Permission from '../Permission';
import { Translation } from '../Translation';
import NewContext from './new-context';
import { KeyValue } from "@velaux/data";
export interface PipelineProps {
pipeline: PipelineListItem;

View File

@ -4,11 +4,9 @@ import React from 'react';
import { createPipelineContext, updatePipelineContext } from '../../api/pipeline';
import KV from '../../extends/KV';
import i18n from '../../i18n';
import type { PipelineListItem } from '@velaux/data';
import type { KeyValue, PipelineListItem } from '../../interface/pipeline';
import { checkName } from '../../utils/common';
import { Translation } from '../Translation';
import { KeyValue } from "@velaux/data";
const { Row, Col } = Grid;
@ -60,13 +58,13 @@ class NewContext extends React.Component<NewContextProps> {
keyValues.push({ key: key, value: values.values[key] });
});
if (editMode) {
updatePipelineContext(project.name, name, { name: values.name, values: keyValues as {key: string, value: string}[] }).then((res) => {
updatePipelineContext(project.name, name, { name: values.name, values: keyValues }).then((res) => {
if (res) {
this.props.onSuccess();
}
});
} else {
createPipelineContext(project.name, name, { name: values.name, values: keyValues as {key: string, value: string}[] }).then((res) => {
createPipelineContext(project.name, name, { name: values.name, values: keyValues }).then((res) => {
if (res) {
this.props.onSuccess();
}

View File

@ -4,7 +4,8 @@ import React from 'react';
import { AiOutlineQuestionCircle } from 'react-icons/ai';
import { Translation } from '../../components/Translation';
import type { ApplicationStatus, Condition , Resource } from '@velaux/data';
import type { ApplicationStatus, Condition } from '../../interface/application';
import type { Resource } from '../../interface/observation';
import { locale } from '../../utils/locale';
import { If } from '../If';

View File

@ -9,7 +9,7 @@ import type { GraphNode, GraphEdge, TraitGraphNode, Line } from './interface';
import { describeComponents, getGraphSize, ResourceIcon } from './utils';
import './component-node.less';
import type { TraitStatus } from '@velaux/data';
import type { TraitStatus } from '../../interface/application';
import { If } from '../If';
export interface ComponentNodeProps {

View File

@ -7,7 +7,7 @@ import kubevela from '../../assets/KubeVela-01.svg';
import kubernetes from '../../assets/kubernetes.svg';
import pod from '../../assets/resources/pod.svg';
import i18n from '../../i18n';
import type { ResourceTreeNode } from '@velaux/data';
import type { ResourceTreeNode } from '../../interface/observation';
import './index.less';
import classNames from 'classnames';

View File

@ -1,4 +1,5 @@
import type { TraitStatus , ResourceTreeNode } from '@velaux/data';
import type { TraitStatus } from '../../interface/application';
import type { ResourceTreeNode } from '../../interface/observation';
export interface TreeNode {
resource: ResourceTreeNode;

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Translation } from '../Translation';
import type { ParamCondition, UIParam, UIParamValidate , Definition } from '@velaux/data';
import type { ParamCondition, UIParam, UIParamValidate } from '../../interface/application';
import type { Rule } from '@alifd/field';
import { Form, Input, Select, Field, Switch, Grid, Divider } from '@alifd/next';
@ -31,6 +31,7 @@ import SecretSelect from '../../extends/SecretSelect';
import Strings from '../../extends/Strings';
import Numbers from '../../extends/Numbers';
import Structs from '../../extends/Structs';
import type { Definition } from '../../interface/addon';
import { checkImageName, replaceUrl } from '../../utils/common';
import { locale } from '../../utils/locale';
import { getValue } from '../../utils/utils';
@ -192,6 +193,9 @@ class UISchema extends Component<Props, State> {
if (condition.action == 'enable' || !condition.action) {
enableConditionCount += 1;
}
if (value == undefined) {
return;
}
switch (condition.op) {
case 'in':
if (Array.isArray(condition.value) && condition.value.includes(value)) {
@ -965,7 +969,7 @@ class UISchema extends Component<Props, State> {
});
const formItemLayout = {
labelCol: {
fixedSpan: 4,
fixedSpan: 9,
},
wrapperCol: {
span: 14,
@ -973,7 +977,7 @@ class UISchema extends Component<Props, State> {
};
const showAdvancedButton = couldBeDisabledParamCount != couldShowParamCount || requiredParamCount === 0;
return (
return (
<Form field={this.form} className="ui-schema-container">
<If condition={disableRenderRow}>{items}</If>
<If condition={!disableRenderRow}>

View File

@ -6,10 +6,11 @@ import Draggable from 'react-draggable';
import { AiOutlinePlayCircle } from 'react-icons/ai';
import { FiStopCircle } from 'react-icons/fi';
import type { Dispatch } from 'redux';
import { WorkflowMode } from '@velaux/data';
import { WorkflowMode } from '../../interface/application';
import { WorkflowEditContext } from '../../context';
import type { DefinitionBase , WorkflowStep, WorkflowStepBase } from '@velaux/data';
import type { DefinitionBase } from '../../interface/definitions';
import type { WorkflowStep, WorkflowStepBase } from '../../interface/pipeline';
import { Edge } from './edge';
import { Step } from './step';

View File

@ -3,7 +3,7 @@ import _ from 'lodash';
import React, { useContext, useState } from 'react';
import { IoMdAdd, IoMdRemove } from 'react-icons/io';
import { WorkflowEditContext } from '../../context';
import type { InputItem, OutputItem } from '@velaux/data';
import type { InputItem, OutputItem } from '../../interface/application';
import { locale } from '../../utils/locale';
const { Row, Col } = Grid;

View File

@ -3,7 +3,7 @@ import _ from 'lodash';
import React, { useState } from 'react';
import { IoMdAdd, IoMdRemove } from 'react-icons/io';
import type { OutputItem } from '@velaux/data';
import type { OutputItem } from '../../interface/application';
import { locale } from '../../utils/locale';
const { Row, Col } = Grid;

View File

@ -10,7 +10,8 @@ import Group from '../../extends/Group';
import './index.less';
import { StepSelect } from '../../extends/StepSelect';
import i18n from '../../i18n';
import type { DefinitionDetail , WorkflowStepBase } from '@velaux/data';
import type { DefinitionDetail } from '../../interface/application';
import type { WorkflowStepBase } from '../../interface/pipeline';
import { replaceUrl } from '../../utils/common';
import DrawerWithFooter from '../Drawer';
import { If } from '../If';

View File

@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { useState } from 'react';
import type { WorkflowStep } from '@velaux/data';
import type { WorkflowStep } from '../../interface/pipeline';
import { StepTypeIcon } from './step-icon';
@ -12,7 +12,7 @@ import { If } from '../If';
import { AiOutlineDelete } from 'react-icons/ai';
import { IoMdAdd } from 'react-icons/io';
import { Translation } from '../../components/Translation';
import { WorkflowMode } from '@velaux/data';
import { WorkflowMode } from '../../interface/application';
export interface StepProps {
step: WorkflowStep;

View File

@ -3,7 +3,8 @@ import _ from 'lodash';
import React from 'react';
import i18n from '../../i18n';
import type { DefinitionBase , WorkflowStepBase } from '@velaux/data';
import type { DefinitionBase } from '../../interface/definitions';
import type { WorkflowStepBase } from '../../interface/pipeline';
import { checkName, showAlias } from '../../utils/common';
import { locale } from '../../utils/locale';
import Item from '../Item';

View File

@ -2,7 +2,7 @@ import { Message } from '@alifd/next';
import * as yaml from 'js-yaml';
import React, { useEffect, useState } from 'react';
import type { WorkflowStep } from '@velaux/data';
import type { WorkflowStep } from '../../interface/pipeline';
import DefinitionCode from '../DefinitionCode';
import { Translation } from '../Translation';

Some files were not shown because too many files have changed in this diff Show More