mirror of https://github.com/kubevela/velad.git
Compare commits
18 Commits
Author | SHA1 | Date |
---|---|---|
|
7e154fbce7 | |
|
c3beea6a6b | |
|
9849282a31 | |
|
089320fad3 | |
|
aa3d7b9ccf | |
|
46fd911d13 | |
|
53db65bb9e | |
|
a0de84a39a | |
|
e689ab1e45 | |
|
e9e899832c | |
|
6b5f971e34 | |
|
962ce760fa | |
|
ab5e4da9f1 | |
|
b60e6ac0ca | |
|
155e9107f1 | |
|
7a45b956cd | |
|
ff1261bda2 | |
|
fbd81b5e00 |
|
@ -1,3 +1,3 @@
|
|||
# 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
|
||||
|
||||
* @chivalryq
|
||||
* @chivalryq @wangyikewxgm
|
|
@ -5,13 +5,12 @@ on:
|
|||
branches:
|
||||
- main
|
||||
|
||||
|
||||
jobs:
|
||||
auto-release:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Download auto
|
||||
|
|
|
@ -9,32 +9,36 @@ on:
|
|||
branches:
|
||||
- main
|
||||
- release-*
|
||||
workflow_dispatch: { }
|
||||
workflow_dispatch: {}
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.19'
|
||||
GOLANGCI_VERSION: 'v1.49'
|
||||
GO_VERSION: "1.22"
|
||||
GOLANGCI_VERSION: "v1.54.2"
|
||||
|
||||
jobs:
|
||||
staticcheck:
|
||||
strategy:
|
||||
matrix:
|
||||
machines: [ "ubuntu-20.04","macos-12" ]
|
||||
machines: ["ubuntu-22.04", "macos-12"]
|
||||
runs-on: ${{ matrix.machines }}
|
||||
steps:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Docker
|
||||
uses: docker-practice/actions-setup-docker@master
|
||||
with:
|
||||
docker_version: "24.0.2"
|
||||
|
||||
- name: Download resources
|
||||
run: |
|
||||
|
@ -46,32 +50,32 @@ jobs:
|
|||
- name: Go Dependencies
|
||||
run: |
|
||||
go mod tidy
|
||||
go get -t -v -d ./...
|
||||
|
||||
- name: Install StaticCheck
|
||||
run: go install honnef.co/go/tools/cmd/staticcheck@v0.3.0
|
||||
|
||||
- name: Static Check
|
||||
run: staticcheck ./...
|
||||
- uses: dominikh/staticcheck-action@v1.3.0
|
||||
with:
|
||||
version: "2024.1"
|
||||
install-go: false
|
||||
|
||||
lint:
|
||||
strategy:
|
||||
matrix:
|
||||
machines: [ "ubuntu-20.04","macos-12" ]
|
||||
machines: ["ubuntu-22.04", "macos-12"]
|
||||
runs-on: ${{ matrix.machines }}
|
||||
steps:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Docker
|
||||
uses: docker-practice/actions-setup-docker@master
|
||||
with:
|
||||
docker_version: "24.0.2"
|
||||
|
||||
- name: Download resources
|
||||
run: |
|
||||
|
@ -93,26 +97,27 @@ jobs:
|
|||
go-check:
|
||||
strategy:
|
||||
matrix:
|
||||
machines: [ "ubuntu-20.04","macos-12" ]
|
||||
machines: ["ubuntu-22.04", "macos-12"]
|
||||
runs-on: ${{ matrix.machines }}
|
||||
steps:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Go Dependencies
|
||||
run: |
|
||||
go mod tidy
|
||||
go get -t -v -d ./...
|
||||
|
||||
- name: Setup Docker
|
||||
uses: docker-practice/actions-setup-docker@master
|
||||
with:
|
||||
docker_version: "24.0.2"
|
||||
|
||||
- name: Download resources
|
||||
run: |
|
||||
|
@ -123,4 +128,3 @@ jobs:
|
|||
|
||||
- name: Check Diff
|
||||
run: make check-diff
|
||||
|
||||
|
|
|
@ -11,22 +11,23 @@ on:
|
|||
branches:
|
||||
- main
|
||||
- release-*
|
||||
workflow_dispatch: { }
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
build-artifact:
|
||||
env:
|
||||
VELAUX_VERSION_KEY: github.com/oam-dev/velad/version.VelaUXVersion
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
TARGETS: [ linux/amd64, darwin/amd64, windows/amd64, linux/arm64, darwin/arm64 ]
|
||||
TARGETS:
|
||||
[linux/amd64, darwin/amd64, windows/amd64, linux/arm64, darwin/arm64]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: "1.22.0"
|
||||
- name: Get matrix
|
||||
id: get_matrix
|
||||
run: |
|
||||
|
@ -37,22 +38,22 @@ jobs:
|
|||
run: |
|
||||
make ${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: bin/velad-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}
|
||||
name: velad-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}
|
||||
test-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ build-artifact ]
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [build-artifact]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: "1.22.0"
|
||||
- name: Install ginkgo
|
||||
run: go install github.com/onsi/ginkgo/ginkgo@v1.16.5
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: velad-linux-amd64
|
||||
- run: |
|
||||
|
@ -65,32 +66,35 @@ jobs:
|
|||
run: ginkgo -v ./test/e2e-test
|
||||
test-darwin:
|
||||
runs-on: macos-12
|
||||
needs: [ build-artifact ]
|
||||
needs: [build-artifact]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: "1.22.0"
|
||||
- name: Install ginkgo
|
||||
run: go install github.com/onsi/ginkgo/ginkgo@v1.16.5
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: velad-darwin-amd64
|
||||
- name: Setup Docker
|
||||
uses: docker-practice/actions-setup-docker@1.0.11
|
||||
uses: docker-practice/actions-setup-docker@master
|
||||
with:
|
||||
docker_version: "24.0.2"
|
||||
- run: |
|
||||
chmod u+x velad-darwin-amd64 && mv velad-darwin-amd64 velad
|
||||
./velad install --set image.pullPolicy=Never --set admissionWebhooks.patch.image.pullPolicy=Never --set multicluster.clusterGateway.image.pullPolicy=Never
|
||||
export KUBECONFIG=$(./velad kubeconfig --host)
|
||||
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core --timeout=180s -n vela-system
|
||||
vela addon enable ~/.vela/addons/velaux
|
||||
|
||||
# TODO(qiaozp): fix the issue of e2e test on darwin
|
||||
# - name: Run e2e test
|
||||
# run: ginkgo -v ./test/e2e-test
|
||||
|
||||
# test-linux-arm64:
|
||||
# runs-on: ubuntu-20.04
|
||||
# runs-on: ubuntu-22.04
|
||||
# needs: [ build-artifact ]
|
||||
# steps:
|
||||
# - uses: actions/download-artifact@v3
|
||||
|
|
|
@ -4,7 +4,7 @@ on:
|
|||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch: { }
|
||||
workflow_dispatch: {}
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
@ -18,7 +18,8 @@ jobs:
|
|||
name: build
|
||||
strategy:
|
||||
matrix:
|
||||
TARGETS: [ linux/amd64, darwin/amd64, windows/amd64, linux/arm64, darwin/arm64]
|
||||
TARGETS:
|
||||
[linux/amd64, darwin/amd64, windows/amd64, linux/arm64, darwin/arm64]
|
||||
env:
|
||||
VELA_VERSION_KEY: github.com/oam-dev/velad/version.VelaVersion
|
||||
VELAUX_VERSION_KEY: github.com/oam-dev/velad/version.VelaUXVersion
|
||||
|
@ -28,11 +29,11 @@ jobs:
|
|||
DIST_DIRS: find * -type d -exec
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: "1.22"
|
||||
- name: Get release
|
||||
id: get_release
|
||||
uses: bruceadams/get-release@v1.2.2
|
||||
|
@ -97,7 +98,7 @@ jobs:
|
|||
asset_name: velad-${{ env.VELAD_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
||||
asset_content_type: binary/octet-stream
|
||||
- name: Post sha256
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sha256sums
|
||||
path: ./_bin/sha256-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.txt
|
||||
|
@ -125,4 +126,3 @@ jobs:
|
|||
verlte ${{ env.VELAD_VERSION }} $LATEST_VERSION && echo "${{ env.VELAD_VERSION }} <= $LATEST_VERSION, skip update" && exit 0
|
||||
echo ${{ env.VELAD_VERSION }} > ./velad_latest_version
|
||||
./ossutil --config-file .ossutilconfig cp -u ./velad_latest_version oss://kubevela-docs/binary/velad/latest_version
|
||||
|
||||
|
|
|
@ -37,10 +37,6 @@ linters-settings:
|
|||
# report about shadowed variables
|
||||
check-shadowing: false
|
||||
|
||||
golint:
|
||||
# minimal confidence for issues, default is 0.8
|
||||
min-confidence: 0.8
|
||||
|
||||
gofmt:
|
||||
# simplify code: gofmt with `-s` option, true by default
|
||||
simplify: true
|
||||
|
@ -115,10 +111,11 @@ linters:
|
|||
- goconst
|
||||
- goimports
|
||||
- gofmt # We enable this as well as goimports for its simplify mode.
|
||||
- golint
|
||||
- unconvert
|
||||
- misspell
|
||||
- nakedret
|
||||
- exportloopref
|
||||
# - revive
|
||||
|
||||
presets:
|
||||
- bugs
|
||||
|
@ -136,7 +133,6 @@ issues:
|
|||
- errcheck
|
||||
- dupl
|
||||
- gosec
|
||||
- scopelint
|
||||
- unparam
|
||||
|
||||
# Ease some gocritic warnings on test files.
|
||||
|
|
10
Makefile
10
Makefile
|
@ -1,11 +1,11 @@
|
|||
include makefiles/dependency.mk
|
||||
|
||||
K3S_VERSION ?= v1.24.8+k3s1
|
||||
K3S_VERSION ?= v1.27.2+k3s1
|
||||
STATIC_DIR := pkg/resources/static
|
||||
VELA_VERSION ?= v1.7.4
|
||||
VELAUX_VERSION ?= v1.7.4
|
||||
VELA_VERSION ?= v1.10.1
|
||||
VELAUX_VERSION ?= v1.9.4
|
||||
VELA_VERSION_NO_V := $(subst v,,$(VELA_VERSION))
|
||||
VELAUX_IMAGE_VERSION ?= ${VELAUX_VERSION}
|
||||
VELAUX_IMAGE_VERSION ?= v1.9.4
|
||||
LDFLAGS= "-X github.com/oam-dev/velad/version.VelaUXVersion=${VELAUX_VERSION} -X github.com/oam-dev/velad/version.VelaVersion=${VELA_VERSION}"
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
@ -50,7 +50,7 @@ darwin-amd64 darwin-arm64 windows-amd64: download_vela_images_addons download_k3
|
|||
CHART_DIR := ${STATIC_DIR}/vela/charts
|
||||
download_vela_chart:
|
||||
mkdir -p ${CHART_DIR}
|
||||
curl -o ${CHART_DIR}/vela-core.tgz https://charts.kubevela.net/core/vela-core-${VELA_VERSION_NO_V}.tgz
|
||||
curl -L -o ${CHART_DIR}/vela-core.tgz https://kubevela.github.io/charts/vela-core-${VELA_VERSION_NO_V}.tgz
|
||||
|
||||
download_vela_images_addons: download_vela_chart
|
||||
tar -xzf ${CHART_DIR}/vela-core.tgz -C ${CHART_DIR}
|
||||
|
|
|
@ -13,7 +13,7 @@ This is quite easy. Depends on your system, run one of scripts below.
|
|||
|
||||
- **Linux/macOS**
|
||||
```shell
|
||||
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash -s 1.4.0
|
||||
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash
|
||||
```
|
||||
|
||||
- **Windows**
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# Joining a New Worker Node to VelaD Control Plane
|
||||
|
||||
This guide describes the steps for joining a new worker node to an existing VelaD control plane.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before proceeding with the steps below, ensure that:
|
||||
|
||||
- Have a VelaD control plane running.
|
||||
- You have the token for the VelaD control plane. You can get the token by running the `velad token` command on the VelaD control plane master node.
|
||||
- New worker node is **Linux machine** and can access the VelaD control plane master node.
|
||||
- You have SSH access to the new worker node
|
||||
|
||||
## Steps
|
||||
|
||||
1. Download VelaD to the new worker node.
|
||||
```shell
|
||||
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash
|
||||
```
|
||||
|
||||
2. Run the `velad join` command on the new worker node.
|
||||
```
|
||||
velad join --master-ip <master-ip> --token <token> --worker-name <worker-name>
|
||||
```
|
||||
- `<master-ip>` is the IP address of the VelaD control plane master node. (Required)
|
||||
- `<token>` is the token for the VelaD control plane. (Required)
|
||||
- `<worker-name>` is the name of the new worker node. (Optional)
|
||||
|
||||
3. Verify the new node has joined the control plane.
|
||||
- Use `kubectl get nodes` to check the new worker node has joined the VelaD control plane.
|
||||
|
||||
## Delete a Worker Node
|
||||
|
||||
Run the `velad uninstall` command on the VelaD on the worker node to be deleted.
|
433
go.mod
433
go.mod
|
@ -1,173 +1,168 @@
|
|||
module github.com/oam-dev/velad
|
||||
|
||||
go 1.19
|
||||
go 1.22.0
|
||||
|
||||
toolchain go1.22.4
|
||||
|
||||
require (
|
||||
github.com/docker/docker v20.10.17+incompatible
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/fatih/color v1.13.0
|
||||
github.com/k3d-io/k3d/v5 v5.4.8-0.20230204095617-5324cf69fe84
|
||||
github.com/kyokomi/emoji/v2 v2.2.9
|
||||
github.com/oam-dev/kubevela v1.7.4
|
||||
github.com/docker/docker v26.0.0+incompatible
|
||||
github.com/docker/go-connections v0.5.0
|
||||
github.com/fatih/color v1.16.0
|
||||
github.com/k3d-io/k3d/v5 v5.4.7
|
||||
github.com/oam-dev/kubevela v1.10.1
|
||||
github.com/onsi/ginkgo v1.16.5
|
||||
github.com/onsi/gomega v1.20.2
|
||||
github.com/onsi/gomega v1.34.1
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/spf13/cobra v1.6.0
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/spf13/cobra v1.8.0
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/tufanbarisyildirim/gonginx v0.0.0-20230104065106-9ae864d29eed
|
||||
helm.sh/helm/v3 v3.10.3
|
||||
k8s.io/api v0.25.3
|
||||
k8s.io/apimachinery v0.25.5
|
||||
k8s.io/client-go v0.25.3
|
||||
k8s.io/klog/v2 v2.70.1
|
||||
sigs.k8s.io/controller-runtime v0.12.3
|
||||
helm.sh/helm/v3 v3.14.4
|
||||
k8s.io/api v0.29.2
|
||||
k8s.io/apimachinery v0.29.2
|
||||
k8s.io/client-go v0.29.2
|
||||
k8s.io/klog/v2 v2.120.1
|
||||
sigs.k8s.io/controller-runtime v0.17.6
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.3 // indirect
|
||||
github.com/cloudflare/circl v1.1.0 // indirect
|
||||
github.com/go-git/gcfg v1.5.0 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.3.1 // indirect
|
||||
github.com/go-git/go-git/v5 v5.5.1 // indirect
|
||||
github.com/moby/sys/mount v0.3.0 // indirect
|
||||
github.com/moby/sys/mountinfo v0.5.0 // indirect
|
||||
github.com/pjbgf/sha1cd v0.2.3 // indirect
|
||||
github.com/skeema/knownhosts v1.1.0 // indirect
|
||||
github.com/ProtonMail/go-crypto v1.1.3 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.6.1 // indirect
|
||||
github.com/go-git/go-git/v5 v5.13.1 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/google/cel-go v0.17.7 // indirect
|
||||
github.com/google/go-containerregistry v0.18.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
|
||||
github.com/invopop/yaml v0.1.0 // indirect
|
||||
github.com/jellydator/ttlcache/v3 v3.0.1 // indirect
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/perimeterx/marshmallow v1.1.4 // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/skeema/knownhosts v1.3.0 // indirect
|
||||
github.com/stoewer/go-strcase v1.2.0 // indirect
|
||||
github.com/vbatts/tar-split v0.11.5 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
|
||||
k8s.io/kms v0.29.3 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go/compute v1.7.0 // indirect
|
||||
cuelang.org/go v0.5.0-beta.5 // indirect
|
||||
cuelang.org/go v0.9.2 // indirect
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/AlecAivazis/survey/v2 v2.1.1 // indirect
|
||||
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.27 // indirect
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.20 // 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/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
|
||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||
github.com/FogDong/uitable v0.0.5 // indirect
|
||||
github.com/MakeNowJust/heredoc v1.0.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.2.1 // indirect
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
|
||||
github.com/Masterminds/squirrel v1.5.3 // indirect
|
||||
github.com/Microsoft/go-winio v0.5.2 // indirect
|
||||
github.com/Microsoft/hcsshim v0.9.5 // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
|
||||
github.com/Masterminds/squirrel v1.5.4 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/Microsoft/hcsshim v0.12.2 // indirect
|
||||
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/agext/levenshtein v1.2.3 // indirect
|
||||
github.com/alessio/shellescape v1.2.2 // indirect
|
||||
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect
|
||||
github.com/alibabacloud-go/cs-20151215/v3 v3.0.21 // indirect
|
||||
github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.0 // 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.0.11 // indirect
|
||||
github.com/alibabacloud-go/tea v1.1.19 // indirect
|
||||
github.com/alibabacloud-go/tea-utils v1.4.5 // indirect
|
||||
github.com/alibabacloud-go/tea-utils/v2 v2.0.0 // indirect
|
||||
github.com/alibabacloud-go/tea-xml v1.1.2 // indirect
|
||||
github.com/alessio/shellescape v1.4.1 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 // indirect
|
||||
github.com/aliyun/credentials-go v1.1.2 // indirect
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
||||
github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/blang/semver/v4 v4.0.0 // indirect
|
||||
github.com/bluele/gcache v0.0.2 // indirect
|
||||
github.com/briandowns/spinner v1.11.1 // indirect
|
||||
github.com/briandowns/spinner v1.23.0 // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chai2010/gettext-go v1.0.2 // indirect
|
||||
github.com/chartmuseum/helm-push v0.10.2 // indirect
|
||||
github.com/clbanning/mxj/v2 v2.5.5 // indirect
|
||||
github.com/cloudtty/cloudtty v0.2.0 // indirect
|
||||
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
|
||||
github.com/containerd/cgroups v1.0.3 // indirect
|
||||
github.com/containerd/containerd v1.6.12 // indirect
|
||||
github.com/coreos/go-oidc v2.1.0+incompatible // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
||||
github.com/coreos/prometheus-operator v0.41.1 // indirect
|
||||
github.com/crossplane/crossplane-runtime v0.14.1-0.20210722005935-0b469fcc77cd // indirect
|
||||
github.com/chartmuseum/helm-push v0.10.4 // indirect
|
||||
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
|
||||
github.com/containerd/cgroups/v3 v3.0.2 // indirect
|
||||
github.com/containerd/containerd v1.7.14 // indirect
|
||||
github.com/containerd/errdefs v0.1.0 // indirect
|
||||
github.com/coreos/go-semver v0.3.1 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/crossplane/crossplane-runtime v1.16.0 // indirect
|
||||
github.com/cue-exp/kubevelafix v0.0.0-20220922150317-aead819d979d // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.3.6 // indirect
|
||||
github.com/dave/jennifer v1.6.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/deckarep/golang-set v1.7.1 // indirect
|
||||
github.com/dimchansky/utfbom v1.1.1 // indirect
|
||||
github.com/docker/cli v20.10.17+incompatible // indirect
|
||||
github.com/docker/distribution v2.8.1+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.6.4 // indirect
|
||||
github.com/distribution/reference v0.5.0 // indirect
|
||||
github.com/docker/cli v26.0.0+incompatible // indirect
|
||||
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.8.1 // indirect
|
||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
|
||||
github.com/docker/go-metrics v0.0.1 // indirect
|
||||
github.com/docker/go-units v0.4.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
|
||||
github.com/ettle/strcase v0.2.0 // indirect
|
||||
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
|
||||
github.com/fatih/camelcase v1.0.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.1 // indirect
|
||||
github.com/fluxcd/helm-controller/api v0.21.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fluxcd/helm-controller/api v0.32.2 // indirect
|
||||
github.com/fluxcd/pkg/apis/acl v0.0.3 // indirect
|
||||
github.com/fluxcd/pkg/apis/kustomize v0.3.3 // indirect
|
||||
github.com/fluxcd/pkg/apis/meta v0.13.0 // indirect
|
||||
github.com/fluxcd/pkg/apis/kustomize v1.0.0 // indirect
|
||||
github.com/fluxcd/pkg/apis/meta v1.0.0 // indirect
|
||||
github.com/fluxcd/source-controller/api v0.24.4 // indirect
|
||||
github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/fvbommel/sortorder v1.0.2 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/fvbommel/sortorder v1.1.0 // indirect
|
||||
github.com/gdamore/encoding v1.0.0 // indirect
|
||||
github.com/gdamore/tcell/v2 v2.5.2 // indirect
|
||||
github.com/gertd/go-pluralize v0.1.7 // indirect
|
||||
github.com/getkin/kin-openapi v0.94.0 // indirect
|
||||
github.com/gdamore/tcell/v2 v2.6.0 // indirect
|
||||
github.com/getkin/kin-openapi v0.118.0 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-errors/errors v1.0.1 // indirect
|
||||
github.com/go-gorp/gorp/v3 v3.0.2 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.5 // indirect
|
||||
github.com/go-openapi/swag v0.19.14 // indirect
|
||||
github.com/go-playground/locales v0.14.0 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.9.0 // indirect
|
||||
github.com/go-resty/resty/v2 v2.7.0 // indirect
|
||||
github.com/go-errors/errors v1.5.1 // indirect
|
||||
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
|
||||
github.com/go-logr/logr v1.4.1 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/go-resty/resty/v2 v2.8.0 // indirect
|
||||
github.com/go-stack/stack v1.8.1 // indirect
|
||||
github.com/go-test/deep v1.0.8 // indirect
|
||||
github.com/go-test/deep v1.1.0 // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/goodhosts/hostsfile v0.1.1 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/go-containerregistry v0.9.0 // indirect
|
||||
github.com/google/btree v1.1.2 // indirect
|
||||
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/google/go-github/v32 v32.1.0 // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/gorilla/mux v1.8.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/gosuri/uitable v0.0.4 // indirect
|
||||
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.12.0 // indirect
|
||||
github.com/huandu/xstrings v1.3.2 // indirect
|
||||
github.com/imdario/mergo v0.3.13 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.18.0 // indirect
|
||||
github.com/huandu/xstrings v1.4.0 // indirect
|
||||
github.com/imdario/mergo v0.3.16 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/jmoiron/sqlx v1.3.5 // indirect
|
||||
|
@ -175,177 +170,165 @@ require (
|
|||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/klauspost/compress v1.15.12 // indirect
|
||||
github.com/kubevela/pkg v0.0.0-20230105054759-263dc191bf51 // indirect
|
||||
github.com/kubevela/prism v1.7.0-alpha.1 // indirect
|
||||
github.com/kubevela/workflow v0.4.1 // indirect
|
||||
github.com/klauspost/compress v1.17.7 // indirect
|
||||
github.com/kubevela/pkg v1.9.3-0.20241203070234-2cf98778c0a9 // indirect
|
||||
github.com/kubevela/workflow v0.6.1-0.20241210074645-d8a85b26c862 // indirect
|
||||
github.com/kyokomi/emoji v2.2.4+incompatible // indirect
|
||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
||||
github.com/leodido/go-urn v1.2.1 // indirect
|
||||
github.com/lib/pq v1.10.6 // indirect
|
||||
github.com/lib/pq v1.10.9 // indirect
|
||||
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/mailru/easyjson v0.7.6 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.13 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||
github.com/miekg/pkcs11 v1.1.1 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.1 // indirect
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
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-20220808134915-39b0c02b01ae // indirect
|
||||
github.com/moby/sys/mount v0.3.3 // indirect
|
||||
github.com/moby/sys/mountinfo v0.6.2 // indirect
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
|
||||
github.com/morikuni/aec v1.0.0 // indirect
|
||||
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/nacos-group/nacos-sdk-go/v2 v2.1.0 // indirect
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.2.2 // indirect
|
||||
github.com/nxadm/tail v1.4.8 // indirect
|
||||
github.com/oam-dev/cluster-gateway v1.7.0-alpha.1 // indirect
|
||||
github.com/oam-dev/cluster-register v1.0.4-0.20220928064144-5f76a9d7ca8c // indirect
|
||||
github.com/oam-dev/cluster-gateway v1.9.1-0.20241120140625-33c8891b781c // indirect
|
||||
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.8 // indirect
|
||||
github.com/oam-dev/terraform-controller v0.8.0 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198 // indirect
|
||||
github.com/opencontainers/runc v1.1.3 // indirect
|
||||
github.com/openkruise/kruise-api v1.1.0 // indirect
|
||||
github.com/openkruise/rollouts v0.1.1-0.20220622054609-149e5a48da5e // indirect
|
||||
github.com/openshift/library-go v0.0.0-20221111030555-73ed40c0a938 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||
github.com/opencontainers/runc v1.1.12 // indirect
|
||||
github.com/openkruise/kruise-api v1.4.0 // indirect
|
||||
github.com/openkruise/rollouts v0.3.0 // indirect
|
||||
github.com/openshift/library-go v0.0.0-20230327085348-8477ec72b725 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/pquerna/cachecontrol v0.1.0 // indirect
|
||||
github.com/prometheus/client_golang v1.12.2 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.34.0 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/prometheus/client_golang v1.18.0 // indirect
|
||||
github.com/prometheus/client_model v0.5.0 // indirect
|
||||
github.com/prometheus/common v0.45.0 // indirect
|
||||
github.com/prometheus/procfs v0.12.0 // indirect
|
||||
github.com/rivo/tview v0.0.0-20221128165837-db36428c92d9 // indirect
|
||||
github.com/rivo/uniseg v0.4.2 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // 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.2.0 // indirect
|
||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/rivo/uniseg v0.4.3 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/rubenv/sql-migrate v1.5.2 // indirect
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
|
||||
github.com/shopspring/decimal v1.3.1 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/spf13/afero v1.11.0 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.12.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.1 // indirect
|
||||
github.com/spf13/viper v1.15.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.2 // indirect
|
||||
github.com/theupdateframework/notary v0.7.0 // indirect
|
||||
github.com/tidwall/gjson v1.9.3 // indirect
|
||||
github.com/tidwall/gjson v1.14.4 // 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/wercker/stern v0.0.0-20190705090245-4fa46dd6987f // indirect
|
||||
github.com/wonderflow/cert-manager-api v1.0.4-0.20210304051430-e08aa76f6c5f // indirect
|
||||
github.com/xanzy/go-gitlab v0.60.0 // indirect
|
||||
github.com/xanzy/go-gitlab v0.91.1 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||
github.com/xlab/treeprint v1.1.0 // indirect
|
||||
github.com/zclconf/go-cty v1.10.0 // 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.opencensus.io v0.23.0 // indirect
|
||||
go.opentelemetry.io/contrib v1.6.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect
|
||||
go.opentelemetry.io/otel v1.3.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v0.20.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.3.0 // 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.3.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v0.11.0 // indirect
|
||||
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
go.uber.org/zap v1.21.0 // indirect
|
||||
go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect
|
||||
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
|
||||
golang.org/x/crypto v0.5.0 // indirect
|
||||
golang.org/x/net v0.6.0 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect
|
||||
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect
|
||||
golang.org/x/sys v0.5.0 // indirect
|
||||
golang.org/x/term v0.5.0 // indirect
|
||||
golang.org/x/text v0.7.0 // indirect
|
||||
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 // indirect
|
||||
google.golang.org/grpc v1.48.0 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
github.com/xlab/treeprint v1.2.0 // indirect
|
||||
github.com/zclconf/go-cty v1.13.0 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.10 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
|
||||
go.opentelemetry.io/otel v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.19.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
||||
go.starlark.net v0.0.0-20240329153429-e6e8e7ce1b7a // indirect
|
||||
go.uber.org/automaxprocs v1.5.3 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.26.0 // indirect
|
||||
go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect
|
||||
go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6 // indirect
|
||||
golang.org/x/crypto v0.32.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
|
||||
golang.org/x/mod v0.19.0 // indirect
|
||||
golang.org/x/net v0.33.0 // indirect
|
||||
golang.org/x/oauth2 v0.20.0 // indirect
|
||||
golang.org/x/sync v0.10.0 // indirect
|
||||
golang.org/x/sys v0.29.0 // indirect
|
||||
golang.org/x/term v0.28.0 // indirect
|
||||
golang.org/x/text v0.21.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.23.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/grpc v1.63.0 // indirect
|
||||
google.golang.org/protobuf v1.34.1 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/evanphx/json-patch.v5 v5.9.0 // 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/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
inet.af/netaddr v0.0.0-20220811202034-502d2d690317 // indirect
|
||||
istio.io/api v0.0.0-20220512212136-561ffec82582 // indirect
|
||||
istio.io/client-go v1.13.4 // indirect
|
||||
istio.io/gogo-genproto v0.0.0-20211208193508-5ab4acc9eb1e // indirect
|
||||
k8s.io/apiextensions-apiserver v0.25.2 // indirect
|
||||
k8s.io/apiserver v0.25.3 // indirect
|
||||
k8s.io/cli-runtime v0.25.2 // indirect
|
||||
k8s.io/component-base v0.25.3 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.29.2 // indirect
|
||||
k8s.io/apiserver v0.29.2 // indirect
|
||||
k8s.io/cli-runtime v0.29.2 // indirect
|
||||
k8s.io/component-base v0.29.2 // indirect
|
||||
k8s.io/helm v2.17.0+incompatible // indirect
|
||||
k8s.io/klog v1.0.0 // indirect
|
||||
k8s.io/kube-aggregator v0.25.3 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
|
||||
k8s.io/kubectl v0.25.2 // indirect
|
||||
k8s.io/metrics v0.25.2 // indirect
|
||||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
|
||||
open-cluster-management.io/api v0.7.0 // indirect
|
||||
oras.land/oras-go v1.2.0 // indirect
|
||||
k8s.io/kube-aggregator v0.27.2 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20240403164606-bc84c2ddaf99 // indirect
|
||||
k8s.io/kubectl v0.29.2 // indirect
|
||||
k8s.io/metrics v0.29.2 // indirect
|
||||
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
|
||||
open-cluster-management.io/api v0.11.0 // indirect
|
||||
oras.land/oras-go v1.2.5 // indirect
|
||||
sigs.k8s.io/apiserver-network-proxy v0.0.30 // 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/gateway-api v0.4.3 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
|
||||
sigs.k8s.io/kind v0.9.0 // indirect
|
||||
sigs.k8s.io/kustomize/api v0.12.1 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 // indirect
|
||||
sigs.k8s.io/apiserver-runtime v1.1.2-0.20221118041430-0a6394f6dda3 // indirect
|
||||
sigs.k8s.io/gateway-api v0.7.1 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/kind v0.20.0 // indirect
|
||||
sigs.k8s.io/kustomize/api v0.16.0 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.16.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
cuelang.org/go => github.com/kubevela/cue v0.4.4-0.20221107123854-a976b0e340be
|
||||
cuelang.org/go => cuelang.org/go v0.9.2
|
||||
github.com/docker/cli => github.com/docker/cli v20.10.9+incompatible
|
||||
github.com/docker/docker => github.com/moby/moby v20.10.25+incompatible
|
||||
github.com/google/certificate-transparency-go => github.com/google/certificate-transparency-go v1.1.3
|
||||
github.com/k3d-io/k3d/v5 => github.com/chivalryq/k3d/v5 v5.0.0-20230115105251-1b3833ce38cc
|
||||
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
|
||||
k8s.io/component-base => k8s.io/component-base v0.25.3 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0
|
||||
google.golang.org/grpc => google.golang.org/grpc v1.53.0
|
||||
oras.land/oras-go => oras.land/oras-go v1.2.2
|
||||
sigs.k8s.io/apiserver-runtime => github.com/kmodules/apiserver-runtime v1.1.2-0.20240303184316-6365e03bf9ac
|
||||
)
|
||||
|
||||
replace sigs.k8s.io/apiserver-network-proxy/konnectivity-client => sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.31-0.20220502234555-5308cea56b78
|
||||
replace github.com/containerd/containerd => github.com/containerd/containerd v1.6.18
|
||||
|
|
|
@ -20,5 +20,5 @@ echo "downloading addons"
|
|||
addons=("velaux-$velaux_version.tgz")
|
||||
for addon in ${addons[*]}; do
|
||||
echo saving "$addon" to "$VELA_ADDON_DIR"/"$addon"
|
||||
curl -L "http://addons.kubevela.net/$addon" -o "$VELA_ADDON_DIR"/"$addon"
|
||||
curl -L "https://kubevela.github.io/catalog/official/$addon" -o "$VELA_ADDON_DIR"/"$addon"
|
||||
done
|
||||
|
|
|
@ -46,8 +46,7 @@ function download_images() {
|
|||
vela_images=("oamdev/vela-core:${vela_version}"
|
||||
"oamdev/cluster-gateway:${cluster_gateway_version}"
|
||||
"oamdev/kube-webhook-certgen:${certgen_version}"
|
||||
"oamdev/velaux:${velaux_version}"
|
||||
"oamdev/vela-apiserver:${vela_version}")
|
||||
"oamdev/velaux:${velaux_version}")
|
||||
|
||||
for IMG in ${vela_images[*]};
|
||||
do
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
# This script is for upgrade kubevela helm charts maintained in velad repo
|
||||
# Chart in this repo have one more argument(deployByPod) than that in kubevela repo.
|
||||
|
||||
# usage: ./hack/upgrade_vela.sh version_now version_upgrade_to
|
||||
# e.g. ./hack/upgrade_vela.sh v1.3.3 v1.3.4
|
||||
# usage: ./hack/upgrade_vela.sh version_upgrade_to
|
||||
# e.g. ./hack/upgrade_vela.sh v1.3.4
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -19,9 +19,23 @@ echo "Upgrading KubeVela version From: "$VERSION_NOW" --> TO: "$VERSION_TO
|
|||
|
||||
echo "Upgrading go.mod version..."
|
||||
|
||||
sed -i "" -e "s/github.com\/oam-dev\/kubevela v.*/github.com\/oam-dev\/kubevela $VERSION_TO/g" go.mod
|
||||
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
# macOS
|
||||
sed -i "" -e "s/github.com\/oam-dev\/kubevela v.*/github.com\/oam-dev\/kubevela $VERSION_TO/g" go.mod
|
||||
else
|
||||
# Linux
|
||||
sed -i -e "s/github.com\/oam-dev\/kubevela v.*/github.com\/oam-dev\/kubevela $VERSION_TO/g" go.mod
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
|
||||
echo "Upgrading version variable in Makefile"
|
||||
|
||||
sed -i "" -e "s/VELA_VERSION ?= v.*/VELA_VERSION ?= $VERSION_TO/g" Makefile
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
# macOS
|
||||
sed -i "" -e "s/VELA_VERSION ?= v.*/VELA_VERSION ?= $VERSION_TO/g" Makefile
|
||||
else
|
||||
# Linux
|
||||
sed -i -e "s/VELA_VERSION ?= v.*/VELA_VERSION ?= $VERSION_TO/g" Makefile
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
#! /bin/bash
|
||||
|
||||
# This script is for upgrade VelaUX
|
||||
|
||||
set -e
|
||||
|
||||
# If one parameter is passed, use it as the version to upgrade to.
|
||||
# If two parameters are passed, use the second one as VelaUX image version. Sometimes, we skip the VelaUX image, only upgrade the VelaUX addon.
|
||||
|
||||
if [ $# = 1 ]; then
|
||||
VERSION_TO=$1
|
||||
IMAGE_VERSION=$1
|
||||
elif [ $# = 2 ]; then
|
||||
VERSION_TO=$1
|
||||
IMAGE_VERSION=$2
|
||||
else
|
||||
echo "Usage: "$0" version_to [image_version]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERION_TO=$1
|
||||
IMAGE_VERSION=$2
|
||||
|
||||
|
||||
VERSION_NOW=$(cat Makefile |grep "VELAUX_VERSION ?=" |grep -o "v.*")
|
||||
|
||||
|
||||
PATCH_FILE_NAME=$VERSION_NOW-$VERSION_TO.patch
|
||||
WORKDIR=pkg/resources/static/vela
|
||||
|
||||
echo "Upgrading VelaUX version From: "$VERSION_NOW" --> TO: "$VERSION_TO,
|
||||
if [ -n "$IMAGE_VERSION" ]; then
|
||||
echo "Upgrading VelaUX image version to: ""$IMAGE_VERSION"
|
||||
else
|
||||
echo "VelaUX image version is the same as VelaUX addon version"
|
||||
IMAGE_VERSION=$VERSION_TO
|
||||
fi
|
||||
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
# macOS
|
||||
sed -i "" -e "s/VELAUX_VERSION ?= v.*/VELAUX_VERSION ?= $VERSION_TO/g" Makefile
|
||||
sed -i "" -e "s/VELAUX_IMAGE_VERSION ?= .*/VELAUX_IMAGE_VERSION ?= $IMAGE_VERSION/g" Makefile
|
||||
else
|
||||
# Linux
|
||||
sed -i -e "s/VELAUX_VERSION ?= v.*/VELAUX_VERSION ?= $VERSION_TO/g" Makefile
|
||||
sed -i -e "s/VELAUX_IMAGE_VERSION ?= .*/VELAUX_IMAGE_VERSION ?= $IMAGE_VERSION/g" Makefile
|
||||
fi
|
|
@ -6,7 +6,7 @@ GOBIN=$(shell go env GOBIN)
|
|||
endif
|
||||
|
||||
|
||||
GOLANGCILINT_VERSION ?= v1.49.0
|
||||
GOLANGCILINT_VERSION ?= v1.54.2
|
||||
|
||||
.PHONY: golangci
|
||||
golangci:
|
||||
|
@ -32,7 +32,7 @@ ifeq (, $(shell which staticcheck))
|
|||
@{ \
|
||||
set -e ;\
|
||||
echo 'installing honnef.co/go/tools/cmd/staticcheck ' ;\
|
||||
go install honnef.co/go/tools/cmd/staticcheck@v0.3.0 ;\
|
||||
go install honnef.co/go/tools/cmd/staticcheck@v0.5.1 ;\
|
||||
}
|
||||
STATICCHECK=$(GOBIN)/staticcheck
|
||||
else
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
type InstallArgs struct {
|
||||
BindIP string
|
||||
NodePublicIP string
|
||||
MasterIP string
|
||||
DBEndpoint string
|
||||
ClusterOnly bool
|
||||
Token string
|
||||
|
@ -18,6 +19,7 @@ type InstallArgs struct {
|
|||
InstallArgs cli.InstallArgs
|
||||
Name string
|
||||
DryRun bool
|
||||
Worker bool
|
||||
}
|
||||
|
||||
// UninstallArgs defines arguments for velad uninstall command
|
||||
|
@ -38,6 +40,14 @@ type TokenArgs struct {
|
|||
Name string
|
||||
}
|
||||
|
||||
// JoinArgs defines arguments for velad join command
|
||||
type JoinArgs struct {
|
||||
Token string
|
||||
Name string
|
||||
MasterIP string
|
||||
DryRun bool
|
||||
}
|
||||
|
||||
// LoadBalancerArgs defines arguments for load balancer command
|
||||
type LoadBalancerArgs struct {
|
||||
Hosts []string
|
||||
|
@ -121,11 +131,11 @@ var (
|
|||
VelaDDockerNetwork = "k3d-velad"
|
||||
|
||||
// K3dImageK3s is k3s image tag
|
||||
K3dImageK3s = "rancher/k3s:v1.24.8-k3s1"
|
||||
K3dImageK3s = "rancher/k3s:v1.29.13-k3s1"
|
||||
// K3dImageTools is k3d tools image tag
|
||||
K3dImageTools = "ghcr.io/k3d-io/k3d-tools:latest"
|
||||
// K3dImageProxy is k3d proxy image tag
|
||||
K3dImageProxy = "ghcr.io/k3d-io/k3d-proxy:5.4.6"
|
||||
K3dImageProxy = "ghcr.io/k3d-io/k3d-proxy:5.5.1"
|
||||
|
||||
// KubeVelaHelmRelease is helm release name for vela
|
||||
KubeVelaHelmRelease = "kubevela"
|
||||
|
|
|
@ -10,11 +10,6 @@ var newErr = errors.New
|
|||
|
||||
// Validate validates the `install` argument
|
||||
func (a *InstallArgs) Validate() error {
|
||||
if runtime.GOOS == GoosLinux {
|
||||
if a.Name != DefaultVelaDClusterName {
|
||||
return newErr("name flag not works in linux")
|
||||
}
|
||||
}
|
||||
if a.NodePublicIP != "" && a.BindIP == "" {
|
||||
a.BindIP = a.NodePublicIP
|
||||
}
|
||||
|
@ -53,3 +48,11 @@ func (a TokenArgs) Validate() error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Validate validates the join arguments
|
||||
func (a JoinArgs) Validate() error {
|
||||
if runtime.GOOS != GoosLinux {
|
||||
return newErr("join command only works in linux")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -16,8 +16,14 @@ func GetK3sServerArgs(args apis.InstallArgs) []string {
|
|||
if args.NodePublicIP != "" {
|
||||
serverArgs = append(serverArgs, "--node-external-ip="+args.NodePublicIP)
|
||||
}
|
||||
if args.Token != "" {
|
||||
serverArgs = append(serverArgs, "--token="+args.Token)
|
||||
// K3s install script requires to provide token using K3S_TOKEN env var when install agent, so skip it here
|
||||
if !args.Worker {
|
||||
if args.Token != "" {
|
||||
serverArgs = append(serverArgs, "--token="+args.Token)
|
||||
}
|
||||
}
|
||||
if args.Name != "" {
|
||||
serverArgs = append(serverArgs, "--node-name="+args.Name)
|
||||
}
|
||||
return serverArgs
|
||||
}
|
||||
|
|
|
@ -10,4 +10,5 @@ type Handler interface {
|
|||
SetKubeconfig() error
|
||||
LoadImage(image string) error
|
||||
GetStatus() apis.ClusterStatus
|
||||
Join(args apis.JoinArgs) error
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ type k3dSetupOptions struct {
|
|||
|
||||
const (
|
||||
// K3dImageTag is image tag of k3d
|
||||
K3dImageTag = "v1.24.8-k3s1"
|
||||
K3dImageTag = "v1.27.2-k3s1"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -67,6 +67,11 @@ type K3dHandler struct {
|
|||
cfg config.ClusterConfig
|
||||
}
|
||||
|
||||
// Join -
|
||||
func (d *K3dHandler) Join(_ apis.JoinArgs) error {
|
||||
return errors.New("not implemented")
|
||||
}
|
||||
|
||||
// Install will install a k3d cluster
|
||||
func (d *K3dHandler) Install(args apis.InstallArgs) error {
|
||||
var err error
|
||||
|
|
|
@ -27,10 +27,32 @@ var (
|
|||
// K3sHandler handle k3s in linux
|
||||
type K3sHandler struct{}
|
||||
|
||||
// Join a worker node to k3s cluster
|
||||
func (l K3sHandler) Join(args apis.JoinArgs) error {
|
||||
info("Join k3s cluster...")
|
||||
// #nosec
|
||||
err := SetupK3s(apis.InstallArgs{
|
||||
Worker: true,
|
||||
DryRun: args.DryRun,
|
||||
Token: args.Token,
|
||||
Name: args.Name,
|
||||
MasterIP: args.MasterIP,
|
||||
})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "fail to join k3s cluster")
|
||||
}
|
||||
|
||||
info("🎉 Successfully join worker node")
|
||||
return nil
|
||||
}
|
||||
|
||||
var _ Handler = &K3sHandler{}
|
||||
|
||||
type k3sSetupOptions struct {
|
||||
DryRun bool
|
||||
DryRun bool
|
||||
Worker bool
|
||||
MasterIP string
|
||||
Token string
|
||||
}
|
||||
|
||||
// Install install k3s cluster
|
||||
|
@ -46,9 +68,13 @@ func (l K3sHandler) Install(args apis.InstallArgs) error {
|
|||
// Uninstall uninstall k3s cluster
|
||||
func (l K3sHandler) Uninstall(name string) error {
|
||||
info("Uninstall k3s...")
|
||||
script, err := decideUninstallScript()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// #nosec
|
||||
uCmd := exec.Command("/usr/local/bin/k3s-uninstall.sh")
|
||||
err := uCmd.Run()
|
||||
uCmd := exec.Command(script)
|
||||
err = uCmd.Run()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Fail to uninstall k3s")
|
||||
}
|
||||
|
@ -58,7 +84,7 @@ func (l K3sHandler) Uninstall(name string) error {
|
|||
dCmd := exec.Command("rm", apis.VelaLinkPos)
|
||||
err = dCmd.Run()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Fail to delete vela link")
|
||||
info("No vela in /usr/local/bin, skip uninstall")
|
||||
}
|
||||
info("Successfully uninstall vela CLI")
|
||||
return nil
|
||||
|
@ -154,6 +180,10 @@ func fillVelaStatus(status *apis.ClusterStatus) {
|
|||
|
||||
// prepareK3sImages Write embed images
|
||||
func (o k3sSetupOptions) prepareK3sImages() error {
|
||||
if o.Worker {
|
||||
info("Skipping image unpacking on worker node")
|
||||
return nil
|
||||
}
|
||||
embedK3sImage, err := resources.K3sImage.Open("static/k3s/images/k3s-airgap-images.tar.gz")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -192,6 +222,16 @@ func (o k3sSetupOptions) prepareK3sImages() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (o k3sSetupOptions) prepareEnv(cmd *exec.Cmd) {
|
||||
masterURL := fmt.Sprintf("https://%s:%d", o.MasterIP, 6443)
|
||||
cmd.Env = os.Environ()
|
||||
cmd.Env = append(cmd.Env, "INSTALL_K3S_SKIP_DOWNLOAD=true")
|
||||
if o.Worker {
|
||||
cmd.Env = append(cmd.Env, "K3S_URL="+masterURL, "K3S_TOKEN="+o.Token)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// prepareK3sScript Write k3s install script to local
|
||||
func (o k3sSetupOptions) prepareK3sScript() (string, error) {
|
||||
var (
|
||||
|
@ -239,7 +279,12 @@ func (o k3sSetupOptions) prepareK3sBin() error {
|
|||
|
||||
// SetupK3s will set up K3s as control plane.
|
||||
func SetupK3s(cArgs apis.InstallArgs) error {
|
||||
o := k3sSetupOptions{DryRun: cArgs.DryRun}
|
||||
o := k3sSetupOptions{
|
||||
DryRun: cArgs.DryRun,
|
||||
Worker: cArgs.Worker,
|
||||
MasterIP: cArgs.MasterIP,
|
||||
Token: cArgs.Token,
|
||||
}
|
||||
info("Preparing cluster setup script...")
|
||||
script, err := o.prepareK3sScript()
|
||||
if err != nil {
|
||||
|
@ -266,11 +311,10 @@ func SetupK3s(cArgs apis.InstallArgs) error {
|
|||
if !o.DryRun {
|
||||
/* #nosec */
|
||||
cmd := exec.Command("/bin/bash", args...)
|
||||
|
||||
cmd.Env = os.Environ()
|
||||
cmd.Env = append(cmd.Env, "INSTALL_K3S_SKIP_DOWNLOAD=true")
|
||||
o.prepareEnv(cmd)
|
||||
info(cmd.String())
|
||||
output, err = cmd.CombinedOutput()
|
||||
fmt.Print(string(output))
|
||||
infof(string(output))
|
||||
}
|
||||
return errors.Wrap(err, "K3s install script failed")
|
||||
}
|
||||
|
@ -296,3 +340,15 @@ func (l K3sHandler) GenKubeconfig(ctx apis.Context, bindIP string) error {
|
|||
info("Successfully generate kubeconfig at ", apis.K3sExternalKubeConfigLocation)
|
||||
return err
|
||||
}
|
||||
|
||||
func decideUninstallScript() (string, error) {
|
||||
serverUninstallFile := "/usr/local/bin/k3s-uninstall.sh"
|
||||
agentUninstallFile := "/usr/local/bin/k3s-agent-uninstall.sh"
|
||||
if _, err := os.Stat(serverUninstallFile); err == nil {
|
||||
return serverUninstallFile, nil
|
||||
}
|
||||
if _, err := os.Stat(agentUninstallFile); err == nil {
|
||||
return agentUninstallFile, nil
|
||||
}
|
||||
return "", errors.New("can not find k3s uninstall script")
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ func NewVeladCommand() *cobra.Command {
|
|||
}
|
||||
cmd.AddCommand(
|
||||
NewInstallCmd(c, ioStreams),
|
||||
NewJoinCmd(),
|
||||
NewStatusCmd(),
|
||||
NewLoadBalancerCmd(),
|
||||
NewKubeConfigCmd(),
|
||||
|
@ -93,7 +94,7 @@ velad load-balancer wizard
|
|||
cmd.Flags().StringVar(&iArgs.BindIP, "bind-ip", "", "Bind additional hostname or IP to the cluster (e.g. IP of load balancer for multi-nodes VelaD cluster). This is used to generate kubeconfig access from remote (`velad kubeconfig --external`). If not set, will use node-ip")
|
||||
cmd.Flags().StringVar(&iArgs.NodePublicIP, "node-ip", "", "Set the public IP of the node")
|
||||
cmd.Flags().StringVar(&iArgs.Token, "token", "", "Token for identify the cluster. Can be used to restart the control plane or register other node. If not set, random token will be generated")
|
||||
cmd.Flags().StringVar(&iArgs.Name, "name", apis.DefaultVelaDClusterName, "The name of the cluster. only works when NOT in linux environment")
|
||||
cmd.Flags().StringVar(&iArgs.Name, "name", apis.DefaultVelaDClusterName, "In Mac/Windows environment, use this to specify the name of the cluster. In Linux environment, use this to specify the name of node")
|
||||
cmd.Flags().BoolVar(&iArgs.DryRun, "dry-run", false, "Dry run the install process")
|
||||
|
||||
// inherit args from `vela install`
|
||||
|
@ -105,6 +106,26 @@ velad load-balancer wizard
|
|||
return cmd
|
||||
}
|
||||
|
||||
// NewJoinCmd create join cmd
|
||||
func NewJoinCmd() *cobra.Command {
|
||||
jArgs := apis.JoinArgs{}
|
||||
cmd := &cobra.Command{
|
||||
Use: "join",
|
||||
Short: "Join a worker node to a control plane, only works in linux environment",
|
||||
Long: "Join a worker node to a control plane, only works in linux environment",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return joinCmd(jArgs)
|
||||
},
|
||||
}
|
||||
cmd.Flags().StringVar(&jArgs.Token, "token", "", "Token for identify the cluster. Can be used to restart the control plane or register other node. If not set, random token will be generated")
|
||||
cmd.Flags().StringVarP(&jArgs.Name, "worker-name", "n", "", "The name of worker node, default to hostname")
|
||||
cmd.Flags().StringVar(&jArgs.MasterIP, "master-ip", "", "Set the public IP of the master node")
|
||||
cmd.Flags().BoolVar(&jArgs.DryRun, "dry-run", false, "Dry run the join process")
|
||||
_ = cmd.MarkFlagRequired("token")
|
||||
_ = cmd.MarkFlagRequired("master-ip")
|
||||
return cmd
|
||||
}
|
||||
|
||||
// NewStatusCmd create status command
|
||||
func NewStatusCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
|
@ -140,7 +161,8 @@ func NewUninstallCmd() *cobra.Command {
|
|||
uArgs := apis.UninstallArgs{}
|
||||
cmd := &cobra.Command{
|
||||
Use: "uninstall",
|
||||
Short: "uninstall control plane",
|
||||
Short: "Uninstall control plane or detach worker node",
|
||||
Long: "Remove master node if it's the only one, or remove this worker node from the cluster",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return uninstallCmd(uArgs)
|
||||
},
|
||||
|
|
|
@ -24,14 +24,20 @@ func tokenCmd(ctx context.Context, args apis.TokenArgs) error {
|
|||
switch runtime.GOOS {
|
||||
case apis.GoosLinux:
|
||||
_, err := os.Stat(apis.K3sTokenPath)
|
||||
if err == nil {
|
||||
file, err := os.ReadFile("/var/lib/rancher/k3s/server/token")
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "fail to read token file: %s", apis.K3sTokenPath)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
info("No token found, control plane not set up yet.")
|
||||
return nil
|
||||
}
|
||||
fmt.Println(string(file))
|
||||
return errors.Wrapf(err, "fail to stat token file: %s", apis.K3sTokenPath)
|
||||
}
|
||||
info("No token found, control plane not set up yet.")
|
||||
file, err := os.ReadFile("/var/lib/rancher/k3s/server/token")
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "fail to read token file: %s", apis.K3sTokenPath)
|
||||
}
|
||||
fmt.Println(string(file))
|
||||
return nil
|
||||
|
||||
default:
|
||||
token, err := utils.GetTokenFromCluster(ctx, args.Name)
|
||||
if err != nil {
|
||||
|
@ -131,9 +137,9 @@ func uninstallCmd(uArgs apis.UninstallArgs) error {
|
|||
}
|
||||
err = h.Uninstall(uArgs.Name)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Failed to uninstall KubeVela control plane")
|
||||
return errors.Wrap(err, "Failed to uninstall KubeVela control plane/worker node")
|
||||
}
|
||||
info("Successfully uninstall KubeVela control plane!")
|
||||
info("Successfully uninstall KubeVela control plane/worker node")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -148,3 +154,11 @@ func statusCmd() {
|
|||
vStatus := vela.GetStatus()
|
||||
PrintVelaStatus(vStatus)
|
||||
}
|
||||
|
||||
func joinCmd(args apis.JoinArgs) error {
|
||||
if err := args.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return h.Join(args)
|
||||
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ func GetTokenFromCluster(ctx context.Context, clusterName string) (string, error
|
|||
}
|
||||
}
|
||||
if ID == "" {
|
||||
return "", errors.Errorf("No cluster with name %s found.", clusterName)
|
||||
return "", errors.Errorf("no cluster with name %s found.", clusterName)
|
||||
}
|
||||
exec, err := Exec(ctx, dockerCli, ID, []string{"cat", apis.K3sTokenPath})
|
||||
if err != nil {
|
||||
|
|
|
@ -13,7 +13,6 @@ import (
|
|||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/client"
|
||||
|
||||
"github.com/kyokomi/emoji/v2"
|
||||
"github.com/oam-dev/kubevela/pkg/utils/system"
|
||||
"github.com/oam-dev/kubevela/references/cli"
|
||||
"github.com/oam-dev/velad/pkg/apis"
|
||||
|
@ -89,7 +88,7 @@ func TransArgsToString(args cli.InstallArgs) []string {
|
|||
res = append(res, "--namespace="+args.Namespace)
|
||||
}
|
||||
if !args.Detail {
|
||||
res = append(res, "--detail=false")
|
||||
res = append(res, "--detail="+fmt.Sprintf("%v", args.Detail))
|
||||
}
|
||||
if !args.ReuseValues {
|
||||
res = append(res, "--reuse=false")
|
||||
|
@ -139,7 +138,7 @@ func Cleanup() error {
|
|||
// InfoBytes is a helper function to print a byte array
|
||||
func InfoBytes(b []byte) {
|
||||
if len(b) != 0 {
|
||||
Info(string(b))
|
||||
Infof(string(b))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,15 +202,16 @@ func GetKubeconfigDir() string {
|
|||
func PrintGuide(ctx *apis.Context, args apis.InstallArgs) {
|
||||
WarnSaveToken(args.Token, args.Name)
|
||||
if !args.ClusterOnly {
|
||||
emoji.Println(":rocket: Successfully install KubeVela control plane")
|
||||
Info("🚀 Successfully install KubeVela control plane")
|
||||
printHTTPGuide(args.Name)
|
||||
printWindowsPathGuide()
|
||||
emoji.Println(":telescope: See available commands with `vela help`")
|
||||
Info("🔭 See available commands with `vela help`")
|
||||
printVelaUXGuide()
|
||||
} else {
|
||||
emoji.Println(":rocket: Successfully install a pure cluster! ")
|
||||
Info("🚀 Successfully install a pure cluster! ")
|
||||
if runtime.GOOS != apis.GoosLinux {
|
||||
emoji.Println(":link: If you have a cluster with KubeVela, Join this as sub-cluster:")
|
||||
emoji.Printf(" vela cluster join $(velad kubeconfig --name %s --internal)\n", args.Name)
|
||||
Info("🔗 If you have a cluster with KubeVela, Join this as sub-cluster:")
|
||||
Infof(" vela cluster join $(velad kubeconfig --name %s --internal)\n", args.Name)
|
||||
}
|
||||
printHTTPGuide(args.Name)
|
||||
}
|
||||
|
@ -219,29 +219,33 @@ func PrintGuide(ctx *apis.Context, args apis.InstallArgs) {
|
|||
printKubeconfigGuide(args)
|
||||
}
|
||||
|
||||
func printVelaUXGuide() {
|
||||
Infof("💡 To enable dashboard, run `vela addon enable %s`\n", velauxDir)
|
||||
}
|
||||
|
||||
func printWindowsPathGuide() {
|
||||
if runtime.GOOS != apis.GoosWindows {
|
||||
return
|
||||
}
|
||||
path := GetCLIInstallPath()
|
||||
velaDir := filepath.Dir(path)
|
||||
emoji.Println(":hammer: To add vela to PATH, if you are using cmd:")
|
||||
Info("🔨 To add vela to PATH, if you are using cmd:")
|
||||
Infof(" set PATH=%%PATH%%;%s\n", velaDir)
|
||||
Info(" If you are using Powershell:")
|
||||
Infof(" $Env:PATH += ';%s'\n", velaDir)
|
||||
}
|
||||
|
||||
func printKubeconfigGuide(args apis.InstallArgs) {
|
||||
emoji.Println(":key: To access the cluster, set KUBECONFIG:")
|
||||
Info("🔑 To access the cluster, set KUBECONFIG:")
|
||||
var kubeconfigArg = "--host"
|
||||
if args.BindIP != "" {
|
||||
kubeconfigArg = "--external"
|
||||
}
|
||||
switch runtime.GOOS {
|
||||
case apis.GoosLinux, apis.GoosDarwin:
|
||||
emoji.Printf(" export KUBECONFIG=$(velad kubeconfig --name %s %s)\n", args.Name, kubeconfigArg)
|
||||
Infof(" export KUBECONFIG=$(velad kubeconfig --name %s %s)\n", args.Name, kubeconfigArg)
|
||||
case apis.GoosWindows:
|
||||
emoji.Printf(" $env:KUBECONFIG = $(velad kubeconfig --name %s %s)\n", args.Name, kubeconfigArg)
|
||||
Infof(" $env:KUBECONFIG = $(velad kubeconfig --name %s %s)\n", args.Name, kubeconfigArg)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -295,7 +299,7 @@ func GetCLIInstallPath() string {
|
|||
func printHTTPGuide(clusterName string) {
|
||||
switch runtime.GOOS {
|
||||
case apis.GoosLinux:
|
||||
emoji.Printf(":laptop: When using gateway trait, you can access with 127.0.0.1\n")
|
||||
Infof("💻 When using gateway trait, you can access with 127.0.0.1\n")
|
||||
default:
|
||||
dockerCli, err := client.NewClientWithOpts(client.FromEnv)
|
||||
if err != nil {
|
||||
|
@ -318,7 +322,7 @@ func printHTTPGuide(clusterName string) {
|
|||
}
|
||||
for _, p := range ports {
|
||||
if p.PrivatePort == 80 {
|
||||
emoji.Printf(":laptop: When using gateway trait, you can access with 127.0.0.1:%d\n", p.PublicPort)
|
||||
Infof("💻 When using gateway trait, you can access with 127.0.0.1:%d\n", p.PublicPort)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strings"
|
||||
|
||||
core "github.com/oam-dev/kubevela/apis/core.oam.dev"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha2"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
@ -33,7 +33,7 @@ func EditGatewayDefinition() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
gateway := &v1alpha2.TraitDefinition{}
|
||||
gateway := &v1beta1.TraitDefinition{}
|
||||
ctx := context.Background()
|
||||
err = cli.Get(ctx, client.ObjectKey{
|
||||
Name: "gateway",
|
||||
|
|
Loading…
Reference in New Issue