Skip to content

Commit 43c3784

Browse files
committed
Merge remote-tracking branch 'upstream/master' into postgres--operator
2 parents b2aecd3 + 22cc53d commit 43c3784

File tree

19 files changed

+536
-68
lines changed

19 files changed

+536
-68
lines changed

.github/workflows/addon-test.yaml

+35-32
Original file line numberDiff line numberDiff line change
@@ -29,60 +29,65 @@ jobs:
2929

3030
Addon-test:
3131
name: Addon-test
32-
runs-on: aliyun
32+
runs-on: self-hosted
3333
needs: detect-noop
3434
if: needs.detect-noop.outputs.noop != 'true'
3535

3636
steps:
37+
- name: Check out code into the Go module directory
38+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
39+
40+
- name: Install tools
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install make gcc jq ca-certificates curl gnupg -y
44+
snap install docker
45+
snap install kubectl --classic
46+
snap install helm --classic
3747
3848
- name: Setup Go
39-
uses: actions/setup-go@v2
49+
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
4050
with:
4151
go-version: ${{ env.GO_VERSION }}
4252

43-
- name: Check out code into the Go module directory
44-
uses: actions/checkout@v2
45-
4653
- name: Check addon semver
4754
run: |
4855
make check-addon-semver
4956
50-
- name: Install ginkgo
51-
run: |
52-
sudo apt-get update
53-
sudo apt-get install -y golang-ginkgo-dev
57+
- name: Tear down K3d if exist
58+
run: |
59+
k3d cluster delete || true
60+
k3d cluster delete worker || true
5461
55-
- name: Install Helm
56-
uses: engineerd/[email protected]
62+
- name: Setup K3d (Hub)
63+
uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96
5764
with:
58-
name: helm
59-
url: https://get.helm.sh/helm-v3.1.2-linux-amd64.tar.gz
60-
pathInArchive: linux-amd64/helm
61-
62-
- name: Setup Kind Cluster (Worker)
63-
run: |
64-
kind delete cluster --name worker
65-
kind create cluster --image kindest/node:v1.20.15@sha256:6f2d011dffe182bad80b85f6c00e8ca9d86b5b8922cdf433d53575c4c5212248 --name worker
66-
kubectl version
67-
kubectl cluster-info
68-
kind get kubeconfig --name worker --internal > /tmp/worker.kubeconfig
69-
kind get kubeconfig --name worker > /tmp/worker.client.kubeconfig
65+
version: ${{ matrix.k8s-version }}
66+
github-token: ${{ secrets.GITHUB_TOKEN }}
67+
k3d-args: ${{ env.EGRESS_ARG }}
7068

69+
- name: Setup K3d (Worker)
70+
uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96
71+
with:
72+
version: ${{ matrix.k8s-version }}
73+
github-token: ${{ secrets.GITHUB_TOKEN }}
74+
k3d-name: worker
75+
k3d-args: --kubeconfig-update-default=false --network=k3d-k3s-default ${{ env.EGRESS_ARG }}
7176

72-
- name: Setup Kind Cluster (Hub)
77+
- name: Generating internal worker kubeconfig
7378
run: |
74-
kind delete cluster
75-
kind create cluster --image kindest/node:v1.20.15@sha256:6f2d011dffe182bad80b85f6c00e8ca9d86b5b8922cdf433d53575c4c5212248
76-
kubectl version
77-
kubectl cluster-info
79+
internal_ip=$(docker network inspect k3d-k3s-default|jq ".[0].Containers"| jq -r '.[]| select(.Name=="k3d-worker-server-0")|.IPv4Address' | cut -d/ -f1)
80+
k3d kubeconfig get worker > /tmp/worker.client.kubeconfig
81+
cp /tmp/worker.client.kubeconfig /tmp/worker.kubeconfig
82+
sed -i "s/0.0.0.0:[0-9]\+/$internal_ip:6443/" /tmp/worker.kubeconfig
7883
7984
- name: Install vela cli
8085
run: |
81-
curl -fsSl https://kubevela.io/script/install.sh | bash -s v1.8.0-alpha.3
86+
curl -fsSl https://kubevela.io/script/install.sh | bash -s v1.9.0-alpha.3
8287
8388
- name: Install vela core
8489
run: |
85-
vela install --yes
90+
vela install -v v1.9.0-alpha.2 --yes
8691
kubectl get deploy -n vela-system kubevela-vela-core -oyaml
8792
8893
- name: Vela worker cluster join
@@ -105,5 +110,3 @@ jobs:
105110
go build -o main test/e2e-test/addon-test/main.go
106111
./main ${{ steps.changed-files.outputs.all_changed_files }}
107112
108-
109-

addons/fluxcd/config-templates/helm-repository.cue

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import (
2+
"vela/config"
3+
)
4+
15
metadata: {
26
name: "helm-repository"
37
alias: "Helm Repository"
@@ -37,6 +41,11 @@ template: {
3741
}
3842
}
3943
}
44+
45+
validation: config.#HelmRepository & {
46+
$params: parameter
47+
}
48+
4049
parameter: {
4150
// +usage=The public url of the helm chart repository.
4251
url: string

addons/fluxcd/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: fluxcd
2-
version: 2.3.4
2+
version: 2.3.5
33
description: Extended workload to do continuous and progressive delivery
44
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/flux/horizontal/color/flux-horizontal-color.png
55
url: https://fluxcd.io
@@ -11,4 +11,4 @@ tags:
1111
- Helm
1212

1313
system:
14-
vela: ">=v1.7.0"
14+
vela: ">=1.9.0-alpha.2"

addons/kruise-rollout/definitions/canary-deploy.cue

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ template: {
3434
type: "rolling-release"
3535
properties: {
3636
weight: parameter.weight
37+
rolloutType: parameter.rolloutType
3738
}
3839
}]
3940
}]
@@ -47,5 +48,7 @@ template: {
4748
components?: *[] | [...string]
4849
//+usage=Specify the percentage of replicas to update to the new version at each step, as well as the routing of traffic to the new version, e.g., 20, 40...
4950
weight: int
51+
//+usage=Specifies the rollout type. Optional values: "partition", "canary". If not specify, the rolloutType is partition.
52+
rolloutType: *"partition" | string
5053
}
5154
}

