Compare commits

..

217 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
github-actions[bot]
f95ff4f06e [Backport release-1.1] Fix: make nginx class to be default value and allow pvc trait to attach more than once (#2471)
* Fix: make nginx class to be default value

(cherry picked from commit 9c41df7b0f)

* Fix: allow pvc trait to attach more than once

(cherry picked from commit 33cf15e439)

Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
2021-10-13 17:21:43 +08:00
github-actions[bot]
e30876e4d2 Fix: compatibility bug (#2470)
make reivwable

(cherry picked from commit df5a802bd4)

Co-authored-by: wangyike <wangyike_wyk@163.com>
2021-10-13 16:59:30 +08:00
github-actions[bot]
141c6bb2ef [Backport release-1.1] Fix: change raw extension to pointer (#2469)
* Fix: change raw extension to pointer

(cherry picked from commit 113f785c97)

* Test: fix ut

(cherry picked from commit 7b9dac98c2)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-13 16:58:20 +08:00
github-actions[bot]
bdfd8e1f8d Fix: wrong log print format (#2453)
(cherry picked from commit 16ecbb8b91)

Co-authored-by: Xiaoxi He <xxhe@alauda.io>
2021-10-12 19:27:53 +08:00
github-actions[bot]
cfbaf38715 [Backport release-1.1] Fix: Closure Bug In newValue (#2452)
* Fix: new value bug

(cherry picked from commit dc184327a0)

* Fix: strategyUnify Bug

(cherry picked from commit 1b2c049ea8)

* Fix: e2e error

(cherry picked from commit f9bfbc0d53)

Co-authored-by: Jian.Li <lj176172@alibaba-inc.com>
2021-10-12 19:10:39 +08:00
github-actions[bot]
d3006f2d9e [Backport release-1.1] Fix: fix unhandled err (#2450)
* Fix: fix unhandled err

refer to https://lift.sonatype.com/result/bhamail/kubevela/01FFT7CSVNCPF6808ZM856V3HN?tab=results

(cherry picked from commit d0ced6cfc9)

* Test: fix panic err

(cherry picked from commit e5e5f9ac42)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-12 14:36:52 +08:00
github-actions[bot]
8f7aa9b746 Fix: update ingress class (#2447)
(cherry picked from commit 77e1b8296c)

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-10-11 20:50:00 +08:00
github-actions[bot]
8431cdb10d [Backport release-1.1] Fix: add Chart icon and url (#2446)
* Fix: add Chart icon and url

Added an icon and url for KubeVela chart

(cherry picked from commit 4dcca2a47f)

* Fix: remove local logo file and use a web image

(cherry picked from commit a86bdb9639)

Co-authored-by: zzxwill <zzxwill@gmail.com>
2021-10-11 20:46:44 +08:00
wyike
66013a9607 Fix: confilict (#2443)
Fix: nil pointer panic
2021-10-11 17:56:18 +08:00
github-actions[bot]
1d133df1dd [Backport release-1.1] Feat: add support for envbinding with namespace selector (#2440)
* Feat: add support for envbinding with namespace selector

(cherry picked from commit 409fe1bf38)

* Fix: service account kubeconfig e2e-test

(cherry picked from commit db7539641c)

* Docs: add comments to explain functions

(cherry picked from commit c9bf6b8914)

* Docs: add envbinding example

(cherry picked from commit 0011c4563f)

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-10-11 15:36:20 +08:00
github-actions[bot]
c66f5f103f Fix: fix depends on app built-in step (#2435)
(cherry picked from commit b126cf1a34)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-09 18:52:57 +08:00
github-actions[bot]
e6779f6906 [Backport release-1.1] Fix: fix apiserver 1.1.3 not available bug (#2431)
* Fix: fix apiserver 1.1.3 not available bug

(cherry picked from commit a0b0c032d4)

* Feat: change apiserver image repository

(cherry picked from commit d417e9014a)

* Fix(helm chart): fix startup args for apiserver

(cherry picked from commit fa759459af)

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-09 16:52:05 +08:00
github-actions[bot]
a48b74d4be Feat: add secure tls for cluster-gateway (#2428)
(cherry picked from commit cf4d508189)

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-10-09 15:24:41 +08:00
github-actions[bot]
2da80af3c4 [Backport release-1.1] Feat: add apply raw built in workflow steps (#2424)
* Feat: add apply raw built in workflow steps

(cherry picked from commit be68f388a2)

* Feat: add apply raw example

(cherry picked from commit 8243b6d916)

* Fix: change the name to apply object

(cherry picked from commit b996a04862)

* Fix: example server name

(cherry picked from commit 2341bf0f5a)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-10-09 12:21:28 +08:00
github-actions[bot]
7bf5e17262 Chore(deps): bump github.com/containerd/containerd from 1.4.8 to 1.4.11 (#2422)
(cherry picked from commit 8450b4153e)

Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
2021-10-09 11:12:08 +08:00
Zheng Xi Zhou
53a6d54b73 Fix: support terraform/provider-azure addon (#2402) (#2418)
Also added some componentdefinitions for Azure cloud resource
2021-10-08 19:14:59 +08:00
github-actions[bot]
bcd072507b [Backport release-1.1] Feat: multicluster support ServiceAccountToken (#2415)
* Feat: support serviceaccount in multicluster

(cherry picked from commit 6168af830e)

* Fix: add compatibility & support sa

(cherry picked from commit 0193d74dfa)

* Fix: add multicluster sa test

(cherry picked from commit d445d29649)

* Fix: add test for upgrade func

(cherry picked from commit f4ba55b540)

* Style: format

(cherry picked from commit 0a8645c30c)

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-10-08 15:55:12 +08:00
qiaozp
ae075e6cb6 Refactor(cli): Refactor vela env, deprecate vela config (#2037) (#2413)
* Refactor(cli): cut env to namespace, use application to save

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Fix: test

* Fix: typo

(cherry picked from commit a574fc0fbf)
2021-10-08 14:44:30 +08:00
Somefive
b2127ee4fa Feat: use #ApplyComponent for EnvBinding (#2382) (#2414)
* Feat: use #ApplyComponent in EnvBinding

* Fix: application test compRev control by resourcetracker

* Fix: add more detail in error info
2021-10-08 14:43:44 +08:00
Jian.Li
a865c85d05 Fix: Applied Resources Statistics Error (#2398)
* Fix: isSameObjReference

* Fix: healthScope
2021-09-30 14:24:09 +08:00
Tianxin Dong
ab2d2750f2 Fix: revision GC in workflow mode (#2355)
* Fix: revision GC in workflow mode

* Test: add revision cleanup test

* Fix: e2e test
2021-09-30 14:16:16 +08:00
Zheng Xi Zhou
99411a7f01 Fix: make the name of Terraform credential secret same to component name (#2399)
To make the secret name of Terraform credential more clear and avoid the
impact on the feature of #2336
2021-09-30 13:53:49 +08:00
Tianxin Dong
f9b218919a Feat(workflow): add depends on in workflow (#2387)
* Feat: add depens on in charts

* Feat(workflow): add depends on in workflow
2021-09-30 10:30:44 +08:00
Somefive
83b26349c7 Feat: bootstrap multicluster testing (#2368)
* Feat: bootstrap multicluster testing

* Fix: update action step name in .github/workflows/e2e-multicluster-test:yml

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>

* Fix: update setup-core wait condition

* Fix: add apply envbinding app test & upgrade gomega

* Fix: remove end_e2e duplicate script

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
2021-09-30 10:19:39 +08:00
wyike
2c64d04417 Feat: pass owner to workload if rollout failed (#2397)
delete useless file
2021-09-30 09:52:20 +08:00
Jian.Li
ef653ebeb4 Feat: add inputs test cases and optimize code (#2388)
* Feat: add test case & optimize code

* Fix: e2e test
2021-09-29 15:08:00 +08:00
Zheng Xi Zhou
305403ff8b Support remote git repo for Terraform configuration (#2337)
* Fix: support remote git repo for Terraform configuration

Besides inline HCL Configuration, supprted remote git repo Configuration

* Fix: add unit-tests

* Fix: update all manifests in vela-minimal
2021-09-29 14:58:27 +08:00
wyike
eebcc6c6ae Fix: use aliyun oss istio chart (#2392) 2021-09-29 14:42:50 +08:00
Jianbo Sun
298ce69593 Chore(deps): bump go.mongodb.org/mongo-driver from 1.3.2 to 1.5.1 (#2391)
Co-authored-by: barnettZQG <yiyun.pro>
2021-09-29 13:14:48 +08:00
Tianxin Dong
1e21a01320 Feat: add vela minimal in make manifests (#2389) 2021-09-29 13:09:57 +08:00
Tianxin Dong
042485124a Fix: fix built in workflow steps (#2378) 2021-09-29 10:05:13 +08:00
Hongchao Deng
49a91ca4c5 Feat: add Addon REST API (#2369) 2021-09-28 18:45:32 +08:00
Jianbo Sun
a2ad91f2f5 Fix: try fix CI unit test (#2376) 2021-09-28 18:44:50 +08:00
Tianxin Dong
5364e53e50 Fix: delete deprecated vela dashboard in e2e setup (#2379)
* Fix: delete deprecated vela dashboard in e2e setup

* Fix: fix helm lint in 3.7.0
2021-09-28 17:01:10 +08:00
whichxjy
811c783a00 Feat: support rollout controller for StatefulSet (#1969)
* Feat: support rollout controller for StatefulSet

* Feat: support one statefulset in rollout

* Feat: add tests for StatefulSet rollout controller

* Fix: correct workload-deleting error

* Feat: remove advanced sts
2021-09-28 11:46:30 +08:00
Jian.Li
22bf2e4c3a Feat: inputs support setting value in array (#2358)
* Feat: input support array

* Feat: add test cases

* Feat: add comment
2021-09-28 09:18:07 +08:00
Somefive
ee0a73b5b7 Fix: dockerfile e2e test command lack environment configuration (#2231) 2021-09-27 20:29:58 +08:00
yangsoon
ddb6285b19 Fix(helm chart): fix startup args for apiserver (#2362) 2021-09-27 14:20:58 +08:00
barnettZQG
3a310f0402 Feat: Initialize api for vela dashboard and CLI (#2339)
* Change the web framework to go-restful.
* Some API specifications are defined.
* Some sample code is provided.
2021-09-26 23:09:23 +08:00
barnettZQG
6771c688dd Docs: add a WeChat QR code (#2351)
* Docs: add wechat QR code

* Update README.md

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

Co-authored-by: barnettZQG <yiyun.pro>
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-09-26 13:41:20 +08:00
Somefive
61a12b0916 Fix: runc security issue (#2350) 2021-09-24 21:54:12 +08:00
Tianxin Dong
360c19cf2d Feat: add vela minimal chart (#2340)
* Feat: add vela minimal chart

* Feat: add README in minimal chart
2021-09-24 17:02:43 +08:00
wyike
11103b31bb Docs: rollout demo (#2348)
delete useless file
2021-09-24 16:31:39 +08:00
qiaozp
a8adaefc78 Chore: remove e2e-api-test in rollout test to speed up (#2345) 2021-09-24 15:44:59 +08:00
qiaozp
b4c7ed1773 Chore: deprecate 'vela dashboard' apiserver (#2341)
* Chore: deprecate
'vela dashboard' apiserver

* Chore: fix import

* Fix: preparation

* Fix: test
2021-09-24 13:00:07 +08:00
Geir Haugom
2e12ea9bd8 Feat: add revisionHistoryLimit to helm chart (#2343) 2021-09-24 10:42:04 +08:00
Jianbo Sun
0a9518f583 Fix: remove appcontext CRD and controller (#2270) 2021-09-23 15:05:47 +08:00
Tianxin Dong
e6668ac390 Fix: do not override the workload name if its specified (#2336)
* Fix: do not override the workload name if its specified

* Fix: resolve comments
2021-09-23 15:05:25 +08:00
qiaozp
2be5b20c6d Chore(cli): remove useless deploy.yaml (#2335)
* Chore: remove useless deploy.yaml

* Chore: remove useless deploy.yaml
2021-09-23 11:48:14 +08:00
Somefive
4f2ed4f59e Fix: remove ocm addon enable in Makefile (#2327) 2021-09-23 11:38:28 +08:00
Gallardot
2d8c8efe08 Feat: add args for init-contianer and sidecar (#2331) 2021-09-22 15:54:27 +08:00
Somefive
89c697ca87 Fix: fix multicluster template bug (#2333) 2021-09-22 14:56:58 +08:00
Zheng Xi Zhou
4379a46a79 Fix: add comments and adjust helm typed component's spec (#2332)
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-09-22 10:05:11 +08:00
Zheng Xi Zhou
d933af022c Fix: move charts from github repo to Alibaba Cloud OSS repo (#2324)
* Fix: move charts from github repo to Alibaba Cloud OSS repo

Charts in Github repo is not always avaialable for some users, so
moved them to OSS repo

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

* Update charts/vela-core/templates/addons/observability-asset.yaml

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

* Update vela-templates/addons/observability-asset/definitions/trait-import-grafana-dashboard.yaml

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

* Update vela-templates/addons/auto-gen/observability-asset.yaml

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-09-20 15:52:52 +08:00
yangsoon
60435e42a5 Fix(addon): don't install fluxcd and terraform by default (#2328) 2021-09-19 09:47:02 +08:00
Somefive
55e746cc7a Fix: fix multicluster values bug (#2326) 2021-09-19 09:26:05 +08:00
Jian.Li
48002641b9 Fix: workflow example (#2323) 2021-09-18 14:40:08 +08:00
Somefive
c1e6ded23d Fix: fix cluster-gateway image tag in chart (#2318) 2021-09-18 00:24:50 +08:00
hughXia
cafb55256f Fix: fix typo (#2317)
Co-authored-by: shengmiao.xia <shengmiao.xia@easystack.cn>
2021-09-17 22:09:29 +08:00
Hongchao Deng
b60c16a4be Fix(rollout): improve rollback experience (#2294) 2021-09-17 19:09:41 +08:00
Somefive
8407c0bf4d Style: rename multi-env to deploy2env (#2309) 2021-09-15 15:03:44 +08:00
yangsoon
76527421d7 Fix(helm chart): change initialDelaySeconds of readinessProbe to 30s (#2308) 2021-09-15 14:29:58 +08:00
wyike
a151d17fde Fix: generate service in canary-traffic trait (#2307)
fix ci

Fix: apply remaing bug

fix ci
2021-09-15 14:25:55 +08:00
Jian.Li
4ff4afde51 Feat: Make applicationComponent can be modified in step (#2304)
* Feat: component properties can be modfiled in step

* Fix: op.#ApplyRemaining
2021-09-15 13:25:22 +08:00
Zheng Xi Zhou
fbac93665d Fix: add application logging dashboard (#2301)
Added a Grafana dashboard for application logging
2021-09-15 13:21:38 +08:00
Tianxin Dong
36c7b9ec5b Fix: imagePullSecrets error from cloneset (#2305)
* Fix: imagePullSecrets error from cloneset

* Fix: generate yaml file

Co-authored-by: withlin <withlin@apache.org>
2021-09-15 13:21:17 +08:00
Hongchao Deng
d0e8418c4a Fix: don't increment count in status (#2306) 2021-09-15 13:20:58 +08:00
Somefive
291f9d139e Fix: fix cli logging (#2298) 2021-09-15 13:18:50 +08:00
wyike
9a766467a3 Fix: generate service in canary-traffic trait (#2300)
fix ci
2021-09-15 11:50:40 +08:00
Zheng Xi Zhou
c9b2c99dbf Revert "Fix: fix alibaba cloud rds module (#2293)" (#2302)
This reverts commit c590853f37.
2021-09-15 11:36:08 +08:00
qiaozp
0a3244f590 Feat: allow user specify alibaba provider addon's region (#2297) 2021-09-14 23:05:28 +08:00
Tianxin Dong
12361c133e Feat: add commit msg in kustomize (#2296) 2021-09-14 22:03:56 +08:00
Zheng Xi Zhou
c590853f37 Fix: fix alibaba cloud rds module (#2293)
Enable users to set `db_instance_storage_type`. This can fix the issue
happended since Sept. 14, 2021.
{"Code":"InvalidNetworkTypeClassicWhenCloudStorage","HostId":
"rds.aliyuncs.com","Message":"The Specified InstanceNetworkType
value Classic is not valid when choose cloud storage type."
2021-09-14 21:57:46 +08:00
Tianxin Dong
17c17fcfc6 Fix: fix apply application (#2288)
* Fix: fix apply application

* Fix: fix apply remaining
2021-09-14 21:49:09 +08:00
Jian.Li
0e8ffd717f Fix: apply-component bug (#2292)
* Fix: apply-component bug

* Feat: uniform apply-component input/output format
2021-09-14 21:37:46 +08:00
Jianbo Sun
8d8447ad94 Fix: filter kubectl apply annotation in vela live-diff (#2290) 2021-09-14 20:36:53 +08:00
Somefive
e8d051a532 Support MultiCluster EnvBinding with cluster-gateway (#2247)
* Feat: init multicluster

* Feat: add secret namespace auto-detect

* Style: format

* Style: split gc codes

* Feat: add cluster cli

* Fix: rebase workflow on master

* Feat: add component selector for env binding

* Fix: selector & patch conflict

* Feat: add local cluster support & fix unit test

* Fix: fix omitempty bug

* Feat(health-scope): support multi-cluster's healthcheck

* Fix: resourcetracker gc bug & rename

* Feat: add multicluster to op.Read

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-09-14 20:35:10 +08:00
qiaozp
c1ebe9db24 Feat: alibaba provider addon (#2243)
bump up terraform version

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-09-14 19:35:21 +08:00
wyike
3d29df3a52 Fix: fix in middler of test (#2275)
add test

delete uesless

add comments

fix small issue

fix error

add charts back
2021-09-14 18:05:21 +08:00
yangsoon
324bbe5e57 Fix(helm): enable apiserver by default (#2249)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-09-14 14:15:47 +08:00
Tianxin Dong
8e172091f6 Test: fix resource tracker e2e (#2281) 2021-09-14 10:26:57 +08:00
Tianxin Dong
e73655a8b2 Refactor: change field exportKey to valueFrom (#2284) 2021-09-14 10:23:39 +08:00
Hongchao Deng
ce70f9f57f Fix: add exponential backoff wait time for workflow reconciling (#2279) 2021-09-13 22:34:25 +08:00
Hongchao Deng
215c4e0752 Fix: patch any key using retainKeys strategy (#2280) 2021-09-13 20:19:16 +08:00
wyike
d93d8626c0 Feat: istio addon and use case demo (#2276)
fix all error and finish readme

small change

fix CI check

add canary trait back
2021-09-13 20:10:32 +08:00
Jian.Li
b66f2995a5 Fix: Bugs (as follows) (#2278)
* Fix: suspend step id

* Feat: add test cases

* Fix: reslove conflict

* Fix: reduce reconclie duration for test
2021-09-13 20:03:49 +08:00
Jianbo Sun
cad21c5138 Fix: refactor workflow and fix some e2e tests (#2272)
* Fix: add e2e plugin test back

* Fix: e2e rollout test and try change port to 37081

* Fix: add rollout plan test back

* Refactor: change the workflow state machine and add workflow succeed state

* Refactor: refine definition controller and fix e2e of app revision

* Refactor: unlock all the normal cases

* Fix: add helm schematic logic back into workflow
2021-09-13 14:17:12 +08:00
Tianxin Dong
af01349f28 Test: fix rollout e2e test (#2277) 2021-09-13 11:13:03 +08:00
Jian.Li
445db3b276 Fix: E2E Test (#2274)
* Fix: value.lookUpByScript bug

* Fix: apply-component patch trait resource
2021-09-12 22:45:14 +08:00
Yuhui Liu
7ed34b675d Feat: add more options for leader election configuration to avoid pressure on kube-apiserver (#2271) 2021-09-12 18:30:59 +08:00
Jianbo Sun
537f19f06b Fix: remove podspecworkload controller and CRD (#2269) 2021-09-12 10:17:09 +08:00
Jian.Li
6cbdbe84b2 Refactor application code to make it run as Dag workflow (#2236)
* Refactor: remove use of AppConfig in AppRevision

* Refactor: remove insert secret and configmap

* Feat(workflow): upgrade

* Fix(conflict): workflow cherry

* Feat(workflow): support DAG mode

* Feat(workflow): prepare steps in step

* Feat(tools): random string

* Fix(rand): gosec weak random

* Fix(ci): test passing

* Feat(workflow): generate steps

* Fix: fix rebase from master

* Fix: fix workflow ut

* Feat(test): add test cases

* Fix: fix lint and rebase from master

* Refactor: application code

* Fix: fix ci lint

* Fix: make code reviewable

* Fix: workflow_test.go

* Feat: collect services

* Fix(ci): unit tests

* Feat: make one

* Test: application with input/output and workflow

* Fix: trace test

* Fix: update step index falied

* Feat: refactor op.#Load

* Fix: delete dead code

* Refactor: op.xxx

* Fix: patch component

* Test: add generator test

* Fix: add license

* Fix: pending e2e plugin test

* Fix: disable test/e2e-test

* Fix: patch by script

Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-09-12 10:12:46 +08:00
Zheng Xi Zhou
2ba7480a41 Fix: add ComponentDefinition alibaba-eip (#2268)
Added another ComponentDefinition alibaba-eip, which will be applied
with vela-core installation
2021-09-11 18:46:00 +08:00
Zheng Xi Zhou
7d827182e6 Fix: fix the output DB_PASSWORD for rds definition (#2267)
Fixed the output `DB_PASSWORD` for ComponentDefinition alibaba-rds
2021-09-11 18:02:57 +08:00
wyike
da5b32f1a8 Fix: delete useless rollouttrait (#2264) 2021-09-10 22:43:40 +08:00
wyike
8b1ce6937f Fix: remove matchlabels in webservice template (#2255) 2021-09-10 12:44:38 +08:00
Jianbo Sun
a79c96fa46 Fix: pending the flaky rollout test (#2253) 2021-09-09 21:06:03 +08:00
Tianxin Dong
faa445255d Feat: add image auto update for gitops (#2251) 2021-09-09 19:53:01 +08:00
Jianbo Sun
f270c5901b Chore: add backup for code owners (#2252) 2021-09-09 17:56:47 +08:00
Zheng Xi Zhou
19bcfdd8df Fix: bump version of Terraform Controller (#2250)
Bumped the version of Terraform controller to change the filed of
Configuration's status.

Related issue: https://github.com/oam-dev/terraform-controller/pull/104
2021-09-09 17:19:57 +08:00
majian
e0eded58e5 Feat: support code-generator and sync to kubevela-core-api (#2174) 2021-09-09 09:28:31 +08:00
A Ismaili
873a19e9e0 Fix: Updated broken Getting Started links (#2248) 2021-09-08 18:13:27 +08:00
Reeta Singh
579f7427fa Feat: vela show annotations display undefined should be refined (#2244)
* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat: vela show annotations display undefined should be refined

Co-authored-by: Reeta Singh <reetas@twitter.com>
2021-09-08 15:02:50 +08:00
Jianbo Sun
65402bd926 Fix: remove some unused flaky tests (#2242) 2021-09-08 09:30:04 +08:00
wyike
ae724b2a9a Docs: canary rollout demo (rollout part only) (#2177)
Feat: component definition support context.revision
2021-09-07 17:08:56 +08:00
Zheng Xi Zhou
5730d08396 Fix: lower title level to make definition docs generation adapt to kubevela.io (#2240)
Lower two levels of the title of workloads/traits docs to adapt to
Kubevela.io
2021-09-07 16:03:33 +08:00
qiaozp
c451d74cfd Fix: kustomize json patch trait definition (#2239) 2021-09-07 11:30:41 +08:00
Yue Wang
4ed40bebe3 Feat(app): show health status from HealthScope in application status (#2228)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-09-07 11:27:29 +08:00
Reeta Singh
e29f22a7b3 Feat(trait): annotation and labels trait should also affect the workload object along with pod (#2237)
* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

Co-authored-by: Reeta Singh <reetas@twitter.com>
2021-09-07 10:57:32 +08:00
Eng Zer Jun
426aa7af34 Refactor: move from io/ioutil to io and os package (#2234)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <zerjun@beatchain.co>
2021-09-06 18:33:42 +08:00
yangsoon
f8ac24db27 Feat(workflow): add status check for workflow mutil-env (#2229) 2021-09-06 14:48:34 +08:00
yangsoon
493e255d78 Fix: align the envbind-app name with the original application name (#2232) 2021-09-05 14:45:44 +08:00
Somefive
32b6502e74 Feat: add pressure-test parameter optimize (#2230) 2021-09-03 17:29:54 +08:00
yangsoon
02f79a5cd9 Fix(addons): remove kruise addon (#2226) 2021-09-03 11:44:52 +08:00
Zheng Xi Zhou
ecef32a7f3 Fix: add flag --label to filer components and traits (#2217)
Added flag `--flag` to filter when executing `vela componnets` and
`vela traits`

Fix https://github.com/oam-dev/kubevela.io/pull/222#discussion_r699214816
2021-09-02 20:51:34 +08:00
yangsoon
e59374bb7d Feat(apiserver): add apiserver service to helm chart (#2225) 2021-09-02 17:16:09 +08:00
yangsoon
cec16cc1a4 Fix(webhook): only check the uniqueness of component names under the same namespace (#2222) 2021-09-02 14:09:45 +08:00
Jian.Li
1776859631 Feat(workflow): Add op.#Task action (#2220)
* Feat(workflow): tekton task

* Feat(tools): random string

* Fix(example): defintion fmt

* Fix(rand): gosec weak random
2021-09-02 13:40:10 +08:00
wyike
f5c2c85381 Fix(addon): rename clonset-service to clonse (#2219)
fix test
2021-09-02 12:05:51 +08:00
Jian.Li
7a42c743d7 Feat(workflow): outputs support script notation (#2218)
* Feat(workflow): output support script notation

* Feat(cue): add test case
2021-09-01 19:19:01 +08:00
yangsoon
d4277f644e Fix(app): When only the policy is specified, the resources in the app need to be rendered and created (#2197)
* Fix(app): apply app when policy is specified

* Fix(policy): update env-binding policy

* Test(policy): add test
2021-09-01 17:27:47 +08:00
Yue Wang
f130d1d922 Fix(upgrade): upgrade controller-tools from 0.2 to 0.6.2 (#2215)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-09-01 15:08:24 +08:00
Jian.Li
1a6d2be6d0 Feat(workflow): input.ParameterKey described like paths notation (#2214)
* Feat(workflow): input.ParameterKey path notation

* Feat(workflow): add test case

* Fix(lint): format code
2021-09-01 11:34:16 +08:00
Tianxin Dong
2d1edbb16d Feat(workflow): add apply application workflow step definition (#2186) 2021-08-31 20:21:29 +08:00
Tianxin Dong
7a139b554f Feat(workflow): support dingding and slack in webhook notification (#2213) 2021-08-31 20:20:26 +08:00
Yue Wang
6bf4a2c1f7 Feat(healthscope): add health-scope-binding policy and e2e test for health scope (#2205)
Signed-off-by: roywang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-08-31 15:59:17 +08:00
Jianbo Sun
9f6812414d Fix: modify service-binding with more accurate type (#2209) 2021-08-31 13:47:16 +08:00
Hongchao Deng
7310cc1363 Docs: update environment design (#2199) 2021-08-31 13:43:00 +08:00
Penthaa Patel
161bab7d62 Refactor(#2185): remove unused config options in Makefile (#2200)
Fixes issue #2185
2021-08-31 10:06:21 +08:00
Jianbo Sun
332fd4753e Fix: update help message of ingress trait (#2198) 2021-08-31 08:40:19 +08:00
Zheng Xi Zhou
4e010d7bae Fix: support more Terraform variable types (#2194)
Including null, list(...), map(...) Terraform types
2021-08-30 20:16:24 +08:00
Jianbo Sun
1ce8722e25 Feat: add more registry traits as internal ones (#2184) 2021-08-30 19:47:54 +08:00
arcosx
cd153e8ce5 Fix: error doc link (#2195) 2021-08-30 19:29:13 +08:00
Somefive
2cea51e5e9 Feat: add pprof (#2192) 2021-08-30 17:19:46 +08:00
yangsoon
75a972516d Feat(workflow): add depends-on workflow step definition (#2190) 2021-08-30 17:19:32 +08:00
Somefive
25bc43ae39 Fix: add patchkey to volumes (#2191) 2021-08-30 15:54:43 +08:00
Zheng Xi Zhou
068e9d97c4 Fix: move Terraform defintions charts/vela-core/templates/definitions (#2176)
Make all Terraform definitions to install when vela-core is installing
2021-08-30 14:49:57 +08:00
Jianbo Sun
e9981b6e20 Feat: add vela live-diff , dry-run, cue-packages into vela commands (#2182) 2021-08-30 12:01:24 +08:00
Jianbo Sun
0781937100 Fix: align all CUE template keyword to use parameter (#2181) 2021-08-30 11:43:20 +08:00
Tianxin Dong
75eab7bdde Docs: remove the commit convention doc (#2187) 2021-08-30 11:41:01 +08:00
yangsoon
d24e282e67 Feat(envbinding): add resourceTracker for envBinding (#2179)
* Feat(envbinding): add resourceTracker for envBinding

* Test: add test for envbinding
2021-08-29 13:29:30 +08:00
qiaozp
0c7048b2a0 Feat(addon): add default enable addon (#2172) 2021-08-29 11:24:40 +08:00
Yue Wang
9780ce3bef Feat(cue): support access components artifacts in cue template context (#2161)
Signed-off-by: roywang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-08-29 09:11:10 +08:00
Jianbo Sun
cb790bfc13 initilize KubeVela codeowner file (#2178)
* Chore(maintainer): initilize KubeVela codeowner file

* Update .github/CODEOWNERS

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Update .github/CODEOWNERS

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Update .github/CODEOWNERS

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
2021-08-28 08:26:41 +08:00
yangsoon
73be37b73b Fix(envbinding): fix the way that envbinding stores resources after configuration (#2175)
* Refactor: replace #op.ApplyEnvBindComponnet with #op.ApplyEnvBindApp

* Fix: fix patch strategy for envbinding
2021-08-27 21:38:57 +08:00
Reeta Singh
950411dbe8 Trait: Add TraitDefinition for PVC (#2158)
* Feat(trait): add trait definition for persistent volume claim

* Feat(trait): add trait definition for persistent volume claim
2021-08-27 18:45:22 +08:00
Zheng Xi Zhou
5fcc2ad9f7 Fix: fix EOF event when describing an application (#2134)
Fixed the issue: When component properties don't meet the parameter
of the ComponentDefinition, it will hit 'EOF' event

Co-authored-by: Jian.Li <74582607+leejanee@users.noreply.github.com>

Fix #2132
2021-08-27 18:45:05 +08:00
wyike
cc8a1d3bde Feat: modify apply component cue action to support skipWorkload trait (#2167)
fix lint

fix comments
2021-08-27 13:12:00 +08:00
Zheng Xi Zhou
1f6d4d2345 Fix: add fluxcd dashbaords (#2130)
Added two fluxcd dashboards and also install its dependencies

just keep the ready Dashboard
2021-08-26 20:31:49 +08:00
wyike
6719e8af3a Feat: add health check status (#2166)
check len(status.contitions) not empty
2021-08-26 20:05:01 +08:00
yangsoon
5d17fb3a7f Refactor: change the ownerReference of configMap which store the parameter for each revision to definitionRevision (#2164)
* Refactor: change the ownerReference of cm store the parameter for each revision to defRevision

* Feat: check whether its needed before status update
2021-08-26 19:56:46 +08:00
Zheng Xi Zhou
08f1ff99cf Fix: traitdefinition controller reconcile in a infinite loop (#2157)
Check whether its needed before status update, add log before
each reconcile returns, and also correct Klog.InfoS to klog.ErrorS
when trying to log err information

Fix #2153
2021-08-25 21:35:33 +08:00
Shaowen Chen
44262f03de Docs: fix typo about workflow rollout (#2163)
Signed-off-by: shaowenchen <mail@chenshaowen.com>
2021-08-25 19:32:56 +08:00
Tianxin Dong
2145afe4e1 Feat(ci): add commit lint ci (#2160) 2021-08-25 17:00:50 +08:00
Tianxin Dong
60cd8ef7de Feat(workflow): add workflow CRD (#2098) 2021-08-25 09:55:12 +08:00
Tianxin Dong
8fb64fcb19 Fix(dryrun): add default name and namespace in dry run (#2150) 2021-08-24 17:54:55 +08:00
Tianxin Dong
8fc192bfac Feat(definition): add built-in dingtalk workflow step definition (#2152) 2021-08-23 19:07:07 +08:00
Young-Zen
c4380dbe06 fix helm test failed (#2149)
Co-authored-by: yanghaojia <yanghaojia@coding.net>
2021-08-23 16:48:37 +08:00
wyike
01f7357525 change IncreaseFirst to DecreaseFirst (#2142)
don't merge, only for test

request cpu to 0

revert
2021-08-23 16:24:51 +08:00
749 changed files with 76185 additions and 52614 deletions

36
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,36 @@
# This file is a github code protect rule follow the codeowners https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#example-of-a-codeowners-file
* @hongchaodeng @wonderflow @leejanee
design/ @hongchaodeng @resouer @wonderflow
# Owner of CUE
pkg/cue @leejanee @FogDong
pkg/stdlib @leejanee @FogDong
# Owner of Workflow
pkg/workflow @leejanee @FogDong
# Owner of rollout
pkg/controller/common/rollout/ @wangyikewxgm @wonderflow
pkg/controller/core.oam.dev/v1alpha2/applicationrollout @wangyikewxgm @wonderflow
pkg/controller/standard.oam.dev/v1alpha1/rollout @wangyikewxgm @wonderflow
runtime/rollout @wangyikewxgm @wonderflow
# Owner of definition controller
pkg/controller/core.oam.dev/v1alpha2/core/workflow/workflowstepdefinition @yangsoon @Somefive
pkg/controller/core.oam.dev/v1alpha2/core/policies/policydefinition @yangsoon @Somefive
pkg/controller/core.oam.dev/v1alpha2/core/components/componentdefinition @yangsoon @zzxwill
pkg/controller/core.oam.dev/v1alpha2/core/traits/traitdefinition @yangsoon @zzxwill
# Owner of health scope controller
pkg/controller/core.oam.dev/v1alpha2/core/scopes/healthscope @captainroy-hy @zzxwill
# Owner of vela templates
vela-templates/ @Somefive @barnettZQG @wonderflow
# Owner of vela CLI
references/cli/ @Somefive @zzxwill
# Owner of vela APIServer
pkg/apiserver/ @barnettZQG @yangsoon

View File

@@ -11,3 +11,4 @@ wangyuan249
chivalryq
FogDong
leejanee
barnettZQG

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("]
}
}

19
.github/workflows/commit-lint.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: PR Title Checker
on:
pull_request:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@v1.3.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: true
configuration_path: ".github/pr-title-checker-config.json"

View File

@@ -0,0 +1,109 @@
name: E2E MultiCluster Test
on:
push:
branches:
- master
- release-*
workflow_dispatch: {}
pull_request:
branches:
- master
- release-*
env:
# Common versions
GO_VERSION: '1.16'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
jobs:
detect-noop:
runs-on: ubuntu-20.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false
e2e-multi-cluster-tests:
runs-on: aliyun
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.KIND_VERSION }}
skipClusterCreation: true
- name: Setup Kind Cluster (Worker)
run: |
kind delete cluster --name worker
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4 --name worker
kubectl version
kubectl cluster-info
kind get kubeconfig --name worker --internal > /tmp/worker.kubeconfig
kind get kubeconfig --name worker > /tmp/worker.client.kubeconfig
- name: Setup Kind Cluster (Hub)
run: |
kind delete cluster
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4
kubectl version
kubectl cluster-info
- 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
- name: Stop kubevela, get profile
run: make end-e2e-core
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/e2e-profile.out,/tmp/e2e_multicluster_test.out
flags: e2e-multicluster-test
name: codecov-umbrella
- name: Clean e2e profile
run: rm /tmp/e2e-profile.out
- name: Cleanup image
if: ${{ always() }}
run: make image-cleanup

View File

@@ -80,13 +80,6 @@ jobs:
helm lint ./charts/vela-core
helm test -n vela-system kubevela --timeout 5m
- name: Wait for e2e preparation ready
run: |
timeout 60 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:38081/api/components)" != "200" ]]; do sleep 5; done' || false
- name: Run api e2e tests
run: make e2e-api-test
- name: Run e2e tests
run: make e2e-rollout-test

View File

@@ -80,13 +80,12 @@ jobs:
helm lint ./charts/vela-core
helm test -n vela-system kubevela --timeout 5m
- name: Wait for e2e preparation ready
run: |
timeout 60 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:38081/api/components)" != "200" ]]; do sleep 5; done' || false
- 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

View File

@@ -85,6 +85,7 @@ jobs:
env:
HELM_CHARTS_DIR: charts
HELM_CHART: charts/vela-core
MINIMAL_HELM_CHART: charts/vela-minimal
LEGACY_HELM_CHART: legacy/charts/vela-core-legacy
OAM_RUNTIME_HELM_CHART: charts/oam-runtime
VELA_ROLLOUT_HELM_CHART: runtime/rollout/charts
@@ -128,11 +129,13 @@ jobs:
chart_version=${current_repo_tag}-nightly-build
fi
sed -i "s/latest/${image_tag}/g" $HELM_CHART/values.yaml
sed -i "s/latest/${image_tag}/g" $MINIMAL_HELM_CHART/values.yaml
sed -i "s/latest/${image_tag}/g" $LEGACY_HELM_CHART/values.yaml
sed -i "s/latest/${image_tag}/g" $OAM_RUNTIME_HELM_CHART/values.yaml
sed -i "s/latest/${image_tag}/g" $VELA_ROLLOUT_HELM_CHART/values.yaml
chart_smever=${chart_version#"v"}
sed -i "s/0.1.0/$chart_smever/g" $HELM_CHART/Chart.yaml
sed -i "s/0.1.0/$chart_smever/g" $MINIMAL_HELM_CHART/Chart.yaml
sed -i "s/0.1.0/$chart_smever/g" $LEGACY_HELM_CHART/Chart.yaml
sed -i "s/0.1.0/$chart_smever/g" $OAM_RUNTIME_HELM_CHART/Chart.yaml
sed -i "s/0.1.0/$chart_smever/g" $VELA_ROLLOUT_HELM_CHART/Chart.yaml
@@ -153,6 +156,7 @@ jobs:
- name: Package helm charts
run: |
helm package $HELM_CHART --destination $LOCAL_OSS_DIRECTORY
helm package $MINIMAL_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
helm package $LEGACY_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
helm package $OAM_RUNTIME_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
helm package $VELA_ROLLOUT_HELM_CHART --destination $LOCAL_OSS_DIRECTORY

View File

@@ -11,10 +11,10 @@ jobs:
sync-core-api:
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.14
- name: Set up Go 1.16
uses: actions/setup-go@v1
env:
GO_VERSION: '1.14'
GO_VERSION: '1.16'
GOLANGCI_VERSION: 'v1.38'
with:
go-version: ${{ env.GO_VERSION }}
@@ -33,4 +33,5 @@ jobs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
COMMIT_ID: ${{ github.sha }}
run: |
bash ./hack/apis/sync.sh
bash ./hack/apis/clientgen.sh
bash ./hack/apis/sync.sh

17
.gitignore vendored
View File

@@ -44,17 +44,8 @@ charts/vela-core/crds/_.yaml
.vela/
# Dashboard
node_modules/
.eslintcache
references/dashboard/dist/
references/dashboard/package-lock.json
references/dashboard/src/.umi/
package-lock.json
references/dashboard/src/.umi-production/
# Swagger: generate Restful API
references/apiserver/docs/index.html
# check docs
git-page/
git-page/
# e2e rollout runtime image build
runtime/rollout/e2e/tmp

View File

@@ -22,75 +22,6 @@ You can contribute to KubeVela in several ways. Here are some examples:
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
### Commit Conventions
KubeVela follows the [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/) and [commit messages best practices](https://chris.beams.io/posts/git-commit/) to improve better history information.
The commit message should be structured as follows:
```
<type>[optional scope]: <subject>
[optional body]
```
#### Examples:
Commit message with scope:
```
Feat(lang): add polish language
```
Commit message with no body:
```
Docs: correct spelling of CHANGELOG
```
Commit message with multi-paragraph body:
```
Fix: correct minor typos in code
see the issue for details
on typos fixed.
Reviewed-by: Z
Refs #133
```
#### `<type>` (required)
Type is required to better capture the area of the commit, based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines).
We capitalize the `<type>` to make sure the subject line is capitalized. `<type>` can be one of the following:
* **Feat**: A new feature
* **Fix**: A bug fix
* **Docs**: Documentation only changes
* **Build**: Changes that affect the build system or external dependencies
* **Style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **Refactor**: A code change that neither fixes a bug nor adds a feature
* **Perf**: A code change that improves performance
* **Test**: Adding missing or correcting existing tests
* **Chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
#### `<scope>` (optional)
Scope is optional, it may be provided to a commits type, to provide additional contextual information and is contained within parenthesis, it is could be anything specifying place of the commit change. Github issue link is
also a valid scope. For example: Fix(cli), Feat(api), Fix(#233), etc.
You can use `*` when the change affects more than a single scope.
#### `<subject>` (required)
The subject MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., "Fix: array parsing issue when multiple spaces were contained in string", instead of "Fix: bug".
#### `<body>` (optional)
A longer commit body may be provided after the short subject, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
### Report bugs

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

@@ -24,6 +24,7 @@ ARG VERSION
ARG GITVERSION
RUN apk add gcc musl-dev libc-dev ;\
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go test -c -o manager-${TARGETARCH} -cover -covermode=atomic -coverpkg ./... .
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \

107
Makefile
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
@@ -58,32 +61,11 @@ vela-cli:
kubectl-vela:
$(GOBUILD_ENV) go build -o bin/kubectl-vela -a -ldflags $(LDFLAGS) ./cmd/plugin/main.go
dashboard-build:
cd references/dashboard && npm install && cd ..
doc-gen:
rm -r docs/en/cli/*
go run hack/docgen/gen.go
PWD := $(shell pwd)
docs-build:
docker run -it -v $(PWD)/docs/sidebars.js:/workspace/kubevela.io/sidebars.js \
-v $(PWD)/docs/en:/workspace/kubevela.io/docs \
oamdev/vela-webtool:v1 -t build
docs-start:
docker run -it -p 3000:3000 -v $(PWD)/docs/sidebars.js:/workspace/kubevela.io/sidebars.js \
-v $(PWD)/docs/en:/workspace/kubevela.io/docs \
oamdev/vela-webtool:v1 -t start
api-gen:
swag init -g references/apiserver/route.go --output references/apiserver/docs
swagger-codegen generate -l html2 -i references/apiserver/docs/swagger.yaml -o references/apiserver/docs
mv references/apiserver/docs/index.html docs/en/developers/references/restful-api/
generate-source:
go run hack/frontend/source.go
PWD := $(shell pwd)
cross-build:
rm -rf _bin
go get github.com/mitchellh/gox@v0.4.0
@@ -113,16 +95,21 @@ compress:
)
# Run against the configured Kubernetes cluster in ~/.kube/config
run: fmt vet
go run ./cmd/core/main.go
run:
go run ./cmd/core/main.go --application-revision-limit 5
run-apiserver:
go run ./cmd/apiserver/main.go
# Run go fmt against code
fmt: goimports installcue
go fmt ./...
$(GOIMPORTS) -local github.com/oam-dev/kubevela -w $$(go list -f {{.Dir}} ./...)
$(CUE) fmt ./vela-templates/definitions/internal/
$(CUE) fmt ./vela-templates/definitions/registry/
$(CUE) fmt ./vela-templates/definitions/internal/*
$(CUE) fmt ./vela-templates/definitions/registry/*
$(CUE) fmt ./pkg/stdlib/pkgs/*
$(CUE) fmt ./pkg/stdlib/op.cue
$(CUE) fmt ./pkg/workflow/tasks/template/static/*
# Run go vet against code
vet:
go vet ./...
@@ -154,13 +141,21 @@ docker-build-runtime-rollout:
docker-push:
docker push $(VELA_CORE_IMAGE)
e2e-setup-core:
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) --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 ocm-cluster-manager
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,13 +163,10 @@ e2e-setup:
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core,app.kubernetes.io/instance=kubevela -n vela-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=source-controller -n flux-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=helm-controller -n flux-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=cluster-manager -n open-cluster-management --timeout=600s
bin/vela dashboard &
e2e-api-test:
# Run e2e test
ginkgo -v -skipPackage capability,setup,apiserver,application -r e2e
ginkgo -v -r e2e/apiserver
ginkgo -v -skipPackage capability,setup,application -r e2e
ginkgo -v -r e2e/application
e2e-test:
@@ -182,10 +174,19 @@ 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
e2e-multicluster-test:
go test -v -coverpkg=./... -coverprofile=/tmp/e2e_multicluster_test.out ./test/e2e-multicluster-test
@$(OK) tests pass
compatibility-test: vet lint staticcheck generate-compatibility-testdata
# Run compatibility test with old crd
COMPATIBILITY_TEST=TRUE go test -race ./pkg/...
@@ -203,10 +204,15 @@ 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
end-e2e:
sh ./hack/e2e/end_e2e.sh
@@ -216,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
@@ -247,18 +259,16 @@ 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
./hack/crd/cleanup.sh
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds charts/oam-runtime/crds runtime/
go run hack/crd/update.go charts/vela-core/crds/standard.oam.dev_podspecworkloads.yaml
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 --addons-path=./vela-templates/addons --store-path=./charts/vela-core/templates/addons
GOLANGCILINT_VERSION ?= v1.31.0
GOLANGCILINT_VERSION ?= v1.38.0
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
HOSTARCH := $(shell uname -m)
ifeq ($(HOSTARCH),x86_64)
@@ -266,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
@@ -331,15 +345,12 @@ else
KUSTOMIZE=$(shell which kustomize)
endif
start-dashboard:
go run references/cmd/apiserver/main.go &
cd references/dashboard && npm install && npm start && cd ..
swagger-gen:
$(GOBIN)/swag init -g apiserver/route.go -d pkg/ -o references/apiserver/docs/
check-license-header:
./hack/licence/header-check.sh
check-install-def:
def-install:
./hack/utils/installdefinition.sh
# generate addons to auto-gen and charts
addon:
go run ./vela-templates/gen_addons.go

View File

@@ -28,7 +28,7 @@ KubeVela is a modern application platform that makes deploying and managing appl
- [Introduction](https://kubevela.io/docs)
- [Installation](https://kubevela.io/docs/install)
- [Design Your First Deployment Plan](https://kubevela.io/docs/end-user/application)
- [Design Your First Deployment Plan](https://kubevela.io/docs/quick-start)
## Documentation
@@ -39,6 +39,9 @@ Full documentation is available on the [KubeVela website](https://kubevela.io/).
- Slack: [CNCF Slack](https://slack.cncf.io/) #kubevela channel (*English*)
- Gitter: [oam-dev](https://gitter.im/oam-dev/community) (*English*)
- [DingTalk Group](https://page.dingtalk.com/wow/dingtalk/act/en-home): `23310022` (*Chinese*)
- Wechat Group (*Chinese*): Broker wechat to add you into the user group.
<img src="https://static.kubevela.net/images/barnett-wechat.jpg" width="200" />
- Bi-weekly Community Call: [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs)
## Talks and Conferences

View File

@@ -17,11 +17,13 @@ limitations under the License.
package common
import (
"encoding/json"
"github.com/oam-dev/terraform-controller/api/v1beta1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
)
@@ -107,8 +109,13 @@ type Terraform struct {
// Type specifies which Terraform configuration it is, HCL or JSON syntax
// +kubebuilder:default:=hcl
// +kubebuilder:validation:Enum:=hcl;json
// +kubebuilder:validation:Enum:=hcl;json;remote
Type string `json:"type,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
@@ -163,23 +170,44 @@ type ApplicationPhase string
const (
// ApplicationRollingOut means the app is in the middle of rolling out
ApplicationRollingOut ApplicationPhase = "rollingOut"
// ApplicationStarting means the app is preparing for reconcile
ApplicationStarting ApplicationPhase = "starting"
// ApplicationRendering means the app is rendering
ApplicationRendering ApplicationPhase = "rendering"
// ApplicationPolicyGenerating means the app is generating policies
ApplicationPolicyGenerating ApplicationPhase = "generatingPolicy"
// ApplicationRunningWorkflow means the app is running workflow
ApplicationRunningWorkflow ApplicationPhase = "runningWorkflow"
// ApplicationWorkflowSuspending means the app's workflow is suspending
ApplicationWorkflowSuspending ApplicationPhase = "workflowSuspending"
// ApplicationWorkflowTerminated means the app's workflow is terminated
ApplicationWorkflowTerminated ApplicationPhase = "workflowTerminated"
// ApplicationWorkflowFinished means the app's workflow is finished
ApplicationWorkflowFinished ApplicationPhase = "workflowFinished"
// ApplicationRunning means the app finished rendering and applied result to the cluster
ApplicationRunning ApplicationPhase = "running"
// ApplicationHealthChecking means the app finished rendering and applied result to the cluster, but still unhealthy
ApplicationHealthChecking ApplicationPhase = "healthChecking"
// ApplicationUnhealthy means the app finished rendering and applied result to the cluster, but still unhealthy
ApplicationUnhealthy ApplicationPhase = "unhealthy"
)
// WorkflowState is a string that mark the workflow state
type WorkflowState string
const (
// WorkflowStateTerminated means workflow is terminated manually, and it won't be started unless the spec changed.
WorkflowStateTerminated WorkflowState = "terminated"
// WorkflowStateSuspended means workflow is suspended manually, and it can be resumed.
WorkflowStateSuspended WorkflowState = "suspended"
// WorkflowStateFinished means workflow is running successfully, all steps finished.
WorkflowStateFinished WorkflowState = "finished"
// WorkflowStateExecuting means workflow is still running or waiting some steps.
WorkflowStateExecuting WorkflowState = "executing"
)
// ApplicationComponentStatus record the health status of App component
type ApplicationComponentStatus struct {
Name string `json:"name"`
Env string `json:"env,omitempty"`
// WorkloadDefinition is the definition of a WorkloadDefinition, such as deployments/apps.v1
WorkloadDefinition WorkloadGVK `json:"workloadDefinition,omitempty"`
Healthy bool `json:"healthy"`
@@ -213,14 +241,27 @@ type RawComponent struct {
// WorkflowStepStatus record the status of a workflow step
type WorkflowStepStatus struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Phase WorkflowStepPhase `json:"phase,omitempty"`
// A human readable message indicating details about why the workflowStep is in this state.
Message string `json:"message,omitempty"`
// A brief CamelCase message indicating details about why the workflowStep is in this state.
Reason string `json:"reason,omitempty"`
ResourceRef corev1.ObjectReference `json:"resourceRef,omitempty"`
Reason string `json:"reason,omitempty"`
SubSteps *SubStepsStatus `json:"subSteps,omitempty"`
}
// WorkflowSubStepStatus record the status of a workflow step
type WorkflowSubStepStatus struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Phase WorkflowStepPhase `json:"phase,omitempty"`
// A human readable message indicating details about why the workflowStep is in this state.
Message string `json:"message,omitempty"`
// A brief CamelCase message indicating details about why the workflowStep is in this state.
Reason string `json:"reason,omitempty"`
}
// AppStatus defines the observed state of Application
@@ -252,18 +293,30 @@ type AppStatus struct {
// LatestRevision of the application configuration it generates
// +optional
LatestRevision *Revision `json:"latestRevision,omitempty"`
// AppliedResources record the resources that the workflow step apply.
AppliedResources []ClusterObjectReference `json:"appliedResources,omitempty"`
}
// WorkflowStatus record the status of workflow
type WorkflowStatus struct {
AppRevision string `json:"appRevision,omitempty"`
StepIndex int `json:"stepIndex,omitempty"`
Suspend bool `json:"suspend"`
Terminated bool `json:"terminated"`
ContextBackend *corev1.ObjectReference `json:"contextBackend"`
AppRevision string `json:"appRevision,omitempty"`
Mode WorkflowMode `json:"mode"`
Suspend bool `json:"suspend"`
Terminated bool `json:"terminated"`
ContextBackend *corev1.ObjectReference `json:"contextBackend,omitempty"`
Steps []WorkflowStepStatus `json:"steps,omitempty"`
}
// SubStepsStatus record the status of workflow steps.
type SubStepsStatus struct {
StepIndex int `json:"stepIndex,omitempty"`
Mode WorkflowMode `json:"mode,omitempty"`
Steps []WorkflowSubStepStatus `json:"steps,omitempty"`
}
// WorkflowStepPhase describes the phase of a workflow step.
type WorkflowStepPhase string
@@ -296,6 +349,16 @@ const (
WorkflowStepType DefinitionType = "WorkflowStep"
)
// WorkflowMode describes the mode of workflow
type WorkflowMode string
const (
// WorkflowModeDAG describes the DAG mode of workflow
WorkflowModeDAG WorkflowMode = "DAG"
// WorkflowModeStep describes the step by step mode of workflow
WorkflowModeStep WorkflowMode = "StepByStep"
)
// AppRolloutStatus defines the observed state of AppRollout
type AppRolloutStatus struct {
v1alpha1.RolloutStatus `json:",inline"`
@@ -313,7 +376,7 @@ type AppRolloutStatus struct {
type ApplicationTrait struct {
Type string `json:"type"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties runtime.RawExtension `json:"properties,omitempty"`
Properties *runtime.RawExtension `json:"properties,omitempty"`
}
// ApplicationComponent describe the component of application
@@ -323,7 +386,11 @@ type ApplicationComponent struct {
// ExternalRevision specified the component revisionName
ExternalRevision string `json:"externalRevision,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties runtime.RawExtension `json:"properties,omitempty"`
Properties *runtime.RawExtension `json:"properties,omitempty"`
DependsOn []string `json:"dependsOn,omitempty"`
Inputs StepInputs `json:"inputs,omitempty"`
Outputs StepOutputs `json:"outputs,omitempty"`
// Traits define the trait of one component, the type must be array to keep the order.
Traits []ApplicationTrait `json:"traits,omitempty"`
@@ -334,6 +401,22 @@ type ApplicationComponent struct {
Scopes map[string]string `json:"scopes,omitempty"`
}
// StepOutputs defines output variable of WorkflowStep
type StepOutputs []outputItem
// StepInputs defines variable input of WorkflowStep
type StepInputs []inputItem
type inputItem struct {
ParameterKey string `json:"parameterKey"`
From string `json:"from"`
}
type outputItem struct {
ValueFrom string `json:"valueFrom"`
Name string `json:"name"`
}
// ClusterSelector defines the rules to select a Cluster resource.
// Either name or labels is needed.
type ClusterSelector struct {
@@ -359,3 +442,46 @@ type ClusterPlacement struct {
// Distribution defines the replica distribution of an AppRevision to a cluster.
Distribution Distribution `json:"distribution,omitempty"`
}
// ResourceCreatorRole defines the resource creator.
type ResourceCreatorRole string
const (
// PolicyResourceCreator create the policy resource.
PolicyResourceCreator ResourceCreatorRole = "policy"
// WorkflowResourceCreator create the resource in workflow.
WorkflowResourceCreator ResourceCreatorRole = "workflow"
)
// ClusterObjectReference defines the object reference with cluster.
type ClusterObjectReference struct {
Cluster string `json:"cluster,omitempty"`
Creator ResourceCreatorRole `json:"creator,omitempty"`
corev1.ObjectReference `json:",inline"`
}
// RawExtensionPointer is the pointer of raw extension
type RawExtensionPointer struct {
RawExtension *runtime.RawExtension
}
// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value.
// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
func (re RawExtensionPointer) MarshalJSON() ([]byte, error) {
if re.RawExtension == nil {
return nil, nil
}
if re.RawExtension.Raw == nil {
// TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which
// expect to call json.Marshal on arbitrary versioned objects (even those not in
// the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction with
// kubectl get on objects not in the scheme needs to be updated to ensure that the
// objects that are not part of the scheme are correctly put into the right form.
if re.RawExtension.Object != nil {
return json.Marshal(re.RawExtension.Object)
}
return []byte("null"), nil
}
// TODO: Check whether ContentType is actually JSON before returning it.
return re.RawExtension.Raw, nil
}

View File

@@ -22,6 +22,7 @@ package common
import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -72,6 +73,11 @@ func (in *AppStatus) DeepCopyInto(out *AppStatus) {
*out = new(Revision)
**out = **in
}
if in.AppliedResources != nil {
in, out := &in.AppliedResources, &out.AppliedResources
*out = make([]ClusterObjectReference, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.
@@ -87,7 +93,26 @@ func (in *AppStatus) DeepCopy() *AppStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationComponent) DeepCopyInto(out *ApplicationComponent) {
*out = *in
in.Properties.DeepCopyInto(&out.Properties)
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Inputs != nil {
in, out := &in.Inputs, &out.Inputs
*out = make(StepInputs, len(*in))
copy(*out, *in)
}
if in.Outputs != nil {
in, out := &in.Outputs, &out.Outputs
*out = make(StepOutputs, len(*in))
copy(*out, *in)
}
if in.Traits != nil {
in, out := &in.Traits, &out.Traits
*out = make([]ApplicationTrait, len(*in))
@@ -143,7 +168,11 @@ func (in *ApplicationComponentStatus) DeepCopy() *ApplicationComponentStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationTrait) DeepCopyInto(out *ApplicationTrait) {
*out = *in
in.Properties.DeepCopyInto(&out.Properties)
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationTrait.
@@ -208,6 +237,22 @@ func (in *ChildResourceKind) DeepCopy() *ChildResourceKind {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterObjectReference) DeepCopyInto(out *ClusterObjectReference) {
*out = *in
out.ObjectReference = in.ObjectReference
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterObjectReference.
func (in *ClusterObjectReference) DeepCopy() *ClusterObjectReference {
if in == nil {
return nil
}
out := new(ClusterObjectReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterPlacement) DeepCopyInto(out *ClusterPlacement) {
*out = *in
@@ -367,6 +412,26 @@ func (in *RawComponent) DeepCopy() *RawComponent {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RawExtensionPointer) DeepCopyInto(out *RawExtensionPointer) {
*out = *in
if in.RawExtension != nil {
in, out := &in.RawExtension, &out.RawExtension
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawExtensionPointer.
func (in *RawExtensionPointer) DeepCopy() *RawExtensionPointer {
if in == nil {
return nil
}
out := new(RawExtensionPointer)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Revision) DeepCopyInto(out *Revision) {
*out = *in
@@ -403,7 +468,7 @@ func (in *Schematic) DeepCopyInto(out *Schematic) {
if in.Terraform != nil {
in, out := &in.Terraform, &out.Terraform
*out = new(Terraform)
**out = **in
(*in).DeepCopyInto(*out)
}
}
@@ -432,9 +497,68 @@ func (in *Status) DeepCopy() *Status {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in StepInputs) DeepCopyInto(out *StepInputs) {
{
in := &in
*out = make(StepInputs, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepInputs.
func (in StepInputs) DeepCopy() StepInputs {
if in == nil {
return nil
}
out := new(StepInputs)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in StepOutputs) DeepCopyInto(out *StepOutputs) {
{
in := &in
*out = make(StepOutputs, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepOutputs.
func (in StepOutputs) DeepCopy() StepOutputs {
if in == nil {
return nil
}
out := new(StepOutputs)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubStepsStatus) DeepCopyInto(out *SubStepsStatus) {
*out = *in
if in.Steps != nil {
in, out := &in.Steps, &out.Steps
*out = make([]WorkflowSubStepStatus, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubStepsStatus.
func (in *SubStepsStatus) DeepCopy() *SubStepsStatus {
if in == nil {
return nil
}
out := new(SubStepsStatus)
in.DeepCopyInto(out)
return out
}
// 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
in.BaseConfigurationSpec.DeepCopyInto(&out.BaseConfigurationSpec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Terraform.
@@ -458,7 +582,9 @@ func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) {
if in.Steps != nil {
in, out := &in.Steps, &out.Steps
*out = make([]WorkflowStepStatus, len(*in))
copy(*out, *in)
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
@@ -475,7 +601,11 @@ func (in *WorkflowStatus) DeepCopy() *WorkflowStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus) {
*out = *in
out.ResourceRef = in.ResourceRef
if in.SubSteps != nil {
in, out := &in.SubSteps, &out.SubSteps
*out = new(SubStepsStatus)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepStatus.
@@ -488,6 +618,21 @@ func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowSubStepStatus) DeepCopyInto(out *WorkflowSubStepStatus) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSubStepStatus.
func (in *WorkflowSubStepStatus) DeepCopy() *WorkflowSubStepStatus {
if in == nil {
return nil
}
out := new(WorkflowSubStepStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkloadGVK) DeepCopyInto(out *WorkloadGVK) {
*out = *in

View File

@@ -17,6 +17,7 @@
package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -31,8 +32,11 @@ const (
// OCMEngine represents Open-Cluster-Management multi-cluster management solution
OCMEngine ClusterManagementEngine = "ocm"
// LocalEngine represents single cluster ClusterManagerEngine
LocalEngine ClusterManagementEngine = "local"
// SingleClusterEngine represents single cluster ClusterManagerEngine
SingleClusterEngine ClusterManagementEngine = "single-cluster"
// ClusterGatewayEngine represents multi-cluster management solution with cluster-gateway
ClusterGatewayEngine ClusterManagementEngine = "cluster-gateway"
)
// EnvBindingPhase is a label for the condition of a EnvBinding at the current time
@@ -72,10 +76,16 @@ type EnvPlacement struct {
NamespaceSelector *NamespaceSelector `json:"namespaceSelector,omitempty"`
}
// EnvSelector defines which components should this env contains
type EnvSelector struct {
Components []string `json:"components,omitempty"`
}
// EnvConfig is the configuration for different environments.
type EnvConfig struct {
Name string `json:"name"`
Placement EnvPlacement `json:"placement,omitempty"`
Selector *EnvSelector `json:"selector,omitempty"`
Patch EnvPatch `json:"patch"`
}
@@ -124,7 +134,10 @@ type EnvBindingStatus struct {
Phase EnvBindingPhase `json:"phase,omitempty"`
ClusterDecisions []ClusterDecision `json:"cluster_decisions,omitempty"`
ClusterDecisions []ClusterDecision `json:"clusterDecisions,omitempty"`
// ResourceTracker record the status of the ResourceTracker
ResourceTracker *corev1.ObjectReference `json:"resourceTracker,omitempty"`
}
// EnvBinding is the Schema for the EnvBinding API

View File

@@ -21,6 +21,7 @@ limitations under the License.
package v1alpha1
import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
@@ -168,6 +169,11 @@ func (in *EnvBindingStatus) DeepCopyInto(out *EnvBindingStatus) {
*out = make([]ClusterDecision, len(*in))
copy(*out, *in)
}
if in.ResourceTracker != nil {
in, out := &in.ResourceTracker, &out.ResourceTracker
*out = new(v1.ObjectReference)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingStatus.
@@ -184,6 +190,11 @@ func (in *EnvBindingStatus) DeepCopy() *EnvBindingStatus {
func (in *EnvConfig) DeepCopyInto(out *EnvConfig) {
*out = *in
in.Placement.DeepCopyInto(&out.Placement)
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(EnvSelector)
(*in).DeepCopyInto(*out)
}
in.Patch.DeepCopyInto(&out.Patch)
}
@@ -244,6 +255,26 @@ func (in *EnvPlacement) DeepCopy() *EnvPlacement {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvSelector) DeepCopyInto(out *EnvSelector) {
*out = *in
if in.Components != nil {
in, out := &in.Components, &out.Components
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvSelector.
func (in *EnvSelector) DeepCopy() *EnvSelector {
if in == nil {
return nil
}
out := new(EnvSelector)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector) {
*out = *in

View File

@@ -54,7 +54,7 @@ type AppStatus struct {
type ApplicationTrait struct {
Name string `json:"name"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties runtime.RawExtension `json:"properties,omitempty"`
Properties *runtime.RawExtension `json:"properties,omitempty"`
}
// ApplicationComponent describe the component of application

View File

@@ -1,48 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ApplicationContextSpec is the spec of ApplicationContext
type ApplicationContextSpec struct {
// ApplicationRevisionName points to the snapshot of an Application with all its closure
ApplicationRevisionName string `json:"applicationRevisionName"`
}
// ApplicationContext is the Schema for the ApplicationContext API
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=appcontext,categories={oam}
// +kubebuilder:subresource:status
type ApplicationContext struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationContextSpec `json:"spec,omitempty"`
// we need to reuse the AC status
Status ApplicationConfigurationStatus `json:"status,omitempty"`
}
// ApplicationContextList contains a list of ApplicationContext
// +kubebuilder:object:root=true
type ApplicationContextList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ApplicationContext `json:"items"`
}

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"
@@ -44,7 +45,7 @@ func ApplicationV1alpha2ToV1beta1(v1a2 *Application, v1b1 *v1beta1.Application)
for j, trait := range comp.Traits {
traits[j] = common.ApplicationTrait{
Type: trait.Name,
Properties: *trait.Properties.DeepCopy(),
Properties: trait.Properties.DeepCopy(),
}
}
@@ -58,7 +59,7 @@ func ApplicationV1alpha2ToV1beta1(v1a2 *Application, v1b1 *v1beta1.Application)
v1b1.Spec.Components = append(v1b1.Spec.Components, common.ApplicationComponent{
Name: comp.Name,
Type: comp.WorkloadType,
Properties: *comp.Settings.DeepCopy(),
Properties: comp.Settings.DeepCopy(),
Traits: traits,
Scopes: scopes,
})
@@ -104,7 +105,7 @@ func (app *Application) ConvertFrom(src conversion.Hub) error {
for j, trait := range comp.Traits {
traits[j] = ApplicationTrait{
Name: trait.Type,
Properties: *trait.Properties.DeepCopy(),
Properties: trait.Properties.DeepCopy(),
}
}
@@ -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

@@ -87,6 +87,7 @@ type HealthScopeStatus struct {
// AppHealthCondition represents health condition of an application
type AppHealthCondition struct {
AppName string `json:"appName"`
EnvName string `json:"envName,omitempty"`
Components []*WorkloadHealthCondition `json:"components,omitempty"`
}

View File

@@ -85,14 +85,6 @@ var (
ApplicationConfigurationGroupVersionKind = SchemeGroupVersion.WithKind(ApplicationConfigurationKind)
)
// ApplicationContext type metadata.
var (
ApplicationContextKind = reflect.TypeOf(ApplicationContext{}).Name()
ApplicationContextGroupKind = schema.GroupKind{Group: Group, Kind: ApplicationContextKind}.String()
ApplicationContextKindAPIVersion = ApplicationContextKind + "." + SchemeGroupVersion.String()
ApplicationContextGroupVersionKind = SchemeGroupVersion.WithKind(ApplicationContextKind)
)
// ContainerizedWorkload type metadata.
var (
ContainerizedWorkloadKind = reflect.TypeOf(ContainerizedWorkload{}).Name()
@@ -154,5 +146,4 @@ func init() {
SchemeBuilder.Register(&Application{}, &ApplicationList{})
SchemeBuilder.Register(&AppRollout{}, &AppRolloutList{})
SchemeBuilder.Register(&ApplicationRevision{}, &ApplicationRevisionList{})
SchemeBuilder.Register(&ApplicationContext{}, &ApplicationContextList{})
}

View File

@@ -428,80 +428,6 @@ func (in *ApplicationConfigurationStatus) DeepCopy() *ApplicationConfigurationSt
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationContext) DeepCopyInto(out *ApplicationContext) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationContext.
func (in *ApplicationContext) DeepCopy() *ApplicationContext {
if in == nil {
return nil
}
out := new(ApplicationContext)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ApplicationContext) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationContextList) DeepCopyInto(out *ApplicationContextList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ApplicationContext, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationContextList.
func (in *ApplicationContextList) DeepCopy() *ApplicationContextList {
if in == nil {
return nil
}
out := new(ApplicationContextList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ApplicationContextList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationContextSpec) DeepCopyInto(out *ApplicationContextSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationContextSpec.
func (in *ApplicationContextSpec) DeepCopy() *ApplicationContextSpec {
if in == nil {
return nil
}
out := new(ApplicationContextSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationList) DeepCopyInto(out *ApplicationList) {
*out = *in
@@ -674,7 +600,11 @@ func (in *ApplicationSpec) DeepCopy() *ApplicationSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationTrait) DeepCopyInto(out *ApplicationTrait) {
*out = *in
in.Properties.DeepCopyInto(&out.Properties)
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationTrait.

View File

@@ -156,6 +156,8 @@ type AppDeploymentStatus struct {
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={oam},shortName=appdeploy
// +kubebuilder:subresource:status
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AppDeployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -166,6 +168,7 @@ type AppDeployment struct {
// AppDeploymentList contains a list of AppDeployment
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AppDeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`

View File

@@ -25,8 +25,17 @@ import (
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
const (
// TypeHealthy application are believed to be determined as healthy by a health scope.
TypeHealthy condition.ConditionType = "Healthy"
)
// Reasons an application is or is not healthy
const (
ReasonHealthy condition.ConditionReason = "AllComponentsHealthy"
ReasonUnhealthy condition.ConditionReason = "UnhealthyOrUnknownComponents"
ReasonHealthCheckErr condition.ConditionReason = "HealthCheckeError"
)
// AppPolicy defines a global policy for all components in the app.
type AppPolicy struct {
@@ -35,7 +44,7 @@ type AppPolicy struct {
Type string `json:"type"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties runtime.RawExtension `json:"properties,omitempty"`
Properties *runtime.RawExtension `json:"properties,omitempty"`
}
// WorkflowStep defines how to execute a workflow step.
@@ -46,29 +55,15 @@ type WorkflowStep struct {
Type string `json:"type"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties runtime.RawExtension `json:"properties,omitempty"`
Properties *runtime.RawExtension `json:"properties,omitempty"`
Inputs StepInputs `json:"inputs,omitempty"`
DependsOn []string `json:"dependsOn,omitempty"`
Outputs StepOutputs `json:"outputs,omitempty"`
Inputs common.StepInputs `json:"inputs,omitempty"`
Outputs common.StepOutputs `json:"outputs,omitempty"`
}
type inputItem struct {
ParameterKey string `json:"parameterKey"`
From string `json:"from"`
}
// StepInputs defines variable input of WorkflowStep
type StepInputs []inputItem
type outputItem struct {
ExportKey string `json:"exportKey"`
Name string `json:"name"`
}
// StepOutputs defines output variable of WorkflowStep
type StepOutputs []outputItem
// Workflow defines workflow steps and other attributes
type Workflow struct {
Steps []WorkflowStep `json:"steps,omitempty"`
@@ -110,6 +105,8 @@ type ApplicationSpec struct {
// +kubebuilder:printcolumn:name="HEALTHY",type=boolean,JSONPath=`.status.services[*].healthy`
// +kubebuilder:printcolumn:name="STATUS",type=string,JSONPath=`.status.services[*].message`
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Application struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -121,6 +118,7 @@ type Application struct {
// +kubebuilder:object:root=true
// ApplicationList contains a list of Application
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ApplicationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`

View File

@@ -43,14 +43,25 @@ type ApplicationRevisionSpec struct {
// ScopeDefinitions records the snapshot of the scopeDefinitions related with the created/modified Application
ScopeDefinitions map[string]ScopeDefinition `json:"scopeDefinitions,omitempty"`
// PolicyDefinitions records the snapshot of the PolicyDefinitions related with the created/modified Application
PolicyDefinitions map[string]PolicyDefinition `json:"policyDefinitions,omitempty"`
// WorkflowStepDefinitions records the snapshot of the WorkflowStepDefinitions related with the created/modified Application
WorkflowStepDefinitions map[string]WorkflowStepDefinition `json:"workflowStepDefinitions,omitempty"`
// ScopeGVK records the apiVersion to GVK mapping
ScopeGVK map[string]metav1.GroupVersionKind `json:"scopeGVK,omitempty"`
// Components records the rendered components from Application, it will contains the whole K8s CR of workload in it.
// +deprecated
Components []common.RawComponent `json:"components,omitempty"`
// ApplicationConfiguration records the rendered applicationConfiguration from Application,
// it will contains the whole K8s CR of trait and the reference component in it.
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
ApplicationConfiguration runtime.RawExtension `json:"applicationConfiguration"`
// +deprecated
ApplicationConfiguration runtime.RawExtension `json:"applicationConfiguration,omitempty"`
// ResourcesConfigMap references the ConfigMap that's generated to contain all final rendered resources.
ResourcesConfigMap corev1.LocalObjectReference `json:"resourcesConfigMap,omitempty"`
@@ -62,6 +73,8 @@ type ApplicationRevisionSpec struct {
// +kubebuilder:storageversion
// +kubebuilder:resource:categories={oam},shortName=apprev
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ApplicationRevision struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -72,6 +85,7 @@ type ApplicationRevision struct {
// +kubebuilder:object:root=true
// ApplicationRevisionList contains a list of ApplicationRevision
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ApplicationRevisionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`

View File

@@ -61,6 +61,8 @@ type AppRolloutSpec struct {
// +kubebuilder:printcolumn:name="BATCH-STATE",type=string,JSONPath=`.status.batchRollingState`
// +kubebuilder:printcolumn:name="ROLLING-STATE",type=string,JSONPath=`.status.rollingState`
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AppRollout struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -71,6 +73,7 @@ type AppRollout struct {
// AppRolloutList contains a list of AppRollout
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AppRolloutList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`

View File

@@ -41,6 +41,8 @@ type ClusterStatus struct {
}
// +kubebuilder:object:root=true
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Cluster is the Schema for the clusters API
type Cluster struct {
@@ -52,6 +54,7 @@ type Cluster struct {
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterList contains a list of Cluster
type ClusterList struct {

View File

@@ -76,6 +76,8 @@ type ComponentDefinitionStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="WORKLOAD-KIND",type=string,JSONPath=".spec.workload.definition.kind"
// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description"
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ComponentDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -95,6 +97,7 @@ func (cd *ComponentDefinition) GetCondition(conditionType condition.ConditionTyp
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ComponentDefinitionList contains a list of ComponentDefinition
type ComponentDefinitionList struct {

View File

@@ -73,6 +73,8 @@ type WorkloadDefinitionStatus struct {
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="DEFINITION-NAME",type=string,JSONPath=".spec.definitionRef.name"
// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description"
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type WorkloadDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -94,6 +96,7 @@ func (wd *WorkloadDefinition) GetCondition(conditionType condition.ConditionType
// +kubebuilder:object:root=true
// WorkloadDefinitionList contains a list of WorkloadDefinition.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type WorkloadDefinitionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
@@ -179,6 +182,8 @@ type TraitDefinitionStatus struct {
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="APPLIES-TO",type=string,JSONPath=".spec.appliesToWorkloads"
// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description"
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type TraitDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -198,6 +203,7 @@ func (td *TraitDefinition) GetCondition(conditionType condition.ConditionType) c
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// TraitDefinitionList contains a list of TraitDefinition.
type TraitDefinitionList struct {
@@ -233,6 +239,8 @@ type ScopeDefinitionSpec struct {
// +kubebuilder:printcolumn:JSONPath=".spec.definitionRef.name",name=DEFINITION-NAME,type=string
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=scope
// +kubebuilder:storageversion
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ScopeDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -241,6 +249,7 @@ type ScopeDefinition struct {
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ScopeDefinitionList contains a list of ScopeDefinition.
type ScopeDefinitionList struct {
@@ -251,6 +260,8 @@ type ScopeDefinitionList struct {
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// An ResourceTracker represents a tracker for track cross namespace resources
// +kubebuilder:resource:scope=Cluster,categories={oam},shortName=tracker
@@ -267,6 +278,7 @@ type ResourceTrackerStatus struct {
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ResourceTrackerList contains a list of ResourceTracker
type ResourceTrackerList struct {

View File

@@ -53,6 +53,8 @@ type DefinitionRevisionSpec struct {
// +kubebuilder:printcolumn:name="REVISION",type=integer,JSONPath=".spec.revision"
// +kubebuilder:printcolumn:name="HASH",type=string,JSONPath=".spec.revisionHash"
// +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=".spec.definitionType"
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type DefinitionRevision struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -61,6 +63,7 @@ type DefinitionRevision struct {
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DefinitionRevisionList contains a list of DefinitionRevision
type DefinitionRevisionList struct {

View File

@@ -69,6 +69,8 @@ type InitializerStatus struct {
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=init
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.status`
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Initializer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -78,6 +80,7 @@ type Initializer struct {
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// InitializerList contains a list of Initializer.
type InitializerList struct {

View File

@@ -32,6 +32,10 @@ type PolicyDefinitionSpec struct {
// Schematic defines the data format and template of the encapsulation of the policy definition
// +optional
Schematic *common.Schematic `json:"schematic,omitempty"`
// ManageHealthCheck means the policy will handle health checking and skip application controller
// built-in health checking.
ManageHealthCheck bool `json:"manageHealthCheck,omitempty"`
}
// PolicyDefinitionStatus is the status of PolicyDefinition
@@ -60,6 +64,8 @@ func (d *PolicyDefinition) GetCondition(conditionType condition.ConditionType) c
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=policy
// +kubebuilder:storageversion
// +kubebuilder:subresource:status
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type PolicyDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -69,6 +75,7 @@ type PolicyDefinition struct {
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PolicyDefinitionList contains a list of PolicyDefinition
type PolicyDefinitionList struct {

View File

@@ -35,6 +35,9 @@ var (
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
// AddToScheme is a global function that registers this API group & version to a scheme
AddToScheme = SchemeBuilder.AddToScheme
)
// ComponentDefinition type metadata.
@@ -165,3 +168,8 @@ func init() {
SchemeBuilder.Register(&ResourceTracker{}, &ResourceTrackerList{})
SchemeBuilder.Register(&Initializer{}, &InitializerList{})
}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}

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"`
@@ -60,6 +61,8 @@ func (d *WorkflowStepDefinition) GetCondition(conditionType condition.ConditionT
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=workflowstep
// +kubebuilder:storageversion
// +kubebuilder:subresource:status
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type WorkflowStepDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -69,6 +72,7 @@ type WorkflowStepDefinition struct {
}
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// WorkflowStepDefinitionList contains a list of WorkflowStepDefinition
type WorkflowStepDefinitionList struct {

View File

@@ -21,7 +21,8 @@ limitations under the License.
package v1beta1
import (
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
@@ -140,7 +141,11 @@ func (in *AppDeploymentStatus) DeepCopy() *AppDeploymentStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AppPolicy) DeepCopyInto(out *AppPolicy) {
*out = *in
in.Properties.DeepCopyInto(&out.Properties)
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppPolicy.
@@ -404,6 +409,27 @@ func (in *ApplicationRevisionSpec) DeepCopyInto(out *ApplicationRevisionSpec) {
(*out)[key] = *val.DeepCopy()
}
}
if in.PolicyDefinitions != nil {
in, out := &in.PolicyDefinitions, &out.PolicyDefinitions
*out = make(map[string]PolicyDefinition, len(*in))
for key, val := range *in {
(*out)[key] = *val.DeepCopy()
}
}
if in.WorkflowStepDefinitions != nil {
in, out := &in.WorkflowStepDefinitions, &out.WorkflowStepDefinitions
*out = make(map[string]WorkflowStepDefinition, len(*in))
for key, val := range *in {
(*out)[key] = *val.DeepCopy()
}
}
if in.ScopeGVK != nil {
in, out := &in.ScopeGVK, &out.ScopeGVK
*out = make(map[string]v1.GroupVersionKind, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Components != nil {
in, out := &in.Components, &out.Components
*out = make([]common.RawComponent, len(*in))
@@ -1126,7 +1152,7 @@ func (in *ResourceTrackerStatus) DeepCopyInto(out *ResourceTrackerStatus) {
*out = *in
if in.TrackedResources != nil {
in, out := &in.TrackedResources, &out.TrackedResources
*out = make([]v1.ObjectReference, len(*in))
*out = make([]corev1.ObjectReference, len(*in))
copy(*out, *in)
}
}
@@ -1220,44 +1246,6 @@ func (in *ScopeDefinitionSpec) DeepCopy() *ScopeDefinitionSpec {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in StepInputs) DeepCopyInto(out *StepInputs) {
{
in := &in
*out = make(StepInputs, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepInputs.
func (in StepInputs) DeepCopy() StepInputs {
if in == nil {
return nil
}
out := new(StepInputs)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in StepOutputs) DeepCopyInto(out *StepOutputs) {
{
in := &in
*out = make(StepOutputs, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepOutputs.
func (in StepOutputs) DeepCopy() StepOutputs {
if in == nil {
return nil
}
out := new(StepOutputs)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Traffic) DeepCopyInto(out *Traffic) {
*out = *in
@@ -1466,15 +1454,24 @@ func (in *Workflow) DeepCopy() *Workflow {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep) {
*out = *in
in.Properties.DeepCopyInto(&out.Properties)
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Inputs != nil {
in, out := &in.Inputs, &out.Inputs
*out = make(StepInputs, len(*in))
*out = make(common.StepInputs, len(*in))
copy(*out, *in)
}
if in.Outputs != nil {
in, out := &in.Outputs, &out.Outputs
*out = make(StepOutputs, len(*in))
*out = make(common.StepOutputs, len(*in))
copy(*out, *in)
}
}

View File

@@ -22,10 +22,10 @@ limitations under the License.
// NOTE(@wonderflow) We don't remove existing CRDs here, because the crd folders contain not only auto generated.
// Generate deepcopy methodsets and CRD manifests
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:crdVersions=v1 output:artifacts:config=../config/crd/base
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:crdVersions=v1,generateEmbeddedObjectMeta=true output:artifacts:config=../config/crd/base
// Generate legacy_support for K8s 1.12~1.15 versions CRD manifests
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd output:artifacts:config=../legacy/charts/vela-core-legacy/crds
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:generateEmbeddedObjectMeta=true output:artifacts:config=../legacy/charts/vela-core-legacy/crds
//go:generate go run ../legacy/convert/main.go ../legacy/charts/vela-core-legacy/crds
package apis

View File

@@ -1,82 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
"github.com/oam-dev/kubevela/pkg/oam"
)
// PodSpecWorkloadSpec defines the desired state of PodSpecWorkload
type PodSpecWorkloadSpec struct {
// Replicas is the desired number of replicas of the given podSpec.
// These are replicas in the sense that they are instantiations of the same podSpec.
// If unspecified, defaults to 1.
Replicas *int32 `json:"replicas,omitempty"`
// PodSpec describes the pods that will be created,
// we omit the meta part as it will be exactly the same as the PodSpecWorkload
PodSpec v1.PodSpec `json:"podSpec"`
}
// PodSpecWorkloadStatus defines the observed state of PodSpecWorkload
type PodSpecWorkloadStatus struct {
condition.ConditionedStatus `json:",inline"`
// Resources managed by this workload.
Resources []v1.ObjectReference `json:"resources,omitempty"`
}
// +kubebuilder:object:root=true
// PodSpecWorkload is the Schema for the PodSpec API
// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale
// +kubebuilder:resource:categories={oam}
// +kubebuilder:subresource:status
type PodSpecWorkload struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec PodSpecWorkloadSpec `json:"spec,omitempty"`
Status PodSpecWorkloadStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// PodSpecWorkloadList contains a list of PodSpecWorkload
type PodSpecWorkloadList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []PodSpecWorkload `json:"items"`
}
var _ oam.Workload = &PodSpecWorkload{}
// SetConditions set condition for this CR
func (in *PodSpecWorkload) SetConditions(c ...condition.Condition) {
in.Status.SetConditions(c...)
}
// GetCondition set condition for this CR
func (in *PodSpecWorkload) GetCondition(c condition.ConditionType) condition.Condition {
return in.Status.GetCondition(c)
}

View File

@@ -32,5 +32,4 @@ var (
func init() {
SchemeBuilder.Register(&Rollout{}, &RolloutList{})
SchemeBuilder.Register(&PodSpecWorkload{}, &PodSpecWorkloadList{})
}

View File

@@ -1,90 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
"github.com/oam-dev/kubevela/pkg/oam"
)
// RolloutTraitSpec defines the desired state of RolloutTrait
type RolloutTraitSpec struct {
// TargetRef references a target resource that contains the newer version
// of the software. We assumed that new resource already exists.
// This is the only resource we work on if the resource is a stateful resource (cloneset/statefulset)
TargetRef corev1.ObjectReference `json:"targetRef"`
// SourceRef references the list of resources that contains the older version
// of the software. We assume that it's the first time to deploy when we cannot find any source.
// +optional
SourceRef []corev1.ObjectReference `json:"sourceRef,omitempty"`
// RolloutPlan is the details on how to rollout the resources
RolloutPlan RolloutPlan `json:"rolloutPlan"`
}
// RolloutTrait is the Schema for the RolloutTrait API
// +kubebuilder:object:root=true
// +genclient
// +kubebuilder:resource:categories={oam}
// +kubebuilder:subresource:status
type RolloutTrait struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec RolloutTraitSpec `json:"spec,omitempty"`
Status RolloutStatus `json:"status,omitempty"`
}
// RolloutTraitList contains a list of RolloutTrait
// +kubebuilder:object:root=true
// +genclient
type RolloutTraitList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RolloutTrait `json:"items"`
}
func init() {
SchemeBuilder.Register(&RolloutTrait{}, &RolloutTraitList{})
}
var _ oam.Trait = &RolloutTrait{}
// SetConditions for set CR condition
func (tr *RolloutTrait) SetConditions(c ...condition.Condition) {
tr.Status.SetConditions(c...)
}
// GetCondition for get CR condition
func (tr *RolloutTrait) GetCondition(c condition.ConditionType) condition.Condition {
return tr.Status.GetCondition(c)
}
// GetWorkloadReference of this MetricsTrait.
func (tr *RolloutTrait) GetWorkloadReference() corev1.ObjectReference {
return tr.Spec.TargetRef
}
// SetWorkloadReference of this MetricsTrait.
func (tr *RolloutTrait) SetWorkloadReference(r corev1.ObjectReference) {
tr.Spec.TargetRef = r
}

View File

@@ -92,107 +92,6 @@ func (in *MetricsExpectedRange) DeepCopy() *MetricsExpectedRange {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSpecWorkload) DeepCopyInto(out *PodSpecWorkload) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecWorkload.
func (in *PodSpecWorkload) DeepCopy() *PodSpecWorkload {
if in == nil {
return nil
}
out := new(PodSpecWorkload)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodSpecWorkload) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSpecWorkloadList) DeepCopyInto(out *PodSpecWorkloadList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PodSpecWorkload, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecWorkloadList.
func (in *PodSpecWorkloadList) DeepCopy() *PodSpecWorkloadList {
if in == nil {
return nil
}
out := new(PodSpecWorkloadList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodSpecWorkloadList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSpecWorkloadSpec) DeepCopyInto(out *PodSpecWorkloadSpec) {
*out = *in
if in.Replicas != nil {
in, out := &in.Replicas, &out.Replicas
*out = new(int32)
**out = **in
}
in.PodSpec.DeepCopyInto(&out.PodSpec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecWorkloadSpec.
func (in *PodSpecWorkloadSpec) DeepCopy() *PodSpecWorkloadSpec {
if in == nil {
return nil
}
out := new(PodSpecWorkloadSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSpecWorkloadStatus) DeepCopyInto(out *PodSpecWorkloadStatus) {
*out = *in
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
if in.Resources != nil {
in, out := &in.Resources, &out.Resources
*out = make([]v1.ObjectReference, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecWorkloadStatus.
func (in *PodSpecWorkloadStatus) DeepCopy() *PodSpecWorkloadStatus {
if in == nil {
return nil
}
out := new(PodSpecWorkloadStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Rollout) DeepCopyInto(out *Rollout) {
*out = *in
@@ -380,87 +279,6 @@ func (in *RolloutStatus) DeepCopy() *RolloutStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RolloutTrait) DeepCopyInto(out *RolloutTrait) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutTrait.
func (in *RolloutTrait) DeepCopy() *RolloutTrait {
if in == nil {
return nil
}
out := new(RolloutTrait)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *RolloutTrait) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RolloutTraitList) DeepCopyInto(out *RolloutTraitList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]RolloutTrait, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutTraitList.
func (in *RolloutTraitList) DeepCopy() *RolloutTraitList {
if in == nil {
return nil
}
out := new(RolloutTraitList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *RolloutTraitList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RolloutTraitSpec) DeepCopyInto(out *RolloutTraitSpec) {
*out = *in
out.TargetRef = in.TargetRef
if in.SourceRef != nil {
in, out := &in.SourceRef, &out.SourceRef
*out = make([]v1.ObjectReference, len(*in))
copy(*out, *in)
}
in.RolloutPlan.DeepCopyInto(&out.RolloutPlan)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutTraitSpec.
func (in *RolloutTraitSpec) DeepCopy() *RolloutTraitSpec {
if in == nil {
return nil
}
out := new(RolloutTraitSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RolloutWebhook) DeepCopyInto(out *RolloutWebhook) {
*out = *in

View File

@@ -162,6 +162,7 @@ type Capability struct {
Center string `json:"center,omitempty"`
Status string `json:"status,omitempty"`
Description string `json:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Category CapabilityCategory `json:"category,omitempty"`
// trait only

View File

@@ -36,9 +36,4 @@ type ComponentManifest struct {
// Release, Git Repo or anything that can package and run a workload.
PackagedWorkloadResources []*unstructured.Unstructured
PackagedTraitResources map[string][]*unstructured.Unstructured
// InsertConfigNotReady is true indicates the ComponentManifest is not ready to apply for insertSecret and configs
// it's possible for some of the component not ready while others are ready, we should not block all of them if only
// part is not ready
InsertConfigNotReady bool
}

View File

@@ -38,13 +38,14 @@ const (
// event message for Application
const (
MessageParsed = "Parsed successfully"
MessageRendered = "Rendered successfully"
MessageRevisioned = "Revisioned successfully"
MessageApplied = "Applied successfully"
MessageHealthCheck = "Health checked healthy"
MessageDeployed = "Deployed successfully"
MessageRollout = "Rollout successfully"
MessageParsed = "Parsed successfully"
MessageRendered = "Rendered successfully"
MessageRevisioned = "Revisioned successfully"
MessageApplied = "Applied successfully"
MessageWorkflowFinished = "Workflow finished"
MessageHealthCheck = "Health checked healthy"
MessageDeployed = "Deployed successfully"
MessageRollout = "Rollout successfully"
MessageFailedParse = "fail to parse application, err: %v"
MessageFailedRender = "fail to render application, err: %v"

View File

@@ -16,6 +16,8 @@ limitations under the License.
package types
import "github.com/oam-dev/kubevela/pkg/oam"
const (
// DefaultKubeVelaNS defines the default KubeVela namespace in Kubernetes
DefaultKubeVelaNS = "vela-system"
@@ -45,12 +47,13 @@ const (
StatusStaging = "Staging"
)
// EnvMeta stores the info for app environment
// Config contains key/value pairs
type Config map[string]string
// EnvMeta stores the namespace for app environment
type EnvMeta struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Email string `json:"email,omitempty"`
Domain string `json:"domain,omitempty"`
Current string `json:"current,omitempty"`
}
@@ -71,3 +74,16 @@ const (
// TypePlugin defines one category used in Kubectl Plugin
TypePlugin = "Plugin Command"
)
// LabelArg is the argument `label` of a definition
const LabelArg = "label"
// DefaultFilterAnnots are annotations that won't pass to workload or trait
var DefaultFilterAnnots = []string{
oam.AnnotationAppRollout,
oam.AnnotationRollingComponent,
oam.AnnotationInplaceUpgrade,
oam.AnnotationFilterLabelKeys,
oam.AnnotationFilterAnnotationKeys,
oam.AnnotationLastAppliedConfiguration,
}

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: applicationconfigurations.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: components.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: containerizedworkloads.core.oam.dev
spec:
group: core.oam.dev
@@ -354,9 +354,13 @@ spec:
description: CPU required by this container.
properties:
required:
anyOf:
- type: integer
- type: string
description: Required CPU count. 1.0 represents one
CPU core.
type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- required
type: object
@@ -386,8 +390,12 @@ spec:
description: GPU required by this container.
properties:
required:
anyOf:
- type: integer
- type: string
description: Required GPU count.
type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- required
type: object
@@ -395,8 +403,12 @@ spec:
description: Memory required by this container.
properties:
required:
anyOf:
- type: integer
- type: string
description: Required memory.
type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- required
type: object
@@ -420,8 +432,12 @@ spec:
disk needs to be mounted.
type: boolean
required:
anyOf:
- type: integer
- type: string
description: Required disk space.
type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- required
type: object

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: healthscopes.core.oam.dev
spec:
group: core.oam.dev
@@ -402,6 +402,8 @@ spec:
- healthStatus
type: object
type: array
envName:
type: string
required:
- appName
type: object

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: manualscalertraits.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: scopedefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: traitdefinitions.core.oam.dev
spec:
group: core.oam.dev
@@ -188,6 +188,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -195,7 +222,24 @@ spec:
enum:
- hcl
- 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
@@ -453,6 +497,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -460,7 +531,24 @@ spec:
enum:
- hcl
- 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

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: workloaddefinitions.core.oam.dev
spec:
group: core.oam.dev
@@ -193,6 +193,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -200,7 +227,24 @@ spec:
enum:
- hcl
- 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
@@ -439,6 +483,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -446,7 +517,24 @@ spec:
enum:
- hcl
- 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

@@ -18,6 +18,7 @@ metadata:
spec:
secretName: {{ template "oam-runtime.fullname" . }}-root-cert
duration: 43800h # 5y
revisionHistoryLimit: {{ .Values.admissionWebhooks.certManager.revisionHistoryLimit }}
issuerRef:
name: {{ template "oam-runtime.fullname" . }}-self-signed-issuer
commonName: "ca.webhook.oam-runtime"
@@ -44,6 +45,7 @@ metadata:
spec:
secretName: {{ template "oam-runtime.fullname" . }}-admission
duration: 8760h # 1y
revisionHistoryLimit: {{ .Values.admissionWebhooks.certManager.revisionHistoryLimit }}
issuerRef:
name: {{ template "oam-runtime.fullname" . }}-root-issuer
dnsNames:

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,13 +70,14 @@ 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: []
certManager:
enabled: false
revisionHistoryLimit: 3
# If autoGenWorkloadDefinition is true, webhook will auto generated workloadDefinition which componentDefinition refers to
autoGenWorkloadDefinition: true
@@ -97,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

@@ -19,3 +19,6 @@ version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.1.0
home: https://kubevela.io
icon: https://kubevela.io/img/logo.jpg

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: appdeployments.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -1,446 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
name: applicationcontexts.core.oam.dev
spec:
group: core.oam.dev
names:
categories:
- oam
kind: ApplicationContext
listKind: ApplicationContextList
plural: applicationcontexts
shortNames:
- appcontext
singular: applicationcontext
scope: Namespaced
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
description: ApplicationContext is the Schema for the ApplicationContext API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ApplicationContextSpec is the spec of ApplicationContext
properties:
applicationRevisionName:
description: ApplicationRevisionName points to the snapshot of an
Application with all its closure
type: string
required:
- applicationRevisionName
type: object
status:
description: we need to reuse the AC status
properties:
conditions:
description: Conditions of the resource.
items:
description: A Condition that may apply to a resource.
properties:
lastTransitionTime:
description: LastTransitionTime is the last time this condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A Message containing details about this condition's
last transition from one status to another, if any.
type: string
reason:
description: A Reason for this condition's last transition from
one status to another.
type: string
status:
description: Status of this condition; is it currently True,
False, or Unknown?
type: string
type:
description: Type of this condition. At most one of each condition
type may apply to a resource at any point in time.
type: string
required:
- lastTransitionTime
- reason
- status
- type
type: object
type: array
dependency:
description: DependencyStatus represents the observed state of the
dependency of an ApplicationConfiguration.
properties:
unsatisfied:
items:
description: UnstaifiedDependency describes unsatisfied dependency
flow between one pair of objects.
properties:
from:
description: DependencyFromObject represents the object
that dependency data comes from.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a
valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container
that triggered the event) or if no container name
is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to
have some well-defined way of referencing a part of
an object. TODO: this design is not final and this
field is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
reason:
type: string
to:
description: DependencyToObject represents the object that
dependency data goes to.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a
valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container
that triggered the event) or if no container name
is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to
have some well-defined way of referencing a part of
an object. TODO: this design is not final and this
field is subject to change in the future.'
type: string
fieldPaths:
items:
type: string
type: array
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
required:
- from
- reason
- to
type: object
type: array
type: object
historyWorkloads:
description: HistoryWorkloads will record history but still working
revision workloads.
items:
description: HistoryWorkload contain the old component revision
that are still running
properties:
revision:
description: Revision of this workload
type: string
workloadRef:
description: Reference to running workload.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a valid
JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that
triggered the event) or if no container name is specified
"spec.containers[2]" (container with index 2 in this pod).
This syntax is chosen only to have some well-defined way
of referencing a part of an object. TODO: this design
is not final and this field is subject to change in the
future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: object
type: array
observedGeneration:
description: The generation observed by the appConfig controller.
format: int64
type: integer
rollingStatus:
description: RollingStatus indicates what phase are we in the rollout
phase
type: string
status:
description: Status is a place holder for a customized controller
to fill if it needs a single place to summarize the status of the
entire application
type: string
workloads:
description: Workloads created by this ApplicationConfiguration.
items:
description: A WorkloadStatus represents the status of a workload.
properties:
appliedComponentRevision:
description: AppliedComponentRevision indicates the applied
component revision name of this workload
type: string
componentName:
description: ComponentName that produced this workload.
type: string
componentRevisionName:
description: ComponentRevisionName of current component
type: string
dependencyUnsatisfied:
description: DependencyUnsatisfied notify does the workload
has dependency unsatisfied
type: boolean
scopes:
description: Scopes associated with this workload.
items:
description: A WorkloadScope represents a scope associated
with a workload and its status
properties:
scopeRef:
description: Reference to a scope created by an ApplicationConfiguration.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object
instead of an entire object, this string should
contain a valid JSON/Go field access statement,
such as desiredState.manifest.containers[2]. For
example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container
that triggered the event) or if no container name
is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only
to have some well-defined way of referencing a part
of an object. TODO: this design is not final and
this field is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
status:
description: Status is a place holder for a customized
controller to fill if it needs a single place to summarize
the status of the scope
type: string
required:
- scopeRef
type: object
type: array
status:
description: Status is a place holder for a customized controller
to fill if it needs a single place to summarize the entire
status of the workload
type: string
traits:
description: Traits associated with this workload.
items:
description: A WorkloadTrait represents a trait associated
with a workload and its status
properties:
appliedGeneration:
description: AppliedGeneration indicates the generation
observed by the appConfig controller. The same field
is also recorded in the annotations of traits. A trait
is possible to be deleted from cluster after created.
This field is useful to track the observed generation
of traits after they are deleted.
format: int64
type: integer
dependencyUnsatisfied:
description: DependencyUnsatisfied notify does the trait
has dependency unsatisfied
type: boolean
message:
description: Message will allow controller to leave some
additional information for this trait
type: string
status:
description: Status is a place holder for a customized
controller to fill if it needs a single place to summarize
the status of the trait
type: string
traitRef:
description: Reference to a trait created by an ApplicationConfiguration.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object
instead of an entire object, this string should
contain a valid JSON/Go field access statement,
such as desiredState.manifest.containers[2]. For
example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container
that triggered the event) or if no container name
is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only
to have some well-defined way of referencing a part
of an object. TODO: this design is not final and
this field is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
required:
- traitRef
type: object
type: array
workloadRef:
description: Reference to a workload created by an ApplicationConfiguration.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a valid
JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that
triggered the event) or if no container name is specified
"spec.containers[2]" (container with index 2 in this pod).
This syntax is chosen only to have some well-defined way
of referencing a part of an object. TODO: this design
is not final and this field is subject to change in the
future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: vela-system/kubevela-vela-core-root-cert
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: applications.core.oam.dev
spec:
conversion:
@@ -335,6 +335,39 @@ spec:
status:
description: AppStatus defines the observed state of Application
properties:
appliedResources:
description: AppliedResources record the resources that the workflow step apply.
items:
description: ClusterObjectReference defines the object reference with cluster.
properties:
apiVersion:
description: API version of the referent.
type: string
cluster:
type: string
creator:
description: ResourceCreatorRole defines the resource creator.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: array
components:
description: Components record the related Components created by Application Controller
items:
@@ -516,6 +549,8 @@ spec:
items:
description: ApplicationComponentStatus record the health status of App component
properties:
env:
type: string
healthy:
type: boolean
message:
@@ -613,12 +648,15 @@ spec:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
stepIndex:
type: integer
mode:
description: WorkflowMode describes the mode of workflow
type: string
steps:
items:
description: WorkflowStepStatus record the status of a workflow step
properties:
id:
type: string
message:
description: A human readable message indicating details about why the workflowStep is in this state.
type: string
@@ -630,33 +668,42 @@ spec:
reason:
description: A brief CamelCase message indicating details about why the workflowStep is in this state.
type: string
resourceRef:
description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .'
subSteps:
description: SubStepsStatus record the status of workflow steps.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
mode:
description: WorkflowMode describes the mode of workflow
type: string
stepIndex:
type: integer
steps:
items:
description: WorkflowSubStepStatus record the status of a workflow step
properties:
id:
type: string
message:
description: A human readable message indicating details about why the workflowStep is in this state.
type: string
name:
type: string
phase:
description: WorkflowStepPhase describes the phase of a workflow step.
type: string
reason:
description: A brief CamelCase message indicating details about why the workflowStep is in this state.
type: string
type:
type: string
required:
- id
type: object
type: array
type: object
type:
type: string
required:
- id
type: object
type: array
suspend:
@@ -664,7 +711,7 @@ spec:
terminated:
type: boolean
required:
- contextBackend
- mode
- suspend
- terminated
type: object
@@ -713,11 +760,41 @@ spec:
items:
description: ApplicationComponent describe the component of application
properties:
dependsOn:
items:
type: string
type: array
externalRevision:
description: ExternalRevision specified the component revisionName
type: string
inputs:
description: StepInputs defines variable input of WorkflowStep
items:
properties:
from:
type: string
parameterKey:
type: string
required:
- from
- parameterKey
type: object
type: array
name:
type: string
outputs:
description: StepOutputs defines output variable of WorkflowStep
items:
properties:
name:
type: string
valueFrom:
type: string
required:
- name
- valueFrom
type: object
type: array
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
@@ -1001,6 +1078,10 @@ spec:
items:
description: WorkflowStep defines how to execute a workflow step.
properties:
dependsOn:
items:
type: string
type: array
inputs:
description: StepInputs defines variable input of WorkflowStep
items:
@@ -1021,13 +1102,13 @@ spec:
description: StepOutputs defines output variable of WorkflowStep
items:
properties:
exportKey:
type: string
name:
type: string
valueFrom:
type: string
required:
- exportKey
- name
- valueFrom
type: object
type: array
properties:
@@ -1047,6 +1128,39 @@ spec:
status:
description: AppStatus defines the observed state of Application
properties:
appliedResources:
description: AppliedResources record the resources that the workflow step apply.
items:
description: ClusterObjectReference defines the object reference with cluster.
properties:
apiVersion:
description: API version of the referent.
type: string
cluster:
type: string
creator:
description: ResourceCreatorRole defines the resource creator.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: array
components:
description: Components record the related Components created by Application Controller
items:
@@ -1228,6 +1342,8 @@ spec:
items:
description: ApplicationComponentStatus record the health status of App component
properties:
env:
type: string
healthy:
type: boolean
message:
@@ -1325,12 +1441,15 @@ spec:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
stepIndex:
type: integer
mode:
description: WorkflowMode describes the mode of workflow
type: string
steps:
items:
description: WorkflowStepStatus record the status of a workflow step
properties:
id:
type: string
message:
description: A human readable message indicating details about why the workflowStep is in this state.
type: string
@@ -1342,33 +1461,42 @@ spec:
reason:
description: A brief CamelCase message indicating details about why the workflowStep is in this state.
type: string
resourceRef:
description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .'
subSteps:
description: SubStepsStatus record the status of workflow steps.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
mode:
description: WorkflowMode describes the mode of workflow
type: string
stepIndex:
type: integer
steps:
items:
description: WorkflowSubStepStatus record the status of a workflow step
properties:
id:
type: string
message:
description: A human readable message indicating details about why the workflowStep is in this state.
type: string
name:
type: string
phase:
description: WorkflowStepPhase describes the phase of a workflow step.
type: string
reason:
description: A brief CamelCase message indicating details about why the workflowStep is in this state.
type: string
type:
type: string
required:
- id
type: object
type: array
type: object
type:
type: string
required:
- id
type: object
type: array
suspend:
@@ -1376,7 +1504,7 @@ spec:
terminated:
type: boolean
required:
- contextBackend
- mode
- suspend
- terminated
type: object

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: approllouts.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: clusters.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: componentdefinitions.core.oam.dev
spec:
group: core.oam.dev
@@ -179,6 +179,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -186,7 +213,24 @@ spec:
enum:
- hcl
- 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
@@ -448,6 +492,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -455,7 +526,24 @@ spec:
enum:
- hcl
- 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

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: containerizedworkloads.core.oam.dev
spec:
group: core.oam.dev
@@ -354,9 +354,13 @@ spec:
description: CPU required by this container.
properties:
required:
anyOf:
- type: integer
- type: string
description: Required CPU count. 1.0 represents one
CPU core.
type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- required
type: object
@@ -386,8 +390,12 @@ spec:
description: GPU required by this container.
properties:
required:
anyOf:
- type: integer
- type: string
description: Required GPU count.
type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- required
type: object
@@ -395,8 +403,12 @@ spec:
description: Memory required by this container.
properties:
required:
anyOf:
- type: integer
- type: string
description: Required memory.
type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- required
type: object
@@ -420,8 +432,12 @@ spec:
disk needs to be mounted.
type: boolean
required:
anyOf:
- type: integer
- type: string
description: Required disk space.
type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- required
type: object

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: definitionrevisions.core.oam.dev
spec:
group: core.oam.dev
@@ -66,6 +66,23 @@ spec:
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
spec:
description: ComponentDefinitionSpec defines the desired state
@@ -205,6 +222,35 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -212,7 +258,25 @@ spec:
enum:
- hcl
- 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
@@ -337,6 +401,23 @@ spec:
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
spec:
description: PolicyDefinitionSpec defines the desired state of
@@ -357,6 +438,11 @@ spec:
required:
- name
type: object
manageHealthCheck:
description: ManageHealthCheck means the policy will handle
health checking and skip application controller built-in
health checking.
type: boolean
schematic:
description: Schematic defines the data format and template
of the encapsulation of the policy definition
@@ -452,6 +538,35 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -459,7 +574,25 @@ spec:
enum:
- hcl
- 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
@@ -546,6 +679,23 @@ spec:
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
spec:
description: A TraitDefinitionSpec defines the desired state of
@@ -697,6 +847,35 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -704,7 +883,25 @@ spec:
enum:
- hcl
- 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
@@ -808,6 +1005,23 @@ spec:
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
spec:
description: WorkflowStepDefinitionSpec defines the desired state
@@ -923,6 +1137,35 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -930,7 +1173,25 @@ spec:
enum:
- hcl
- 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
@@ -974,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

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: envbindings.core.oam.dev
spec:
group: core.oam.dev
@@ -73,12 +73,44 @@ spec:
description: ApplicationComponent describe the component
of application
properties:
dependsOn:
items:
type: string
type: array
externalRevision:
description: ExternalRevision specified the component
revisionName
type: string
inputs:
description: StepInputs defines variable input of
WorkflowStep
items:
properties:
from:
type: string
parameterKey:
type: string
required:
- from
- parameterKey
type: object
type: array
name:
type: string
outputs:
description: StepOutputs defines output variable of
WorkflowStep
items:
properties:
name:
type: string
valueFrom:
type: string
required:
- name
- valueFrom
type: object
type: array
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
@@ -150,6 +182,15 @@ spec:
type: string
type: object
type: object
selector:
description: EnvSelector defines which components should this
env contains
properties:
components:
items:
type: string
type: array
type: object
required:
- name
- patch
@@ -176,7 +217,7 @@ spec:
status:
description: A EnvBindingStatus is the status of EnvBinding
properties:
cluster_decisions:
clusterDecisions:
items:
description: ClusterDecision recorded the mapping of environment
and cluster
@@ -228,6 +269,42 @@ spec:
description: EnvBindingPhase is a label for the condition of a EnvBinding
at the current time
type: string
resourceTracker:
description: ResourceTracker record the status of the ResourceTracker
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: object
type: object
served: true

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: healthscopes.core.oam.dev
spec:
group: core.oam.dev
@@ -402,6 +402,8 @@ spec:
- healthStatus
type: object
type: array
envName:
type: string
required:
- appName
type: object

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: initializers.core.oam.dev
spec:
group: core.oam.dev
@@ -63,6 +63,23 @@ spec:
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
spec:
description: ApplicationSpec is the spec of Application
@@ -72,12 +89,43 @@ spec:
description: ApplicationComponent describe the component
of application
properties:
dependsOn:
items:
type: string
type: array
externalRevision:
description: ExternalRevision specified the component
revisionName
type: string
inputs:
description: StepInputs defines variable input of WorkflowStep
items:
properties:
from:
type: string
parameterKey:
type: string
required:
- from
- parameterKey
type: object
type: array
name:
type: string
outputs:
description: StepOutputs defines output variable of
WorkflowStep
items:
properties:
name:
type: string
valueFrom:
type: string
required:
- name
- valueFrom
type: object
type: array
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
@@ -466,6 +514,10 @@ spec:
description: WorkflowStep defines how to execute a workflow
step.
properties:
dependsOn:
items:
type: string
type: array
inputs:
description: StepInputs defines variable input of
WorkflowStep
@@ -489,13 +541,13 @@ spec:
of WorkflowStep
items:
properties:
exportKey:
type: string
name:
type: string
valueFrom:
type: string
required:
- exportKey
- name
- valueFrom
type: object
type: array
properties:
@@ -515,6 +567,55 @@ spec:
status:
description: AppStatus defines the observed state of Application
properties:
appliedResources:
description: AppliedResources record the resources that the workflow
step apply.
items:
description: ClusterObjectReference defines the object reference
with cluster.
properties:
apiVersion:
description: API version of the referent.
type: string
cluster:
type: string
creator:
description: ResourceCreatorRole defines the resource
creator.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a
valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container
that triggered the event) or if no container name
is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to
have some well-defined way of referencing a part of
an object. TODO: this design is not final and this
field is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: array
components:
description: Components record the related Components created
by Application Controller
@@ -791,6 +892,8 @@ spec:
description: ApplicationComponentStatus record the health
status of App component
properties:
env:
type: string
healthy:
type: boolean
message:
@@ -982,13 +1085,16 @@ spec:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
stepIndex:
type: integer
mode:
description: WorkflowMode describes the mode of workflow
type: string
steps:
items:
description: WorkflowStepStatus record the status of
a workflow step
properties:
id:
type: string
message:
description: A human readable message indicating
details about why the workflowStep is in this
@@ -1005,83 +1111,50 @@ spec:
details about why the workflowStep is in this
state.
type: string
resourceRef:
description: 'ObjectReference contains enough information
to let you inspect or modify the referred object.
--- New uses of this type are discouraged because
of difficulty describing its usage when embedded
in APIs. 1. Ignored fields. It includes many
fields which are not generally honored. For instance,
ResourceVersion and FieldPath are both very rarely
valid in actual usage. 2. Invalid usage help. It
is impossible to add specific help for individual
usage. In most embedded usages, there are particular restrictions
like, "must refer only to types A and B" or "UID
not honored" or "name must be restricted". Those
cannot be well described when embedded. 3. Inconsistent
validation. Because the usages are different,
the validation rules are different by usage, which
makes it hard for users to predict what will happen. 4.
The fields are both imprecise and overly precise. Kind
is not a precise mapping to a URL. This can produce
ambiguity during interpretation and require
a REST mapping. In most cases, the dependency
is on the group,resource tuple and the version
of the actual struct is irrelevant. 5. We cannot
easily change it. Because this type is embedded
in many locations, updates to this type will
affect numerous schemas. Don''t make new APIs
embed an underspecified API type they do not control.
Instead of using this type, create a locally provided
and used type that is well-focused on your reference.
For example, ServiceReferences for admission registration:
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
.'
subSteps:
description: SubStepsStatus record the status of
workflow steps.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an
object instead of an entire object, this string
should contain a valid JSON/Go field access
statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to
a container within a pod, this would take
on a value like: "spec.containers{name}" (where
"name" refers to the name of the container
that triggered the event) or if no container
name is specified "spec.containers[2]" (container
with index 2 in this pod). This syntax is
chosen only to have some well-defined way
of referencing a part of an object. TODO:
this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More
info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which
this reference is made, if any. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
mode:
description: WorkflowMode describes the mode
of workflow
type: string
stepIndex:
type: integer
steps:
items:
description: WorkflowSubStepStatus record
the status of a workflow step
properties:
id:
type: string
message:
description: A human readable message
indicating details about why the workflowStep
is in this state.
type: string
name:
type: string
phase:
description: WorkflowStepPhase describes
the phase of a workflow step.
type: string
reason:
description: A brief CamelCase message
indicating details about why the workflowStep
is in this state.
type: string
type:
type: string
required:
- id
type: object
type: array
type: object
type:
type: string
required:
- id
type: object
type: array
suspend:
@@ -1089,7 +1162,7 @@ spec:
terminated:
type: boolean
required:
- contextBackend
- mode
- suspend
- terminated
type: object

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: manualscalertraits.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: policydefinitions.core.oam.dev
spec:
group: core.oam.dev
@@ -54,6 +54,10 @@ spec:
required:
- name
type: object
manageHealthCheck:
description: ManageHealthCheck means the policy will handle health
checking and skip application controller built-in health checking.
type: boolean
schematic:
description: Schematic defines the data format and template of the
encapsulation of the policy definition
@@ -147,6 +151,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -154,7 +185,24 @@ spec:
enum:
- hcl
- 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

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: resourcetrackers.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: scopedefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: traitdefinitions.core.oam.dev
spec:
group: core.oam.dev
@@ -188,6 +188,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -195,7 +222,24 @@ spec:
enum:
- hcl
- 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
@@ -453,6 +497,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -460,7 +531,24 @@ spec:
enum:
- hcl
- 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

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: workflowstepdefinitions.core.oam.dev
spec:
group: core.oam.dev
@@ -148,6 +148,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -155,7 +182,24 @@ spec:
enum:
- hcl
- 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
@@ -197,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

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: workloaddefinitions.core.oam.dev
spec:
group: core.oam.dev
@@ -193,6 +193,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -200,7 +227,24 @@ spec:
enum:
- hcl
- 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
@@ -439,6 +483,33 @@ 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
properties:
name:
description: Name of the referenced object.
type: string
namespace:
default: default
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
@@ -446,7 +517,24 @@ spec:
enum:
- hcl
- 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

@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
controller-gen.kubebuilder.io/version: v0.6.2
name: rollouts.standard.oam.dev
spec:
group: standard.oam.dev

View File

@@ -51,6 +51,16 @@ app.kubernetes.io/name: {{ include "kubevela.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{- define "kubevela-apiserver.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kubevela.name" . }}-apiserver
app.kubernetes.io/instance: {{ .Release.Name }}-apiserver
{{- end -}}
{{- define "kubevela-cluster-gateway.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kubevela.name" . }}-cluster-gateway
app.kubernetes.io/instance: {{ .Release.Name }}-cluster-gateway
{{- end -}}
{{/*
Create the name of the service account to use
*/}}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,264 @@
apiVersion: v1
data:
application: |
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
annotations:
addons.oam.dev/description: istio Controller is a Kubernetes Controller for manage
traffic.
name: istio
namespace: vela-system
spec:
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
}]
}
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
}]
},
]
}
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
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:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: istio Controller is a Kubernetes Controller for manage
traffic.
addons.oam.dev/name: istio
labels:
addons.oam.dev/type: istio
name: istio
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,43 +1,43 @@
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:
addons.oam.dev/description: KEDA is a Kubernetes-based Event Driven Autoscaler.
addons.oam.dev/name: keda
labels:
addons.oam.dev/type: keda
name: keda

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,187 +10,179 @@ 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-service
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-service
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\tif
parameter[\"imagePullSecrets\"] != _|_ {\n\t\t\t\t\t\timagePullSecrets:
[ for v in parameter.imagePullSecrets {name: v}]\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}\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:
addons.oam.dev/description: Kruise is a Kubernetes extended suite for application
automations
addons.oam.dev/name: kruise
labels:
addons.oam.dev/type: kruise
name: kruise

View File

@@ -1,39 +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
labels:
addons.oam.dev/type: ns-flux-system
name: ns-flux-system
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,127 +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: Add a datasource 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
labels:
addons.oam.dev/type: observability-asset
name: observability-asset
namespace: {{.Values.systemDefinitionNamespace}}

View File

@@ -1,143 +1,139 @@
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://grafana.github.io/helm-charts
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://raw.githubusercontent.com/oam-dev/grafana-registration/master/dashboards/kubevela_core_logging.json
- https://raw.githubusercontent.com/oam-dev/grafana-registration/master/dashboards/kubevela_core_monitoring.json
type: import-grafana-dashboard
type: helm
- name: loki
properties:
chart: loki-stack
releaseName: loki
repoType: helm
targetNamespace: observability
url: https://grafana.github.io/helm-charts
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://prometheus-community.github.io/helm-charts
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://prometheus-community.github.io/helm-charts
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:
addons.oam.dev/description: An out of the box solution for KubeVela observability
addons.oam.dev/name: observability
labels:
addons.oam.dev/type: observability
name: observability

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,36 +10,36 @@ 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:
addons.oam.dev/description: Prometheus is an open-source systems monitoring and
alerting toolkit
addons.oam.dev/name: prometheus
labels:
addons.oam.dev/type: prometheus
name: prometheus

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 Alibaba Cloud
addons.oam.dev/name: terraform-alibaba
name: terraform-alibaba
namespace: vela-system
spec:
components:
- name: alibaba-account-creds-[[ index .Args "providerName" ]]
properties:
apiVersion: v1
kind: Secret
metadata:
name: alibaba-account-creds-[[ index .Args "providerName" ]]
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: alibaba-[[ index .Args "providerName" ]]
properties:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: '[[ index .Args "providerName" ]]'
namespace: default
spec:
credentials:
secretRef:
key: credentials
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: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 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

@@ -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 Azure
addons.oam.dev/name: terraform-azure
name: terraform-azure
namespace: vela-system
spec:
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
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: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 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

@@ -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 Alibaba Cloud
addons.oam.dev/name: terraform/provider-alibaba
name: terraform-provider-alibaba
namespace: vela-system
spec:
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
source: Secret
provider: alibaba
region: '[[ index .Args "ALICLOUD_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 Alibaba Cloud
addons.oam.dev/name: terraform/provider-alibaba
labels:
addons.oam.dev/type: terraform-provider-alibaba
name: terraform-provider-alibaba
namespace: {{.Values.systemDefinitionNamespace}}

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

@@ -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 Azure
addons.oam.dev/name: terraform/provider-azure
name: terraform-provider-azure
namespace: vela-system
spec:
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
source: Secret
provider: azure
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 Azure
addons.oam.dev/name: terraform/provider-azure
labels:
addons.oam.dev/type: terraform-provider-azure
name: terraform-provider-azure
namespace: {{.Values.systemDefinitionNamespace}}

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: Terraform Controller is a Kubernetes Controller for
@@ -10,313 +10,591 @@ data:
name: terraform
namespace: vela-system
spec:
appTemplate:
spec:
components:
- name: terraform-controller
properties:
chart: ./chart
repoType: git
url: https://github.com/oam-dev/terraform-controller
type: helm
- name: terraform-system
properties:
apiVersion: v1
kind: Namespace
metadata:
name: terraform-system
type: raw
- name: alibaba-ack
properties:
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba
Cloud ACK cluster
type: terraform
name: alibaba-ack
namespace: vela-system
spec:
schematic:
terraform:
configuration: |
module "kubernetes" {
source = "github.com/zzxwill/terraform-alicloud-kubernetes"
new_nat_gateway = true
vpc_name = var.vpc_name
vpc_cidr = var.vpc_cidr
vswitch_name_prefix = var.vswitch_name_prefix
vswitch_cidrs = var.vswitch_cidrs
master_instance_types = var.master_instance_types
worker_instance_types = var.worker_instance_types
k8s_pod_cidr = var.k8s_pod_cidr
k8s_service_cidr = var.k8s_service_cidr
k8s_worker_number = var.k8s_worker_number
cpu_core_count = var.cpu_core_count
memory_size = var.memory_size
zone_id = var.zone_id
k8s_version = var.k8s_version
k8s_name_prefix = var.k8s_name_prefix
}
######################
# Instance types variables
######################
variable "cpu_core_count" {
description = "CPU core count is used to fetch instance types."
type = number
default = 4
}
variable "memory_size" {
description = "Memory size used to fetch instance types."
type = number
default = 8
}
######################
# VPC variables
######################
variable "vpc_name" {
description = "The vpc name used to create a new vpc when 'vpc_id' is not specified. Default to variable `example_name`"
type = string
default = "tf-k8s-vpc"
}
variable "vpc_cidr" {
description = "The cidr block used to launch a new vpc when 'vpc_id' is not specified."
type = string
default = "10.0.0.0/8"
}
######################
# VSwitch variables
######################
variable "vswitch_name_prefix" {
type = string
description = "The vswitch name prefix used to create several new vswitches. Default to variable 'example_name'."
default = "tf-k8s-vsw"
}
variable "number_format" {
description = "The number format used to output."
type = string
default = "%02d"
}
variable "vswitch_ids" {
description = "List of existing vswitch id."
type = list
default = []
}
variable "vswitch_cidrs" {
description = "List of cidr blocks used to create several new vswitches when 'vswitch_ids' is not specified."
type = list
default = [
"10.1.0.0/16",
"10.2.0.0/16",
"10.3.0.0/16"]
}
variable "k8s_name_prefix" {
description = "The name prefix used to create several kubernetes clusters. Default to variable `example_name`"
type = string
default = "poc"
}
variable "new_nat_gateway" {
type = bool
description = "Whether to create a new nat gateway. In this template, a new nat gateway will create a nat gateway, eip and server snat entries."
default = true
}
variable "master_instance_types" {
description = "The ecs instance types used to launch master nodes."
type = list
default = [
# hongkong
"ecs.sn1ne.xlarge",
# hongkong
"ecs.c6.xlarge",
# hongkong
"ecs.c4.xlarge",
# hongkong
"ecs.c5.xlarge",
"ecs.n4.xlarge",
# "ecs.n1.large",
# "ecs.sn1.large",
# "ecs.s6-c1m2.xlarge",
# "ecs.c6e.xlarge"
]
}
variable "worker_instance_types" {
description = "The ecs instance types used to launch worker nodes."
type = list
default = [
# hongkong
"ecs.sn1ne.xlarge",
# hongkong
"ecs.c6.xlarge",
# hongkong
"ecs.c4.xlarge",
# hongkong
"ecs.c6e.xlarge",
"ecs.n4.xlarge",
// "ecs.n1.large",
// "ecs.sn1.large",
// "ecs.s6-c1m2.xlarge"
]
}
variable "node_cidr_mask" {
type = number
description = "The node cidr block to specific how many pods can run on single node. Valid values: [24-28]."
default = 24
}
variable "enable_ssh" {
description = "Enable login to the node through SSH."
type = bool
default = true
}
variable "install_cloud_monitor" {
description = "Install cloud monitor agent on ECS."
type = bool
default = true
}
variable "cpu_policy" {
type = string
description = "kubelet cpu policy. Valid values: 'none','static'. Default to 'none'."
default = "none"
}
variable "proxy_mode" {
description = "Proxy mode is option of kube-proxy. Valid values: 'ipvs','iptables'. Default to 'iptables'."
type = string
default = "iptables"
}
variable "password" {
description = "The password of ECS instance."
type = string
default = "Just4Test"
}
variable "k8s_worker_number" {
description = "The number of worker nodes in kubernetes cluster."
type = number
default = 2
}
# k8s_pod_cidr is only for flannel network
variable "k8s_pod_cidr" {
description = "The kubernetes pod cidr block. It cannot be equals to vpc's or vswitch's and cannot be in them."
type = string
default = "172.20.0.0/16"
}
variable "k8s_service_cidr" {
description = "The kubernetes service cidr block. It cannot be equals to vpc's or vswitch's or pod's and cannot be in them."
type = string
default = "192.168.0.0/16"
}
variable "k8s_version" {
description = "The version of the kubernetes version. Valid values: '1.16.6-aliyun.1','1.14.8-aliyun.1'. Default to '1.16.6-aliyun.1'."
type = string
default = "1.20.4-aliyun.1"
}
variable "zone_id" {
description = "Availability Zone ID"
type = string
default = "cn-hongkong-b"
# "cn-beijing-a"
}
output "name" {
value = module.kubernetes.name
}
output "kubeconfig" {
value = module.kubernetes.kubeconfig
}
output "cluster_ca_cert" {
value = module.kubernetes.cluster_ca_cert
}
output "client_cert" {
value = module.kubernetes.client_cert
}
output "client_key" {
value = module.kubernetes.client_key
}
output "api_server_internet" {
value = module.kubernetes.api_server_internet
}
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-oss
properties:
apiVersion: core.oam.dev/v1alpha2
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba
Cloud OSS object
type: terraform
name: alibaba-oss
spec:
schematic:
terraform:
configuration: "resource \"alicloud_oss_bucket\" \"bucket-acl\" {\n
\ bucket = var.bucket\n acl = var.acl\n}\noutput \"BUCKET_NAME\"
{\n value = \"${alicloud_oss_bucket.bucket-acl.bucket}.${alicloud_oss_bucket.bucket-acl.extranet_endpoint}\"\n}\nvariable
\"bucket\" {\n description = \"OSS bucket name\"\n default = \"vela-website\"\n
\ type = string\n}\nvariable \"acl\" {\n description = \"OSS bucket
ACL, supported 'private', 'public-read', 'public-read-write'\"\n
\ default = \"private\"\n type = string\n} \n"
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-rds
properties:
apiVersion: core.oam.dev/v1alpha2
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba
Cloud RDS object
type: terraform
name: alibaba-rds
spec:
schematic:
terraform:
configuration: "module \"rds\" {\n source = \"terraform-alicloud-modules/rds/alicloud\"\n
\ engine = \"MySQL\"\n engine_version = \"8.0\"\n instance_type
= \"rds.mysql.c1.large\"\n instance_storage = \"20\"\n instance_name
= var.instance_name\n account_name = var.account_name\n password
= var.password\n}\noutput \"DB_NAME\" {\n value = module.rds.this_db_instance_name\n}\noutput
\"DB_USER\" {\n value = module.rds.this_db_database_account\n}\noutput
\"DB_PORT\" {\n value = module.rds.this_db_instance_port\n}\noutput
\"DB_HOST\" {\n value = module.rds.this_db_instance_connection_string\n}\noutput
\"DB_PASSWORD\" {\n value = module.rds.this_db_instance_port\n}\nvariable
\"instance_name\" {\n description = \"RDS instance name\"\n type
= string\n default = \"poc\"\n}\nvariable \"account_name\" {\n
\ description = \"RDS instance user account name\"\n type = string\n
\ default = \"oam\"\n}\nvariable \"password\" {\n description =
\"RDS instance account password\"\n type = string\n default =
\"Xyfff83jfewGGfaked\"\n} \n"
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
status:
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
dependsOn:
- ref:
components:
- name: terraform-controller
properties:
chart: terraform-controller
repoType: helm
url: https://charts.kubevela.net/addons
version: 0.2.10
type: helm
- name: alibaba-redis
properties:
apiVersion: core.oam.dev/v1beta1
kind: Initializer
name: fluxcd
namespace: vela-system
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
Redis
labels:
type: terraform
name: alibaba-redis
namespace: vela-system
spec:
schematic:
terraform:
configuration: https://github.com/kubevela-contrib/terraform-modules/alibaba/redis
type: remote
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-ack
properties:
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
ACK cluster
labels:
type: terraform
name: alibaba-ack
namespace: vela-system
spec:
schematic:
terraform:
configuration: https://github.com/kubevela-contrib/terraform-modules.git
path: alibaba/cs/dedicated-kubernetes
type: remote
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-ask
properties:
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
Serverless Kubernetes (ASK)
labels:
type: terraform
name: alibaba-ask
namespace: vela-system
spec:
schematic:
terraform:
configuration: https://github.com/kubevela-contrib/terraform-modules.git
path: alibaba/cs/serverless-kubernetes
type: remote
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-eip
properties:
apiVersion: core.oam.dev/v1alpha2
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
Elastic IP
labels:
type: terraform
name: alibaba-eip
namespace: vela-system
spec:
schematic:
terraform:
configuration: https://github.com/oam-dev/terraform-alibaba-eip.git
type: remote
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-oss
properties:
apiVersion: core.oam.dev/v1alpha2
kind: ComponentDefinition
metadata:
annotations:
cloud-resource/console-url: https://oss.console.aliyun.com/bucket/oss-{ALICLOUD_REGION}/{BUCKET_NAME}/overview
cloud-resource/identifier: BUCKET_NAME
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
OSS object
labels:
type: terraform
name: alibaba-oss
namespace: vela-system
spec:
schematic:
terraform:
configuration: "resource \"alicloud_oss_bucket\" \"bucket-acl\" {\n bucket
= var.bucket\n acl = var.acl\n}\noutput \"BUCKET_NAME\" {\n value
= \"${alicloud_oss_bucket.bucket-acl.bucket}.${alicloud_oss_bucket.bucket-acl.extranet_endpoint}\"\n}\nvariable
\"bucket\" {\n description = \"OSS bucket name\"\n default = \"vela-website\"\n
\ type = string\n}\nvariable \"acl\" {\n description = \"OSS bucket
ACL, supported 'private', 'public-read', 'public-read-write'\"\n default
= \"private\"\n type = string\n} \n"
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-rds
properties:
apiVersion: core.oam.dev/v1alpha2
kind: ComponentDefinition
metadata:
annotations:
cloud-resource/console-url: https://rdsnext.console.aliyun.com/detail/{DB_ID}/basicInfo?&region={ALICLOUD_REGION}
cloud-resource/identifier: DB_ID
cloud-resource/sensitive-outputs: DB_PASSWORD
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
RDS object
labels:
type: terraform
name: alibaba-rds
namespace: vela-system
spec:
schematic:
terraform:
configuration: |
module "rds" {
source = "github.com/kubevela-contrib/terraform-alicloud-rds"
engine = "MySQL"
engine_version = "8.0"
instance_type = "rds.mysql.c1.large"
instance_storage = "20"
instance_name = var.instance_name
account_name = var.account_name
password = var.password
allocate_public_connection = var.allocate_public_connection
security_ips = ["0.0.0.0/0",]
}
output "DB_ID" {
value = module.rds.db_instance_id
}
output "DB_NAME" {
value = module.rds.this_db_instance_name
}
output "DB_USER" {
value = module.rds.this_db_database_account
}
output "DB_PORT" {
value = module.rds.this_db_instance_port
}
output "DB_HOST" {
value = module.rds.this_db_instance_connection_string
}
output "DB_PASSWORD" {
value = var.password
}
output "DB_PUBLIC_HOST" {
value = module.rds.db_public_connection_string
}
variable "instance_name" {
description = "RDS instance name"
type = string
default = "poc"
}
variable "account_name" {
description = "RDS instance user account name"
type = string
default = "oam"
}
variable "password" {
description = "RDS instance account password"
type = string
default = "Xyfff83jfewGGfaked"
}
variable "allocate_public_connection" {
description = "Whether to allocate public connection for a RDS instance."
type = bool
default = true
}
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-sls-project
properties:
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
SLS Project
labels:
type: terraform
name: alibaba-sls-project
namespace: vela-system
spec:
schematic:
terraform:
configuration: https://github.com/kubevela-contrib/terraform-modules.git
path: alibaba/sls/project
type: remote
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-sls-store
properties:
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
SLS Store
labels:
type: terraform
name: alibaba-sls-store
namespace: vela-system
spec:
schematic:
terraform:
configuration: https://github.com/kubevela-contrib/terraform-modules.git
path: alibaba/sls/store
type: remote
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-vpc
properties:
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
VPC
labels:
type: terraform
name: alibaba-vpc
namespace: vela-system
spec:
schematic:
terraform:
configuration: https://github.com/kubevela-contrib/terraform-modules.git
path: alibaba/vpc
type: remote
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: alibaba-vswitch
properties:
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Alibaba Cloud
VSwitch
labels:
type: terraform
name: alibaba-vswitch
namespace: vela-system
spec:
schematic:
terraform:
configuration: https://github.com/kubevela-contrib/terraform-modules.git
path: alibaba/vswitch
type: remote
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: aws-s3
properties:
apiVersion: core.oam.dev/v1alpha2
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for AWS S3
labels:
type: terraform
name: aws-s3
namespace: vela-system
spec:
schematic:
terraform:
configuration: |
resource "aws_s3_bucket" "bucket-acl" {
bucket = var.bucket
acl = var.acl
}
output "BUCKET_NAME" {
value = aws_s3_bucket.bucket-acl.bucket_domain_name
}
variable "bucket" {
description = "S3 bucket name"
default = "vela-website"
type = string
}
variable "acl" {
description = "S3 bucket ACL"
default = "private"
type = string
}
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: azure-database-mariadb
properties:
apiVersion: core.oam.dev/v1alpha2
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Azure Database
Mariadb
provider: azure
labels:
type: terraform
name: azure-database-mariadb
namespace: vela-system
spec:
schematic:
terraform:
configuration: |
# Configure the Microsoft Azure Provider
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "example" {
name = var.resource_group
location = var.location
}
resource "azurerm_mariadb_server" "example" {
name = var.server_name
location = var.location
resource_group_name = azurerm_resource_group.example.name
sku_name = "B_Gen5_2"
storage_mb = 51200
backup_retention_days = 7
geo_redundant_backup_enabled = false
administrator_login = var.username
administrator_login_password = var.password
version = "10.2"
ssl_enforcement_enabled = true
}
resource "azurerm_mariadb_database" "example" {
name = var.db_name
resource_group_name = azurerm_resource_group.example.name
server_name = azurerm_mariadb_server.example.name
charset = "utf8"
collation = "utf8_general_ci"
}
variable "server_name" {
type = string
description = "mariadb server name"
default = "mariadb-svr-sample"
}
variable "db_name" {
default = "backend"
type = string
description = "Database instance name"
}
variable "username" {
default = "acctestun"
type = string
description = "Database instance username"
}
variable "password" {
default = "H@Sh1CoR3!faked"
type = string
description = "Database instance password"
}
variable "location" {
description = "Azure location"
type = string
default = "West Europe"
}
variable "resource_group" {
description = "Resource group"
type = string
default = "kubevela-group"
}
output "SERVER_NAME" {
value = var.server_name
}
output "DB_NAME" {
value = var.db_name
}
output "DB_USER" {
value = var.username
}
output "DB_PASSWORD" {
sensitive = true
value = var.password
}
output "DB_PORT" {
value = "3306"
}
output "DB_HOST" {
value = azurerm_mariadb_server.example.fqdn
}
providerRef:
name: azure
namespace: default
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
- name: azure-storage-account
properties:
apiVersion: core.oam.dev/v1alpha2
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Terraform configuration for Azure Blob Storage
Account
provider: azure
labels:
type: terraform
name: azure-storage-account
namespace: vela-system
spec:
schematic:
terraform:
configuration: |
# Configure the Microsoft Azure Provider
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "rsg" {
count = var.create_rsg ? 1 : 0
name = var.resource_group_name
location = var.location
}
resource "azurerm_storage_account" "sa" {
name = var.name
resource_group_name = var.create_rsg ? azurerm_resource_group.rsg[0].name : var.resource_group_name
location = var.location
account_tier = "Standard"
account_replication_type = "GRS"
enable_https_traffic_only = true
dynamic "static_website" {
for_each = var.static_website
content {
index_document = static_website.value["index_document"]
error_404_document = static_website.value["error_404_document"]
}
}
tags = var.tags
}
variable "create_rsg" {
description = "Conditional if resource group should be created. Defaults to 'true'."
type = bool
default = true
}
variable "resource_group_name" {
description = "Name of resource group. Defaults to 'rsg'."
type = string
default = "rsg"
}
variable "name" {
description = "Name of storage account. Defaults to 'storageaccount'."
type = string
default = "storageaccount"
}
variable "location" {
description = "Location of storage account. Defaults to 'West Europe'."
type = string
default = "West Europe"
}
variable "tags" {
description = "Tags for storage account. Defaults to '{}'."
type = map(string)
default = {}
}
variable "static_website" {
description = "Static website configuration. Defaults to disabled."
type = list(map(string))
default = [{
index_document = null
error_404_document = null
}]
}
output "BLOB_CONNECTION_STRING" {
description = "Blob storage connection string"
sensitive = true
value = azurerm_storage_account.sa.primary_connection_string
}
output "BLOB_WEB_ENDPOINT" {
description = "Blob storage static web endpoint"
value = azurerm_storage_account.sa.primary_web_endpoint
}
providerRef:
name: azure
namespace: default
workload:
definition:
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
type: raw
workflow:
steps:
- name: ""
properties:
name: fluxcd
namespace: vela-system
type: depends-on-app
- name: ""
type: apply-application
status:
observedGeneration: 0
rollout:
batchRollingState: ""
currentBatch: 0
lastTargetAppRevision: ""
rollingState: ""
upgradedReadyReplicas: 0
upgradedReplicas: 0
kind: ConfigMap
metadata:
annotations:
addons.oam.dev/description: Terraform Controller is a Kubernetes Controller for
Terraform.
addons.oam.dev/name: terraform
labels:
addons.oam.dev/type: terraform
name: terraform

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