Compare commits

..

58 Commits

Author SHA1 Message Date
Zheng Xi Zhou
8de36ff295 Backport: pass on properties of Terraform typed application to Configuration (#2872)
Pass on properties like writeConnectionSecretRef, Region and providerRef
to Configuration.

Backport #2847

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2021-12-03 13:08:54 +08:00
github-actions[bot]
56dfd74ba2 Fix: mark test chart image in a fixed tag to avoid changed by release action (#2874)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit d3d3d4dff2)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-03 13:06:15 +08:00
Zheng Xi Zhou
c4c00637bd Fix: backport Terraform releated PR (#2829)
- Fix: upgrade terraform controller to v0.2.10 #2827
- Fix: support naming a terraform provider #2794

Signed-off-by: zzxwill <zzxwill@gmail.com>
2021-11-30 18:47:06 +08:00
github-actions[bot]
493d8bdc5d Fix: sync status of Terraform typed components to application (#2845)
Synchronized the status of an Terraform typed components to .status.
services of the application

Signed-off-by: zzxwill <zzxwill@gmail.com>
(cherry picked from commit 1a13735d7b)

Co-authored-by: zzxwill <zzxwill@gmail.com>
2021-11-30 17:52:57 +08:00
github-actions[bot]
e636d7c48c [Backport release-1.1] Fix: health check appRev label bug (#2822)
* Fix: healthscope failed since appRevision is not set && rollout controller amend appRevision to workload since compRev does not have this one

(cherry picked from commit dd67fa976e)

* Fix: test

(cherry picked from commit 97cf2d1bfd)

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-11-27 13:07:14 +08:00
github-actions[bot]
1fafe5f05e Fix: don't invoke docker command if not exist (#2814)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit b5418f99d6)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-11-26 15:10:51 +08:00
Zheng Xi Zhou
ed574179d4 Fix: clean Terraform legacy files (#2776)
Cleaned terraform addon releated files
2021-11-23 13:22:26 +08:00
Zheng Xi Zhou
378ab1b81f Fix: install Terraform and apply the support for a provider in a jump (#2774)
- Fix issue: addon name should not include forward-slash "/" cloud-resource   fix #2588
- Install terraform and the provider in one jump. Instead of installing `terraform`
and `terraform-xxx` in two steps
- Terraform ComponenetDefinition won't be applied at once even though not all of them are needed
2021-11-23 10:59:52 +08:00
Zheng Xi Zhou
d16ae2a6f7 Fix: allow external cloud resources to be kept when Application is deleted (#2750)
Provide an option for users whether to keep provisioned cloud resources when Terraform-typed Application is deleted.

Fix #2697
2021-11-22 19:12:42 +08:00
github-actions[bot]
de5f140b08 [Backport release-1.1] Feat: support user defined image registry (#2765)
* Feat: support user defined image registry

(cherry picked from commit afbc661e91)

* Feat: add test app image repo into values

(cherry picked from commit 31da329e77)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-11-22 10:57:34 +08:00
qiaozp
93faf41ac4 Fix: Align -n command argument (backport #2719) (#2753)
* Fix: Align -n command argument (#2719)

* add namespace flag

fix

fix test

fix tests

* try test

* try test

* fix tests

(cherry picked from commit b38aa1cdf0)

* revert

* fix

* fix test
2021-11-20 12:28:52 +08:00
github-actions[bot]
1d7ace119d Chore(deps): Bump github.com/containerd/containerd from 1.4.11 to 1.4.12 (#2745)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.4.11 to 1.4.12.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.4.11...v1.4.12)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 13ed9be6a9)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-19 11:13:57 +08:00
github-actions[bot]
44bdf033ad [Backport release-1.1] Fix: observability installation (#2735)
* fix observability installation

(cherry picked from commit 32646ea3b6)

* fix nil pointer

(cherry picked from commit 29564fe264)

* fix nil pointer

(cherry picked from commit 716d869dc5)

* remove asset, build in trait

(cherry picked from commit acbeeb16e1)

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-11-18 16:09:35 +08:00
github-actions[bot]
69008da5e8 fix istio (#2736)
(cherry picked from commit 4521a66d19)

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-11-18 14:16:13 +08:00
github-actions[bot]
514ef7ff03 Fix: fix workflowstep depends-on-app (#2725)
(cherry picked from commit b161c247d9)

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-16 22:50:49 +08:00
Tianxin Dong
bce3e158ca Backport #2541 to release 1.1 (#2709) 2021-11-15 20:34:14 +08:00
github-actions[bot]
8a9df2dd39 Fix: stop installing golangci-lint each time (#2713)
When golangci-lint doesn't locate in $PATH, it will be installed in
$GOBIN every single time.

(cherry picked from commit bff846b7fe)

Co-authored-by: zzxwill <zzxwill@gmail.com>
2021-11-15 16:39:54 +08:00
Jianbo Sun
9a0ea76210 Revert "Backport #2629 to release-1.1: patch status retry while conflict happens" (#2704)
* Revert "Fix: patch status retry while conflict happens (#2629) (#2638)"

This reverts commit 4e9a7fc82e.

* Style: make reviewable

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-11-14 17:07:30 +08:00
Somefive
156f165b5c Fix: cluster url (#2675) (#2705) 2021-11-14 13:54:07 +08:00
Jian.Li
fce05bffc5 Backport #2683 : Feat: output log with structured tag & add step duration metrics (#2696)
* debug task

(cherry picked from commit 93378eda67)

* metrics

(cherry picked from commit 7366804014)

* trace context

(cherry picked from commit f32105f23b)

* add step_duration metrics

(cherry picked from commit f9fc065e71)

* add readme docs

(cherry picked from commit 69146b468d)
2021-11-12 23:55:00 +08:00
Zheng Xi Zhou
6c0b943dfc Fix: application status.services doesn't include Terraform typed components (#2692)
Function aggregateHealthStatus() in pkg/controller/core.oam.dev/v1alpha2/
application/apply.go which is used to retrieve components status, was
abandoned. All unit-tests of it was abandoned too. Fixed it and restore all the unit
tests.
2021-11-12 22:33:09 +08:00
github-actions[bot]
d83fa47741 Fix: fix delete a component from application not delete workload (#2690)
lint

Fix: error test

Fix: fix e2e rollout

Fix comment

(cherry picked from commit 7fb0c2ad13)

Co-authored-by: wangyike <wangyike_wyk@163.com>
2021-11-12 11:47:24 +08:00
github-actions[bot]
e8fe203265 [Backport release-1.1] Fix: minor fix for vela cli printing (#2657)
* Fix: minor fix for vela cli printing

(cherry picked from commit 45177b74e9)

* add dockerfile go mod cache

(cherry picked from commit db5fd86a53)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-11-08 10:23:03 +08:00
github-actions[bot]
a075830ae1 Feat: add vela exec for multi cluster (#2654)
fix

support vela exec

(cherry picked from commit 6bdfbe2a4f)

Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
2021-11-07 09:08:36 +08:00
github-actions[bot]
8ab4634701 [Backport release-1.1] Fix: filter loggable workload in vela logs (#2653)
* Fix: filter loggable workload in vela logs

(cherry picked from commit d7168f2f13)

* reviewable

(cherry picked from commit 76547e2c00)

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-11-06 21:27:10 +08:00
Jianbo Sun
9838eff9c7 Fix: upgrade stern lib to avoid panic for vela logs (#2652)
(cherry picked from commit 026027eff9)
2021-11-06 17:37:29 +08:00
Jianbo Sun
476de5e4f1 Backport: #2653 Feat: add vela prob to test cluster (#2649) 2021-11-06 17:24:50 +08:00
github-actions[bot]
c89d1e1713 [Backport release-1.1] Fix: allow definition schema cm can be same name in different definition type (#2639)
* Fix: fix definition schema cm name

(cherry picked from commit ef899413a3)

* fix ut

(cherry picked from commit 374aa64e32)

* fix ut

(cherry picked from commit a4357f6acf)

* fix show

(cherry picked from commit b3033f9f80)

* add switch default case

(cherry picked from commit dbe8167959)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-11-06 10:50:00 +08:00
Somefive
4e9a7fc82e Fix: patch status retry while conflict happens (#2629) (#2638) 2021-11-05 15:55:09 +08:00
github-actions[bot]
3b62e44ef8 Feat: add reconcile timeout configuration for vela-core (#2633)
(cherry picked from commit 923ec1844f)

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-11-04 20:49:23 +08:00
github-actions[bot]
066c448c1a Fix: show reconcile error log (#2628)
(cherry picked from commit 77db060f8e)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-11-04 19:02:41 +08:00
github-actions[bot]
8de80ebdb2 [Backport release-1.1] Fix: add owner reference in workflow context cm (#2621)
* Fix: add owner reference in workflow context cm

(cherry picked from commit f5d5fe4463)

* fix ci

(cherry picked from commit b4debba07b)

* delete useless test case

(cherry picked from commit 6fffd6c3d9)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-11-04 14:20:24 +08:00
github-actions[bot]
855cbfe3ec [Backport release-1.1] Feat: store workflow step def properties in cm (#2614)
* Fix: fix notification def

(cherry picked from commit f35a213048)

* Feat: store workflow step def properties in cm

(cherry picked from commit 7f3902536c)

* fix ci

(cherry picked from commit a252749f77)

* fix data race

(cherry picked from commit 0b55ce8386)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-11-03 19:10:18 +08:00
github-actions[bot]
162534b611 Fix: change Initializer to Application for addon Observability (#2617)
In this doc, updated the Observability implementation from initializer
to Application. I also store definitions as it's not well stored in
vela-templates/addons/observability

(cherry picked from commit 52e17dc466)

Co-authored-by: zzxwill <zzxwill@gmail.com>
2021-11-03 17:33:44 +08:00
github-actions[bot]
6bd5d8e6e2 Fix: abnormal aux name (#2613)
(cherry picked from commit 7b2503e85b)

Co-authored-by: Jian.Li <lj176172@alibaba-inc.com>
2021-11-03 15:27:37 +08:00
github-actions[bot]
22079aacd3 allow import package in custom status cue template (#2610)
(cherry picked from commit aa80658be8)

Co-authored-by: chwetion <chwetion@foxmail.com>
2021-11-03 12:22:41 +08:00
github-actions[bot]
b2329d548d [Backport release-1.1] Feat: vela logs support multicluster (#2603)
* Feat: add basic multiple cluster logs

(cherry picked from commit ed232ce4d8)

* fix context

(cherry picked from commit 27cdad1e4b)

* Fix select style

(cherry picked from commit 11ea2693a7)

* Fix select style

(cherry picked from commit 070dcf4e09)

* remove useless env

(cherry picked from commit dec63906ce)

* fix naming

(cherry picked from commit 395a655341)

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-11-02 15:51:58 +08:00
github-actions[bot]
9152c15a88 [Backport release-1.1] Fix(cli): client-side throttling in vela CLI (#2586)
* fix cli throttling

(cherry picked from commit ef7c640430)

* fix import

(cherry picked from commit 93a4b8fd0e)

* set to a lower value

(cherry picked from commit e14623c9ca)

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-10-29 15:08:30 +08:00
wyike
73b3d3106b Feat(rollout): fill rolloutBatches if empty when scale up/down (#2569) (#2582)
* Feat: fill rolloutBatches if empty

* Fix: fix unit-test

* Test: add more test

Fix: lint

Fix: fix lint
2021-10-29 15:07:45 +08:00
wyike
237c71d94e Backport 2527 to release 1.1 (#2555)
* Fix: resolve confict

* Fix: cherry pick 2472  to  1.1
2021-10-28 20:49:27 +08:00
github-actions[bot]
2200d199f3 fix incorrect addon status (#2579)
(cherry picked from commit 8b13335133)

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-10-28 20:43:35 +08:00
Zheng Xi Zhou
d083039a32 Fix: backport all Terraform related features to release-1.1 (#2553)
Copy all Terraform related code to release-1.1 to fix probelms and support
features.

Fix #2547
2021-10-28 11:37:41 +08:00
Tianxin Dong
5e6be649c1 [Backport release-1.1] Feat: Commit step-generate data without success (#2565)
* Feat: commit without success

* Feat: add test case

Co-authored-by: Jian.Li <lj176172@alibaba-inc.com>
2021-10-28 10:48:39 +08:00
github-actions[bot]
706a65beae [Backport release-1.1] Feat: add nocalhost dev config trait definition (#2564)
* Feat: add nocalhost dev config trait definition

(cherry picked from commit 965869b43b)

* Feat: add nocalhost dev config trait example

add nocalhost dev config trait example in `docs/examples/nocalhost`

Signed-off-by: yuyicai <yuyicai@hotmail.com>
(cherry picked from commit 70114877ce)

Co-authored-by: yuyicai <yuyicai@hotmail.com>
2021-10-27 16:03:39 +08:00
Jian.Li
d21a337dd7 Backport 2522 to release 1.1 (#2529)
* Feat: not apply if render hash not change

* Fix: generateRenderHash panic
2021-10-27 11:56:11 +08:00
github-actions[bot]
b53f4f4fdd Feat: add cluster in read or apply object (#2560)
(cherry picked from commit 5dbd8c8765)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-27 10:08:29 +08:00
github-actions[bot]
24970cd990 Fix: CVE-2021-42836 (#2552)
CVE-2021-42836
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.

(cherry picked from commit 25e4b682a8)

Co-authored-by: zzxwill <zzxwill@gmail.com>
2021-10-26 12:03:59 +08:00
github-actions[bot]
844f479f54 Feat: add helm type component definition custom status (#2525)
(cherry picked from commit d8c33db293)

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-10-19 19:03:16 +08:00
github-actions[bot]
91d336b469 Fix(cli): use flag instead of env in workflow cli (#2524)
(cherry picked from commit 3a7dea1cbe)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-19 17:54:09 +08:00
Zheng Xi Zhou
516156f32f Fix: aws/azure Terraform provider are broken (#2517)
Removed built-in aws/azure Terraform providers, and fix azure
mariadb definition issue.

Fix #2475
2021-10-19 12:57:36 +08:00
github-actions[bot]
eb5808e4ea Feat: support secret in webhook notification (#2516)
(cherry picked from commit 62bd87f13f)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-19 10:46:39 +08:00
github-actions[bot]
66f794e9fd Feat: add imagePullPolicy/imagePullSecret to task def (#2506)
(cherry picked from commit ba5f562b2a)

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-10-18 11:14:38 +08:00
github-actions[bot]
90f46c57e8 Feat: upgrade the image of kube-webhook-certgen (#2500)
(cherry picked from commit e1e004d596)

Co-authored-by: yangsoon <yangsoonlx@gmail.com>
2021-10-15 17:40:02 +08:00
github-actions[bot]
95496e55c0 [Backport release-1.1] Feat: add export config and secret def (#2498)
* Feat: add export config and secret def

(cherry picked from commit ed1f7c787d)

* Fix: change the def name and optimize the example

(cherry picked from commit 2d626c872a)

* Fix: fix the name in def

(cherry picked from commit 1e92d64767)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-15 15:40:51 +08:00
github-actions[bot]
3009d02fcd [Backport release-1.1] Fix: add libgit2 support for gitops (#2490)
* Fix: add libgit2 support for gitops

(cherry picked from commit 31102a2e65)

* Fix: resolve rebase

(cherry picked from commit 3137e15b3f)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-14 20:57:44 +08:00
qiaozp
df8b60d521 Feat: add read object step def (#2482) (#2487)
(cherry picked from commit 32364aa9e4)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Refactor: addon migrate to application (#2444)

* Refactor: addon migrate to application

* Refactor: change test for addon

* Fix: golint

* Fix: add annotation const

* Refactor: make CLI compatible

* Fix: go-lint

(cherry picked from commit 8c4af1d69c)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-10-14 20:55:27 +08:00
github-actions[bot]
6c6e834155 Fix(application): nil pointer for component properties (#2483)
(cherry picked from commit 92b92e683c)

Co-authored-by: kinsolee <lijingzhao@forchange.tech>
2021-10-14 20:11:38 +08:00
github-actions[bot]
cc3d2e28c0 Feat: add read object step def (#2482)
(cherry picked from commit 32364aa9e4)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-14 18:25:53 +08:00
291 changed files with 23716 additions and 17697 deletions

10
.github/pr-title-checker-config.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
"LABEL": {
"name": "title-needs-formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["Fix: ", "Feat: ", "Docs: ", "Test: ", "Chore: ", "CI: ", "Perf: ", "Refactor: ", "Revert: ", "Style: ", "Test: ", "Backport: ", "Backport",
"Fix(", "Feat(", "Docs(", "Test(", "Chore(", "CI(", "Perf(", "Refactor(", "Revert(", "Style(", "Test(", "Backport("]
}
}

View File

@@ -1,13 +1,19 @@
name: Lint Commit Messages
on: [push, pull_request]
name: PR Title Checker
on:
pull_request:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
jobs:
commitlint:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: thehanimo/pr-title-checker@v1.3.1
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
with:
helpURL: https://github.com/oam-dev/kubevela/blob/master/contribute/create-pull-request.md#commit-message-format
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: true
configuration_path: ".github/pr-title-checker-config.json"

View File

@@ -76,10 +76,16 @@ jobs:
- name: Load Image to kind cluster (Hub)
run: make kind-load
- name: Load Image to kind cluster (Worker)
run: |
make kind-load-runtime-cluster
- name: Cleanup for e2e tests
run: |
make e2e-cleanup
make e2e-setup-core
make
make setup-runtime-e2e-cluster
- name: Run e2e multicluster tests
run: make e2e-multicluster-test

View File

@@ -83,6 +83,9 @@ jobs:
- name: Run api e2e tests
run: make e2e-api-test
- name: Run addons e2e tests
run: make e2e-addon-test
- name: Run e2e tests
run: make e2e-test

5
.gitignore vendored
View File

@@ -45,4 +45,7 @@ charts/vela-core/crds/_.yaml
.vela/
# check docs
git-page/
git-page/
# e2e rollout runtime image build
runtime/rollout/e2e/tmp

View File

@@ -5,6 +5,10 @@ WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# It's a proxy for CN developer, please unblock it if you have network issue
# RUN go env -w GOPROXY=https://goproxy.cn,direct
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

View File

@@ -39,6 +39,9 @@ endif
VELA_CORE_IMAGE ?= vela-core:latest
VELA_CORE_TEST_IMAGE ?= vela-core-test:$(GIT_COMMIT)
VELA_RUNTIME_ROLLOUT_IMAGE ?= vela-runtime-rollout:latest
VELA_RUNTIME_ROLLOUT_TEST_IMAGE ?= vela-runtime-rollout-test:$(GIT_COMMIT)
RUNTIME_CLUSTER_CONFIG ?= /tmp/worker.kubeconfig
RUNTIME_CLUSTER_NAME ?= worker
all: build
@@ -143,13 +146,16 @@ e2e-setup-core:
helm upgrade --install --create-namespace --namespace vela-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set applicationRevisionLimit=5 --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --set multicluster.enabled=true --wait kubevela ./charts/vela-core
kubectl wait --for=condition=Available deployment/kubevela-vela-core -n vela-system --timeout=180s
setup-runtime-e2e-cluster:
helm upgrade --install --create-namespace --namespace vela-system --kubeconfig=$(RUNTIME_CLUSTER_CONFIG) --set image.pullPolicy=IfNotPresent --set image.repository=vela-runtime-rollout-test --set image.tag=$(GIT_COMMIT) --wait vela-rollout ./runtime/rollout/charts
e2e-setup:
helm install kruise https://github.com/openkruise/kruise/releases/download/v0.9.0/kruise-chart.tgz --set featureGates="PreDownloadImageForInPlaceUpdate=true"
sh ./hack/e2e/modify_charts.sh
helm upgrade --install --create-namespace --namespace vela-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set applicationRevisionLimit=5 --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --wait kubevela ./charts/vela-core
helm upgrade --install --create-namespace --namespace oam-runtime-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --wait oam-runtime ./charts/oam-runtime
bin/vela addon enable fluxcd
bin/vela addon enable terraform
bin/vela addon enable terraform-alibaba ALICLOUD_ACCESS_KEY=xxx ALICLOUD_SECRET_KEY=yyy ALICLOUD_REGION=cn-beijing
ginkgo version
ginkgo -v -r e2e/setup
@@ -168,6 +174,11 @@ e2e-test:
ginkgo -v --skip="rollout related e2e-test." ./test/e2e-test
@$(OK) tests pass
e2e-addon-test:
cp bin/vela /tmp/
ginkgo -v ./test/e2e-addon-test
@$(OK) tests pass
e2e-rollout-test:
ginkgo -v --focus="rollout related e2e-test." ./test/e2e-test
@$(OK) tests pass
@@ -193,10 +204,12 @@ e2e-cleanup:
rm -rf ~/.vela
image-cleanup:
ifneq (, $(shell which docker))
# Delete Docker image
ifneq ($(shell docker images -q $(VELA_CORE_TEST_IMAGE)),)
docker rmi -f $(VELA_CORE_TEST_IMAGE)
endif
endif
end-e2e-core:
sh ./hack/e2e/end_e2e_core.sh
@@ -209,6 +222,12 @@ kind-load:
docker build -t $(VELA_CORE_TEST_IMAGE) -f Dockerfile.e2e .
kind load docker-image $(VELA_CORE_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_CORE_TEST_IMAGE)"; exit 1; }
kind-load-runtime-cluster:
/bin/sh hack/e2e/build_runtime_rollout.sh
docker build -t $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) -f runtime/rollout/e2e/Dockerfile.e2e runtime/rollout/e2e/
rm -rf runtime/rollout/e2e/tmp
kind load docker-image $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) --name=$(RUNTIME_CLUSTER_NAME) || { echo >&2 "kind not installed or error loading image: $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE)"; exit 1; }
# Run tests
core-test: fmt vet manifests
go test ./pkg/... -coverprofile cover.out
@@ -240,7 +259,7 @@ core-uninstall: manifests
kubectl delete -f charts/vela-core/crds/
# Generate manifests e.g. CRD, RBAC etc.
manifests: installcue kustomize
manifests: installcue kustomize addon
go generate $(foreach t,pkg apis,./$(t)/...)
# TODO(yangsoon): kustomize will merge all CRD into a whole file, it may not work if we want patch more than one CRD in this way
$(KUSTOMIZE) build config/crd -o config/crd/base/core.oam.dev_applications.yaml
@@ -248,7 +267,6 @@ manifests: installcue kustomize
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds charts/oam-runtime/crds runtime/ charts/vela-minimal/crds
rm -f config/crd/base/*
./vela-templates/gen_definitions.sh
go run ./vela-templates/gen_addons.go
GOLANGCILINT_VERSION ?= v1.38.0
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
@@ -258,16 +276,20 @@ HOSTARCH := amd64
endif
golangci:
ifeq (, $(shell which golangci-lint))
ifneq ($(shell which golangci-lint),)
@$(OK) golangci-lint is already installed
GOLANGCILINT=$(shell which golangci-lint)
else ifeq (, $(shell which $(GOBIN)/golangci-lint))
@{ \
set -e ;\
echo 'installing golangci-lint-$(GOLANGCILINT_VERSION)' ;\
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) $(GOLANGCILINT_VERSION) ;\
echo 'Install succeed' ;\
echo 'Successfully installed' ;\
}
GOLANGCILINT=$(GOBIN)/golangci-lint
else
GOLANGCILINT=$(shell which golangci-lint)
@$(OK) golangci-lint is already installed
GOLANGCILINT=$(GOBIN)/golangci-lint
endif
.PHONY: staticchecktool
@@ -328,3 +350,7 @@ check-license-header:
def-install:
./hack/utils/installdefinition.sh
# generate addons to auto-gen and charts
addon:
go run ./vela-templates/gen_addons.go

View File

@@ -19,13 +19,11 @@ package common
import (
"encoding/json"
"github.com/oam-dev/terraform-controller/api/v1beta1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
types "github.com/oam-dev/terraform-controller/api/types/crossplane-runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
)
@@ -114,8 +112,10 @@ type Terraform struct {
// +kubebuilder:validation:Enum:=hcl;json;remote
Type string `json:"type,omitempty"`
// ProviderReference specifies the reference to Provider
ProviderReference *types.Reference `json:"providerRef,omitempty"`
// Path is the sub-directory of remote git repository. It's valid when remote is set
Path string `json:"path,omitempty"`
v1beta1.BaseConfigurationSpec `json:",inline"`
}
// A WorkloadTypeDescriptor refer to a Workload Type

View File

@@ -21,7 +21,6 @@ limitations under the License.
package common
import (
crossplane_runtime "github.com/oam-dev/terraform-controller/api/types/crossplane-runtime"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
)
@@ -559,11 +558,7 @@ func (in *SubStepsStatus) DeepCopy() *SubStepsStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Terraform) DeepCopyInto(out *Terraform) {
*out = *in
if in.ProviderReference != nil {
in, out := &in.ProviderReference, &out.ProviderReference
*out = new(crossplane_runtime.Reference)
**out = **in
}
in.BaseConfigurationSpec.DeepCopyInto(&out.BaseConfigurationSpec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Terraform.

View File

@@ -20,6 +20,7 @@ import (
"fmt"
"reflect"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/conversion"
@@ -115,10 +116,17 @@ func (app *Application) ConvertFrom(src conversion.Hub) error {
}
// convert component
// `.properties` -> `.settings`
var compProperties runtime.RawExtension
if comp.Properties != nil {
compProperties = *comp.Properties.DeepCopy()
}
app.Spec.Components = append(app.Spec.Components, ApplicationComponent{
Name: comp.Name,
WorkloadType: comp.Type,
Settings: *comp.Properties.DeepCopy(),
Settings: compProperties,
Traits: traits,
Scopes: scopes,
})

View File

@@ -38,7 +38,8 @@ type WorkflowStepDefinitionSpec struct {
type WorkflowStepDefinitionStatus struct {
// ConditionedStatus reflects the observed status of a resource
condition.ConditionedStatus `json:",inline"`
// ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
ConfigMapRef string `json:"configMapRef,omitempty"`
// LatestRevision of the component definition
// +optional
LatestRevision *common.Revision `json:"latestRevision,omitempty"`

View File

@@ -85,4 +85,5 @@ var DefaultFilterAnnots = []string{
oam.AnnotationInplaceUpgrade,
oam.AnnotationFilterLabelKeys,
oam.AnnotationFilterAnnotationKeys,
oam.AnnotationLastAppliedConfiguration,
}

View File

@@ -188,6 +188,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -197,11 +206,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -211,6 +224,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -468,6 +497,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -477,11 +515,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -491,6 +533,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -193,6 +193,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -202,11 +211,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -216,6 +229,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -454,6 +483,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -463,11 +501,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -477,6 +519,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: create
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
args:
- create

View File

@@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: patch
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
args:
- patch

View File

@@ -126,7 +126,7 @@ spec:
{{ end }}
- "--system-definition-namespace={{ .Values.systemDefinitionNamespace }}"
- "--oam-spec-ver={{ .Values.OAMSpecVer }}"
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}

View File

@@ -1,7 +1,7 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "oam-runtime.fullname" . }}-test-connection"
name: {{ include "oam-runtime.fullname" . }}-test-connection
labels:
{{- include "oam-runtime.labels" . | nindent 4 }}
annotations:
@@ -9,7 +9,7 @@ metadata:
spec:
containers:
- name: wget
image: busybox
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
command: ['wget']
args: ['{{ include "oam-runtime.fullname" . }}:{{ .Values.healthCheck.port }}']
restartPolicy: Never

View File

@@ -7,6 +7,8 @@ replicaCount: 1
applyOnceOnly: "off"
disableCaps: "all"
imageRegistry: ""
image:
repository: oamdev/vela-core
tag: latest
@@ -68,8 +70,8 @@ admissionWebhooks:
patch:
enabled: true
image:
repository: wonderflow/kube-webhook-certgen
tag: v2.1
repository: oamdev/kube-webhook-certgen
tag: v2.3
pullPolicy: IfNotPresent
affinity: {}
tolerations: []
@@ -98,4 +100,9 @@ concurrentReconciles: 4
dependCheckWait: 30s
# OAMSpecVer is the oam spec version controller want to setup
OAMSpecVer: "v0.2"
OAMSpecVer: "v0.2"
test:
app:
repository: oamdev/busybox
tag: v1

View File

@@ -1232,6 +1232,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -1241,11 +1251,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -1255,6 +1270,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -1635,6 +1667,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -1644,11 +1686,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -1658,6 +1705,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -1936,6 +2000,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -1945,11 +2019,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -1959,6 +2038,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -3360,6 +3456,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -3369,11 +3475,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -3383,6 +3494,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -3656,6 +3784,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -3665,11 +3803,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -3679,6 +3822,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -4041,6 +4201,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -4050,11 +4220,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -4064,6 +4239,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -4305,6 +4497,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -4314,11 +4516,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -4328,6 +4535,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -4371,6 +4595,10 @@ spec:
- type
type: object
type: array
configMapRef:
description: ConfigMapRef refer to a ConfigMap which contains
OpenAPI V3 JSON schema of Component parameters.
type: string
latestRevision:
description: LatestRevision of the component definition
properties:
@@ -4585,6 +4813,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -4594,11 +4832,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -4608,6 +4851,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -179,6 +179,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -188,11 +197,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -202,6 +215,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -463,6 +492,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -472,11 +510,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -486,6 +528,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -222,6 +222,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git
repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -231,11 +241,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It
will override the region in the region field of
ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -245,6 +260,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required to
connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -506,6 +538,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git
repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -515,11 +557,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It
will override the region in the region field of
ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -529,6 +576,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required to
connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -783,6 +847,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git
repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -792,11 +866,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It
will override the region in the region field of
ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -806,6 +885,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required to
connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -1041,6 +1137,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git
repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -1050,11 +1156,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It
will override the region in the region field of
ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -1064,6 +1175,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required to
connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -1107,6 +1235,10 @@ spec:
- type
type: object
type: array
configMapRef:
description: ConfigMapRef refer to a ConfigMap which contains
OpenAPI V3 JSON schema of Component parameters.
type: string
latestRevision:
description: LatestRevision of the component definition
properties:

View File

@@ -151,6 +151,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -160,11 +169,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -174,6 +187,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -188,6 +188,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -197,11 +206,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -211,6 +224,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -468,6 +497,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -477,11 +515,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -491,6 +533,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -148,6 +148,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -157,11 +166,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -171,6 +184,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -212,6 +241,10 @@ spec:
- type
type: object
type: array
configMapRef:
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
V3 JSON schema of Component parameters.
type: string
latestRevision:
description: LatestRevision of the component definition
properties:

View File

@@ -193,6 +193,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -202,11 +211,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -216,6 +229,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -454,6 +483,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -463,11 +501,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -477,6 +519,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

File diff suppressed because it is too large Load Diff

View File

@@ -1,255 +1,257 @@
apiVersion: v1
data:
initializer: |
application: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
kind: Application
metadata:
annotations:
addons.oam.dev/description: istio Controller is a Kubernetes Controller for manage
traffic.
name: istio
namespace: istio-system
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: istio
properties:
chart: istio
repoType: helm
url: https://charts.kubevela.net/addons
version: 1.11.1
type: helm
- name: canary-rollout
properties:
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
name: canary-rollout
namespace: vela-system
spec:
schematic:
cue:
template: |-
import ("vela/op")
components:
- name: ns-istio-system
properties:
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
type: raw
- name: istio
properties:
chart: istio
repoType: helm
url: https://charts.kubevela.net/addons
version: 1.11.1
type: helm
- name: canary-rollout
properties:
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
name: canary-rollout
namespace: vela-system
spec:
schematic:
cue:
template: |-
import ("vela/op")
parameter: {
batchPartition: int
traffic: weightedTargets: [...{
revision: string
weight: int
parameter: {
batchPartition: int
traffic: weightedTargets: [...{
revision: string
weight: int
}]
}
comps__: op.#Load
compNames__: [ for name, c in comps__.value {name}]
comp__: compNames__[0]
apply: op.#ApplyComponent & {
value: comps__.value[comp__]
patch: {
traits: "rollout": {
spec: rolloutPlan: batchPartition: parameter.batchPartition
}
traits: "virtualService": {
spec:
// +patchStrategy=retainKeys
http: [
{
route: [
for i, t in parameter.traffic.weightedTargets {
destination: {
host: comp__
subset: t.revision
}
weight: t.weight
}]
},
]
}
traits: "destinationRule": {
// +patchStrategy=retainKeys
spec: {
host: comp__
subsets: [
for i, t in parameter.traffic.weightedTargets {
name: t.revision
labels: {"app.oam.dev/revision": t.revision}
},
]}
}
}
}
applyRemaining: op.#ApplyRemaining & {
exceptions: [comp__]
}
type: raw
- name: istio-gateway
properties:
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: use istio to manage in-cluster traffic
name: istio-gateway
namespace: vela-system
spec:
appliesToWorkloads:
- deployments.apps
podDisruptive: true
schematic:
cue:
template: "\noutputs: gateway: {\n apiVersion: \"networking.istio.io/v1alpha3\"\n
\ kind: \"Gateway\"\n metadata: {\n name: context.name\n
\ namespace: context.namespace\n }\n spec: {\n selector:
{\n istio: parameter.gateway\n }\n servers: [{\n hosts:
parameter.hosts\n port: {\n name: \"http\"\n number:
80\n protocol: \"HTTP\"\n }\n }]\n }\n}\n\noutputs:
virtualService: {\n apiVersion: \"networking.istio.io/v1alpha3\"\n
\ kind: \"VirtualService\"\n metadata: {\n name: context.name\n
\ namespace: context.namespace\n }\n spec: {\n gateways:
[context.name]\n hosts: parameter.hosts\n http:[{\n match:
[ for i, u in parameter.match { uri: u} ]\n route: [{destination:
{\n host: context.name\n port: number: parameter.port\n
\ }}]\n }]\n }\n}\n\nparameter: {\n hosts: [string]\n
\ gateway: *\"ingressgateway\"|string\n match: [...#uri]\n port:
int\n}\n\n#uri: {\n exact?: string\n prefix?: string\n} \n"
type: raw
- name: canary-rollback
properties:
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
name: canary-rollback
namespace: vela-system
spec:
schematic:
cue:
template: |-
import ("vela/op")
parameter: {...}
comps: op.#Load
compNames: [ for name, c in comps.value {name}]
firstcomp: compNames[0]
rolloutObj: op.#Read & {
value: {
apiVersion: "standard.oam.dev/v1alpha1"
kind: "Rollout"
metadata: {
name: firstcomp
namespace: context.namespace
}
}
}
_sourceRevision: rolloutObj.value.status.LastSourceRevision
apply: op.#ApplyComponent & {
value: comps.value[firstcomp]
patch: {
traits: "rollout": {
spec: {
targetRevisionName: _sourceRevision
}
}
traits: "virtualService": {
spec:
// +patchStrategy=retainKeys
http: [
{
route: [{
destination: {
host: firstcomp
subset: _sourceRevision
}
weight: 100
}]
},
]
}
comps__: op.#Load
compNames__: [ for name, c in comps__.value {name}]
comp__: compNames__[0]
apply: op.#ApplyComponent & {
value: comps__.value[comp__]
patch: {
traits: "rollout": {
spec: rolloutPlan: batchPartition: parameter.batchPartition
}
traits: "virtualService": {
spec:
// +patchStrategy=retainKeys
http: [
{
route: [
for i, t in parameter.traffic.weightedTargets {
destination: {
host: comp__
subset: t.revision
}
weight: t.weight
}]
},
]
}
traits: "destinationRule": {
// +patchStrategy=retainKeys
spec: {
host: comp__
subsets: [
for i, t in parameter.traffic.weightedTargets {
name: t.revision
labels: {"app.oam.dev/revision": t.revision}
},
]}
}
}
}
applyRemaining: op.#ApplyRemaining & {
exceptions: [comp__]
}
type: raw
- name: istio-gateway
properties:
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: use istio to manage in-cluster traffic
name: istio-gateway
namespace: vela-system
spec:
appliesToWorkloads:
- deployments.apps
podDisruptive: true
schematic:
cue:
template: "\noutputs: gateway: {\n apiVersion: \"networking.istio.io/v1alpha3\"\n
\ kind: \"Gateway\"\n metadata: {\n name: context.name\n
\ namespace: context.namespace\n }\n spec: {\n selector:
{\n istio: parameter.gateway\n }\n servers: [{\n
\ hosts: parameter.hosts\n port: {\n name:
\"http\"\n number: 80\n protocol: \"HTTP\"\n
\ }\n }]\n }\n}\n\noutputs: virtualService: {\n apiVersion:
\"networking.istio.io/v1alpha3\"\n kind: \"VirtualService\"\n
\ metadata: {\n name: context.name\n namespace:
context.namespace\n }\n spec: {\n gateways: [context.name]\n
\ hosts: parameter.hosts\n http:[{\n match: [ for
i, u in parameter.match { uri: u} ]\n route: [{destination:
{\n host: context.name\n port: number: parameter.port\n
\ }}]\n }]\n }\n}\n\nparameter: {\n hosts: [string]\n
\ gateway: *\"ingressgateway\"|string\n match: [...#uri]\n
\ port: int\n}\n\n#uri: {\n exact?: string\n prefix?: string\n}
\n"
type: raw
- name: canary-rollback
properties:
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
name: canary-rollback
namespace: vela-system
spec:
schematic:
cue:
template: |-
import ("vela/op")
parameter: {...}
comps: op.#Load
compNames: [ for name, c in comps.value {name}]
firstcomp: compNames[0]
rolloutObj: op.#Read & {
value: {
apiVersion: "standard.oam.dev/v1alpha1"
kind: "Rollout"
metadata: {
name: firstcomp
namespace: context.namespace
}
traits: "destinationRule": {
// +patchStrategy=retainKeys
spec: {
host: firstcomp
subsets: [
{
name: _sourceRevision
labels: {"app.oam.dev/revision": _sourceRevision}
},
]
}
}
}
}
_sourceRevision: rolloutObj.value.status.LastSourceRevision
apply: op.#ApplyComponent & {
value: comps.value[firstcomp]
patch: {
traits: "rollout": {
spec: {
targetRevisionName: _sourceRevision
}
}
traits: "virtualService": {
spec:
// +patchStrategy=retainKeys
http: [
{
route: [{
destination: {
host: firstcomp
subset: _sourceRevision
}
weight: 100
}]
},
]
}
traits: "destinationRule": {
// +patchStrategy=retainKeys
spec: {
host: firstcomp
subsets: [
{
name: _sourceRevision
labels: {"app.oam.dev/revision": _sourceRevision}
},
]
}
}
}
}
applyRemaining: op.#ApplyRemaining & {
exceptions: [firstcomp]
}
type: raw
- name: canary-traffic
properties:
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: use istio to manage traffic
name: canary-traffic
namespace: vela-system
spec:
appliesToWorkloads:
- deployments.apps
podDisruptive: true
schematic:
cue:
template: "outputs: service: {\n\t\tapiVersion: \"v1\"\n\t\tkind:
\ \"Service\"\n\t\tmetadata: name: context.name\n\t\tspec:
{\n\t\t\tselector: \"app.oam.dev/component\": context.name\n\t\t\tports:
[\n\t\t\t\tfor p in parameter.port {\n\t\t\t\t\tport: p\n\t\t\t\t\ttargetPort:
p\n\t\t\t\t},\n\t\t\t]\n\t\t\ttype: \"ClusterIP\"\n\t\t}\n}\n\noutputs:
virtualService: {\n apiVersion: \"networking.istio.io/v1alpha3\"\n
\ kind: \"VirtualService\"\n metadata: {\n name: context.name\n
\ namespace: context.namespace\n }\n spec: {\n hosts:
[context.name]\n http: [{route: [\n {destination: {\n
\ host: context.name\n port: {number: parameter.port[0]}\n
\ }}]}]\n }\n}\n\noutputs: destinationRule: {\n apiVersion:
\"networking.istio.io/v1alpha3\"\n kind: \"DestinationRule\"\n
\ metadata: {\n name: context.name\n namespace:
context.namespace\n }\n spec: {\n host: context.name\n
\ subsets: [{\n name: context.revision\n labels:
{\"app.oam.dev/revision\": context.revision}\n }]\n }\n}\n\nparameter:
{\n port: [int]\n} \n"
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
dependsOn:
- ref:
applyRemaining: op.#ApplyRemaining & {
exceptions: [firstcomp]
}
type: raw
- name: canary-traffic
properties:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: fluxcd
namespace: vela-system
- ref:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: ns-istio-system
namespace: vela-system
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: use istio to manage traffic
name: canary-traffic
namespace: vela-system
spec:
appliesToWorkloads:
- deployments.apps
podDisruptive: true
schematic:
cue:
template: "outputs: service: {\n\t\tapiVersion: \"v1\"\n\t\tkind: \"Service\"\n\t\tmetadata:
name: context.name\n\t\tspec: {\n\t\t\tselector: \"app.oam.dev/component\":
context.name\n\t\t\tports: [\n\t\t\t\tfor p in parameter.port {\n\t\t\t\t\tport:
\ p\n\t\t\t\t\ttargetPort: p\n\t\t\t\t},\n\t\t\t]\n\t\t\ttype:
\"ClusterIP\"\n\t\t}\n}\n\noutputs: virtualService: {\n apiVersion:
\"networking.istio.io/v1alpha3\"\n kind: \"VirtualService\"\n metadata:
{\n name: context.name\n namespace: context.namespace\n
\ }\n spec: {\n hosts: [context.name]\n http: [{route:
[\n {destination: {\n host: context.name\n port:
{number: parameter.port[0]}\n }}]}]\n }\n}\n\noutputs: destinationRule:
{\n apiVersion: \"networking.istio.io/v1alpha3\"\n kind:
\"DestinationRule\"\n metadata: {\n name: context.name\n
\ namespace: context.namespace\n }\n spec: {\n
\ host: context.name\n subsets: [{\n name:
context.revision\n labels: {\"app.oam.dev/revision\": context.revision}\n
\ }]\n }\n}\n\nparameter: {\n port: [int]\n} \n"
type: raw
workflow:
steps:
- name: checking-depends-on
properties:
name: fluxcd
namespace: vela-system
type: depends-on-app
- name: apply-ns
properties:
component: ns-istio-system
type: apply-component
- name: apply-resources
type: apply-remaining
status:
observedGeneration: 0
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:

View File

@@ -1,39 +1,38 @@
apiVersion: v1
data:
initializer: |
application: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
kind: Application
metadata:
annotations:
addons.oam.dev/description: KEDA is a Kubernetes-based Event Driven Autoscaler.
name: keda
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: keda
properties:
chart: keda
repoType: helm
url: https://kedacore.github.io/charts
type: helm
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
dependsOn:
- ref:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: fluxcd
namespace: vela-system
components:
- name: keda
properties:
chart: keda
repoType: helm
url: https://kedacore.github.io/charts
type: helm
workflow:
steps:
- name: checking-depends-on
properties:
name: fluxcd
namespace: vela-system
type: depends-on-app
- name: apply-resources
type: apply-application
status:
observedGeneration: 0
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:

View File

@@ -1,8 +1,8 @@
apiVersion: v1
data:
initializer: |
application: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
kind: Application
metadata:
annotations:
addons.oam.dev/description: Kruise is a Kubernetes extended suite for application
@@ -10,182 +10,173 @@ data:
name: kruise
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: kruise
properties:
chart: ./charts/kruise/v0.9.0
git:
branch: master
repoType: git
url: https://github.com/openkruise/kruise
values:
featureGates: PreDownloadImageForInPlaceUpdate=true
type: helm
- name: cloneset
properties:
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Describes long-running, scalable, containerized
services that have a stable network endpoint to receive external network
traffic from customers. If workload type is skipped for any service
defined in Appfile, it will be defaulted to `webservice` type.
name: cloneset
namespace: vela-system
spec:
schematic:
cue:
template: "output: {\n\tapiVersion: \"apps.kruise.io/v1alpha1\"\n\tkind:
\ \"CloneSet\"\n\tmetadata: labels: {\n\t\t\"app.oam.dev/component\":
context.name\n\t}\n\tspec: {\n\t\tselector: matchLabels: {\n\t\t\t\"app.oam.dev/component\":
context.name\n\t\t}\n\n\t\ttemplate: {\n\t\t\tmetadata: labels:
{\n\t\t\t\t\"app.oam.dev/component\": context.name\n\t\t\t}\n\n\t\t\tspec:
{\n\t\t\t\tcontainers: [{\n\t\t\t\t\tname: context.name\n\t\t\t\t\timage:
parameter.image\n\n\t\t\t\t\tif parameter.cmd != _|_ {\n\t\t\t\t\t\tcommand:
parameter.cmd\n\t\t\t\t\t}\n\t\t\t\t\tif parameter.args != _|_ {\n\t\t\t\t\t\targs:
parameter.args\n\t\t\t\t\t}\n\t\t\t\t\tif parameter.env != _|_ {\n\t\t\t\t\t\tenv:
parameter.env\n\t\t\t\t\t}\n\n\t\t\t\t\tif context.config != _|_
{\n\t\t\t\t\t\tenv: context.config\n\t\t\t\t\t}\n\n\t\t\t\t\tif
parameter[\"imagePullPolicy\"] != _|_ {\n\t\t\t\t\t\timagePullPolicy:
parameter.imagePullPolicy\n\t\t\t\t\t}\n\n\t\t\t\t\tports: [{\n\t\t\t\t\t\tcontainerPort:
parameter.port\n\t\t\t\t\t}]\n\n\t\t\t\t\tif parameter[\"cpu\"]
!= _|_ {\n\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\tlimits: cpu: parameter.cpu\n\t\t\t\t\t\t\trequests:
cpu: parameter.cpu\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif parameter[\"memory\"]
!= _|_ {\n\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\tlimits: memory:
\ parameter.memory\n\t\t\t\t\t\t\trequests: memory: parameter.memory\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif
parameter[\"livenessProbe\"] != _|_ {\n\t\t\t\t\t\tlivenessProbe:
parameter.livenessProbe\n\t\t\t\t\t}\n\n\t\t\t\t\tif parameter[\"readinessProbe\"]
!= _|_ {\n\t\t\t\t\t\treadinessProbe: parameter.readinessProbe\n\t\t\t\t\t}\n\n\t\t\t\t\tlifecycle:
{\n\t\t\t\t\t\tif parameter.postStart != _|_ {\n\t\t\t\t\t\t\tpostStart:
exec: command: parameter.postStart\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif
parameter.preStop != _|_ {\n\t\t\t\t\t\t\tpreStop: exec: command:
parameter.preStop\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t\tif
parameter.hostAliases != _|_ {\n\t\t\t\t\thostAliases: parameter.hostAliases\n\t\t\t\t}\n\t\t\t\tif
parameter[\"imagePullSecrets\"] != _|_ {\n\t\t\t\t\timagePullSecrets:
[ for v in parameter.imagePullSecrets {name: v}]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif
parameter.updateStrategyType != _|_ {\n\t\t\tupdateStrategy: {\n\t\t\t\ttype:
parameter.updateStrategyType\n\t\t\t}\n\t\t}\n\t}\n}\nparameter:
{\n\t// +usage=Which image would you like to use for your service\n\t//
+short=i\n\timage: string\n\n\t// +usage=Specify image pull policy
for your service\n\timagePullPolicy?: string\n\n\t// +usage=Specify
image pull secrets for your service\n\timagePullSecrets?: [...string]\n\n\t//
+usage=Number of CPU units for the service, like `0.5` (0.5 CPU
core), `1` (1 CPU core)\n\tcpu?: string\n\n\t// +usage=Specify the
amount of memory to limit\n\tmemory?: *\"2048Mi\" | =~\"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$\"\n\n\t//
+usage=Commands to run in the container\n\tcmd?: [...string]\n\n\t//
+usage=Arguments to the command.\n\targs?: [...string]\n\n\t// +usage=postStart
commands will be called immediately after a container is created.\n\tpostStart?:
[...string]\n\n\t// +usage=PreStop is called immediately before
a container is terminated due to an API request or management event
such as liveness/startup probe failure, preemption, resource contention,
etc. The handler is not called if the container crashes or exits.
The reason for termination is passed to the handler. The Pod's termination
grace period countdown begins before the PreStop hooked is executed.
Regardless of the outcome of the handler, the container will eventually
terminate within the Pod's termination grace period. Other management
of the container blocks until the hook completes or until the termination
grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n\tpreStop?:
[...string]\n\n\t// +usage=Which port do you want customer traffic
sent to\n\t// +short=p\n\tport: *80 | int\n\n\t// +usage=Define
arguments by using environment variables\n\tenv?: [...#ENV]\n\n\t//
+usage=Cloneset updateStrategy, candidates are `ReCreate`/`InPlaceIfPossible`/`InPlaceOnly`\n\tupdateStrategyType?:
string\n\n\t// +usage=HostAliases is a list of hosts and IPs that
will be write into the pod's hosts file\n\thostAliases?: [...{\n\t\thostnames:
[...string]\n\t\tip: string\n\t}]\n\n\t// +usage=Instructions for
assessing whether the container is alive.\n\tlivenessProbe?: #HealthProbe\n\n\t//
+usage=Instructions for assessing whether the container is in a
suitable state to serve traffic.\n\treadinessProbe?: #HealthProbe\n}\n\n#ENV:
{\n\t// +usage=Environment variable name\n\tname: string\n\t// +usage=The
value of the environment variable\n\tvalue?: string\n\t// +usage=Specifies
a source the value of this var should come from\n\tvalueFrom?: {\n\t\t//
+usage=Selects a key of a secret in the pod's namespace\n\t\tsecretKeyRef:
{\n\t\t\t// +usage=The name of the secret in the pod's namespace
to select from\n\t\t\tname: string\n\t\t\t// +usage=The key of the
secret to select from. Must be a valid secret key\n\t\t\tkey: string\n\t\t}\n\t}\n}\n\n#HealthProbe:
{\n\n\t// +usage=Instructions for assessing container health by
executing a command. Either this attribute or the httpGet attribute
or the tcpSocket attribute MUST be specified. This attribute is
mutually exclusive with both the httpGet attribute and the tcpSocket
attribute.\n\texec?: {\n\t\t// +usage=A command to be executed inside
the container to assess its health. Each space delimited token of
the command is a separate array element. Commands exiting 0 are
considered to be successful probes, whilst all other exit codes
are considered failures.\n\t\tcommand: [...string]\n\t}\n\n\t//
+usage=Instructions for assessing container health by executing
an HTTP GET request. Either this attribute or the exec attribute
or the tcpSocket attribute MUST be specified. This attribute is
mutually exclusive with both the exec attribute and the tcpSocket
attribute.\n\thttpGet?: {\n\t\t// +usage=The endpoint, relative
to the port, to which the HTTP GET request should be directed.\n\t\tpath:
string\n\t\t// +usage=The TCP socket within the container to which
the HTTP GET request should be directed.\n\t\tport: int\n\t\thttpHeaders?:
[...{\n\t\t\tname: string\n\t\t\tvalue: string\n\t\t}]\n\t}\n\n\t//
+usage=Instructions for assessing container health by probing a
TCP socket. Either this attribute or the exec attribute or the httpGet
attribute MUST be specified. This attribute is mutually exclusive
with both the exec attribute and the httpGet attribute.\n\ttcpSocket?:
{\n\t\t// +usage=The TCP socket within the container that should
be probed to assess container health.\n\t\tport: int\n\t}\n\n\t//
+usage=Number of seconds after the container is started before the
first probe is initiated.\n\tinitialDelaySeconds: *0 | int\n\n\t//
+usage=How often, in seconds, to execute the probe.\n\tperiodSeconds:
*10 | int\n\n\t// +usage=Number of seconds after which the probe
times out.\n\ttimeoutSeconds: *1 | int\n\n\t// +usage=Minimum consecutive
successes for the probe to be considered successful after having
failed.\n\tsuccessThreshold: *1 | int\n\n\t// +usage=Number of consecutive
failures required to determine the container is not alive (liveness
probe) or not ready (readiness probe).\n\tfailureThreshold: *3 |
int\n} \n"
workload:
definition:
apiVersion: apps.kruise.io/v1alpha1
kind: CloneSet
type: raw
- name: predownloadimage
properties:
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
name: predownloadimage
spec:
schematic:
cue:
template: "import (\"vela/op\")\nparameter: {\n image: string\n parallel:
int\n kvs: [string]: string\n type: *\"Always\" | string\n activeDeadlineSeconds:
*1200 | int\n ttlSecondsAfterFinished: *300 | int\n backoffLimit?:
int\n timeoutSeconds?: int\n arr: [...string]\n}\n\npullImageJob:
op.#Apply & {\n value:{\n apiVersion: \"apps.kruise.io/v1alpha1\"\n
\ kind: \"ImagePullJob\"\n metadata: {\n name: \"pull-image-job\"\n
\ }\n spec: {\n image: parameter.image\n parallelism:
parameter.parallel\n selector: matchLabels: parameter.kvs\n
\ completionPolicy: {\n type: parameter.type\n activeDeadlineSeconds:
parameter.activeDeadlineSeconds\n ttlSecondsAfterFinished:
parameter.ttlSecondsAfterFinished\n }\n pullPolicy: {\n
\ if parameter.backoffLimit != _|_ {\n backoffLimit:
parameter.backoffLimit\n }\n if parameter.timeoutSeconds
!= _|_ {\n timeoutSeconds: parameter.timeoutSeconds\n }\n
\ }\n pullSecrets: parameter.arr\n } \n }
\ \n} \n"
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
dependsOn:
- ref:
components:
- name: kruise
properties:
chart: ./charts/kruise/v0.9.0
git:
branch: master
repoType: git
url: https://github.com/openkruise/kruise
values:
featureGates: PreDownloadImageForInPlaceUpdate=true
type: helm
- name: cloneset
properties:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: fluxcd
namespace: vela-system
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Describes long-running, scalable, containerized
services that have a stable network endpoint to receive external network
traffic from customers. If workload type is skipped for any service defined
in Appfile, it will be defaulted to `webservice` type.
name: cloneset
namespace: vela-system
spec:
schematic:
cue:
template: "output: {\n\tapiVersion: \"apps.kruise.io/v1alpha1\"\n\tkind:
\ \"CloneSet\"\n\tmetadata: labels: {\n\t\t\"app.oam.dev/component\":
context.name\n\t}\n\tspec: {\n\t\tselector: matchLabels: {\n\t\t\t\"app.oam.dev/component\":
context.name\n\t\t}\n\n\t\ttemplate: {\n\t\t\tmetadata: labels: {\n\t\t\t\t\"app.oam.dev/component\":
context.name\n\t\t\t}\n\n\t\t\tspec: {\n\t\t\t\tcontainers: [{\n\t\t\t\t\tname:
\ context.name\n\t\t\t\t\timage: parameter.image\n\n\t\t\t\t\tif parameter.cmd
!= _|_ {\n\t\t\t\t\t\tcommand: parameter.cmd\n\t\t\t\t\t}\n\t\t\t\t\tif
parameter.args != _|_ {\n\t\t\t\t\t\targs: parameter.args\n\t\t\t\t\t}\n\t\t\t\t\tif
parameter.env != _|_ {\n\t\t\t\t\t\tenv: parameter.env\n\t\t\t\t\t}\n\n\t\t\t\t\tif
context.config != _|_ {\n\t\t\t\t\t\tenv: context.config\n\t\t\t\t\t}\n\n\t\t\t\t\tif
parameter[\"imagePullPolicy\"] != _|_ {\n\t\t\t\t\t\timagePullPolicy:
parameter.imagePullPolicy\n\t\t\t\t\t}\n\n\t\t\t\t\tports: [{\n\t\t\t\t\t\tcontainerPort:
parameter.port\n\t\t\t\t\t}]\n\n\t\t\t\t\tif parameter[\"cpu\"] != _|_
{\n\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\tlimits: cpu: parameter.cpu\n\t\t\t\t\t\t\trequests:
cpu: parameter.cpu\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif parameter[\"memory\"]
!= _|_ {\n\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\tlimits: memory: parameter.memory\n\t\t\t\t\t\t\trequests:
memory: parameter.memory\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif
parameter[\"livenessProbe\"] != _|_ {\n\t\t\t\t\t\tlivenessProbe: parameter.livenessProbe\n\t\t\t\t\t}\n\n\t\t\t\t\tif
parameter[\"readinessProbe\"] != _|_ {\n\t\t\t\t\t\treadinessProbe:
parameter.readinessProbe\n\t\t\t\t\t}\n\n\t\t\t\t\tlifecycle: {\n\t\t\t\t\t\tif
parameter.postStart != _|_ {\n\t\t\t\t\t\t\tpostStart: exec: command:
parameter.postStart\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif parameter.preStop
!= _|_ {\n\t\t\t\t\t\t\tpreStop: exec: command: parameter.preStop\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t\tif
parameter.hostAliases != _|_ {\n\t\t\t\t\thostAliases: parameter.hostAliases\n\t\t\t\t}\n\t\t\t\tif
parameter[\"imagePullSecrets\"] != _|_ {\n\t\t\t\t\timagePullSecrets:
[ for v in parameter.imagePullSecrets {name: v}]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif
parameter.updateStrategyType != _|_ {\n\t\t\tupdateStrategy: {\n\t\t\t\ttype:
parameter.updateStrategyType\n\t\t\t}\n\t\t}\n\t}\n}\nparameter: {\n\t//
+usage=Which image would you like to use for your service\n\t// +short=i\n\timage:
string\n\n\t// +usage=Specify image pull policy for your service\n\timagePullPolicy?:
string\n\n\t// +usage=Specify image pull secrets for your service\n\timagePullSecrets?:
[...string]\n\n\t// +usage=Number of CPU units for the service, like
`0.5` (0.5 CPU core), `1` (1 CPU core)\n\tcpu?: string\n\n\t// +usage=Specify
the amount of memory to limit\n\tmemory?: *\"2048Mi\" | =~\"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$\"\n\n\t//
+usage=Commands to run in the container\n\tcmd?: [...string]\n\n\t//
+usage=Arguments to the command.\n\targs?: [...string]\n\n\t// +usage=postStart
commands will be called immediately after a container is created.\n\tpostStart?:
[...string]\n\n\t// +usage=PreStop is called immediately before a container
is terminated due to an API request or management event such as liveness/startup
probe failure, preemption, resource contention, etc. The handler is
not called if the container crashes or exits. The reason for termination
is passed to the handler. The Pod's termination grace period countdown
begins before the PreStop hooked is executed. Regardless of the outcome
of the handler, the container will eventually terminate within the Pod's
termination grace period. Other management of the container blocks until
the hook completes or until the termination grace period is reached.
More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n\tpreStop?:
[...string]\n\n\t// +usage=Which port do you want customer traffic sent
to\n\t// +short=p\n\tport: *80 | int\n\n\t// +usage=Define arguments
by using environment variables\n\tenv?: [...#ENV]\n\n\t// +usage=Cloneset
updateStrategy, candidates are `ReCreate`/`InPlaceIfPossible`/`InPlaceOnly`\n\tupdateStrategyType?:
string\n\n\t// +usage=HostAliases is a list of hosts and IPs that will
be write into the pod's hosts file\n\thostAliases?: [...{\n\t\thostnames:
[...string]\n\t\tip: string\n\t}]\n\n\t// +usage=Instructions for assessing
whether the container is alive.\n\tlivenessProbe?: #HealthProbe\n\n\t//
+usage=Instructions for assessing whether the container is in a suitable
state to serve traffic.\n\treadinessProbe?: #HealthProbe\n}\n\n#ENV:
{\n\t// +usage=Environment variable name\n\tname: string\n\t// +usage=The
value of the environment variable\n\tvalue?: string\n\t// +usage=Specifies
a source the value of this var should come from\n\tvalueFrom?: {\n\t\t//
+usage=Selects a key of a secret in the pod's namespace\n\t\tsecretKeyRef:
{\n\t\t\t// +usage=The name of the secret in the pod's namespace to
select from\n\t\t\tname: string\n\t\t\t// +usage=The key of the secret
to select from. Must be a valid secret key\n\t\t\tkey: string\n\t\t}\n\t}\n}\n\n#HealthProbe:
{\n\n\t// +usage=Instructions for assessing container health by executing
a command. Either this attribute or the httpGet attribute or the tcpSocket
attribute MUST be specified. This attribute is mutually exclusive with
both the httpGet attribute and the tcpSocket attribute.\n\texec?: {\n\t\t//
+usage=A command to be executed inside the container to assess its health.
Each space delimited token of the command is a separate array element.
Commands exiting 0 are considered to be successful probes, whilst all
other exit codes are considered failures.\n\t\tcommand: [...string]\n\t}\n\n\t//
+usage=Instructions for assessing container health by executing an HTTP
GET request. Either this attribute or the exec attribute or the tcpSocket
attribute MUST be specified. This attribute is mutually exclusive with
both the exec attribute and the tcpSocket attribute.\n\thttpGet?: {\n\t\t//
+usage=The endpoint, relative to the port, to which the HTTP GET request
should be directed.\n\t\tpath: string\n\t\t// +usage=The TCP socket
within the container to which the HTTP GET request should be directed.\n\t\tport:
int\n\t\thttpHeaders?: [...{\n\t\t\tname: string\n\t\t\tvalue: string\n\t\t}]\n\t}\n\n\t//
+usage=Instructions for assessing container health by probing a TCP
socket. Either this attribute or the exec attribute or the httpGet attribute
MUST be specified. This attribute is mutually exclusive with both the
exec attribute and the httpGet attribute.\n\ttcpSocket?: {\n\t\t// +usage=The
TCP socket within the container that should be probed to assess container
health.\n\t\tport: int\n\t}\n\n\t// +usage=Number of seconds after the
container is started before the first probe is initiated.\n\tinitialDelaySeconds:
*0 | int\n\n\t// +usage=How often, in seconds, to execute the probe.\n\tperiodSeconds:
*10 | int\n\n\t// +usage=Number of seconds after which the probe times
out.\n\ttimeoutSeconds: *1 | int\n\n\t// +usage=Minimum consecutive
successes for the probe to be considered successful after having failed.\n\tsuccessThreshold:
*1 | int\n\n\t// +usage=Number of consecutive failures required to determine
the container is not alive (liveness probe) or not ready (readiness
probe).\n\tfailureThreshold: *3 | int\n} \n"
workload:
definition:
apiVersion: apps.kruise.io/v1alpha1
kind: CloneSet
type: raw
- name: predownloadimage
properties:
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
name: predownloadimage
spec:
schematic:
cue:
template: "import (\"vela/op\")\nparameter: {\n image: string\n parallel:
int\n kvs: [string]: string\n type: *\"Always\" | string\n activeDeadlineSeconds:
*1200 | int\n ttlSecondsAfterFinished: *300 | int\n backoffLimit?:
int\n timeoutSeconds?: int\n arr: [...string]\n}\n\npullImageJob:
op.#Apply & {\n value:{\n apiVersion: \"apps.kruise.io/v1alpha1\"\n
\ kind: \"ImagePullJob\"\n metadata: {\n name: \"pull-image-job\"\n
\ }\n spec: {\n image: parameter.image\n parallelism:
parameter.parallel\n selector: matchLabels: parameter.kvs\n completionPolicy:
{\n type: parameter.type\n activeDeadlineSeconds: parameter.activeDeadlineSeconds\n
\ ttlSecondsAfterFinished: parameter.ttlSecondsAfterFinished\n
\ }\n pullPolicy: {\n if parameter.backoffLimit != _|_
{\n backoffLimit: parameter.backoffLimit\n }\n if
parameter.timeoutSeconds != _|_ {\n timeoutSeconds: parameter.timeoutSeconds\n
\ }\n }\n pullSecrets: parameter.arr\n } \n
\ } \n} \n"
type: raw
workflow:
steps:
- name: checking-depends-on
properties:
name: fluxcd
namespace: vela-system
type: depends-on-app
- name: apply-resources
type: apply-application
status:
observedGeneration: 0
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:

View File

@@ -1,40 +0,0 @@
apiVersion: v1
data:
initializer: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
metadata:
annotations:
addons.oam.dev/description: Create namespace for flux-system
name: ns-flux-system
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: flux-system
properties:
apiVersion: v1
kind: Namespace
metadata:
name: flux-system
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
status:
observedGeneration: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: Create namespace for flux-system
addons.oam.dev/name: ns-flux-system
labels:
addons.oam.dev/type: ns-flux-system
name: ns-flux-system
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,40 +0,0 @@
apiVersion: v1
data:
initializer: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
metadata:
annotations:
addons.oam.dev/description: Create namespace for istio-system
name: ns-istio-system
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: istio-system
properties:
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
status:
observedGeneration: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: Create namespace for istio-system
addons.oam.dev/name: ns-istio-system
labels:
addons.oam.dev/type: ns-istio-system
name: ns-istio-system
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,128 +0,0 @@
apiVersion: v1
data:
initializer: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
metadata:
annotations:
addons.oam.dev/description: Preparations that observability need
name: observability-asset
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: observability
properties:
apiVersion: v1
kind: Namespace
metadata:
name: observability
type: raw
- name: import-grafana-dashboard
properties:
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Import dashboards to Grafana
name: import-grafana-dashboard
namespace: vela-system
spec:
schematic:
cue:
template: "outputs: registerdatasource: {\n\tapiVersion: \"grafana.extension.oam.dev/v1alpha1\"\n\tkind:
\ \"ImportDashboard\"\n\tspec: {\n\t\tgrafana: {\n\t\t\tservice:
\ parameter.grafanaServiceName\n\t\t\tnamespace:
\ parameter.grafanaServiceNamespace\n\t\t\tcredentialSecret:
\ parameter.credentialSecret\n\t\t\tcredentialSecretNamespace:
parameter.credentialSecretNamespace\n\t\t}\n\t\turls: parameter.urls\n\t}\n}\nparameter:
{\n\tgrafanaServiceName: string\n\tgrafanaServiceNamespace:
\ *\"default\" | string\n\tcredentialSecret: string\n\tcredentialSecretNamespace:
*\"default\" | string\n\turls: [...string]\n} \n"
type: raw
- name: pure-ingress
properties:
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Enable public web traffic for the component
without creating a Service.
name: pure-ingress
namespace: vela-system
spec:
schematic:
cue:
template: "\noutputs: ingress: {\n\tapiVersion: \"networking.k8s.io/v1beta1\"\n\tkind:
\ \"Ingress\"\n\tmetadata:\n\t\tname: context.name\n\tspec:
{\n\t\trules: [{\n\t\t\thost: parameter.domain\n\t\t\thttp: {\n\t\t\t\tpaths:
[\n\t\t\t\t\tfor k, v in parameter.http {\n\t\t\t\t\t\tpath: k\n\t\t\t\t\t\tbackend:
{\n\t\t\t\t\t\t\tserviceName: context.name\n\t\t\t\t\t\t\tservicePort:
v\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t}\n\t\t}]\n\t}\n}\n\nparameter:
{\n\t// +usage=Specify the domain you want to expose\n\tdomain:
string\n\n\t// +usage=Specify the mapping relationship between the
http path and the workload port\n\thttp: [string]: int\n}\n"
status:
customStatus: |-
let igs = context.outputs.ingress.status.loadBalancer.ingress
if igs == _|_ {
message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + " --route'\n"
}
if len(igs) > 0 {
if igs[0].ip != _|_ {
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
}
if igs[0].ip == _|_ {
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host
}
}
healthPolicy: |
isHealth: len(context.outputs.ingress.status.loadBalancer.ingress) > 0
type: raw
- name: register-grafana-datasource
properties:
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add a datasource to Grafana
name: register-grafana-datasource
namespace: vela-system
spec:
schematic:
cue:
template: "outputs: registerdatasource: {\n\tapiVersion: \"grafana.extension.oam.dev/v1alpha1\"\n\tkind:
\ \"DatasourceRegistration\"\n\tspec: {\n\t\tgrafana: {\n\t\t\tservice:
\ parameter.grafanaServiceName\n\t\t\tnamespace:
\ parameter.grafanaServiceNamespace\n\t\t\tcredentialSecret:
\ parameter.credentialSecret\n\t\t\tcredentialSecretNamespace:
parameter.credentialSecretNamespace\n\t\t}\n\t\tdatasource: {\n\t\t\tname:
\ parameter.name\n\t\t\ttype: parameter.type\n\t\t\taccess:
\ parameter.access\n\t\t\tservice: parameter.service\n\t\t\tnamespace:
parameter.namespace\n\t\t}\n\t}\n}\n\nparameter: {\n\tgrafanaServiceName:
\ string\n\tgrafanaServiceNamespace: *\"default\" | string\n\tcredentialSecret:
\ string\n\tcredentialSecretNamespace: string\n\tname: string\n\ttype:
\ string\n\taccess: *\"proxy\"
| string\n\tservice: string\n\tnamespace: *\"default\"
| string\n}\n"
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
status:
observedGeneration: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: Preparations that observability need
addons.oam.dev/name: observability-asset
labels:
addons.oam.dev/type: observability-asset
name: observability-asset
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,141 +1,134 @@
apiVersion: v1
data:
initializer: |
application: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
kind: Application
metadata:
annotations:
addons.oam.dev/description: An out of the box solution for KubeVela observability
name: observability
namespace: observability
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: grafana-registration
properties:
chart: ./chart
git:
branch: master
repoType: git
targetNamespace: observability
url: https://github.com/oam-dev/grafana-registration
values:
replicaCount: 1
type: helm
- name: grafana
properties:
chart: grafana
releaseName: grafana
repoType: helm
targetNamespace: observability
url: https://charts.kubevela.net/addons
version: 6.14.1
traits:
- properties:
domain: '[[ index .Args "grafana-domain" ]]'
http:
/: 80
type: pure-ingress
- properties:
credentialSecret: grafana
credentialSecretNamespace: observability
grafanaServiceName: grafana
grafanaServiceNamespace: observability
urls:
- https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json
- https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json
- https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json
- https://charts.kubevela.net/addons/dashboards/flux2/cluster.json
type: import-grafana-dashboard
type: helm
- name: loki
properties:
chart: loki-stack
releaseName: loki
repoType: helm
targetNamespace: observability
url: https://charts.kubevela.net/addons
version: 2.4.1
traits:
- properties:
access: proxy
credentialSecret: grafana
credentialSecretNamespace: observability
grafanaServiceName: grafana
grafanaServiceNamespace: observability
name: loki
namespace: observability
service: loki
type: loki
type: register-grafana-datasource
type: helm
- name: prometheus-server
properties:
chart: prometheus
releaseName: prometheus
repoType: helm
targetNamespace: observability
url: https://charts.kubevela.net/addons
values:
alertmanager:
persistentVolume:
enabled: '[[ index .Args "alertmanager-pvc-enabled" | default "true"
]]'
size: '[[ index .Args "alertmanager-pvc-size" | default "20Gi" ]]'
storageClass: '[[ index .Args "alertmanager-pvc-class" ]]'
server:
persistentVolume:
enabled: '[[ index .Args "server-pvc-enabled" | default "true" ]]'
size: '[[ index .Args "server-pvc-size" | default "20Gi" ]]'
storageClass: '[[ index .Args "server-pvc-class" ]]'
version: 14.4.1
traits:
- properties:
access: proxy
credentialSecret: grafana
credentialSecretNamespace: observability
grafanaServiceName: grafana
grafanaServiceNamespace: observability
name: prometheus
namespace: observability
service: prometheus-server
type: prometheus
type: register-grafana-datasource
type: helm
- name: kube-state-metrics
properties:
chart: kube-state-metrics
repoType: helm
targetNamespace: observability
url: https://charts.kubevela.net/addons
values:
image:
repository: oamdev/kube-state-metrics
tag: v2.1.0
version: 3.4.1
type: helm
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
dependsOn:
- ref:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: fluxcd
namespace: vela-system
- ref:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: observability-asset
namespace: vela-system
components:
- name: grafana-registration
properties:
chart: ./chart
git:
branch: master
repoType: git
targetNamespace: vela-system
url: https://github.com/oam-dev/grafana-registration
values:
replicaCount: 1
type: helm
- name: grafana
properties:
chart: grafana
releaseName: grafana
repoType: helm
targetNamespace: vela-system
url: https://charts.kubevela.net/addons
version: 6.14.1
traits:
- properties:
domain: '[[ index .Args "grafana-domain" ]]'
http:
/: 80
type: pure-ingress
- properties:
credentialSecret: grafana
credentialSecretNamespace: vela-system
grafanaServiceName: grafana
grafanaServiceNamespace: vela-system
urls:
- https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json
- https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json
- https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json
- https://charts.kubevela.net/addons/dashboards/flux2/cluster.json
type: import-grafana-dashboard
type: helm
- name: loki
properties:
chart: loki-stack
releaseName: loki
repoType: helm
targetNamespace: vela-system
url: https://charts.kubevela.net/addons
version: 2.4.1
traits:
- properties:
access: proxy
credentialSecret: grafana
credentialSecretNamespace: vela-system
grafanaServiceName: grafana
grafanaServiceNamespace: vela-system
name: loki
namespace: vela-system
service: loki
type: loki
type: register-grafana-datasource
type: helm
- name: prometheus-server
properties:
chart: prometheus
releaseName: prometheus
repoType: helm
targetNamespace: vela-system
url: https://charts.kubevela.net/addons
values:
alertmanager:
persistentVolume:
enabled: '[[ index .Args "alertmanager-pvc-enabled" | default "true" ]]'
size: '[[ index .Args "alertmanager-pvc-size" | default "20Gi" ]]'
storageClass: '[[ index .Args "alertmanager-pvc-class" ]]'
server:
persistentVolume:
enabled: '[[ index .Args "server-pvc-enabled" | default "true" ]]'
size: '[[ index .Args "server-pvc-size" | default "20Gi" ]]'
storageClass: '[[ index .Args "server-pvc-class" ]]'
version: 14.4.1
traits:
- properties:
access: proxy
credentialSecret: grafana
credentialSecretNamespace: vela-system
grafanaServiceName: grafana
grafanaServiceNamespace: vela-system
name: prometheus
namespace: vela-system
service: prometheus-server
type: prometheus
type: register-grafana-datasource
type: helm
- name: kube-state-metrics
properties:
chart: kube-state-metrics
repoType: helm
targetNamespace: vela-system
url: https://charts.kubevela.net/addons
values:
image:
repository: oamdev/kube-state-metrics
tag: v2.1.0
version: 3.4.1
type: helm
workflow:
steps:
- name: checking-depends-on
properties:
name: fluxcd
namespace: vela-system
type: depends-on-app
- name: apply-resources
type: apply-remaining
status:
observedGeneration: 0
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
apiVersion: v1
data:
initializer: |
application: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
kind: Application
metadata:
annotations:
addons.oam.dev/description: Prometheus is an open-source systems monitoring and
@@ -10,31 +10,30 @@ data:
name: prometheus
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: prometheus
properties:
chart: premetheus
repoType: helm
url: https://prometheus-community.github.io/helm-charts
type: helm
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
dependsOn:
- ref:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: fluxcd
namespace: vela-system
components:
- name: prometheus
properties:
chart: premetheus
repoType: helm
url: https://prometheus-community.github.io/helm-charts
type: helm
workflow:
steps:
- name: checking-depends-on
properties:
name: fluxcd
namespace: vela-system
type: depends-on-app
- name: apply-resources
type: apply-application
status:
observedGeneration: 0
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:

View File

@@ -1,21 +1,22 @@
apiVersion: core.oam.dev/v1beta1
kind: Initializer
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for Alibaba Cloud
addons.oam.dev/name: terraform/provider-alibaba
name: terraform-provider-alibaba
namespace: default
spec:
appTemplate:
apiVersion: v1
data:
application: |
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for Alibaba Cloud
addons.oam.dev/name: terraform-alibaba
name: terraform-alibaba
namespace: vela-system
spec:
components:
- name: alibaba-account-creds
- name: alibaba-account-creds-[[ index .Args "providerName" ]]
properties:
apiVersion: v1
kind: Secret
metadata:
name: alibaba-account-creds
name: alibaba-account-creds-[[ index .Args "providerName" ]]
namespace: vela-system
stringData:
credentials: |
@@ -24,23 +25,32 @@ spec:
securityToken: [[ index .Args "ALICLOUD_SECURITY_TOKEN" ]]
type: Opaque
type: raw
- name: default
- name: alibaba-[[ index .Args "providerName" ]]
properties:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: default
name: '[[ index .Args "providerName" ]]'
namespace: default
spec:
credentials:
secretRef:
key: credentials
name: alibaba-account-creds
name: alibaba-account-creds-[[ index .Args "providerName" ]]
namespace: vela-system
source: Secret
provider: alibaba
region: '[[ index .Args "ALICLOUD_REGION" ]]'
type: raw
workflow:
steps:
- name: ""
properties:
name: terraform
namespace: vela-system
type: depends-on-app
- name: ""
type: apply-application
status:
rollout:
batchRollingState: ""
@@ -49,5 +59,12 @@ spec:
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
status:
observedGeneration: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for Alibaba Cloud
addons.oam.dev/name: terraform-alibaba
labels:
addons.oam.dev/type: terraform-alibaba
name: terraform-alibaba
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -0,0 +1,70 @@
apiVersion: v1
data:
application: |
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for AWS
addons.oam.dev/name: terraform-aws
name: terraform-aws
namespace: vela-system
spec:
components:
- name: aws-account-creds
properties:
apiVersion: v1
kind: Secret
metadata:
name: aws-account-creds
namespace: vela-system
stringData:
credentials: |
awsAccessKeyID: [[ index .Args "AWS_ACCESS_KEY_ID" ]]
awsSecretAccessKey: [[ index .Args "AWS_SECRET_ACCESS_KEY" ]]
awsSessionToken: [[ index .Args "AWS_SESSION_TOKEN" ]]
type: Opaque
type: raw
- name: aws
properties:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: aws
namespace: default
spec:
credentials:
secretRef:
key: credentials
name: aws-account-creds
namespace: vela-system
source: Secret
provider: aws
region: '[[ index .Args "AWS_DEFAULT_REGION" ]]'
type: raw
workflow:
steps:
- name: ""
properties:
name: terraform
namespace: vela-system
type: depends-on-app
- name: ""
type: apply-application
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for AWS
addons.oam.dev/name: terraform-aws
labels:
addons.oam.dev/type: terraform-aws
name: terraform-aws
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,13 +1,14 @@
apiVersion: core.oam.dev/v1beta1
kind: Initializer
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for Azure
addons.oam.dev/name: terraform/provider-azure
name: terraform-provider-azure
namespace: default
spec:
appTemplate:
apiVersion: v1
data:
application: |
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for Azure
addons.oam.dev/name: terraform-azure
name: terraform-azure
namespace: vela-system
spec:
components:
- name: azure-account-creds
@@ -41,6 +42,15 @@ spec:
source: Secret
provider: azure
type: raw
workflow:
steps:
- name: ""
properties:
name: terraform
namespace: vela-system
type: depends-on-app
- name: ""
type: apply-application
status:
rollout:
batchRollingState: ""
@@ -49,5 +59,12 @@ spec:
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
status:
observedGeneration: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for Azure
addons.oam.dev/name: terraform-azure
labels:
addons.oam.dev/type: terraform-azure
name: terraform-azure
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,59 +1,55 @@
apiVersion: v1
data:
initializer: |
application: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
kind: Application
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for Alibaba Cloud
addons.oam.dev/name: terraform/provider-alibaba
name: terraform-provider-alibaba
namespace: default
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: alibaba-account-creds
properties:
apiVersion: v1
kind: Secret
metadata:
components:
- name: alibaba-account-creds
properties:
apiVersion: v1
kind: Secret
metadata:
name: alibaba-account-creds
namespace: vela-system
stringData:
credentials: |
accessKeyID: [[ index .Args "ALICLOUD_ACCESS_KEY" ]]
accessKeySecret: [[ index .Args "ALICLOUD_SECRET_KEY" ]]
securityToken: [[ index .Args "ALICLOUD_SECURITY_TOKEN" ]]
type: Opaque
type: raw
- name: default
properties:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: default
namespace: default
spec:
credentials:
secretRef:
key: credentials
name: alibaba-account-creds
namespace: vela-system
stringData:
credentials: |
accessKeyID: [[ index .Args "ALICLOUD_ACCESS_KEY" ]]
accessKeySecret: [[ index .Args "ALICLOUD_SECRET_KEY" ]]
securityToken: [[ index .Args "ALICLOUD_SECURITY_TOKEN" ]]
type: Opaque
type: raw
- name: default
properties:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: default
namespace: default
spec:
credentials:
secretRef:
key: credentials
name: alibaba-account-creds
namespace: vela-system
source: Secret
provider: alibaba
region: '[[ index .Args "ALICLOUD_REGION" ]]'
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
source: Secret
provider: alibaba
region: '[[ index .Args "ALICLOUD_REGION" ]]'
type: raw
status:
observedGeneration: 0
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:

View File

@@ -0,0 +1,61 @@
apiVersion: v1
data:
application: |
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for AWS
addons.oam.dev/name: terraform/provider-aws
name: terraform-provider-aws
namespace: vela-system
spec:
components:
- name: aws-account-creds
properties:
apiVersion: v1
kind: Secret
metadata:
name: aws-account-creds
namespace: vela-system
stringData:
credentials: |
awsAccessKeyID: [[ index .Args "AWS_ACCESS_KEY_ID" ]]
awsSecretAccessKey: [[ index .Args "AWS_SECRET_ACCESS_KEY" ]]
awsSessionToken: [[ index .Args "AWS_SESSION_TOKEN" ]]
type: Opaque
type: raw
- name: aws
properties:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: aws
namespace: default
spec:
credentials:
secretRef:
key: credentials
name: aws-account-creds
namespace: vela-system
source: Secret
provider: aws
region: '[[ index .Args "AWS_DEFAULT_REGION" ]]'
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for AWS
addons.oam.dev/name: terraform/provider-aws
labels:
addons.oam.dev/type: terraform-provider-aws
name: terraform-provider-aws
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,59 +1,55 @@
apiVersion: v1
data:
initializer: |
application: |
apiVersion: core.oam.dev/v1beta1
kind: Initializer
kind: Application
metadata:
annotations:
addons.oam.dev/description: Kubernetes Terraform Controller for Azure
addons.oam.dev/name: terraform/provider-azure
name: terraform-provider-azure
namespace: default
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: azure-account-creds
properties:
apiVersion: v1
kind: Secret
metadata:
components:
- name: azure-account-creds
properties:
apiVersion: v1
kind: Secret
metadata:
name: azure-account-creds
namespace: vela-system
stringData:
credentials: |
armClientID: [[ index .Args "ARM_CLIENT_ID" ]]
armClientSecret: [[ index .Args "ARM_CLIENT_SECRET" ]]
armSubscriptionID: [[ index .Args "ARM_SUBSCRIPTION_ID" ]]
armTenantID: [[ index .Args "ARM_TENANT_ID" ]]
type: Opaque
type: raw
- name: azure
properties:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: azure
namespace: default
spec:
credentials:
secretRef:
key: credentials
name: azure-account-creds
namespace: vela-system
stringData:
credentials: |
armClientID: [[ index .Args "ARM_CLIENT_ID" ]]
armClientSecret: [[ index .Args "ARM_CLIENT_SECRET" ]]
armSubscriptionID: [[ index .Args "ARM_SUBSCRIPTION_ID" ]]
armTenantID: [[ index .Args "ARM_TENANT_ID" ]]
type: Opaque
type: raw
- name: azure
properties:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: azure
namespace: default
spec:
credentials:
secretRef:
key: credentials
name: azure-account-creds
namespace: vela-system
source: Secret
provider: azure
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
source: Secret
provider: azure
type: raw
status:
observedGeneration: 0
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: create
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
args:
- create

View File

@@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: patch
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
args:
- patch

View File

@@ -35,7 +35,7 @@ spec:
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
- "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}"
{{ end }}
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
resources:
{{- toYaml .Values.multicluster.clusterGateway.resources | nindent 12 }}
@@ -132,7 +132,7 @@ spec:
spec:
containers:
- name: create
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
args:
- create
@@ -175,7 +175,7 @@ spec:
spec:
containers:
- name: patch
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
command:
- /patch

View File

@@ -16,7 +16,13 @@ spec:
)
apply: op.#Apply & {
value: parameter
value: parameter.value
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the value of the object
value: {...}
// +usage=Specify the cluster of the object
cluster: *"" | string
}
parameter: {}

View File

@@ -27,7 +27,7 @@ spec:
}
}
load: op.#Steps & {
if dependsOn.err != _|_ && dependsOn.value == _|_ {
if dependsOn.err != _|_ {
configMap: op.#Read & {
value: {
apiVersion: "v1"
@@ -37,18 +37,17 @@ spec:
namespace: parameter.namespace
}
}
}
apply: op.#Apply & {
value: {
yaml.Unmarshal(configMap.value.data[parameter.name])
}
}
} @step(1)
template: configMap.value.data["application"]
apply: op.#Apply & {
value: yaml.Unmarshal(template)
} @step(2)
wait: op.#ConditionalWait & {
continue: load.apply.value.status.status == "running"
}
continue: apply.value.status.status == "running"
} @step(3)
}
if dependsOn.value != _|_ {
if dependsOn.err == _|_ {
wait: op.#ConditionalWait & {
continue: dependsOn.value.status.status == "running"
}

View File

@@ -0,0 +1,42 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/export2config.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Export data to config map for your workflow steps
name: export2config
namespace: {{.Values.systemDefinitionNamespace}}
spec:
schematic:
cue:
template: |
import (
"vela/op"
)
apply: op.#Apply & {
value: {
apiVersion: "v1"
kind: "ConfigMap"
metadata: {
name: parameter.configName
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
if parameter.namespace == _|_ {
namespace: context.namespace
}
}
data: parameter.data
}
}
parameter: {
// +usage=Specify the name of the config map
configName: string
// +usage=Specify the namespace of the config map
namespace?: string
// +usage=Specify the data of config map
data: {}
}

View File

@@ -0,0 +1,47 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/export2secret.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Export data to secret for your workflow steps
name: export2secret
namespace: {{.Values.systemDefinitionNamespace}}
spec:
schematic:
cue:
template: |
import (
"vela/op"
)
apply: op.#Apply & {
value: {
apiVersion: "v1"
kind: "Secret"
if parameter.type != _|_ {
type: parameter.type
}
metadata: {
name: parameter.secretName
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
if parameter.namespace == _|_ {
namespace: context.namespace
}
}
stringData: parameter.data
}
}
parameter: {
// +usage=Specify the name of the secret
secretName: string
// +usage=Specify the namespace of the secret
namespace?: string
// +usage=Specify the type of the secret
type?: string
// +usage=Specify the data of secret
data: {}
}

View File

@@ -0,0 +1,39 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/import-grafana-dashboard.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Import dashboards to Grafana
name: import-grafana-dashboard
namespace: {{.Values.systemDefinitionNamespace}}
spec:
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
outputs: registerdatasource: {
apiVersion: "grafana.extension.oam.dev/v1alpha1"
kind: "ImportDashboard"
spec: {
grafana: {
service: parameter.grafanaServiceName
namespace: parameter.grafanaServiceNamespace
credentialSecret: parameter.credentialSecret
credentialSecretNamespace: parameter.credentialSecretNamespace
}
urls: parameter.urls
}
}
parameter: {
grafanaServiceName: string
grafanaServiceNamespace: *"default" | string
credentialSecret: string
credentialSecretNamespace: *"default" | string
urls: [...string]
}
workloadRefPath: ""

View File

@@ -0,0 +1,113 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/nocalhost.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: nocalhost develop configuration.
name: nocalhost
namespace: {{.Values.systemDefinitionNamespace}}
spec:
appliesToWorkloads:
- '*'
podDisruptive: true
schematic:
cue:
template: |
import (
"encoding/json"
)
patch: metadata: annotations: {
"dev.nocalhost/application-name": context.appName
"dev.nocalhost/application-namespace": context.namespace
"dev.nocalhost": json.Marshal({
containers: [
{
name: context.name
dev: {
if parameter.gitUrl != _|_ {
gitUrl: parameter.gitUrl
}
image: parameter.image
shell: parameter.shell
workDir: parameter.workDir
if parameter.storageClass != _|_ {
storageClass: parameter.storageClass
}
resources: {
limits: parameter.resources.limits
requests: parameter.resources.requests
}
if parameter.persistentVolumeDirs != _|_ {
persistentVolumeDirs: [
for v in parameter.persistentVolumeDirs {
path: v.path
capacity: v.capacity
},
]
}
if parameter.command != _|_ {
command: parameter.command
}
if parameter.debug != _|_ {
debug: parameter.debug
}
hotReload: parameter.hotReload
if parameter.sync != _|_ {
sync: parameter.sync
}
if parameter.env != _|_ {
env: [
for v in parameter.env {
name: v.name
value: v.value
},
]
}
if parameter.portForward != _|_ {
portForward: parameter.portForward
}
}
},
]
})
}
parameter: {
gitUrl?: string
image: string
shell: *"bash" | string
workDir: *"/home/nocalhost-dev" | string
storageClass?: string
command?: {
run?: [...string]
debug?: [...string]
}
debug?: remoteDebugPort?: int
hotReload: *true | bool
sync: {
type: *"send" | string
filePattern?: [...string]
ignoreFilePattern?: [...string]
}
env?: [...{
name: string
value: string
}]
portForward?: [...string]
persistentVolumeDirs?: [...{
path: string
capacity: string
}]
resources: {
limits: {
memory: *"2Gi" | string
cpu: *"2" | string
}
requests: {
memory: *"512Mi" | string
cpu: *"0.5" | string
}
}
}

View File

@@ -0,0 +1,56 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/pure-ingress.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Enable public web traffic for the component without creating a Service.
name: pure-ingress
namespace: {{.Values.systemDefinitionNamespace}}
spec:
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
outputs: ingress: {
apiVersion: "networking.k8s.io/v1beta1"
kind: "Ingress"
metadata: name: context.name
spec: rules: [{
host: parameter.domain
http: paths: [
for k, v in parameter.http {
path: k
backend: {
serviceName: context.name
servicePort: v
}
},
]
}]
}
parameter: {
// +usage=Specify the domain you want to expose
domain: string
// +usage=Specify the mapping relationship between the http path and the workload port
http: [string]: int
}
status:
customStatus: |-
let igs = context.outputs.ingress.status.loadBalancer.ingress
if igs == _|_ {
message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + " --route'\n"
}
if len(igs) > 0 {
if igs[0].ip != _|_ {
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
}
if igs[0].ip == _|_ {
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host
}
}
workloadRefPath: ""

View File

@@ -0,0 +1,62 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/read-object.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Read objects for your workflow steps
name: read-object
namespace: {{.Values.systemDefinitionNamespace}}
spec:
schematic:
cue:
template: |
import (
"vela/op"
)
output: {
if parameter.apiVersion == _|_ && parameter.kind == _|_ {
op.#Read & {
value: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
metadata: {
name: parameter.name
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
}
}
cluster: parameter.cluster
}
}
if parameter.apiVersion != _|_ || parameter.kind != _|_ {
op.#Read & {
value: {
apiVersion: parameter.apiVersion
kind: parameter.kind
metadata: {
name: parameter.name
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
}
}
cluster: parameter.cluster
}
}
}
parameter: {
// +usage=Specify the apiVersion of the object, defaults to core.oam.dev/v1beta1
apiVersion?: string
// +usage=Specify the kind of the object, defaults to Application
kind?: string
// +usage=Specify the name of the object
name: string
// +usage=Specify the namespace of the object
namespace?: string
// +usage=Specify the cluster of the object
cluster: *"" | string
}

View File

@@ -0,0 +1,48 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/register-grafana-datasource.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add a datasource to Grafana
name: register-grafana-datasource
namespace: {{.Values.systemDefinitionNamespace}}
spec:
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
outputs: registerdatasource: {
apiVersion: "grafana.extension.oam.dev/v1alpha1"
kind: "DatasourceRegistration"
spec: {
grafana: {
service: parameter.grafanaServiceName
namespace: parameter.grafanaServiceNamespace
credentialSecret: parameter.credentialSecret
credentialSecretNamespace: parameter.credentialSecretNamespace
}
datasource: {
name: parameter.name
type: parameter.type
access: parameter.access
service: parameter.service
namespace: parameter.namespace
}
}
}
parameter: {
grafanaServiceName: string
grafanaServiceNamespace: *"default" | string
credentialSecret: string
credentialSecretNamespace: string
name: string
type: string
access: *"proxy" | string
service: string
namespace: *"default" | string
}
workloadRefPath: ""

View File

@@ -24,8 +24,10 @@ spec:
componentName: context.name
rolloutPlan: {
rolloutStrategy: "IncreaseFirst"
rolloutBatches: parameter.rolloutBatches
targetSize: parameter.targetSize
if parameter.rolloutBatches != _|_ {
rolloutBatches: parameter.rolloutBatches
}
targetSize: parameter.targetSize
if parameter["batchPartition"] != _|_ {
batchPartition: parameter.batchPartition
}
@@ -35,7 +37,7 @@ spec:
parameter: {
targetRevision: *context.revision | string
targetSize: int
rolloutBatches: [...rolloutBatch]
rolloutBatches?: [...rolloutBatch]
batchPartition?: int
}
rolloutBatch: replicas: int

View File

@@ -23,6 +23,10 @@ spec:
name: context.name
image: parameter.image
if parameter["imagePullPolicy"] != _|_ {
imagePullPolicy: parameter.imagePullPolicy
}
if parameter["cmd"] != _|_ {
command: parameter.cmd
}
@@ -85,6 +89,13 @@ spec:
}}]
}
if parameter["imagePullSecrets"] != _|_ {
imagePullSecrets: [ for v in parameter.imagePullSecrets {
name: v
},
]
}
}
}
}
@@ -97,6 +108,12 @@ spec:
// +short=i
image: string
// +usage=Specify image pull policy for your service
imagePullPolicy?: string
// +usage=Specify image pull secrets for your service
imagePullSecrets?: [...string]
// +usage=Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never.
restart: *"Never" | string

View File

@@ -13,11 +13,18 @@ spec:
template: |
import (
"vela/op"
"encoding/base64"
)
parameter: {
dingding?: {
url: string
url: {
address?: string
fromSecret?: {
name: string
key: string
}
}
message: {
text?: *null | {
content: string
@@ -62,7 +69,13 @@ spec:
}
slack?: {
url: string
url: {
address?: string
fromSecret?: {
name: string
key: string
}
}
message: {
text: string
blocks?: *null | [...block]
@@ -84,17 +97,17 @@ spec:
url?: string
value?: string
style?: string
text?: text
text?: textType
confirm?: {
title: text
text: text
confirm: text
deny: text
title: textType
text: textType
confirm: textType
deny: textType
style?: string
}
options?: [...option]
initial_options?: [...option]
placeholder?: text
placeholder?: textType
initial_date?: string
image_url?: string
alt_text?: string
@@ -108,32 +121,74 @@ spec:
initial_time?: string
}]
}
text: {
textType: {
type: string
text: string
emoji?: bool
verbatim?: bool
}
option: {
text: text
text: textType
value: string
description?: text
description?: textType
url?: string
}
// send webhook notification
ding: {
ding: op.#Steps & {
if parameter.dingding != _|_ {
op.#DingTalk & {
message: parameter.dingding.message
dingUrl: parameter.dingding.url
if parameter.dingding.url.address != _|_ {
ding1: op.#DingTalk & {
message: parameter.dingding.message
dingUrl: parameter.dingding.url.address
}
}
if parameter.dingding.url.fromSecret != _|_ && parameter.dingding.url.address == _|_ {
read: op.#Read & {
value: {
apiVersion: "v1"
kind: "Secret"
metadata: {
name: parameter.dingding.url.fromSecret.name
namespace: context.namespace
}
}
}
decoded: base64.Decode(null, read.value.data[parameter.dingding.url.fromSecret.key])
stringValue: op.#ConvertString & {bt: decoded}
ding2: op.#DingTalk & {
message: parameter.dingding.message
dingUrl: stringValue.str
}
}
}
}
slack: {
slack: op.#Steps & {
if parameter.slack != _|_ {
op.#Slack & {
message: parameter.slack.message
slackUrl: parameter.slack.url
if parameter.slack.url.address != _|_ {
slack1: op.#Slack & {
message: parameter.slack.message
slackUrl: parameter.slack.url.address
}
}
if parameter.slack.url.fromSecret != _|_ && parameter.slack.url.address == _|_ {
read: op.#Read & {
value: {
kind: "Secret"
apiVersion: "v1"
metadata: {
name: parameter.slack.url.fromSecret.name
namespace: context.namespace
}
}
}
decoded: base64.Decode(null, read.value.data[parameter.slack.url.fromSecret.key])
stringValue: op.#ConvertString & {bt: decoded}
slack2: op.#Slack & {
message: parameter.slack.message
slackUrl: stringValue.str
}
}
}
}

View File

@@ -30,7 +30,7 @@ spec:
args:
- "apiserver"
- "--port={{ .Values.apiServer.port }}"
image: {{ .Values.apiserverImage.repository }}:{{ .Values.apiserverImage.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.apiserverImage.repository }}:{{ .Values.apiserverImage.tag }}
imagePullPolicy: {{ quote .Values.apiserverImage.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}

View File

@@ -130,7 +130,7 @@ spec:
{{ if .Values.multicluster.enabled }}
- "--enable-cluster-gateway"
{{ end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}

View File

@@ -10,7 +10,7 @@ spec:
- name: helm-test-express-server
type: webservice
properties:
image: crccheck/hello-world
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
port: 8000
traits:
- type: ingress
@@ -30,7 +30,7 @@ spec:
serviceAccountName: kubevela-vela-core
containers:
- name: {{ .Release.Name }}-application-test
image: alpine/k8s:1.18.2
image: {{ .Values.imageRegistry }}{{ .Values.test.k8s.repository }}:{{ .Values.test.k8s.tag }}
imagePullPolicy: IfNotPresent
command:
- /bin/bash

View File

@@ -7,6 +7,8 @@ replicaCount: 1
applyOnceOnly: "off"
disableCaps: ""
imageRegistry: ""
image:
repository: oamdev/vela-core
tag: latest
@@ -73,7 +75,7 @@ admissionWebhooks:
enabled: true
image:
repository: oamdev/kube-webhook-certgen
tag: v2.2
tag: v2.3
pullPolicy: IfNotPresent
affinity: {}
tolerations: []
@@ -130,4 +132,12 @@ multicluster:
memory: 200Mi
secureTLS:
enabled: true
certPath: /etc/k8s-cluster-gateway-certs
certPath: /etc/k8s-cluster-gateway-certs
test:
app:
repository: oamdev/hello-world
tag: v1
k8s:
repository: oamdev/alpine-k8s
tag: 1.18.2

View File

@@ -1232,6 +1232,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -1241,11 +1251,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -1255,6 +1270,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -1635,6 +1667,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -1644,11 +1686,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -1658,6 +1705,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -1936,6 +2000,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -1945,11 +2019,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -1959,6 +2038,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -3360,6 +3456,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -3369,11 +3475,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -3383,6 +3494,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -3656,6 +3784,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -3665,11 +3803,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -3679,6 +3822,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -4041,6 +4201,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -4050,11 +4220,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -4064,6 +4239,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -4305,6 +4497,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -4314,11 +4516,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -4328,6 +4535,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -4371,6 +4595,10 @@ spec:
- type
type: object
type: array
configMapRef:
description: ConfigMapRef refer to a ConfigMap which contains
OpenAPI V3 JSON schema of Component parameters.
type: string
latestRevision:
description: LatestRevision of the component definition
properties:
@@ -4585,6 +4813,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote
git repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -4594,11 +4832,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region.
It will override the region in the region field
of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -4608,6 +4851,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required
to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -222,6 +222,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git
repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -231,11 +241,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It
will override the region in the region field of
ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -245,6 +260,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required to
connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -506,6 +538,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git
repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -515,11 +557,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It
will override the region in the region field of
ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -529,6 +576,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required to
connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -783,6 +847,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git
repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -792,11 +866,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It
will override the region in the region field of
ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -806,6 +885,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required to
connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -1041,6 +1137,16 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether
provisioned cloud resources will be deleted when
CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git
repository. It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference
to Provider
@@ -1050,11 +1156,16 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It
will override the region in the region field of
ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -1064,6 +1175,23 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies
the namespace and name of a Secret to which any
connection details for this managed resource should
be written. Connection details frequently include
the endpoint, username, and password required to
connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -1107,6 +1235,10 @@ spec:
- type
type: object
type: array
configMapRef:
description: ConfigMapRef refer to a ConfigMap which contains
OpenAPI V3 JSON schema of Component parameters.
type: string
latestRevision:
description: LatestRevision of the component definition
properties:

View File

@@ -151,6 +151,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -160,11 +169,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -174,6 +187,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -188,6 +188,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -197,11 +206,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -211,6 +224,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -468,6 +497,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -477,11 +515,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -491,6 +533,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -148,6 +148,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -157,11 +166,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -171,6 +184,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -212,6 +241,10 @@ spec:
- type
type: object
type: array
configMapRef:
description: ConfigMapRef refer to a ConfigMap which contains OpenAPI
V3 JSON schema of Component parameters.
type: string
latestRevision:
description: LatestRevision of the component definition
properties:

View File

@@ -193,6 +193,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -202,11 +211,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -216,6 +229,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object
@@ -454,6 +483,15 @@ spec:
configuration:
description: Configuration is Terraform Configuration
type: string
deleteResource:
default: true
description: DeleteResource will determine whether provisioned
cloud resources will be deleted when CR is deleted
type: boolean
path:
description: Path is the sub-directory of remote git repository.
It's valid when remote is set
type: string
providerRef:
description: ProviderReference specifies the reference to
Provider
@@ -463,11 +501,15 @@ spec:
type: string
namespace:
default: default
description: Namespace of the secret.
description: Namespace of the referenced object.
type: string
required:
- name
type: object
region:
description: Region is cloud provider's region. It will override
the region in the region field of ProviderReference
type: string
type:
default: hcl
description: Type specifies which Terraform configuration
@@ -477,6 +519,22 @@ spec:
- json
- remote
type: string
writeConnectionSecretToRef:
description: WriteConnectionSecretToReference specifies the
namespace and name of a Secret to which any connection details
for this managed resource should be written. Connection
details frequently include the endpoint, username, and password
required to connect to the managed resource.
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- configuration
type: object

View File

@@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: create
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
args:
- create

View File

@@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: patch
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
args:
- patch

View File

@@ -35,7 +35,7 @@ spec:
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
- "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}"
{{ end }}
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
resources:
{{- toYaml .Values.multicluster.clusterGateway.resources | nindent 12 }}
@@ -132,7 +132,7 @@ spec:
spec:
containers:
- name: create
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
args:
- create
@@ -175,7 +175,7 @@ spec:
spec:
containers:
- name: patch
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
command:
- /patch

View File

@@ -16,7 +16,13 @@ spec:
)
apply: op.#Apply & {
value: parameter
value: parameter.value
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the value of the object
value: {...}
// +usage=Specify the cluster of the object
cluster: *"" | string
}
parameter: {}

View File

@@ -27,7 +27,7 @@ spec:
}
}
load: op.#Steps & {
if dependsOn.err != _|_ && dependsOn.value == _|_ {
if dependsOn.err != _|_ {
configMap: op.#Read & {
value: {
apiVersion: "v1"
@@ -37,18 +37,17 @@ spec:
namespace: parameter.namespace
}
}
}
apply: op.#Apply & {
value: {
yaml.Unmarshal(configMap.value.data[parameter.name])
}
}
} @step(1)
template: configMap.value.data["application"]
apply: op.#Apply & {
value: yaml.Unmarshal(template)
} @step(2)
wait: op.#ConditionalWait & {
continue: load.apply.value.status.status == "running"
}
continue: apply.value.status.status == "running"
} @step(3)
}
if dependsOn.value != _|_ {
if dependsOn.err == _|_ {
wait: op.#ConditionalWait & {
continue: dependsOn.value.status.status == "running"
}

View File

@@ -0,0 +1,42 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/export2config.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Export data to config map for your workflow steps
name: export2config
namespace: {{.Values.systemDefinitionNamespace}}
spec:
schematic:
cue:
template: |
import (
"vela/op"
)
apply: op.#Apply & {
value: {
apiVersion: "v1"
kind: "ConfigMap"
metadata: {
name: parameter.configName
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
if parameter.namespace == _|_ {
namespace: context.namespace
}
}
data: parameter.data
}
}
parameter: {
// +usage=Specify the name of the config map
configName: string
// +usage=Specify the namespace of the config map
namespace?: string
// +usage=Specify the data of config map
data: {}
}

View File

@@ -0,0 +1,47 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/export2secret.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Export data to secret for your workflow steps
name: export2secret
namespace: {{.Values.systemDefinitionNamespace}}
spec:
schematic:
cue:
template: |
import (
"vela/op"
)
apply: op.#Apply & {
value: {
apiVersion: "v1"
kind: "Secret"
if parameter.type != _|_ {
type: parameter.type
}
metadata: {
name: parameter.secretName
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
if parameter.namespace == _|_ {
namespace: context.namespace
}
}
stringData: parameter.data
}
}
parameter: {
// +usage=Specify the name of the secret
secretName: string
// +usage=Specify the namespace of the secret
namespace?: string
// +usage=Specify the type of the secret
type?: string
// +usage=Specify the data of secret
data: {}
}

View File

@@ -0,0 +1,39 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/import-grafana-dashboard.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Import dashboards to Grafana
name: import-grafana-dashboard
namespace: {{.Values.systemDefinitionNamespace}}
spec:
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
outputs: registerdatasource: {
apiVersion: "grafana.extension.oam.dev/v1alpha1"
kind: "ImportDashboard"
spec: {
grafana: {
service: parameter.grafanaServiceName
namespace: parameter.grafanaServiceNamespace
credentialSecret: parameter.credentialSecret
credentialSecretNamespace: parameter.credentialSecretNamespace
}
urls: parameter.urls
}
}
parameter: {
grafanaServiceName: string
grafanaServiceNamespace: *"default" | string
credentialSecret: string
credentialSecretNamespace: *"default" | string
urls: [...string]
}
workloadRefPath: ""

View File

@@ -0,0 +1,113 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/nocalhost.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: nocalhost develop configuration.
name: nocalhost
namespace: {{.Values.systemDefinitionNamespace}}
spec:
appliesToWorkloads:
- '*'
podDisruptive: true
schematic:
cue:
template: |
import (
"encoding/json"
)
patch: metadata: annotations: {
"dev.nocalhost/application-name": context.appName
"dev.nocalhost/application-namespace": context.namespace
"dev.nocalhost": json.Marshal({
containers: [
{
name: context.name
dev: {
if parameter.gitUrl != _|_ {
gitUrl: parameter.gitUrl
}
image: parameter.image
shell: parameter.shell
workDir: parameter.workDir
if parameter.storageClass != _|_ {
storageClass: parameter.storageClass
}
resources: {
limits: parameter.resources.limits
requests: parameter.resources.requests
}
if parameter.persistentVolumeDirs != _|_ {
persistentVolumeDirs: [
for v in parameter.persistentVolumeDirs {
path: v.path
capacity: v.capacity
},
]
}
if parameter.command != _|_ {
command: parameter.command
}
if parameter.debug != _|_ {
debug: parameter.debug
}
hotReload: parameter.hotReload
if parameter.sync != _|_ {
sync: parameter.sync
}
if parameter.env != _|_ {
env: [
for v in parameter.env {
name: v.name
value: v.value
},
]
}
if parameter.portForward != _|_ {
portForward: parameter.portForward
}
}
},
]
})
}
parameter: {
gitUrl?: string
image: string
shell: *"bash" | string
workDir: *"/home/nocalhost-dev" | string
storageClass?: string
command?: {
run?: [...string]
debug?: [...string]
}
debug?: remoteDebugPort?: int
hotReload: *true | bool
sync: {
type: *"send" | string
filePattern?: [...string]
ignoreFilePattern?: [...string]
}
env?: [...{
name: string
value: string
}]
portForward?: [...string]
persistentVolumeDirs?: [...{
path: string
capacity: string
}]
resources: {
limits: {
memory: *"2Gi" | string
cpu: *"2" | string
}
requests: {
memory: *"512Mi" | string
cpu: *"0.5" | string
}
}
}

View File

@@ -0,0 +1,56 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/pure-ingress.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Enable public web traffic for the component without creating a Service.
name: pure-ingress
namespace: {{.Values.systemDefinitionNamespace}}
spec:
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
outputs: ingress: {
apiVersion: "networking.k8s.io/v1beta1"
kind: "Ingress"
metadata: name: context.name
spec: rules: [{
host: parameter.domain
http: paths: [
for k, v in parameter.http {
path: k
backend: {
serviceName: context.name
servicePort: v
}
},
]
}]
}
parameter: {
// +usage=Specify the domain you want to expose
domain: string
// +usage=Specify the mapping relationship between the http path and the workload port
http: [string]: int
}
status:
customStatus: |-
let igs = context.outputs.ingress.status.loadBalancer.ingress
if igs == _|_ {
message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + " --route'\n"
}
if len(igs) > 0 {
if igs[0].ip != _|_ {
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
}
if igs[0].ip == _|_ {
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host
}
}
workloadRefPath: ""

View File

@@ -0,0 +1,62 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/read-object.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Read objects for your workflow steps
name: read-object
namespace: {{.Values.systemDefinitionNamespace}}
spec:
schematic:
cue:
template: |
import (
"vela/op"
)
output: {
if parameter.apiVersion == _|_ && parameter.kind == _|_ {
op.#Read & {
value: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
metadata: {
name: parameter.name
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
}
}
cluster: parameter.cluster
}
}
if parameter.apiVersion != _|_ || parameter.kind != _|_ {
op.#Read & {
value: {
apiVersion: parameter.apiVersion
kind: parameter.kind
metadata: {
name: parameter.name
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
}
}
cluster: parameter.cluster
}
}
}
parameter: {
// +usage=Specify the apiVersion of the object, defaults to core.oam.dev/v1beta1
apiVersion?: string
// +usage=Specify the kind of the object, defaults to Application
kind?: string
// +usage=Specify the name of the object
name: string
// +usage=Specify the namespace of the object
namespace?: string
// +usage=Specify the cluster of the object
cluster: *"" | string
}

View File

@@ -0,0 +1,48 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/register-grafana-datasource.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add a datasource to Grafana
name: register-grafana-datasource
namespace: {{.Values.systemDefinitionNamespace}}
spec:
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
outputs: registerdatasource: {
apiVersion: "grafana.extension.oam.dev/v1alpha1"
kind: "DatasourceRegistration"
spec: {
grafana: {
service: parameter.grafanaServiceName
namespace: parameter.grafanaServiceNamespace
credentialSecret: parameter.credentialSecret
credentialSecretNamespace: parameter.credentialSecretNamespace
}
datasource: {
name: parameter.name
type: parameter.type
access: parameter.access
service: parameter.service
namespace: parameter.namespace
}
}
}
parameter: {
grafanaServiceName: string
grafanaServiceNamespace: *"default" | string
credentialSecret: string
credentialSecretNamespace: string
name: string
type: string
access: *"proxy" | string
service: string
namespace: *"default" | string
}
workloadRefPath: ""

View File

@@ -24,8 +24,10 @@ spec:
componentName: context.name
rolloutPlan: {
rolloutStrategy: "IncreaseFirst"
rolloutBatches: parameter.rolloutBatches
targetSize: parameter.targetSize
if parameter.rolloutBatches != _|_ {
rolloutBatches: parameter.rolloutBatches
}
targetSize: parameter.targetSize
if parameter["batchPartition"] != _|_ {
batchPartition: parameter.batchPartition
}
@@ -35,7 +37,7 @@ spec:
parameter: {
targetRevision: *context.revision | string
targetSize: int
rolloutBatches: [...rolloutBatch]
rolloutBatches?: [...rolloutBatch]
batchPartition?: int
}
rolloutBatch: replicas: int

View File

@@ -23,6 +23,10 @@ spec:
name: context.name
image: parameter.image
if parameter["imagePullPolicy"] != _|_ {
imagePullPolicy: parameter.imagePullPolicy
}
if parameter["cmd"] != _|_ {
command: parameter.cmd
}
@@ -85,6 +89,13 @@ spec:
}}]
}
if parameter["imagePullSecrets"] != _|_ {
imagePullSecrets: [ for v in parameter.imagePullSecrets {
name: v
},
]
}
}
}
}
@@ -97,6 +108,12 @@ spec:
// +short=i
image: string
// +usage=Specify image pull policy for your service
imagePullPolicy?: string
// +usage=Specify image pull secrets for your service
imagePullSecrets?: [...string]
// +usage=Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never.
restart: *"Never" | string

View File

@@ -13,11 +13,18 @@ spec:
template: |
import (
"vela/op"
"encoding/base64"
)
parameter: {
dingding?: {
url: string
url: {
address?: string
fromSecret?: {
name: string
key: string
}
}
message: {
text?: *null | {
content: string
@@ -62,7 +69,13 @@ spec:
}
slack?: {
url: string
url: {
address?: string
fromSecret?: {
name: string
key: string
}
}
message: {
text: string
blocks?: *null | [...block]
@@ -84,17 +97,17 @@ spec:
url?: string
value?: string
style?: string
text?: text
text?: textType
confirm?: {
title: text
text: text
confirm: text
deny: text
title: textType
text: textType
confirm: textType
deny: textType
style?: string
}
options?: [...option]
initial_options?: [...option]
placeholder?: text
placeholder?: textType
initial_date?: string
image_url?: string
alt_text?: string
@@ -108,32 +121,74 @@ spec:
initial_time?: string
}]
}
text: {
textType: {
type: string
text: string
emoji?: bool
verbatim?: bool
}
option: {
text: text
text: textType
value: string
description?: text
description?: textType
url?: string
}
// send webhook notification
ding: {
ding: op.#Steps & {
if parameter.dingding != _|_ {
op.#DingTalk & {
message: parameter.dingding.message
dingUrl: parameter.dingding.url
if parameter.dingding.url.address != _|_ {
ding1: op.#DingTalk & {
message: parameter.dingding.message
dingUrl: parameter.dingding.url.address
}
}
if parameter.dingding.url.fromSecret != _|_ && parameter.dingding.url.address == _|_ {
read: op.#Read & {
value: {
apiVersion: "v1"
kind: "Secret"
metadata: {
name: parameter.dingding.url.fromSecret.name
namespace: context.namespace
}
}
}
decoded: base64.Decode(null, read.value.data[parameter.dingding.url.fromSecret.key])
stringValue: op.#ConvertString & {bt: decoded}
ding2: op.#DingTalk & {
message: parameter.dingding.message
dingUrl: stringValue.str
}
}
}
}
slack: {
slack: op.#Steps & {
if parameter.slack != _|_ {
op.#Slack & {
message: parameter.slack.message
slackUrl: parameter.slack.url
if parameter.slack.url.address != _|_ {
slack1: op.#Slack & {
message: parameter.slack.message
slackUrl: parameter.slack.url.address
}
}
if parameter.slack.url.fromSecret != _|_ && parameter.slack.url.address == _|_ {
read: op.#Read & {
value: {
kind: "Secret"
apiVersion: "v1"
metadata: {
name: parameter.slack.url.fromSecret.name
namespace: context.namespace
}
}
}
decoded: base64.Decode(null, read.value.data[parameter.slack.url.fromSecret.key])
stringValue: op.#ConvertString & {bt: decoded}
slack2: op.#Slack & {
message: parameter.slack.message
slackUrl: stringValue.str
}
}
}
}

View File

@@ -30,7 +30,7 @@ spec:
args:
- "apiserver"
- "--bind-addr=0.0.0.0:{{ .Values.apiServer.port }}"
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}

View File

@@ -132,7 +132,7 @@ spec:
{{ if .Values.multicluster.enabled }}
- "--enable-cluster-gateway"
{{ end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}

View File

@@ -10,53 +10,5 @@ spec:
- name: helm-test-express-server
type: webservice
properties:
image: crccheck/hello-world
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
port: 8000
# traits:
# - type: ingress
# properties:
# domain: testsvc.example.com
# http:
# "/": 8000
# ---
# apiVersion: v1
# kind: Pod
# metadata:
# name: "{{ .Release.Name }}-application-test"
# annotations:
# "helm.sh/hook": test
# helm.sh/hook-delete-policy: hook-succeeded
# spec:
# serviceAccountName: kubevela-vela-core
# containers:
# - name: {{ .Release.Name }}-application-test
# image: alpine/k8s:1.18.2
# imagePullPolicy: IfNotPresent
# command:
# - /bin/bash
# - -ec
# - |
# set -e
# echo "Waiting application is ready..."
# echo "waiting for application being Ready"
# kubectl -n vela-system wait --for=condition=Ready applications.core.oam.dev helm-test-vela-app --timeout=3m
# echo "application is Ready"
# # wait for deploy being created
# echo "waiting for deployment being available"
# kubectl -n vela-system wait --for=condition=available deployments helm-test-express-server --timeout 3m
# echo "deployment being available"
# # wait for ingress being created
# while ! [ `kubectl -n vela-system get ing helm-test-express-server | grep -v NAME | wc -l` = 1 ]; do
# echo "waiting for ingress being created"
# sleep 1
# done
# echo "Application and its components are created"
# restartPolicy: Never

View File

@@ -7,6 +7,8 @@ replicaCount: 1
applyOnceOnly: "off"
disableCaps: "manualscalertrait,containerizedwokrload,envbinding"
imageRegistry: ""
image:
repository: oamdev/vela-core
tag: latest
@@ -69,7 +71,7 @@ admissionWebhooks:
enabled: true
image:
repository: oamdev/kube-webhook-certgen
tag: v2.2
tag: v2.3
pullPolicy: IfNotPresent
affinity: {}
tolerations: []
@@ -125,4 +127,9 @@ multicluster:
memory: 200Mi
secureTLS:
enabled: true
certPath: /etc/k8s-cluster-gateway-certs
certPath: /etc/k8s-cluster-gateway-certs
test:
app:
repository: oamdev/hello-world
tag: v1

View File

@@ -32,6 +32,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
"k8s.io/klog/v2"
"k8s.io/klog/v2/klogr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/healthz"
@@ -43,6 +44,7 @@ import (
oamv1alpha2 "github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2"
"github.com/oam-dev/kubevela/pkg/controller/utils"
"github.com/oam-dev/kubevela/pkg/cue/packages"
_ "github.com/oam-dev/kubevela/pkg/monitor/metrics"
"github.com/oam-dev/kubevela/pkg/multicluster"
"github.com/oam-dev/kubevela/pkg/oam"
"github.com/oam-dev/kubevela/pkg/oam/discoverymapper"
@@ -111,6 +113,8 @@ func main() {
flag.StringVar(&storageDriver, "storage-driver", "Local", "Application file save to the storage driver")
flag.DurationVar(&syncPeriod, "informer-re-sync-interval", 60*time.Minute,
"controller shared informer lister full re-sync period")
flag.DurationVar(&commonconfig.ReconcileTimeout, "reconcile-timeout", time.Minute*3,
"the timeout for controller reconcile")
flag.StringVar(&oam.SystemDefinitonNamespace, "system-definition-namespace", "vela-system", "define the namespace of the system-level definition")
flag.IntVar(&controllerArgs.ConcurrentReconciles, "concurrent-reconciles", 4, "concurrent-reconciles is the concurrent reconcile number of the controller. The default value is 4")
flag.Float64Var(&qps, "kube-api-qps", 50, "the qps for reconcile clients. Low qps may lead to low throughput. High qps may give stress to api-server. Raise this value if concurrent-reconciles is set to be high.")
@@ -192,7 +196,7 @@ func main() {
os.Exit(1)
}
}
ctrl.SetLogger(klogr.New())
mgr, err := ctrl.NewManager(restConfig, ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,

View File

@@ -1,32 +0,0 @@
const Configuration = {
/*
* Resolve and load @commitlint/config-conventional from node_modules.
* Referenced packages must be installed
*/
extends: ['@commitlint/config-conventional'],
/*
* Any rules defined here will override rules from @commitlint/config-conventional
*/
rules: {
'type-enum': [
2,
'always',
[
'Build',
'Chore',
'CI',
'Docs',
'Feat',
'Fix',
'Perf',
'Refactor',
'Revert',
'Style',
'Test',
],
],
'type-case': [2, 'never', 'lower-case'],
},
};
module.exports = Configuration;

View File

@@ -22,6 +22,7 @@
| disable-caps | string | "" | To be disabled builtin capability list. |
| storage-driver | string | Local | Application file save to the storage driver |
| informer-re-sync-interval | time | 1h | Controller shared informer lister full re-sync period, the interval between two routinely reconciles for one CR (like Application) if no changes made to it. |
| reconcile-timeout | time | 3m | The timeout for controller reconcile. |
| system-definition-namespace | string | vela-system | define the namespace of the system-level definition |
| concurrent-reconciles | int | 4 | The concurrent reconcile number of the controller. You can increase the degree of concurrency if a large number of CPU cores are provided to the controller. |
| kube-api-qps | int | 50 | The qps for reconcile k8s clients. Increase it if you have high concurrency. A small number might restrict the requests to the api-server which may cause a long waiting queue when there are a large number of inflight requests. Try to avoid setting it too high since it will cause large burden on apiserver. |
@@ -39,4 +40,4 @@
| Medium | < 500 | < 5,000 | < 30,000 | 4 | 500 | 800 | 1 | 2Gi |
| Large | < 1,000 | < 12,000 | < 72,000 | 4 | 800 | 1,000 | 2 | 4Gi |
> For details, read KubeVela Performance Test Report
> For details, read KubeVela Performance Test Report

View File

@@ -0,0 +1,157 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: bookinfo
spec:
components:
- name: productpage
type: webservice
properties:
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/productpage:latest
port: 9080
traits:
- type: expose
properties:
port:
- 9080
- type: nocalhost
properties:
gitUrl: https://github.com/nocalhost/bookinfo-productpage.git
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:3.7.7-slim-productpage-with-pydevd
shell: "bash"
workDir: "/opt/work"
resources:
limits:
memory: 1Gi
cpu: "1"
requests:
memory: 512Mi
cpu: "0.5"
debug:
remoteDebugPort: 9009
hotReload: true
sync:
type: send
filePattern:
- ./
ignoreFilePattern:
- .git
- .idea
command:
run:
- sh
- run.sh
debug:
- sh
- debug.sh
env:
- name: "foo"
value: "bar"
portForward:
- 39080:9080
- name: authors
type: webservice
properties:
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/authors:latest
port: 9080
traits:
- type: expose
properties:
port:
- 9080
- type: nocalhost
properties:
gitUrl: https://github.com/nocalhost/bookinfo-authors.git
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest
command:
run:
- sh
- run.sh
debug:
- sh
- debug.sh
debug:
remoteDebugPort: 9009
- name: details
type: webservice
properties:
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/details:latest
port: 9080
traits:
- type: expose
properties:
port:
- 9080
- type: nocalhost
properties:
gitUrl: https://github.com/nocalhost/bookinfo-details.git
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:2.7.1-slim
command:
run:
- sh
- run.sh
debug:
- sh
- debug.sh
sync:
filePattern:
- ./
ignoreFilePattern:
- .git
- .idea
- name: ratings
type: webservice
properties:
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/ratings:latest
port: 9080
traits:
- type: expose
properties:
port:
- 9080
- type: nocalhost
properties:
gitUrl: https://github.com/nocalhost/bookinfo-ratings.git
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:12.18.1-slim
command:
run:
- sh
- run.sh
debug:
- sh
- debug.sh
- name: reviews
type: webservice
properties:
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/reviews:latest
port: 9080
traits:
- type: expose
properties:
port:
- 9080
- type: nocalhost
properties:
gitUrl: https://github.com/nocalhost/bookinfo-reviews.git
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest
command:
run:
- sh
- run.sh
debug:
- sh
- debug.sh
debug:
remoteDebugPort: 5005
sync:
filePattern:
- ./
ignoreFilePattern:
- .git
- .idea
- .gradle
- build

View File

@@ -1,4 +1,4 @@
This repo is the source artifacts for addon `observability`.
- All .cue files are source artifacts from definition of [observability-asset](../../../vela-templates/addons/observability-asset).
- `initializer-observability.yaml` will help developer [observability](../../../vela-templates/addons/observability).
- All files in definitions are source artifacts which is now built-in in `vela-core` helm chart.
- `application-observability.yaml` will help developer [observability](../../../vela-templates/addons/observability).

View File

@@ -0,0 +1,130 @@
apiVersion: v1
kind: Namespace
metadata:
name: observability
spec: { }
---
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
annotations:
addons.oam.dev/description: "An out of the box solution for KubeVela observability"
name: grafana
namespace: observability
spec:
components:
# install grafana datasource registration chart
- name: grafana-registration-release
type: helm
properties:
repoType: git
url: https://github.com/oam-dev/grafana-registration
git:
branch: master
chart: ./chart
targetNamespace: observability
values:
replicaCount: 1
# install Grafana
- name: grafana
properties:
chart: grafana
version: 6.14.1
repoType: helm
# original url: https://grafana.github.io/helm-charts
url: https://charts.kubevela.net/addons
targetNamespace: observability
releaseName: grafana
type: helm
traits:
- type: pure-ingress
properties:
domain: grafana.c58136db32cbc44cca364bf1cf7f90519.cn-hongkong.alicontainer.com
http:
"/": 80
- type: import-grafana-dashboard
properties:
grafanaServiceName: grafana
grafanaServiceNamespace: observability
credentialSecret: grafana
credentialSecretNamespace: observability
urls:
- "https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json"
- "https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json"
- "https://charts.kubevela.net/addons/dashboards/flux2/cluster.json"
- "https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json"
# install loki
- name: loki
type: helm
properties:
chart: loki-stack
version: 2.4.1
repoType: helm
# original url: https://grafana.github.io/helm-charts
url: https://charts.kubevela.net/addons
targetNamespace: observability
releaseName: loki
traits:
- type: register-grafana-datasource # register loki datasource to Grafana
properties:
grafanaServiceName: grafana
grafanaServiceNamespace: observability
credentialSecret: grafana
credentialSecretNamespace: observability
name: loki
service: loki
namespace: observability
type: loki
access: proxy
# install Prometheus
- name: prometheus-server
type: helm
properties:
chart: prometheus
version: 14.4.1
repoType: helm
# original url: https://prometheus-community.github.io/helm-charts
url: https://charts.kubevela.net/addons
targetNamespace: observability
releaseName: prometheus
values:
alertmanager:
persistentVolume:
storageClass: "alicloud-disk-available"
size: "20Gi"
server:
persistentVolume:
storageClass: "alicloud-disk-available"
size: "20Gi"
traits:
- type: register-grafana-datasource # register Prometheus datasource to Grafana
properties:
grafanaServiceName: grafana
grafanaServiceNamespace: observability
credentialSecret: grafana
credentialSecretNamespace: observability
name: prometheus
service: prometheus-server
namespace: observability
type: prometheus
access: proxy
# install kube-state-metrics
- name: kube-state-metrics
type: helm
properties:
chart: kube-state-metrics
version: 3.4.1
repoType: helm
# original url: https://prometheus-community.github.io/helm-charts
url: https://charts.kubevela.net/addons
targetNamespace: observability
values:
image:
repository: oamdev/kube-state-metrics
tag: v2.1.0

View File

@@ -1,159 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: observability
spec: { }
---
apiVersion: core.oam.dev/v1beta1
kind: Initializer
metadata:
name: grafana
namespace: observability
spec:
appTemplate:
spec:
components:
# install grafana datasource registration chart
- name: grafana-registration-release
properties:
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: grafana-registration-release
namespace: observability
spec:
chart:
spec:
chart: ./chart
interval: 1m
sourceRef:
kind: GitRepository
name: grafana-registration-repo
namespace: observability
interval: 5m
values:
replicaCount: 1
type: raw
- name: grafana-registration-repo
properties:
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: grafana-registration-repo
namespace: observability
spec:
interval: 5m
ref:
branch: master
url: https://github.com/oam-dev/grafana-registration
type: raw
# install Grafana
- name: grafana
properties:
chart: grafana
version: 6.14.1
repoType: helm
# original url: https://grafana.github.io/helm-charts
url: https://charts.kubevela.net/addons
targetNamespace: observability
releaseName: grafana
type: helm
traits:
- type: pure-ingress
properties:
domain: grafana.cf7223b8abedc4691b7eccfe3c675850a.cn-hongkong.alicontainer.com
http:
"/": 80
- type: import-grafana-dashboard
properties:
grafanaServiceName: grafana
grafanaServiceNamespace: observability
credentialSecret: grafana
credentialSecretNamespace: observability
urls:
- "https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json"
- "https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json"
- "https://charts.kubevela.net/addons/dashboards/flux2/cluster.json"
- "https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json"
# install loki
- name: loki
type: helm
properties:
chart: loki-stack
version: 2.4.1
repoType: helm
# original url: https://grafana.github.io/helm-charts
url: https://charts.kubevela.net/addons
targetNamespace: observability
releaseName: loki
traits:
- type: register-grafana-datasource # register loki datasource to Grafana
properties:
grafanaServiceName: grafana
grafanaServiceNamespace: observability
credentialSecret: grafana
credentialSecretNamespace: observability
name: loki
service: loki
namespace: observability
type: loki
access: proxy
# install Prometheus
- name: prometheus-server
type: helm
properties:
chart: prometheus
version: 14.4.1
repoType: helm
# original url: https://prometheus-community.github.io/helm-charts
url: https://charts.kubevela.net/addons
targetNamespace: observability
releaseName: prometheus
values:
alertmanager:
persistentVolume:
storageClass: "alicloud-disk-available"
size: "20Gi"
server:
persistentVolume:
storageClass: "alicloud-disk-available"
size: "20Gi"
traits:
- type: register-grafana-datasource # register Prometheus datasource to Grafana
properties:
grafanaServiceName: grafana
grafanaServiceNamespace: observability
credentialSecret: grafana
credentialSecretNamespace: observability
name: prometheus
service: prometheus-server
namespace: observability
type: prometheus
access: proxy
# install kube-state-metrics
- name: kube-state-metrics
type: helm
properties:
chart: kube-state-metrics
version: 3.4.1
repoType: helm
# original url: https://prometheus-community.github.io/helm-charts
url: https://charts.kubevela.net/addons
targetNamespace: observability
values:
image:
repository: oamdev/kube-state-metrics
tag: v2.1.0
dependsOn:
- ref:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: fluxcd
namespace: vela-system

View File

@@ -1,21 +0,0 @@
outputs: registerdatasource: {
apiVersion: "grafana.extension.oam.dev/v1alpha1"
kind: "ImportDashboard"
spec: {
grafana: {
service: parameter.grafanaServiceName
namespace: parameter.grafanaServiceNamespace
credentialSecret: parameter.credentialSecret
credentialSecretNamespace: parameter.credentialSecretNamespace
}
urls: parameter.urls
}
}
parameter: {
grafanaServiceName: string
grafanaServiceNamespace: *"default" | string
credentialSecret: string
credentialSecretNamespace: *"default" | string
urls: [...string]
}

View File

@@ -1,31 +0,0 @@
outputs: registerdatasource: {
apiVersion: "grafana.extension.oam.dev/v1alpha1"
kind: "DatasourceRegistration"
spec: {
grafana: {
service: parameter.grafanaServiceName
namespace: parameter.grafanaServiceNamespace
credentialSecret: parameter.credentialSecret
credentialSecretNamespace: parameter.credentialSecretNamespace
}
datasource: {
name: parameter.name
type: parameter.type
access: parameter.access
service: parameter.service
namespace: parameter.namespace
}
}
}
parameter: {
grafanaServiceName: string
grafanaServiceNamespace: *"default" | string
credentialSecret: string
credentialSecretNamespace: string
name: string
type: string
access: *"proxy" | string
service: string
namespace: *"default" | string
}

View File

@@ -0,0 +1,13 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: app-ask-sample
spec:
components:
- name: sample-ask
type: alibaba-ask
properties:
name: kubevela
writeConnectionSecretToRef:
name: ask-conn

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