addons/kruise-rollout/definitions/rolling-release.cue

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ template: {
8383
final: *false | bool
8484
// +usage=Define the workload for rolling. If not specified, it will be auto detected.
8585
workloadType?: #WorkloadType
86+
//+usage=Specifies the rollout type. Optional values: "partition", "canary". If not specify, the rolloutType is partition.
87+
rolloutType: *"partition" | string
8688
}
8789

8890
app: component: {...}
@@ -123,7 +125,7 @@ template: {
123125
name: context.name
124126
namespace: context.namespace
125127
annotations: {
126-
"rollouts.kruise.io/rolling-style": "partition"
128+
"rollouts.kruise.io/rolling-style": parameter.rolloutType
127129
"controller.core.oam.dev/skip-resume": "true"
128130
}
129131
}

addons/kruise-rollout/metadata.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: kruise-rollout
2-
version: 1.5.0
2+
version: 1.5.1
33
description: Rollout workload by kruise controller
44
url: https://github.com/openkruise/rollouts
55
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openkruise/stacked/color/openkruise-stacked-color.png
66

7-
deployTo:
8-
control_plane: true
9-
runtime_cluster: true
10-
117
tags:
128
- Official
139
- Rollout

addons/kruise-rollout/template.cue

+30-16
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,37 @@ output: {
77
name: "kruise-rollout"
88
namespace: "vela-system"
99
}
10-
spec: components: [{
11-
name: "kruise-rollout"
12-
type: "helm"
13-
properties: {
14-
repoType: "helm"
15-
url: "https://openkruise.github.io/charts/"
16-
chart: "kruise-rollout"
17-
version: "0.3.0"
18-
values: {
19-
replicaCount: 1
20-
rollout: webhook: objectSelector: [{
21-
key: "kruise-rollout.oam.dev/webhook"
22-
operator: "Exists"
23-
}]
10+
spec: {
11+
components: [{
12+
name: "kruise-rollout"
13+
type: "helm"
14+
properties: {
15+
repoType: "helm"
16+
url: "https://openkruise.github.io/charts/"
17+
chart: "kruise-rollout"
18+
version: "0.3.0"
19+
values: {
20+
replicaCount: 1
21+
rollout: webhook: objectSelector: [{
22+
key: "kruise-rollout.oam.dev/webhook"
23+
operator: "Exists"
24+
}]
25+
}
2426
}
25-
}
26-
}]
27+
}]
28+
policies: [{
29+
type: "topology"
30+
name: "deploy-kruise-rollout"
31+
properties: {
32+
if parameter.clusters != _|_ {
33+
clusters: parameter.clusters
34+
}
35+
if parameter.clusters == _|_ {
36+
clusterLabelSelector: {}
37+
}
38+
}
39+
}]
40+
}
2741
}
2842

2943
outputs: resourceTree: {

addons/netlify/metadata.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
name: netlify
2-
version: 10.5.1
2+
version: 10.5.2
33
description: Interact with Netlify from the comfort of your CLI.
44
url: https://github.com/netlify/cli
55
icon: https://raw.githubusercontent.com/netlify/cli/main/cli.png
66

77
tags:
88
- extended_workload
99

10-
deployTo:
11-
runtime_cluster: true
12-
1310
invisible: false
1411

addons/netlify/template.cue

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
output: {
2+
apiVersion: "core.oam.dev/v1beta1"
3+
kind: "Application"
4+
metadata: {
5+
name: "netlify"
6+
namespace: "vela-system"
7+
}
8+
spec: {
9+
components: []
10+
policies: [{
11+
type: "topology"
12+
name: "deploy-netlify"
13+
properties: {
14+
if parameter.clusters != _|_ {
15+
clusters: parameter.clusters
16+
}
17+
if parameter.clusters == _|_ {
18+
clusterLabelSelector: {}
19+
}
20+
}
21+
}]
22+
}
23+
}

addons/rollout/metadata.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: rollout
2-
version: 1.3.1
2+
version: 1.3.2
33
description: Provides basic batch publishing capability.
44
icon: https://static.kubevela.net/images/logos/KubeVela%20-03.png
55
url: https://kubevela.io/docs/end-user/traits/rollout
@@ -9,9 +9,6 @@ tags:
99
- rollout
1010
- GA
1111

12-
deployTo:
13-
runtimeCluster: true
14-
1512
dependencies:
1613
# install controller by helm.
1714
- name: fluxcd

addons/rollout/template.cue

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
output: {
2+
apiVersion: "core.oam.dev/v1beta1"
3+
kind: "Application"
4+
metadata: {
5+
name: "rollout"
6+
namespace: "vela-system"
7+
}
8+
spec: {
9+
components: []
10+
policies: [{
11+
type: "topology"
12+
name: "deploy-rollout"
13+
properties: {
14+
if parameter.clusters != _|_ {
15+
clusters: parameter.clusters
16+
}
17+
if parameter.clusters == _|_ {
18+
clusterLabelSelector: {}
19+
}
20+
}
21+
}]
22+
}
23+
}

0 commit comments

Comments
 (0)