Compare commits

..

417 Commits
v0.0.1 ... main

Author SHA1 Message Date
am6737 9c8cc5d816
fix: Prevent crashes when accessing cluster details (#911)
- Added optional chaining to safely access cluster details in `AddClusterDialog`.

This fix addresses the issue where the page crashes when trying to load details for an inaccessible cluster.

Signed-off-by: am6737 <1359816810@qq.com>
2025-03-13 09:43:00 +05:30
am6737 0d00d92f55
fix: Set default values for traits in VelaUX (#913)
Added `setDefaultProperties` to ensure default values are correctly set for traits like "cpuscaler", "hpa", "resource", and "k8s-update-strategy".

Signed-off-by: am6737 <1359816810@qq.com>
2025-03-13 09:40:29 +05:30
PushparajShetty 021024e4af
Fix: Modified error message for invalid pwd and username (#918)
* Modified error message for invalid pwd and username

Signed-off-by: viskumar <viskumar@guidewire.com>

* changed the actions/cache version to v4

Signed-off-by: Vibhor Chinda <vibhorchinda@gmail.com>

* Fix: permission for PR labeling

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: viskumar <viskumar@guidewire.com>
Signed-off-by: Vibhor Chinda <vibhorchinda@gmail.com>
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Co-authored-by: viskumar <viskumar@guidewire.com>
Co-authored-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-03-13 09:26:50 +05:30
am6737 d9b7ae102f
feat: improve Helm charts values.yaml popup (#909)
- Added custom width (60vw) to Helm values.yaml dialog for better visibility.
- Enabled close modes: 'close' and 'mask' to improve user experience.

Closes #851

Signed-off-by: am6737 <1359816810@qq.com>
2024-10-10 13:36:59 +08:00
am6737 8e11f93ed7
Fix(addons): Align Button with Title in AddonDetailDialog (#915)
Signed-off-by: am6737 <1359816810@qq.com>
2024-10-09 18:24:09 +08:00
Anoop Gopalakrishnan 5704854899
Chore: Bump versions (#905)
* Chore: Bump versions

- Golang
- Kubernetes version in kubebuilder
- Ubuntu version

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Bump golang version

- Bump the github action versions

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Bump golang and github actions versions

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Bump golang and github action versions

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore(debug): Downgrade kubebuilder k8s version

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore(debug): Use makefile for kubebuilder install

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore(debug): Set kubernetes version in kubebuilder

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Bump all actions versions

- And golang versions

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore(debug): Bump versions

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: Bump versions

- Updated golang version in go.mod
- Updated staticcheck version

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Bump versions

- Update the golangci-lint version

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Bump versions

- Fix lint/staticcheck issues

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Bump versions

- Fix lint issues

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Bump versions

- Fix lint issues

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2024-07-11 16:01:28 +05:30
Oana Schipor 73334e7516
Fix: Username length in projects users to match users (#904)
* truncating username in vela_project_user to match vela_user username

Signed-off-by: Oana Schipor <oana.schipor@vortexa.com>

* update fn

Signed-off-by: Oana Schipor <oana.schipor@vortexa.com>

* Remove old k8s version

Signed-off-by: Oana Schipor <oana.schipor@vortexa.com>

---------

Signed-off-by: Oana Schipor <oana.schipor@vortexa.com>
2024-07-04 20:46:27 +05:30
Bob 127f5325e9
fix: fix swgger.json (#891)
* Update swagger.json by `make update-swagger`.
* Returns a predefined structure instead of a map object to avoid Swagger being unable to generate code correctly
* Delete duplicate runtimes_cluster parameter definition to avoid the code constructed by swagger being unusable
* Add swagger 3.0.json to facilitate developers debugging APIs on the swagger UI.

Signed-off-by: 上郡 <shangjun.csb@alibaba-inc.com>
Co-authored-by: 上郡 <shangjun.csb@alibaba-inc.com>
2023-12-05 13:03:22 +08:00
Bob d5ea29f5ab
fix: fix some typo errors (#890)
Signed-off-by: 上郡 <shangjun.csb@alibaba-inc.com>
Co-authored-by: 上郡 <shangjun.csb@alibaba-inc.com>
2023-12-05 12:52:21 +08:00
dependabot[bot] 2ab672c09a
Chore(deps): Bump get-func-name from 2.0.0 to 2.0.2 (#880)
Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-30 19:49:50 -05:00
Neeraj Gartia 4579408f62
Fix: Enables translate error property of `gorm` (#877) 2023-09-15 13:58:26 +08:00
qiaozp d14a2b6538
Chore: unify sql data driver implementation (#873) 2023-09-07 11:44:59 +08:00
qiaozp 7937d098d5
Feat: support exit-on-lost-leader flag (#868) 2023-08-08 13:45:35 +08:00
qiaozp 8438aa72e9
Fix: fail to get global helm config secret (#867)
* Fix: fail to get global config when config not exist in project scope

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Add unit test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add test clean up

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: infinite forloop

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* restore 404

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-08-02 20:19:11 +08:00
Namo 27b45c265c
Feat: Add support for OpenGauss database types (#865)
Signed-off-by: ligjn <lgj112113@163.com>

change opengauss to postgres

Co-authored-by: ligjn <lgj112113@163.com>
2023-08-01 21:26:26 +08:00
zuoningz d0b2a3b995
Fix: incorrect API response mark (#864)
Co-authored-by: Z Zhang <zuoning@AndrewZs-MacBook-Air.local>
2023-07-27 17:42:23 +08:00
qiaozp 3978079cfd
Fix: additionalPropertis in openapi schema converted to uischema wrongly (#861)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-07-22 19:36:26 +08:00
qiaozp 76a39a7b99
Fix: CodeQL job fails (#860)
* Fix: CodeQL job fails

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: code lint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: code lint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: code lint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-07-21 10:41:58 +08:00
dependabot[bot] 470699b3fb
Chore(deps): Bump semver from 5.7.1 to 5.7.2 (#853)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 16:59:46 +08:00
dependabot[bot] 2570713556
Chore(deps): Bump word-wrap from 1.2.3 to 1.2.4 (#858)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 15:27:38 +08:00
zuoningz 0e56cec6b5
Fix: applied default cluster to created target (#857)
Co-authored-by: Z Zhang <zuoning@AndrewZs-MacBook-Air.local>
2023-07-18 16:04:43 +08:00
mujinhuakai 8a81aa1e1d
Fix: customized uiSchema can't show properly (#854)
Co-authored-by: liyanfang <liyanfang@cmss.chinamobile.com>
2023-07-14 14:36:18 +08:00
qiaozp 28dea8a27e
Fix: cloudshell scheme not found (#856)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-07-14 09:56:36 +08:00
Neeraj Gartia 118a9fee6c
Feat: adds support of mongodb urls with prefix `mongodb+srv://` (#849) 2023-06-28 14:32:18 +08:00
Neeraj Gartia 580372f9d0
Feat: add MySQL data store driver implementation (#841) 2023-06-26 21:25:20 +08:00
qiaozp ff8382cba0
Feat: upgrade kubevela and pkg (#848)
* Feat: upgrade kubevela and pkg

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reviewable

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix nil pointer

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Migrate cloudprovider

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Upgrade ginkgo to v2

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix: add cloudshell to scheme

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: ginkgo by clause

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: addon dependency test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* rollback pending test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-06-26 08:40:38 +08:00
qiaozp 7a81518059
Chore: remove acr image (#844) 2023-06-21 09:57:11 +08:00
qiaozp c50db158f0
Chore: Add codeowner (#840)
* Add codeowner

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Unify file ext

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-06-16 14:11:19 +08:00
qiaozp 04aa7e9aea
Fix: application table view crash when app have no labels (#842)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-06-13 18:56:30 +08:00
JohnJan 2931e13f48
Feat: add docker-build makefile (#837) 2023-06-12 14:03:54 +08:00
Neeraj Gartia 1c7641efa0
Feat: add info about other custom triggers (#836) 2023-06-09 16:44:50 +08:00
Neeraj Gartia c01aa00c54
Feat: add MySQL database driver (#825) 2023-06-09 14:11:07 +08:00
qiaozp 80a0acc129
Chore: upgrade yarn version (#838)
* Chore: upgrade yarn version

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix the varn version to 3.6.0

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-06-09 10:27:39 +08:00
qiaozp d2ecefa937
Feat: add plugin enable/disable sub-page (#764)
* Feat: add plugin download API

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: add plugin download API

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: add uninstall plugin API

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: remove plugin in memory when uninstall

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: use empty response

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Add plugin enable/disable sub-page

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Dynamic detect icon link

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Show config page

install test

add uninstall

export plugin api to @velaux/ui

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* refactor, style

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reviewable

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix url gone after install

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove log

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* standalone config page

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* rollback changes to addon cards

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix enter config page loading app

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* clean up model

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Move addon interface to @velaux/data

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* clean up logs

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* refactor files

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* migrate interface, add save&reload button to config page

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove committed .DS_Store

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Remove hack

Remove icon test
remove checkimage

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix code alert

Fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove /public/plugin constraint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* optimize the page style, usage

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Merge all relative imports from velaux/data

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove restriction when request module.js

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix image build

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix build

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-06-01 21:18:04 +08:00
Neeraj Gartia e3453aea56
Feat: support to approve, terminate and rollback workflow by custom triggers (#797)
* add approve,terminate,rollback actions

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* feat: execute action clubbed with older one

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* feat: adds test

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* feat: modified tests

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* feat: fix unit-test errors

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* feat: some minor changes

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* feat: added some variables

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* feat: some minor changes

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

---------

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2023-06-01 20:43:47 +08:00
qiaozp 0ad6d36f7a
Fix: server test fails for k3d version (#826)
* Fix: server test fails for k3d version

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* keep v1.21

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: velaql test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-05-22 09:55:33 +08:00
Neeraj Gartia c55b911a64
chore: adds setup testing server steps to makefile (#821)
Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2023-05-18 11:04:06 +08:00
Jaychou 3622218201
Fix: Modify advanced parameters to align left (#817)
* Fix:Modify advanced parameters to align left

Signed-off-by: jiaxiaolei <584736476@qq.com>

* Remove Left Aligned Style

Signed-off-by: jiaxiaolei <584736476@qq.com>

---------

Signed-off-by: jiaxiaolei <584736476@qq.com>
2023-05-18 10:50:36 +08:00
qiaozp 04715c77bd
Fix: prevent caching js when http code isn't 200 (#814)
* Fix: prevent caching js when http code isn't 200

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Strict cache output

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove danger log

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-05-10 09:58:23 +08:00
qiaozp 448905e9c6
Add CI auto restart command (#815)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-05-10 09:57:25 +08:00
JohnJan 55380e2678
Fix: mongodb adds data model to set update time (#808) 2023-05-09 10:59:25 +08:00
qiaozp 872f1626e7
Fix list user projects panic (#810)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-05-09 09:59:51 +08:00
qiaozp 2509508f93
Chore: upgrade yarn to 3.5.1 (#809) 2023-05-08 20:59:28 +08:00
barnettZQG 847af3b2a6
Fix: User can't be updated (#800) 2023-04-28 11:48:51 +08:00
barnettZQG 92d097ce40
Fix: Check the permission before request the compare API (#802) 2023-04-28 11:34:59 +08:00
barnettZQG 6fe131b311
Fix: Show policy type when editing the policy (#803) 2023-04-28 11:33:06 +08:00
barnettZQG f051bb5579
Chore: Add @chivalryq and @wangyikewxgm as the code owner (#795)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-28 11:05:26 +08:00
mujinhuakai 6bd27dd7c0
Fix: Application Graph displays exception stack trace (#796)
* Application Graph displays exception stack trace

Signed-off-by: liyanfang <liyanfang@cmss.chinamobile.com>

* Fix: Application Graph displays exception stack trace

Signed-off-by: liyanfang <liyanfang@cmss.chinamobile.com>

---------

Signed-off-by: liyanfang <liyanfang@cmss.chinamobile.com>
Co-authored-by: liyanfang <liyanfang@cmss.chinamobile.com>
2023-04-28 09:55:54 +08:00
Jaychou 7bc6b2fade
Fix: Modifying Memory Units (#792)
Signed-off-by: jiaxiaolei <584736476@qq.com>
2023-04-27 10:07:35 +08:00
barnettZQG 22d4c14ff1
Fix: Remove the label confluct checking (#786)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-24 17:23:57 +08:00
barnettZQG e8af00e0cc
Fix: The sub length of the dex user more than 31 (#785)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-24 17:23:25 +08:00
JohnJan b0c407fd40
Feat: upgrade k8s.io to 0.26 and kubevela to 1.9.0 (#783)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-23 16:14:46 +08:00
Tianxin Dong eca8d1d6f1
Fix: fix rollback sync and terminate case (#781)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-19 16:55:28 +08:00
barnettZQG cff8c89f22
Chore: Add the guide for the plugin developer (#780)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-18 15:49:11 +08:00
barnettZQG 47f2313215
Fix: Add the prepare step for the canary workflow (#779)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-17 17:58:07 +08:00
barnettZQG dabd21b1ce
Fix: Can't submit the platform settings (#778)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-17 15:03:06 +08:00
barnettZQG 000b65c1eb
Feat: Support to compress and cache the static files (#777)
* Feat: Support to compress and cache the static files

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-17 09:48:37 +08:00
barnettZQG d3985d157f
Fix: The latest workflow records are not loaded (#776)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-16 21:47:58 +08:00
barnettZQG 3cae9e146f
Chore: Add the package release shell (#767)
* Chore: Add the package release shell

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Update the package.json

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Install @parcel/watcher fails on ARM

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-16 10:22:37 +08:00
barnettZQG dabefee0f7
Feat: Move the grafana navigation to the extension workspace (#774)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-16 09:04:33 +08:00
Tianxin Dong ac9493fc0d
Fix: fix sync when restarting the application (#775)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-16 09:04:12 +08:00
yikuaibro f821bf2e30
Fix: Add custom annotation add for application edit page (#770)
* Fix: Add custom annotation add for application edit page

Signed-off-by: li <1312513963@qq.com>

* update

Signed-off-by: li <1312513963@qq.com>

* update

Signed-off-by: li <1312513963@qq.com>

* Do not override internal annotations

Signed-off-by: li <1312513963@qq.com>

---------

Signed-off-by: li <1312513963@qq.com>
2023-04-15 23:20:31 +08:00
Tianxin Dong 118ea99f5b
Fix: fix sync and the status of sub steps (#765)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-14 22:20:34 +08:00
barnettZQG 17d562e091
Fix: Simplify the workspace menus (#766)
* Fix: Simplify the workspace menus

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: support querying the time of joining project

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the field type

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-14 09:56:21 +08:00
barnettZQG 41943d7367
Feat: Sync all admin users to Dex server (#763)
* Feat: Sync all admin users to dex server

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-13 23:03:12 +08:00
barnettZQG 7a3ea7de3a
Fix: Add some localization configs (#762)
* Fix: Add some local configs

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Check permission

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change some words

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-13 15:53:43 +08:00
barnettZQG 755d894368
Fix: Load the workflow by the record (#761)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-13 11:51:26 +08:00
barnettZQG e5cfebce5b
Fix: Page crashed when there is no application (#760)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-13 11:01:29 +08:00
barnettZQG c0bdfa4702
Fix: Can't create the config (#759)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-12 20:39:41 +08:00
wyike e3491b2c4d
Feat: add interface to list all workflow records from an env (#756)
* add list all workflow records from one env

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add check rules

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* merge two queries to 1

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix go lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-12 20:39:10 +08:00
barnettZQG 2c099d1691
Chore: Add a workflow to test building arm64 image (#758)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-12 20:38:29 +08:00
barnettZQG 79676fee73
Fix: enhance the canary rollout setting (#752)
* Fix: enhance the canary rollout setting

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: Support multiple workflows for one env

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: Enhance some code

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-12 18:52:13 +08:00
barnettZQG 3656e04e50
Feat: Add the header for the workflow status page (#753)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-12 14:00:18 +08:00
Tianxin Dong dc7a9ce6c5
Feat: add mode in steps for step group (#746)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-11 13:54:23 +08:00
qiaozp e2a709661a
Feat: Add the plugin management API (#747)
* Feat: Add the plugin management API

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Implement plugin mamage API

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* imports

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Add plugin e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix CheckPerm panic

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

add enabled filed to mangedPluginDTO

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Add mergeMap ut

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

remove focus

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix ut

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* code lint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* clarify manage plugin APIs, add e2e tests

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reviewable

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-11 10:56:10 +08:00
barnettZQG 49a3a0303f
Fix: Translation component is not default (#750)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-10 16:56:56 +08:00
Basuotian 9bbb0b9daa
fix uiType 'Numbers' in default ui schema (#744)
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-04-10 09:42:26 +08:00
mujinhuakai 2fae9e60ab
The depends on options do not show properly when adding new component (#749)
Signed-off-by: liyanfang <liyanfang@cmss.chinamobile.com>
Co-authored-by: liyanfang <liyanfang@cmss.chinamobile.com>
2023-04-10 09:38:52 +08:00
wyike 5fbb7912d1
Feat: collect app status from all envs (#745)
* collect app status from all envs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

debug

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-07 14:34:07 +08:00
barnettZQG 6b33036e96
Feat: Add the backend plugin framework (#740)
* Feat: Add the backend plugin framework

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add some unit tests

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the package order

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: make the node dashboard plugin to work

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: Support to prxoy the multiple cluster API

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: Change the menu

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Can't build ui package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change some words

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-04-05 08:00:01 +08:00
Tianxin Dong ace7606010
Feat: add kubevela bot in github workflow (#743)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-04 17:33:50 +08:00
qiaozp 1dec098f08
Feat: add button loading style (#741) 2023-04-04 13:50:12 +08:00
qiaozp bceaad7ee9
Feat: force reset password when first time login (#716)
* Force reset password when first time login

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Add test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

add initialize admin twice test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

use es6 braces code format

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

lint style and remove init admin

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

fix tests

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

remove the legacy admin init logic

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

remove all model.DefaultAdminUserName in non-test file

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove model.DefaultAdminUserName in test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* tidy code

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reviewable

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix unit test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix unit test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix auth ut

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix dex login test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix broken configure admin ut

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix auth ut

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reviewable

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add debug log

remove addon enable process before e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove debug info

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-04-04 09:57:18 +08:00
Basuotian 903bcaefd4
Feat: support download pod lods in velaux (#739)
* feat: support download pod lods in velaux

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* make download function reusable

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* remove unused translation

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

---------

Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-04-03 17:40:11 +08:00
Tianxin Dong d2582ed9a9
Chore: refactor workflow status syncer with informer (#723)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-30 22:08:53 +08:00
Basuotian 30988cfe27
fix config yarn2 in vscode (#738)
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-03-30 21:52:25 +08:00
barnettZQG 89581ba1ef
Fix: UI crash when the plugin doesn't build. (#737)
* Fix: UI crash when the plugin doesn't build.

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: ignore the js file in the pkg dir

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-30 21:02:16 +08:00
caiqi1111 4ca9085e75
Feat: support get secret from project config for helm chart (#698)
* Feat: support get secret from project config for helm chart

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Feat: support get secret from project config for helm chart

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Feat: support get secret from project config for helm chart

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Feat: support get secret from project config for helm chart

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Feat: support get secret from project config for helm chart

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Feat: support get secret from project config for helm chart

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Feat: support get secret from project config for helm chart

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

---------

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
2023-03-30 13:47:22 +08:00
barnettZQG ce2a5f83d4
Fix: Enhance the code style (#732)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-30 09:50:14 +08:00
barnettZQG 4bacca97e1
Feat: Support to proxy the dex server (#731)
* Feat: Support to proxy the dex server

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-29 21:30:57 +08:00
Jaychou 08ca8b05d7
Fix: The length of the name should not be greater than 31 characters (#724)
Signed-off-by: jiaxiaolei <584736476@qq.com>
2023-03-29 20:54:30 +08:00
Jaychou 383863820c
Fix:Add a helm type of application, the warehouse drop-down box is empty (#733)
Signed-off-by: jiaxiaolei <584736476@qq.com>
2023-03-29 20:54:03 +08:00
barnettZQG b564723f76
Fix: Can't render the menus when there is no plugins (#730)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-29 18:35:19 +08:00
barnettZQG 5e7c09852f
Chore: Add the step to generate the Git-Version (#729)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-29 17:00:58 +08:00
Basuotian d9b991964a
Fix: List application api by label (#727)
* fix list applicaiton by label api; fix e2e test case

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* fix labelselector in project application page

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* fix some zh-CN translate;

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* fix event handler bound

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* update grid config

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

---------

Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-03-29 16:15:19 +08:00
barnettZQG 3eff82cf12
Feat: Added a shortcut process to set up the canary workflow (#728)
* Feat: Added a shortcut process to set up the canary workflow

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Format the package.json file

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-29 13:35:23 +08:00
barnettZQG 93ecac2ce1
Fix: Enhance the project introduction (#725)
* Fix: Enhance the project introduction

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the readme

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-28 14:49:14 +08:00
barnettZQG f7f1236aa1
Feat: Initializes the UI plugin framework (#719)
* Feat: Initializes the UI plugin framework

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Can't build the theme package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Can't build the data package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Miss the style-loader dependence

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Change the e2e Dockerfile

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Change the enable addon shell

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: The input device is not a TTY

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the copy command

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: reset the plugin dir name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Reset the plugin dir and add some logs

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Reset the plugin dir

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Set the correct module

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Add the .pnp.* rule to .gitignore

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Set the GOPROXY

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-27 15:20:43 +08:00
Neeraj Gartia 4c8b5bef7b
Fix: Load the category of the workflow step definition. (#711)
* sync with workflow step definition changes

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* changed var name with catalog to category

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* imported types.AnnoDefinitionCategory var

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

* changed the sorting order

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>

---------

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2023-03-27 11:00:33 +08:00
Basuotian c312e3f768
Feat: support label filter for application list (#712)
* Feat: support label filter for application list

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* add label fold up display in application table view

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* fix error when clear all label filter

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* add e2e test case for list application by label

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* fix swagger.json

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* use unique app label for e2e test

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* fix e2e test case by adding list app parms

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* fix some zh translation

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

---------

Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-03-23 14:21:25 +08:00
barnettZQG 19c3496a29
Fix: make the addon config to work (#715)
* Fix: change the build driver

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the test workflow

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: make the addon config to work

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: uninstall the openssl-dev package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: set qemu action step

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-22 21:52:06 +08:00
Joakim Mohn 1942e062ee
Fix: make API Server OpenAPI compliant (#709)
Signed-off-by: Joakim Mohn <joakim.mohn@gmail.com>
2023-03-21 17:14:17 +08:00
barnettZQG 7ed1897eb0
Fix: remove the dependency package node-sass (#705)
* Fix: remove the dependency package node-sass

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the build driver

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the test workflow

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-18 11:25:53 +08:00
barnettZQG 757e72701c
Feat: Add the CI step to check the addon config (#703)
* Feat: Add the CI step to check the addon config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the app template

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the notes

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-16 11:42:04 +08:00
HIHIA adeb851998
Feat: deploy API return the workflow name (#704)
Signed-off-by: HIHIA <283304489@qq.com>
2023-03-16 11:40:55 +08:00
barnettZQG ad18bb15b8
Feat: Separate two workspaces (#701)
* Feat: Separate two workspaces

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize the router component

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-16 10:02:29 +08:00
Jaychou cfc1e61a4b
fix: Add the processing of rollback status to the version list (#696)
Signed-off-by: jiaxiaolei <584736476@qq.com>
Co-authored-by: jiaxiaolei <jiaxiaolei@cmss.chinamobile.com>
2023-03-14 09:47:04 +08:00
barnettZQG 9499bf9067
Fix: Can't create the policy (#694)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-13 20:54:36 +08:00
barnettZQG 443dfb807d
Feat: Refactor the UI framework and remove b-design (#691)
* Feat: Refactor the UI framework and remove b-design

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: optimize the style and the breadcrumb

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add the dependencies for the testing

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Variable @link-color is undefined

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Update the openssl package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-13 11:44:18 +08:00
barnettZQG 2e3bd62778
Feat: Add the API server module (#688)
* Feat: Add the API server module

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the github action

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the readme

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the unit test shell

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the github action shell

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the addon initalization shell

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the addon definition

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add some attachments for testing

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change webpack config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the helm mock

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the helm mock

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-09 15:08:19 +08:00
barnettZQG 643166b689
Feat: support to guide the chart configuration from the OCI registry (#683)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-02-15 17:07:51 +08:00
barnettZQG 2c7c6d0cb9
Feat: support for deleting the workflow (#680)
* Feat: support for deleting the workflow

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: enhance the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-31 12:01:27 +08:00
barnettZQG 75eac009e2
Fix: Step repetition rendering (#678)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-31 11:35:02 +08:00
barnettZQG 14a8a59a02
Feat: support for updating the trigger (#677)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-31 10:58:27 +08:00
barnettZQG dab771c361
Feat: support to update, clone, and edit the pipeline context (#675)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-31 09:49:47 +08:00
barnettZQG 8f79374e41
Feat: optimize the style and support to delete the group step (#672)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-30 18:39:56 +08:00
Somefive 882ed9f243
Fix: beautify (#668)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2023-01-30 13:29:00 +08:00
barnettZQG a3163c1832
Fix: can not binding the environment (#669)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-30 13:28:11 +08:00
barnettZQG d544ac796c
Feat: add the envbinding route page (#662)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-13 11:55:49 +08:00
barnettZQG af2cfe3070
Fix: add some local configs (#661)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-11 14:42:14 +08:00
barnettZQG 7974422551
Fix: enhance the addon detail page (#658)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-06 14:46:04 +08:00
barnettZQG a9683487af
Feat: support to rollback the application (#657)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-05 17:44:23 +08:00
barnettZQG fec0f1d5a9
Fix: failed to check the permissions of the environment (#656)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-04 12:09:31 +08:00
barnettZQG 8bf71650d1
Feat: Refactoring application workflow, Pipeline support visual editing (#652)
* Feat: Refactoring application workflow, Pipeline support visual editing

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change the breadcrumb in pipeline page

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-04 10:27:27 +08:00
lgtm-com[bot] f2cfcd8788
Add CodeQL workflow for GitHub code scanning (#649)
Co-authored-by: LGTM Migrator <lgtm-migrator@users.noreply.github.com>
2023-01-03 18:59:13 +08:00
barnettZQG e5ca95e62a
Fix: the page crash when input by keyboard (#653)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-03 11:56:47 +08:00
barnettZQG fbb960d177
Feat: show the notification message after creating a config (#647)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-12-03 21:29:50 +08:00
barnettZQG 18bb1e28fd
Fix: enable the addon with the registry name (#643)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-11-24 10:54:25 +08:00
barnettZQG d9cfa0b82f
Fix: the wrong environment list was loaded (#642)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-11-24 10:50:25 +08:00
barnettZQG 573da1c47a
Feat: support to set the registry for the ACR webhook (#640)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-11-21 18:06:11 +08:00
wzj 536d37c94e
Docs: translate into chinese (#637)
Signed-off-by: wzjgo <wzjgo1023@gmail.com>

Signed-off-by: wzjgo <wzjgo1023@gmail.com>
2022-11-09 13:46:23 +08:00
barnettZQG e9864734bd
Feat: add some translations and support to delete the distribution (#634)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-11-04 14:10:37 +08:00
barnettZQG f590b15664
Fix: enhance the permissions (#631)
* Fix: disable the Input AutoComplete

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: enhance the permissions

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the package version

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-11-01 21:05:08 +08:00
barnettZQG a8eef5c422
Feat: add the observability Pipeline template (#628)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-31 11:11:30 +08:00
barnettZQG 3462a9a0ed
Fix: guides the user to enable the vale-workflow addon (#626)
* Fix: guides the user to enable the vale-workflow addon

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: component state property never read

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-29 20:15:08 +08:00
barnettZQG b6b8f8eed5
Feat: support to manage the Pipeline (#624)
* Feat: support to manage the Pipeline

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: External links without noopener/noreferrer

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-29 16:06:49 +08:00
barnettZQG cd550aba80
Feat: enhance the top bar and show the grafana link (#622)
* Feat: enhance the top bar and show the grafana link

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: mark the experimental addon

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-24 10:18:02 +08:00
barnettZQG 348d9acc23
Fix: enhance the drawer page of the addon (#620)
* Fix: enhance the drawer page of the addon

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: reset the schema after version changed

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-22 13:11:57 +08:00
barnettZQG aa7390c980
Fix: enhance the application graph (#618)
* Fix: enhance the application graph

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: remove the never read property

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: show the graph not as the tree

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-20 11:37:48 +08:00
barnettZQG ed60e2a71f
Feat: display the version info more directly (#619)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-20 09:46:10 +08:00
barnettZQG 2f9b544d55
Feat: support to manage the configs (#616)
* Feat: support to create the target where creating the environment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support to manage the configs

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the values do not take effect

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change some alerts

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: alerts of the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add some logos

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-18 13:52:16 +08:00
weiy730 1d6d0142cc
Feat(#536): Graphically display Component and Trait relationships and status (#615)
Signed-off-by: weiy730 <weiy730@163.com>

Signed-off-by: weiy730 <weiy730@163.com>
2022-10-18 13:51:56 +08:00
barnettZQG c1a63a8b8f
Feat: support to create the target where creating the environment (#614)
* Feat: support to create the target where creating the environment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: adapt the process from the creating application page

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: set the locale

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: show the port name for the endpoints

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change some words

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-09 15:23:42 +08:00
barnettZQG bf2b1ded9e
Fix: can not show the detail of the first revision (#612)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-31 19:05:52 +08:00
barnettZQG 3e7ba770f5
Fix: miss the form items after turning off the switch (#609)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-24 14:06:30 +08:00
barnettZQG 4da717c542
Fix: set the locale (#608)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-24 10:26:35 +08:00
barnettZQG da6c335063
Feat: show the endpoints in the addon detail page (#606)
* Feat: show the endpoints in the addon detail page

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: js/unsafe-external-link

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-02 18:30:13 +08:00
Zhiyu Wang 437ebfd239
Fix: hidden cloudshell dialog scroll bar (#604)
Signed-off-by: Zhiyu Wang <cloudsky.newbis@gmail.com>
2022-08-01 18:19:31 +08:00
barnettZQG a3b0968857
Fix: incorrect dex redirect URL (#601)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-31 16:58:04 +08:00
barnettZQG 457771e70f
Fix: the email can not edit (#600)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-31 16:35:03 +08:00
barnettZQG 927d8e0ee7
Feat: support to show the console shell button (#599)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 16:35:26 +08:00
barnettZQG 0a73876f79
Feat: support to show the member alias and show the detail of the pod and application (#598)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 15:09:33 +08:00
barnettZQG 3054ffc427
Feat: support to set the default roles (#597)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 10:51:42 +08:00
barnettZQG 90ff0722a6
Feat: support to update the policy (#596)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 10:38:07 +08:00
barnettZQG 63c6a316e8
Feat: support to test authentication with dex (#594)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 10:37:53 +08:00
barnettZQG 5b731158d3
Fix: optimize the styles (#595)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-24 10:58:46 +08:00
barnettZQG 67291dcf5e
Chore: update the contributing document (#593)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-22 14:52:00 +08:00
barnettZQG 5b85a9e459
Feat: Optimize the application configuration page (#592)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-21 14:23:01 +08:00
barnettZQG fa2291868c
Feat: support to create the application policy (#583)
* Feat: support to create the application policy

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: potentially inconsistent state update

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the inaccurate words

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support to force delete the policy

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-19 20:13:38 +08:00
barnettZQG 7d1bd4d5fc
Fix: optimize the revision pagination and status show (#590)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-19 15:28:53 +08:00
barnettZQG a118b14f46
Feat: support to copy the inner endpoint (#589)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-19 15:09:12 +08:00
barnettZQG c8adf12da9
Fix: upgrade the nginx to 1.23 and fix CVE-2022-2068 (#587)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-19 14:16:49 +08:00
barnettZQG 1093f2d1a2
Chore: change the owner (#585)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-18 19:43:46 +08:00
barnettZQG 429f7ef91e
Fix: the pagination is not available (#584)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-18 19:40:27 +08:00
barnettZQG 8240cd6448
Feat: support to custom input the secret name and key (#581)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-14 12:10:35 +08:00
barnettZQG 981ec99e79
Feat: support to show my projects (#580)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-14 10:49:23 +08:00
barnettZQG 7adf72d5e2
Feat: support show the application list with the table (#579)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-14 10:13:27 +08:00
barnettZQG 72462d7e63
Feat: support to filter the addons by the tags (#578)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-13 19:42:12 +08:00
barnettZQG c816208ea3
Feat: support dry run the application (#577)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-13 19:42:00 +08:00
barnettZQG 546aefcc69
Feat: support to show the application diff (#572)
* Feat: support to show the application diff

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the field name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-08 09:39:46 +08:00
barnettZQG b895894871
Fix: the integration name is required (#575)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-08 09:38:54 +08:00
qiaozp 2a2feaeee4
Fix: don't load provider list with default project (#571)
* Fix: don't load provider list with default project

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

* fix

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-07-07 10:31:13 +08:00
barnettZQG b0a39152b6
Feat: add the CertBase64 extend component (#568)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-06 09:51:44 +08:00
barnettZQG 27cd18fc90
Fix: no namespace show undefined (#569)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-06 09:51:22 +08:00
qiaozp 8ff8892b34
Feat: add arm64 image build (#566)
* Feat: add arm64 image build

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

* setup qemu and buildkit

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-07-03 19:49:55 +08:00
barnettZQG 7d1af91eae
Fix: the cloudshell url is invalid (#565)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-03 11:38:26 +08:00
barnettZQG 2d7a30d84f
Revert "Feat: add arm64 image build (#560)" (#564)
This reverts commit a73b682d81.
2022-07-01 22:32:57 +08:00
barnettZQG 338bf91ec8
Fix: show the error message of querying the logs (#562)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-01 20:52:03 +08:00
barnettZQG 64b834e5d5
Feat: add the CloudShell feature (#557)
* Feat: add the CloudShell feature

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the login page

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-01 20:08:11 +08:00
barnettZQG 8849d4e043
Feat: support to query and show the application configuration (#561)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-01 20:07:54 +08:00
qiaozp a73b682d81
Feat: add arm64 image build (#560)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-07-01 16:05:49 +08:00
Charlie Chiang 27b9685f8c
Feat: use keyboard navigation, press enter to login (#559)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-01 09:33:19 +08:00
barnettZQG a608e9d7b7
Feat: Creating target support to select from all projects (#558)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-30 15:53:27 +08:00
barnettZQG c300eb6e33
Feat: support to view the image info (#555)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-21 14:59:12 +08:00
barnettZQG 54c14d2c67
Feat: support edit the application labels (#552)
* Feat: support edit the application labels

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change shown of the workflow record

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-17 16:04:46 +08:00
barnettZQG 12c72c8ffd
Feat: reference the github markdown style for the addon readme (#551)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-17 15:44:54 +08:00
barnettZQG c84a45dcd5
Feat: show the kind of the resource (#550)
* Feat: show the kind of the resource

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: show the kind in the cluster and pod node

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the less code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-17 15:44:09 +08:00
TIEDPAG 99c264037a
Fix: Extra comma in addon pager (#542) (#543)
* Chore: get version from env (#540)

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: Extra comma in addon pager (#542)

Signed-off-by: damianqin <damianqin@tiedpag.club>

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
Co-authored-by: damianqin <damianqin@zego.im>
2022-06-13 14:43:40 +08:00
barnettZQG 38f1d84ae7
Feat: support edit the component/trait/workflow properties via the code (#545)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-10 13:08:26 +08:00
barnettZQG c8ad52d042
Chore: get version from env (#540)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-31 18:25:50 +08:00
barnettZQG 603cb6dead
Fix: get the region from status (#538)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-31 17:43:37 +08:00
barnettZQG 99c8c77530
Fix: optimize the permission of the definition management page (#535)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-31 15:29:10 +08:00
barnettZQG ab80323f05
Feat: default show the overview tab on the application status page (#533)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-30 14:44:08 +08:00
barnettZQG 61b840a253
Feat: change the title to Balloon (#531)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-29 12:44:47 +08:00
barnettZQG 9db9a7621a
Feat: Optimize the kubernetes object editing component (#529)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-28 19:40:02 +08:00
barnettZQG 55f90bdb56
Fix: fail to set the policy value (#525)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-27 20:12:23 +08:00
barnettZQG 785b9f215a
Fix: optimize permission check (#524)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-27 17:14:09 +08:00
barnettZQG ae8d158256
Fix: incorrect display of resource details (#523)
* Fix: incorrect display of resource details

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: fait to show resource

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 22:10:21 +08:00
barnettZQG 35265373ee
Fix: fail to confige the helm value (#521)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 19:42:51 +08:00
barnettZQG 45a1f09833
Feat: add the application graph page (#520)
* Feat: add the application graph page

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: some style error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 15:18:56 +08:00
barnettZQG 1b49c1abe0
Feat: refactor the application page (#519)
* Feat: refactor the application page

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support delete the trait

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add some translations

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-22 15:54:37 +08:00
wangbow 916c75a70c
Fix: component dependOn issue (#518)
* Fix: component dependOnissue

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: component dependOn issue

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-19 21:42:25 +08:00
wangbow 430938c36d
Fix: component parameters are mixed after the component type is changed (#517)
* Fix: component parameters are mixed after the component type is changed

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: component parameters are mixed after the component type is changed

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: component parameters are mixed after the component type is changed

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: component parameters are mixed after the component type is changed

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-18 20:21:01 +08:00
barnettZQG c7a7f33f62
Feat: optimize the ui schema component (#516)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-18 18:40:31 +08:00
wangbow 7abee39ddd
Fix: add PolicySelect component to support select the policy in deploy workflow step (#515)
* Feat: add PolicySelect component to support select the policy in deploy workflow step

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: policySelect component update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-18 18:08:55 +08:00
barnettZQG 4dff67f4d2
Feat: optimize the ui schema page (#514)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-18 16:12:24 +08:00
wangbow 18cfa4ee5f
Feat: support to configure the component name for the trigger (#512)
* Feat: support to configure the component name for the trigger

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create trigger update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-18 14:13:34 +08:00
wangbow d2fa0a6ef2
Feat: definition management add type search function (#513)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-18 14:11:50 +08:00
wangbow a39756c95e
Feat: support set dependsOn field when creating or updating the component (#511)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-18 11:00:16 +08:00
wangbow 38e983e5b1
Fix: optimize the yamle input experience (#509)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-16 16:49:14 +08:00
barnettZQG 2311f115ea
Feat: display the instances of both cloud service and common components (#508)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-16 16:48:05 +08:00
barnettZQG ae28ef810d
Chore: add the issue templates (#506)
* Feat: change version

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize some messages

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Chore: add the issue templates

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-14 14:47:46 +08:00
barnettZQG 0e8f30c532
Fix: optimize some messages (#497)
* Feat: change version

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize some messages

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-11 18:33:44 +08:00
wangbow fb8a420566
Fix: helmValues component support custom the configuration key (#494)
* Feat: helmValues component support custom the configuration key

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: kv value type update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: helm select kv update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-11 17:20:12 +08:00
wangbow 1b971baea0
Fix: definition ui update (#495)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-07 14:52:50 +08:00
wangbow ed0af5ff82
Fix: show application trait status (#493)
* Feat: show application trait status

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: show application trait status update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-05-07 14:13:03 +08:00
wangbow 4390221fad
Feat: support the definitions management (#491)
* Feat: support the definitions management

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: support the defnitions managerment

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-28 10:44:36 +08:00
ManAnRuck 41b706c4d5
Fallback local language to en if not supported (#489)
SOLVES https://github.com/oam-dev/velaux/issues/488

Currently only en and zh are the only supported languages.
If for example in reason of other browser language settings, the locales doesn't exist and the ui is not visible (after login).
As workaround it is possible to change the browser language (bad way).

The solution is to add a fallback language.

Signed-off-by: Manuel Ruck <git@manuelruck.de>

Co-authored-by: Manuel Ruck <git@manuelruck.de>
2022-04-26 17:59:07 +08:00
barnettZQG 9c2fdf3fb0
Chore: add wangbow as an approver (#486)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-25 14:46:39 +08:00
barnettZQG 787f5d4b48
Fix: can not query instances when the application is abnormal (#484)
* Fix: can not query instances when the application is abnormal

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the app logs shown bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-25 13:48:05 +08:00
barnettZQG 1c1e9c984e
Fix: the additional parameter does not take effect (#482)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-25 11:12:55 +08:00
barnettZQG 258a71e18f
Feat: support the telemetry data collection (#476)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-22 16:58:24 +08:00
wangbow b7c5819ba1
Fix: configType page bug & helmReport update (#474)
* Fix: configType page bug & helmReport update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: configType page bug & helmReport update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: user page placehodlanguage change update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-21 22:52:28 +08:00
wangbow 83c874250b
Fix: add local translation (#464)
* Fix: add local translation

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: add singleton local implements

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-19 18:45:08 +08:00
wangbow 760bd5f557
Fix: sso dex error, guide users to login page (#467)
* Fix: sso dex error, guide users to login page

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: sso dex error, guide users to login page

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-19 16:43:17 +08:00
wangbow b6da819264
Feat: admin user first login need update password && email (#462)
* Feat: admin user first login need update password && email

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: admin update paasword & email

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: admin update paasword & email

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: admin user first login need update password && email

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: admin user first login need update password && email update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-19 14:52:03 +08:00
wangbow 9184336f99
Fix: support login i18n (#465)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-19 09:59:31 +08:00
wangbow 6d89be4eba
Fix: refresh token can not work (#458)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-15 13:29:30 +08:00
barnettZQG 1739c344ef
Chore: change the branches (#457)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-15 13:25:40 +08:00
barnettZQG 8eca08ae7e
Fix: the local cluster name not shown (#455)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-15 10:56:06 +08:00
barnettZQG d0069ce583
Chore: change the contributing document (#453)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-14 22:34:18 +08:00
wangbow 8e8cd84a93
Fix: platform router jump update (#451)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-14 20:10:09 +08:00
barnettZQG 23b9e30b59
Fix: change applied resources list (#450)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-14 18:11:18 +08:00
wangbow ed8eef92bf
Fix: 12011 & 14010 business route jump (#448)
* Fix: 12011 & 14010 business route jump

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: platformsetting guide dialog add translation

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-14 18:10:57 +08:00
barnettZQG 1a67e9a65b
Fix: not load target list (#445)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-14 13:07:40 +08:00
wangbow 01de87ce53
Fix: helm type create an application and fills in secretRef with secretName (#447)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-14 13:02:45 +08:00
barnettZQG 9177281c2e
Fix: the cloud service application can not show the components list (#444)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-14 11:41:36 +08:00
wangbow 0c37a0c23b
Fix: configType menu icon update (#443)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-13 12:07:43 +08:00
wangbow efcf16efe3
Feat: project integration page implements (#442)
* Feat: project integration page implements

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: project integration configType alias show

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-13 12:06:40 +08:00
xianyue b859348cd3
Fix: component EnvBindPlanDialog get wrong envs (#441)
Signed-off-by: xianyue <13651133+xianyue390348@users.noreply.github.com>
2022-04-12 17:26:47 +08:00
wangbow 5e0e2186f4
Feat: create target add cloud service provider list (#438)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-12 13:30:35 +08:00
wangbow d80aa9aec7
Feat: project page & application page add button permission (#427)
* Feat: project page add button permission

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: applicaiton page add button permisson

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: application &&  project add button permisson

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: applicaiton & project page update button permisson

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-12 11:50:38 +08:00
wangbow 3338fecc6c
Feat: some pages add button permission (#426)
* Feat: user and roles add button permission

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: add button permission to some page

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: remove console.log sentence

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: some page update button permission

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: addon page update button permisson

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-12 11:49:07 +08:00
xianyue 0a41709f1d
Fix: clear envBindings when change project (#434)
Signed-off-by: xianyue <13651133+xianyue390348@users.noreply.github.com>
2022-04-12 10:49:04 +08:00
wangbow 16cd2aaa3d
Feat: configType page add status info show (#431)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-11 10:13:04 +08:00
wangbow 8abc8667e0
Feat: refresh token handler implements (#425)
* Feat: refresh token handler implements

Feat: refresh token handler update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: update refresh token businessCode

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: add singleton apply resetLogin dialog

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: add singleton apply resetLogin dialog

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-04-11 09:45:23 +08:00
BigPigHoof d48c30d542
Feat: add addons gitlab support (#423)
* Feat: add addons gitlab support

Signed-off-by: huangwei <285961971@qq.com>

* add gitlab addon support help information

Signed-off-by: huangwei <285961971@qq.com>
2022-04-01 17:58:03 +08:00
barnettZQG d4d2d802e4
Fix: the default value of the select form is inaccurate (#424)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-01 16:57:30 +08:00
barnettZQG 699a1aaefe
Feat: change show alias (#422)
* Fix: disable type selector where option length is 1

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: disable show project integrations

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-01 01:00:46 +08:00
barnettZQG 7b402db446
Fix: disable type selector where option length is 1 (#421)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-31 22:15:15 +08:00
barnettZQG 808c807997
Fix: query helm repos without project name (#420)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-31 20:51:16 +08:00
Wei (段少) 57606521d0
Fix: Remove redundant i18n (#419)
* Update: remove redundant i18n

Signed-off-by: BinaryHB0916 <davidduan0916@gmail.com>
2022-03-31 19:28:10 +08:00
wangbow 2179fe4e3f
Feat: integration page implements (#417)
* Feat: integration implements

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: run eslint

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: integration code update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: intergration code change

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: add integration meun permission option

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: create config ui update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: integration pr issuce

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: integration ui update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-31 19:14:48 +08:00
barnettZQG 485f077f13
Feat: support list helm repo (#418)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-31 17:20:34 +08:00
Wei (段少) 62ab0b88c0
Fix: word of Chinese character you and reset password (#416)
* Fix: word of Chinese character you and reset password

Signed-off-by: BinaryHB0916 <davidduan0916@gmail.com>

* Update src/locals/Zh/zh.json

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: typo on password

Signed-off-by: BinaryHB0916 <davidduan0916@gmail.com>

* Update: subtitle Basic authorization...

Signed-off-by: BinaryHB0916 <davidduan0916@gmail.com>

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-31 16:51:04 +08:00
barnettZQG 5428397eab
Feat: support update the platform configuration (#415)
* Feat: support update the platform configuration

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change some comments

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-31 15:42:20 +08:00
wangbow 1c5b5ab7f1
Feat: login page add error message show (#413)
* Feat: logon error apply form bottom

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: login error message show

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: login error add transtion

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: login error code change

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: zh.json update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: request error redundant process

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-31 15:03:16 +08:00
barnettZQG a6c24e7326
Fix: the environment page cannot be switched (#411)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-29 20:07:17 +08:00
barnettZQG 42f9d857af
Feat: change and show version (#410)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-29 14:43:47 +08:00
Tianxin Dong 53fe0281af
Feat: add dex config (#408)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-29 11:26:32 +08:00
barnettZQG 01d011a5cb
Feat: support set addon cluster and version (#409)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-29 01:46:13 +08:00
barnettZQG bb2e02475a
Feat: add the permission check function and component (#407)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-27 17:00:00 +08:00
wangbow ff79b6ea86
Feat: roles and project Roles detail and member page implements (#406)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-27 09:46:27 +08:00
barnettZQG 1d84f4b0f9
Feat: adapt to RBAC mode (#405)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-26 18:31:31 +08:00
wangbow cbb8069c51
Fix: status 401, redirect to login page (#403)
* Fix: don't remove token, when api throw error

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: status 401, route login page

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-24 20:11:59 +08:00
wangbow 0b43b39f71
Feat: add auth dev (#401)
* Feat: add auth dev

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: axios interinterceptors response error update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: auth refreshToken filed

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: remove unuseful code

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-24 19:43:26 +08:00
wangbow fc4c1d7e13
Feat: project and project Details implements (#402)
* Feat: project and projectDetails dev

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: application, env ,target add project apply

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-24 17:28:14 +08:00
barnettZQG b4440adbf7
Feat: support the read-only application (#399)
* Feat: support the read only application shown

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support delete the readonly application

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: use Record replace Map

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-23 14:24:38 +08:00
wangbow 57a16cbce4
Feat: userManager page implements (#400)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-22 14:13:48 +08:00
barnettZQG e65b935794
Feat: support the conditions for ui schema and add some extend components about helm (#398)
* Feat: support the conditions for ui schema and add some extend components about helm

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add fault tolerance logic code

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-18 20:22:56 +08:00
barnettZQG 26ddf52ae9
Feat: support show the prompt message by the trait podDisruptive value (#397)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-16 18:13:26 +08:00
barnettZQG 0e32642cff
Feat: get the suitable trait definitions by appliedWorkload (#394)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-15 16:05:00 +08:00
barnettZQG 81da21fffa
Feat: support query endpoints and resources by component (#392)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-11 18:14:43 +08:00
wangbow 3fc5ac03c5
Feat: application detail add logs page (#385)
* Feat: appdetail add logs page

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: appDetail logs style update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: logs style optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: logs container height optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: logs operation update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-10 18:03:17 +08:00
wangbow 8d4ca1a29d
Fix: cloud list can't be scrolling down (#386)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-10 18:01:47 +08:00
wangbow b4f526f36e
Feat: add component create and edit (#382)
* Feat: add component create and edit

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: create component add edit component update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Feat: component create and edit update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-03-02 20:23:50 +08:00
Wei (段少) 23725ac372
Feat: add the chinese language support. (#371)
* Feat: enable i18n

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: update zh.json

* Feat: update zh language

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change some code

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: revise EN wording and localize all parts except in Applications

* Feat: add up zh doc in creating compoents without cloud service part

* Fix: updates on more zh

* Feat: change some translation

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change some translations

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-02 19:46:36 +08:00
barnettZQG b41220727a
Feat: add show app status page (#384)
* Feat: add show app status page

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: move component status to before conditions

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-02 17:17:00 +08:00
Zhiyu Wang 745729999b
add pod restarts count (#383)
Signed-off-by: Zhiyu Wang <cloudsky.newbis@gmail.com>
2022-03-01 20:46:47 +08:00
barnettZQG 66bd4e65a3
Feat: change the version in package.json (#376)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-24 09:45:48 +08:00
barnettZQG 936bbce385
Feat: optimize the uischema rendering engine (#373)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-23 11:08:56 +08:00
barnettZQG 8c367372f5
Fix: change app condition show (#369)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-18 15:49:15 +08:00
barnettZQG 6e2ceda1b1
Fix: optimize the total number of parameters calculation algorithm. (#367)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-18 15:21:31 +08:00
barnettZQG 3c0e884cbf
Fix: inaccurate hints after new cluster (#363)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-18 12:03:44 +08:00
barnettZQG 84d07ec75b
Chore: add the image scan action (#364)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-18 12:02:51 +08:00
wangbow 549cbdc959
Fix: create cluster add addon message show (#361)
* Fix: cluster add addon message

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: yarn run lint

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create cluster addon message style

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-02-15 20:12:42 +08:00
barnettZQG f6da1626ab
Fix: the pattern of uischema is not effective (#356)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-14 17:43:49 +08:00
wangbow 3f04151309
Fix: compoent type add filter search and group (#357)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-02-14 17:42:41 +08:00
wangbow 7bcf285363
Fix: create targets namespace optimization (#350)
* Fix: create targets namespace optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create nampsace data success, data write back

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-14 10:18:14 +08:00
wangbow bc62d06715
Fix: uiSchema structs optimization (#353)
* Fix: uishcema style optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: uisheme struct style optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: run eslint

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: structs style show

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-02-13 15:19:43 +08:00
barnettZQG f1cda246b8
Feat: change version (#347)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-09 11:15:32 +08:00
Tyler Henderson f91b033253
Feat: Added version info into sidebar (#344)
* Added version info in the velaux

Signed-off-by: Tyler Henderson <henderson.tyler@outlook.com>

* Removed a div

Signed-off-by: Tyler Henderson <henderson.tyler@outlook.com>

* Changed width to paddling-left

Changed width and text-align to padding-left

Signed-off-by: Tyler Henderson <henderson.tyler@outlook.com>
2022-01-30 15:13:42 +08:00
barnettZQG f8f9a51c1f
Feat: refactor the editing mode of the workflow (#340)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-25 18:40:48 +08:00
Tianxin Dong 9f2def59cb
Feat: add backport (#341)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-01-25 16:59:31 +08:00
barnettZQG 7acfc42b56
Fix: the api path is invalid (#335)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-17 15:01:04 +08:00
barnettZQG 54449614ae
Feat: support show user improvement plan (#333)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-14 23:53:35 +08:00
barnettZQG 44b8ff0f24
Fix: clicking on the blank area cannot switch tab (#332)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-12 11:17:02 +08:00
Jianbo Sun 11ce11a0cd
Fix: typo of baseline config (#331)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-11 19:40:15 +08:00
wangbow 26ed7f1cec
Fix: add query the application service endpoint (#330)
* Fix: add query the application service endpoint

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: query the application service endpoint updat

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: query the application service endpoint updat

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-01-11 16:57:41 +08:00
wangbow 553eb4e82b
Fix: application details add create and delete trigger (#327)
* Fix: application details add create and delete trigger

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create trigger type change

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create trigger code change

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create trigger type code change

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create trigger and message business

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create trigger code change

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: crate trigger code update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-01-10 13:44:56 +08:00
wangbow ab924cdc72
Fix: add create env in application create and details envbings (#326)
* fix: add create env in application create and details envbings

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create envbinds code format

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create envBinds font change

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: create envBinds font change

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-07 14:17:51 +08:00
wangbow 37c9acf580
Fix: make link text in the description of a parameter to by a superlink (#325)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-01-07 11:38:40 +08:00
Zheng Xi Zhou 5b36a55132
Fix: display its metrics and logging in Dashboard (#319)
The metrics and logging doesn't show correctly

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-05 15:25:41 +08:00
wangbow 9e2527b19a
Fix: remove ZONE and PVC parameter (#323)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2022-01-05 14:15:08 +08:00
barnettZQG 36abcc698f
Feat: support nested form parameter verification (#314)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-30 18:52:42 +08:00
barnettZQG ef500d90d7
Feat: change env to environment (#313)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-30 14:26:56 +08:00
wangbow 815d478841
Feat: application add edit operation (#296)
* Feat: application add edit operation

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: edit application field update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-12-30 14:15:06 +08:00
wangbow bc52db6592
Fix: no application add create application link (#304)
* Fix: no application add create application link

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: no application add create application link

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: guide to create application description modification

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-12-30 14:14:18 +08:00
barnettZQG c7fdbc7e43
Fix: fix undefined bug (#311)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-29 21:37:08 +08:00
barnettZQG ce29a22020
Fix: uischame render value error and env value error (#309)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-29 20:11:19 +08:00
barnettZQG aa897dd298
Feat: support show app triggers (#310)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-29 20:11:08 +08:00
barnettZQG 322f132a37
Feat: hide project form item (#307)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-29 20:02:15 +08:00
barnettZQG 5502167939
Feat: support show log and grafana dashboard link (#305)
* Feat: support show log and grafana dashboard link

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support show container log

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-28 20:14:47 +08:00
wangbow 911e2d4817
Fix: optimize the menu style on the mobile terminal (#306)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-12-28 14:04:25 +08:00
barnettZQG 0e800063c9
Feat: support add experimental addon registry (#300)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-25 13:56:26 +08:00
wangbow 21230a8e8c
Fix: Addons status details title update (#297)
* Fix: Addons status details title update

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Update src/pages/Addons/components/detail/index.tsx

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-25 11:33:11 +08:00
barnettZQG bb0a087b8f
Feat: support independent env management (#294)
* Feat: support independent env management

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support filter namespace by annotation

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support show addon status in list

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-25 10:46:07 +08:00
wangbow 4c418c6f8a
Fix: uiSchema UI splitButton optimization (#293)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-12-23 12:55:27 +08:00
barnettZQG a4c79549c8
Fix: adapt to the registry list API changes (#285)
* Fix: fix some ui bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support HelmValues extends

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: adapt to the registry list API changes

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-21 13:16:12 +08:00
barnettZQG 0fc6487f51
Fix: the process of disabling addon lacks state control (#281)
* Fix: fix some ui bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support HelmValues extends

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-18 10:02:56 +08:00
wangbow b77c4f0088
Fix: uiSchema SecretKeySelect init value optimization (#283)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-12-17 20:46:48 +08:00
wangbow 57f2089f69
Fix: uiSchema CMD enter optimization (#282)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-12-17 11:03:27 +08:00
wangbow 8cd9fc95ec
Fix: Addons details add status shedule (#277)
* Fix: #264 Addons details add status shedule

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: #264 Addons details add status details and uiSchema optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-12-16 19:01:15 +08:00
barnettZQG fe71f2adb3
Fix: service endpoint did not show and show target cluster alias (#276)
* Fix: service endpoint did not show and show target cluster alias

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: edit envbinding bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-15 17:38:36 +08:00
wangbow 0b0bb9feb6
Fix: Pod Details table column style optimization and refresh button position optimization (#275)
* Fix: #263 Pod Details table column style optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: #263 refresh button position optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-15 17:11:14 +08:00
wangbow 4ff2070833
Fix: #266 deliveryTarget edit and remove optimization (#274)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-15 17:00:41 +08:00
wangbow b225c78588
Fix: #257 cluster dialog add outside scroll (#273)
* Fix: #257 cluster dialog add outside scroll

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: #257 cluster dialog add outside scroll

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-15 16:44:48 +08:00
wangbow 11d3315e6c
Fix: #262 ui schema switch change, the configuration optimization (#272)
* Fix: #262 ui schema switch change, the configuration optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

* Fix: #262 ui schema switch change, the configuration optimization

Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-15 16:30:02 +08:00
barnettZQG 36ea904a8d
Chore: add PR template file (#271)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-15 12:06:27 +08:00
king-jam1 3b9b5454ec
Feat: support edit an application envbinding (#236)
* Liao: resolve problem

Signed-off-by: 廖金源 <jinyuan.liao@rootcloud.com>

* Liao: merge the getIsEdit and setFields function

Signed-off-by: 廖金源 <jinyuan.liao@rootcloud.com>

* Liao: delete namespaceList

Signed-off-by: 廖金源 <jinyuan.liao@rootcloud.com>

* Liao: add Edit Button

Signed-off-by: 廖金源 <jinyuan.liao@rootcloud.com>

* Liao: format

Signed-off-by: 廖金源 <jinyuan.liao@rootcloud.com>

* Liao: delete workflow131

Signed-off-by: 廖金源 <jinyuan.liao@rootcloud.com>

* Liao: delete Header codition

Signed-off-by: 廖金源 <jinyuan.liao@rootcloud.com>

Co-authored-by: 廖金源 <jinyuan.liao@rootcloud.com>
2021-12-10 12:14:23 +08:00
barnettZQG 03811ead8e
Feat: support the additional parameter in KV component (#255)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-08 19:17:02 +08:00
barnettZQG e4630e7d23
Feat: support list and create project (#254)
* Feat: support list and create project

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: fix change project not query target bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-08 19:06:20 +08:00
barnettZQG b9e931473d
Fix: change all irregular words (#248)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-07 17:00:53 +08:00
barnettZQG db9e1c9956
Chore: change branch name
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-03 17:27:46 +08:00
barnettZQG ea9a2fddd9
Chore: change release action config (#247)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-03 17:23:39 +08:00
barnettZQG 3b25a17b73
Feat: support oss addon repo and support access address show (#246)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-03 16:36:07 +08:00
barnettZQG 015755d3eb
Feat: support upgrade addon (#245)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-03 09:17:30 +08:00
barnettZQG f9af6de2c2
Feat: optimize data presentation (#244)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-02 15:57:39 +08:00
barnettZQG 5737ef6d14
Feat: support set and cancel workflow default attribute (#243)
* Feat: support set and cancel workflow default attribute

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change words that don't make sense

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-02 15:04:14 +08:00
barnettZQG b512320bee
Chore: add pr title check action (#241)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-02 14:37:32 +08:00
barnettZQG 5fef0e7581
Feat: support cloud app and fix multiple bugs (#239)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-02 11:06:05 +08:00
wangbow 3669fdeaf9
Feat: workflow step dev (#238)
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-11-30 16:20:41 +08:00
barnettZQG fd5cfa4486
Fix: can not create new workflow step bug (#235)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-29 20:40:59 +08:00
barnettZQG 58be920ffc
Fix: fix identifier conflict 2021-11-29 12:26:01 +08:00
barnettZQG 0288f88878
Chore: add release action config and enable gzip in nginx (#234)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-29 12:23:08 +08:00
barnettZQG b680c0ff87
Feat: optimized the workflow edit page. (#232)
* Feat: optimized the workflow edit page.

* Fix: fix workflow show bug

* Fix: fix canvas width bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-29 10:18:32 +08:00
king-jam1 e223bfa3cc
Liao: fiexd [todo] support query app by delivery target (#230)
* Liao: fiexd [todo] support query app by delivery target

* Liao: no fixed

* Liao: fixed [TODO] support query app by delivery target again

* Liao: Delete useless stuff

* Liao: change cluter to targetName

Co-authored-by: 廖金源 <jinyuan.liao@rootcloud.com>
2021-11-29 10:18:13 +08:00
Hongchao Deng 2e8eb9746b
chore: improve wording (#233) 2021-11-28 21:52:47 +08:00
barnettZQG 54d9ce16a1
Feat: change non-standard text. (#231)
* Fix: fix the remove item bug in KV and Structs component

* Feat: change non-standard text.

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-28 15:54:14 +08:00
barnettZQG 4e2c147bef
Fix: fix the remove item bug in KV and Structs component (#229)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-26 11:04:11 +08:00
barnettZQG 3e1c01070d
Feat: add K8sObjectsCode extend component (#227)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-25 14:42:48 +08:00
barnettZQG 29c31b3859
Feat: show app service status (#221)
* Feat: show app service status

* Feat: fix workflow can not update bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-24 20:34:44 +08:00
wangbow 4b49379bf3
Feat: workflow crud and fix dataflow (#220)
* Fix: many render

* Feat: workflow crud and fix dataflow

* Fix: eslint error

* Fix: code formatter

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-11-24 19:02:38 +08:00
barnettZQG 267ae9fdb2
Feat: support show app status (#219)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-24 17:22:52 +08:00
xAmast 9ae76e0685
Fix: #208 (#218)
* Fix: #208

* Feat: disable addon enable button when addon enabled.

* Fix: eslint error
2021-11-24 17:02:32 +08:00
barnettZQG 7239c92d31
Fix: #169 (#217)
* Fix: #169

* Feat: change code style

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-23 20:54:56 +08:00
barnettZQG b2d9b589d6
Feat: support show container memory and cpu usage rate (#216)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-23 19:31:46 +08:00
yangsoon dea30f56be
Feat: update the app resources query api (#214) 2021-11-23 16:50:11 +08:00
barnettZQG 6313c55a37
Feat: optimize UISchema component (#213)
* Feat: optimize UISchema component

* Chore: change readme

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-23 15:59:41 +08:00
barnettZQG b24251a7c9
Feat: support change component properties (#207)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-21 23:00:02 +08:00
barnettZQG 1622159189
Feat: limiting workflow forks (#206)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-21 12:15:22 +08:00
wangbow 373d27f529
Feat: workflow dev (#204)
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-11-20 22:18:06 +08:00
barnettZQG 9845132949
Feat: change envbinding component (#205)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-20 21:09:18 +08:00
wangbow c908c7849e
Feat: instanceList dev and versionList dev (#203)
* Feat: instanceList dev and revisonList dev

* Feat: run eslint pretty

* Feat: merge

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: barnettZQG <576501057@qq.com>
2021-11-19 11:22:23 +08:00
barnettZQG 9f0317f631
Feat: change app page header (#200)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-19 09:30:52 +08:00
barnettZQG 02cb8bac75
Feat: reconstruct the addon detail page (#199)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-17 17:52:24 +08:00
wangbow cc61184589
Feat:trait business devlopment (#198)
* Feat: Trait business develop

* Feat: run eslint pretty

* Fix: code namespace optimization

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-11-17 15:42:05 +08:00
barnettZQG 2c7adddf69
Feat: improve the application creation process (#197)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-17 11:11:20 +08:00
wangbow 7c0202e354
Feat: deliveryTargets page dev (#196)
* Feat: deliveryTargets page dev

* Fix: run eslint pretty

* Fix: code optimization

* Feat: remove business that does not need to be displayed

* Fix: code style and deliveryTargetDialog ref remove

* Fix: pagination size change

* Fix: code style and deliveTaget interface apply

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-11-16 15:20:32 +08:00
barnettZQG 80b69179fe
Feat: optimized the application creation process (#195)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-15 11:24:44 +08:00
wangbow 8af28d4260
Feat: create application update (#194)
* Feat: application create update

* Fix: run eslint pretty

* Feat: create application update

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-11-13 20:59:33 +08:00
barnettZQG 327ee32773
Feat: change application layout (#193)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-13 17:30:06 +08:00
barnettZQG 5a557298b8
Feat: change layout (#192)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-12 13:55:34 +08:00
hanxie f3ef1f37ab
rebuild workflowplan and update lastest feature (#180)
* Optimize the basic style,such as topbar and leftmenu

* add tsx-control-statements to  beautify the code

* Add more business components

* rebuild envplan component

* fix bug

* update workflow content

* Improve complex form components, including struts, strings, etc. Adjust the entire display effect
2021-11-12 11:41:30 +08:00
barnettZQG 41feb998a8
Feat: change dockerfile (#184)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-08 22:29:05 +08:00
wangbow cb23ae4d69
Feat: app details add create Env component (#183)
* Feat: appDetail create env component

* Feat: style format optimization

* Feat: run eslint pretty

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-11-08 21:21:02 +08:00
barnettZQG 3c55af91e7
Feat: optimize dependencies and add dockerfile, fixed #160 (#182)
* Feat: optimize dependencies and add dockerfile, fixed #160

* Fix: change parser command

* Fix: fix lint bug

* Fix: not support jsx

* Fix: change Dockerfile

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-08 20:15:57 +08:00
barnettZQG fad7eaed14
Feat: application dashboard page (#177)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-07 17:15:56 +08:00
barnettZQG 67e40fd05d
Feat: reset the application dashboard page (#172)
* Feat: improve the application plan list page

* Feat: reset the application dashboard page

* Chore: change code owner

* Style: change style

* Update index.jsx

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-07 12:04:56 +08:00
wangbow d2fe1ffb30
Feat: implementation of service detail interface joint debugging and interaction (#168)
* Feat: draw dva loading components

* Feat: implementation of service detail interface joint debugging and interaction

* Feat: topology files rename

* Feat: update application componentDefinition api

* Feat: the data of application details is stored in state

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-11-05 21:51:56 +08:00
barnettZQG 1cd84ed1e1
Feat: improve the application plan list page (#166)
* Feat: improve the application plan list page

* Style: change code style

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-04 15:16:20 +08:00
barnettZQG 411fbd9c25
Feat: change api path (#165)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-03 17:39:43 +08:00
barnettZQG 599907c6b5
Feat: perfect addon and cluster management feature (#164)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-03 15:52:37 +08:00
hanxie 06808e4e2d
rebuild envplan component (#163)
* Optimize the basic style,such as topbar and leftmenu

* add tsx-control-statements to  beautify the code

* Add more business components

* rebuild envplan component
2021-11-01 17:07:18 +08:00
barnettZQG 71089ec438
Feat: perfect addon management page (#161)
* Feat: perfect addon management page

* Style: change code style

* Fix: change max-old-space-size

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-01 10:17:52 +08:00
wangbow 67ebcbd32f
Feat: application newly added optimization and cluster interface joint commissioning (#159)
* Fix: solve the problem of syntax errors in the new version of vscode ts

* Feat: cluster interface  Harmonization and Interaction Processing

* Fix: formatting issiues

* Feat: application Creation Add Environmental Planning and Yaml Creation

* Fix: lint style and format

* Feat: remove console.log and detail optimization

* Fix: lint style and code format

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-10-29 21:28:51 +08:00
hanxie 59c4039ae0
Merge the latest code and add tsx-control-statements module (#158)
* Optimize the basic style,such as topbar and leftmenu

* add tsx-control-statements to  beautify the code
2021-10-27 18:18:36 +08:00
wangbow 711cf79aa2
Feat: cluster Interaction and Interface Testing (#156)
* Fix: solve the problem of syntax errors in the new version of vscode ts

* Feat: cluster interface  Harmonization and Interaction Processing

* Fix: formatting issiues

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-10-27 16:20:28 +08:00
hanxie b973338010
Optimize the basic style,such as topbar and leftmenu (#155) 2021-10-26 20:52:30 +08:00
wangbow 40b32ebe23
Feat: add interface and interaction implementation (#154)
* Style: modify the sidebar font style and the ayout background color

* Feat: application management list for mock interface test

* Feat: add general style files and apply list page optimization

* Style: sidebar navigation style optimization

* Feat: cluster list page  mock test

* Feat: add DVA and mock interface test to encapsulate request library

* Feat: Optimize routing naming and data structure

* Fix: static syntax problems for standard processing

* feat: add mock instruction to distinguish between mock interface and real interface

* Feat: add component details static

* Style: multi level breadcrumb style optimization

* Feat: sidebar configurable and specification optimized

* Feat: ui specification details optimization

* Feat: file directory display optimization

* Feat: title Component generic, component specification optimization

* Feat: remove redundant files and optimize directory specifications

* Feat: specification details optimization

* Feat: (application list and create list interface test)

* Feat: add moment transform date

* Feat: axios encapsulate get and post method

* Feat: configure domain names and ports for different environments

* Feat: configure domain names and ports for different environments

* Feat: extract the domain configuration file to the local

* Style: layout add breadcrumb style optimization

* Feat: namespace interface intergrated

* Feat: add interface and interaction implementation

* Feat: creat app add namespace UI

* Feat: creat app add namespace UI

* Style: layout add breadcrumb style optimization

* Feat: namespace interface intergrated

* Feat: add interface and interaction implementation

* Feat: creat app add namespace UI

* Feat: creat app add namespace UI

* Fix: fix webpack can not start bug (#152)

Co-authored-by: barnettZQG <yiyun.pro>

* Style: format style common.ts

* Fix: nameing convention and api url path update

* Fix: mock startup environment variable optimization and testing

* Feat: add mock json files

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: barnettZQG <576501057@qq.com>
2021-10-25 14:31:24 +08:00
barnettZQG 1e1f6485e3
Fix: fix webpack can not start bug (#152)
Co-authored-by: barnettZQG <yiyun.pro>
2021-10-20 16:29:34 +08:00
wangbow 4c7efbb8e3
Feat: axios encapsulate get and post method (#151)
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-10-19 17:33:19 +08:00
wangbow 079b3b376d
Feat: initialize the data flow framework and the API request framework. (#150)
* Style: modify the sidebar font style and the ayout background color

* Feat: application management list for mock interface test

* Feat: add general style files and apply list page optimization

* Style: sidebar navigation style optimization

* Feat: cluster list page  mock test

* Feat: add DVA and mock interface test to encapsulate request library

* Feat: Optimize routing naming and data structure

* Fix: static syntax problems for standard processing

* feat: add mock instruction to distinguish between mock interface and real interface

* Feat: add component details static

* Style: multi level breadcrumb style optimization

* Feat: sidebar configurable and specification optimized

* Feat: ui specification details optimization

* Feat: file directory display optimization

* Feat: title Component generic, component specification optimization

* Feat: remove redundant files and optimize directory specifications

* Feat: specification details optimization

Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-10-18 20:01:37 +08:00
wangbow 988f93b552
Style: modify the sidebar font style and the ayout background color (#149)
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
2021-10-13 20:10:37 +08:00
barnettZQG 6250c9703b
Fix: change readme (#147)
* Fix: change readme

* Update README.md

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

* Fix: change code owners

Co-authored-by: barnettZQG <yiyun.pro>
Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
2021-10-13 19:45:06 +08:00
barnettZQG d0620e7bf2
Chore: set code owners (#146)
* Chore: set code owners

* Fix: fix Translation is not found bug

* Fix: delete Translation

* Fix: add Translation

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-13 17:09:08 +08:00
barnettZQG a74ae3bc91 Feat: initialize the new front-end project. 2021-10-13 16:39:51 +08:00
barnettZQG 31d5201b2b Docs: change readme about wechat 2021-09-26 11:53:34 +08:00
barnettZQG 2e5d078713 Docs: change readme, rename velacp to velaux 2021-09-26 11:33:39 +08:00
Hongchao Deng 6265e12cdb remove webpack5 config
umi is using a configuration that doesn't exist in webpack5. Remove the config
2021-08-30 17:48:47 +08:00
Hongchao Deng 07793ebbbb cleanup 2021-08-30 16:56:37 +08:00
Hongchao Deng 0672a8240f update readme 2021-08-06 09:58:17 +08:00
Hongchao Deng a8e85f67e5 update arch 2021-08-06 08:53:18 +08:00
Hongchao Deng af92f6e6b9 add more arch 2021-08-05 21:19:06 +08:00
Hongchao Deng 3b2b6a006d update arch 2021-08-05 20:45:23 +08:00
wangyuan249 3cc8ab8083
Separate frontend and backend service and rm datastore package (#142)
* change cluster rpcinfo to configmap

* add get app and list app

* remove all datastore in cluster

* fix application all

* change catalog and capability

* fix

* abstract the shared part

* add status code and err message

* fix

* seperate frontend

* fix port and proxy

* rm datastore package

* fix
2021-08-04 17:22:01 +08:00
wangyuan249 6415ba719b
Support use K8s etcd(configmap) as datastore (#139)
* change cluster rpcinfo to configmap

* add get app and list app

* remove all datastore in cluster

* fix application all

* change catalog and capability

* fix

* abstract the shared part

* add status code and err message

* fix
2021-07-30 20:58:40 +08:00
Hongchao Deng 5a428aee86
Revert "Upgrade the system to velaux (part 1)" (#141) 2021-07-29 07:50:07 +08:00
Lei Zhang (Harry) 4d90682445
Merge pull request #140 from resouer/dev
Upgrade the system to velaux (part 1)
2021-07-28 10:33:53 -07:00
Lei Zhang ca6d58b0c6 Upgrade the system 2021-07-28 10:32:31 -07:00
wangyuan249 095515ed66
Generate helm chart for velacp (#134)
* config helm chart for velacp

* create velacp controller

* fix service account

* fit dockerfile

* frontend build

* add ui/dist file and ingress

* change targetport

* change image url
2021-07-14 16:10:51 +08:00
wangyuan249 2b2d5f79a7
update kubevela apis (#138)
* change dependency and sort import

* fix sort groups
2021-07-12 13:04:02 +08:00
Hongchao Deng e741368e0d README: update image 2021-07-05 22:09:26 +08:00
Hongchao Deng 73476d4c71
update README (#136) 2021-07-05 21:38:34 +08:00
guoxudong 08f0d280a1
Merge pull request #135 from sunny0826/release-fix
fix release make command
2021-07-02 16:58:53 +08:00
guoxudong 9557ce5bd8 fix 2021-07-02 16:42:48 +08:00
guoxudong d86e937ef2 fix release make command 2021-07-02 16:41:34 +08:00
1185 changed files with 204416 additions and 20555 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
**/node_modules/

10
.editorconfig Normal file
View File

@ -0,0 +1,10 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2

16
.eslintignore Normal file
View File

@ -0,0 +1,16 @@
build/
test/
coverage/
node_modules/
packages/velaux-ui/src/assets/
.DS_Store
public
*.d.ts
dist
pkg/

56
.eslintrc.js Normal file
View File

@ -0,0 +1,56 @@
module.exports = {
extends: ['@grafana/eslint-config'],
root: true,
plugins: ['@emotion', 'lodash', 'jest', 'import', 'jsx-a11y'],
globals: {
page: true,
__COMMIT_HASH__: 'readonly',
},
rules: {
eqeqeq: 'off',
'react/prop-types': 'off',
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
// 'react/no-unknown-property': ['error', { ignore: ['css'] }],
// 'import/order': [
// 'error',
// {
// groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'],
// 'newlines-between': 'always',
// alphabetize: { order: 'asc' },
// },
// ],
'import/order': 'off',
'react/jsx-key': 'off',
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'react-redux',
importNames: ['useDispatch', 'useSelector'],
message: 'Please import from app/types instead.',
},
{
name: 'react-i18next',
importNames: ['Trans', 't'],
message: 'Please import from app/core/internationalization instead',
},
],
},
],
'no-duplicate-imports': 'off',
"import/no-duplicates": "warn",
'react/no-deprecated': 'off',
'react/no-unknown-property': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/array-type': 'off',
},
overrides: [
{
files: ['packages/velaux-ui/src/utils/common.ts'],
rules: {
'no-redeclare': 'off',
},
},
],
};

4
.gitattributes vendored Normal file
View File

@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated

7
.github/CODEOWNERS vendored Normal file
View File

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

42
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,42 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: ""
labels: kind/bug
assignees: ''
---
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
**To Reproduce**
<!--
Steps to reproduce the behavior:
1. The YAML files of Component/Trait I used.
2. The YAML file of Application I applied.
3. Other operations I have done.
4. See error
-->
**Expected behavior**
<!--
A clear and concise description of what you expected to happen.
-->
**Screenshots**
<!--
If applicable, add screenshots to help explain your problem.
-->
**KubeVela Version**
<!--
Describe your KubeVela controller or CLI version information.
-->
**Additional context**
<!--
Add any other context about the problem here.
-->

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Questions & Help
url: https://github.com/kubevela/kubevela/discussions
about: Please ask and answer questions here.

View File

@ -0,0 +1,27 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for this project
title: "[Feature]"
labels: kind/feature
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
<!--
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-->
**Describe the solution you'd like**
<!--
A clear and concise description of what you want to happen.
-->
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features you've considered.
-->
**Additional context**
<!--
Add any other context or screenshots about the feature request here.
-->

27
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,27 @@
### Description of your changes
<!--
Briefly describe what this pull request does. We love pull requests that resolve an open KubeVela issue. If yours does, you
can uncomment the below line to indicate which issue your PR fixes, for example
"Fixes #500":
-->
Fixes #
I have:
- [ ] Read and followed KubeVela's [contribution process](https://github.com/oam-dev/kubevela/blob/master/contribute/create-pull-request.md).
- [ ] [Related Docs](https://github.com/oam-dev/kubevela.io) updated properly. In a new feature or configuration option, an update to the documentation is necessary.
- [ ] Run `yarn lint` to ensure the frontend changes are ready for review.
- [ ] Run `make reviewable`to ensure the server changes are ready for review.
- [ ] Added `backport release-x.y` labels to auto-backport this PR if necessary.
### Special notes for your reviewer
<!--
Be sure to direct your reviewers'
attention to anything that needs special consideration.
-->

11
.github/dependabot.yml vendored Normal file
View File

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

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

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

64
.github/workflows/arm64-build-test.yml vendored Normal file
View File

@ -0,0 +1,64 @@
name: Arm64 Build Test
on:
push:
branches:
- main
- release-*
tags:
- v*
workflow_dispatch: { }
pull_request:
branches:
- main
- release-*
env:
# Common versions
GO_VERSION: '1.22.0'
permissions:
contents: read
jobs:
detect-noop:
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
continue-on-error: true
arm64-build-test:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4
- name: Build linux/arm64 image
id: docker_build_2
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
with:
context: ./
build-args: |
GOPROXY=https://proxy.golang.org
file: ./Dockerfile
platforms: linux/arm64
push: false
tags: oamdev/velaux:latest

22
.github/workflows/back-port.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Backport
on:
pull_request_target:
types:
- closed
jobs:
# align with crossplane's choice https://github.com/crossplane/crossplane/blob/master/.github/workflows/backport.yml
open-pr:
runs-on: ubuntu-22.04
if: github.event.pull_request.merged
steps:
- name: Checkout
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
with:
fetch-depth: 0
- name: Open Backport PR
uses: zeebe-io/backport-action@v0.0.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}

41
.github/workflows/codeql.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: "CodeQL"
on:
push:
branches: [ "main", "release-1.2", "release-1.3", "release-1.4", "release-1.5", "release-1.6" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "40 0 * * 5"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ go, javascript ]
steps:
- name: Checkout
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"

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

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

View File

@ -1,99 +0,0 @@
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
# Common versions
GO_VERSION: '1.16'
GOLANGCI_VERSION: 'v1.38.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
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Build
run: make build-cp
- name: Test
run: make test
lint:
runs-on: ubuntu-20.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
# This action uses its own setup-go, which always seems to use the latest
# stable version of Go. We could run 'make lint' to ensure our desired Go
# version, but we prefer this action because it leaves 'annotations' (i.e.
# it comments on PRs to point out linter violations).
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: ${{ env.GOLANGCI_VERSION }}
check-diff:
runs-on: ubuntu-20.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Check code formatting
run: go install golang.org/x/tools/cmd/goimports && make fmt
- name: Check Diff
run: make check-diff

29
.github/workflows/image-scan.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: "ImageScan"
on:
push:
branches: [ main, release-* ]
jobs:
images:
name: Image Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- name: Build Vela Core image from Dockerfile
run: |
docker build -t docker.io/oamdev/vela-velaux:${{ github.sha }} .
- name: Run Trivy vulnerability scanner for velaux
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/oamdev/vela-velaux:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'

141
.github/workflows/issue-commands.yml vendored Normal file
View File

@ -0,0 +1,141 @@
name: Run commands when issues are labeled or comments added
on:
issues:
types: [labeled, opened]
issue_comment:
types: [created]
permissions:
contents: read
jobs:
bot:
runs-on: ubuntu-22.04
steps:
- name: Checkout Actions
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
with:
repository: "oam-dev/kubevela-github-actions"
path: ./actions
ref: v0.4.2
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: ./actions/package-lock.json
- name: Install Dependencies
run: npm ci --production --prefix ./actions
- name: Run Commands
uses: ./actions/commands
with:
token: ${{secrets.VELA_BOT_TOKEN}}
configPath: issue-commands
backport:
runs-on: ubuntu-22.04
if: github.event.issue.pull_request && contains(github.event.comment.body, '/backport')
permissions:
contents: write
pull-requests: write
issues: write
steps:
- name: Extract Command
id: command
uses: xt0rted/slash-command-action@bf51f8f5f4ea3d58abc7eca58f77104182b23e88
with:
repo-token: ${{ secrets.VELA_BOT_TOKEN }}
command: backport
reaction: "true"
reaction-type: "eyes"
allow-edits: "false"
permission-level: read
- name: Handle Command
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
env:
VERSION: ${{ steps.command.outputs.command-arguments }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const version = process.env.VERSION
let label = "backport release-" + version
if (version.includes("release")) {
label = "backport " + version
}
// Add our backport label.
github.rest.issues.addLabels({
// Every pull request is an issue, but not every issue is a pull request.
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: [label]
})
console.log("Added '" + label + "' label.")
- name: Checkout
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
with:
fetch-depth: 0
- name: Open Backport PR
uses: zeebe-io/backport-action@v0.0.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}
retest:
runs-on: ubuntu-22.04
if: github.event.issue.pull_request && contains(github.event.comment.body, '/retest')
permissions:
actions: write
contents: write
pull-requests: write
issues: write
steps:
- name: Retest the current pull request
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
env:
PULL_REQUEST_ID: ${{ github.event.issue.number }}
COMMENT_ID: ${{ github.event.comment.id }}
COMMENT_BODY: ${{ github.event.comment.body }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pull_request_id = process.env.PULL_REQUEST_ID
const comment_id = process.env.COMMENT_ID
const comment_body = process.env.COMMENT_BODY
console.log("retest pr: #" + pull_request_id + " comment: " + comment_body)
const {data: pr} = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pull_request_id,
})
console.log("pr: " + JSON.stringify(pr))
const action = comment_body.split(" ")[0]
let workflow_ids = comment_body.split(" ").slice(1).filter(line => line.length > 0).map(line => line + ".yml")
if (workflow_ids.length == 0) workflow_ids = ["staticcheck.yml", "server-test.yml", "arm64-build-test.yml"]
for (let i = 0; i < workflow_ids.length; i++) {
const workflow_id = workflow_ids[i]
const {data: runs} = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: workflow_id,
head_sha: pr.head.sha,
})
console.log("runs for " + workflow_id + ": ", JSON.stringify(runs))
runs.workflow_runs.forEach((workflow_run) => {
if (workflow_run.status === "in_progress") return
let handler = github.rest.actions.reRunWorkflow
if (action === "/retest-failed") handler = github.rest.actions.reRunWorkflowFailedJobs
handler({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: workflow_run.id
})
})
}
github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment_id,
content: "eyes",
});

View File

@ -7,85 +7,44 @@ on:
workflow_dispatch: {}
jobs:
release:
runs-on: ubuntu-latest
env:
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: 1.16
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get the latest version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Run cross-build
run: |
go get github.com/mitchellh/gox@v0.4.0
make cross-build
- name: Set up Node 14.x
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Build UI
run: |
cd ui/ && yarn && yarn build && cd ..
- name: Run compress binary
run: make compress
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.2
- name: Upload Linux amd64 tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/velacp-linux-amd64.tar.gz
asset_name: velacp-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload Linux amd64 zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/velacp-linux-amd64.zip
asset_name: velacp-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload MacOS tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/velacp-darwin-amd64.tar.gz
asset_name: velacp-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload MacOS zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/velacp-darwin-amd64.zip
asset_name: velacp-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload Windows tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/velacp-windows-amd64.tar.gz
asset_name: velacp-${{ steps.get_version.outputs.VERSION }}-windows-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload Windows zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/velacp-windows-amd64.zip
asset_name: velacp-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload Checksums
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/sha256sums.txt
asset_name: sha256sums.txt
asset_content_type: text/plain
- uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- name: Get the version
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
if [[ ${GITHUB_REF} == "refs/heads/main" ]]; then
VERSION=latest
fi
echo ::set-output name=VERSION::${VERSION}
- name: Get git revision
id: vars
shell: bash
run: |
echo "git_revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Login to DockerHub
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3.1.0
- uses: docker/setup-buildx-action@v3.4.0
with:
driver-opts: image=moby/buildkit:master
- name: Build docker image
id: acr_build
uses: docker/build-push-action@v6.3.0
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
VERSION=${{ steps.get_version.outputs.VERSION }}
GOPROXY=https://proxy.golang.org
tags: |-
oamdev/velaux:${{ steps.get_version.outputs.VERSION }}

204
.github/workflows/server-test.yml vendored Normal file
View File

@ -0,0 +1,204 @@
name: VelaUX APIServer Test
on:
push:
branches:
- main
- release-*
tags:
- v*
workflow_dispatch: { }
pull_request:
branches:
- main
- release-*
env:
# Common versions
GO_VERSION: '1.22.0'
permissions:
contents: read
jobs:
detect-noop:
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
continue-on-error: true
server-unit-tests:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v4
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Install ginkgo
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y golang-ginkgo-dev
- name : Set up MySQL
uses: mirromutth/mysql-action@v1.1
with:
mysql database: 'kubevela'
mysql root password: 'kubevelaSQL123'
- name: Set up Postgres
uses: Harmon758/postgresql-action@v1
with:
postgresql version: '11'
postgresql db: 'kubevela'
postgresql user: 'kubevela'
postgresql password: 'Kubevela-123'
- name: Start MongoDB
uses: supercharge/mongodb-github-action@5a87bd81f88e2a8b195f8b7b656f5cda1350815a # 1.11.0
with:
mongodb-version: '5.0'
# TODO need update action version to resolve node 12 deprecated.
- name: install Kubebuilder
uses: RyanSiu1995/kubebuilder-action@e7e4de1c1eaf1d089b9a186f7526239acadf0b40
with:
version: 3.1.0
kubebuilderOnly: false
kubernetesVersion: v1.26.0
- name: Run api server unit test
run: make unit-test-server
- name: Upload coverage report
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: apiserver-unittests
name: codecov-umbrella
server-e2e-tests:
runs-on: ubuntu-22.04
needs: [ detect-noop ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.26"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
with:
submodules: true
- name: Build docker image
id: docker_build
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
with:
context: ./
build-args: |
GOPROXY=https://proxy.golang.org
file: ./Dockerfile.e2e
platforms: linux/amd64
push: false
tags: oamdev/velaux:latest
- name: Tear down K3d if exist
run: |
k3d cluster delete || true
k3d cluster delete worker || true
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.26 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
- name: Setup K3d (Hub)
uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96
with:
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-args: ${{ env.EGRESS_ARG }}
- name: Setup K3d (Worker)
uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96
with:
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-name: worker
k3d-args: --kubeconfig-update-default=false --network=k3d-k3s-default ${{ env.EGRESS_ARG }}
- name: Kind Cluster (Worker)
run: |
internal_ip=$(docker network inspect k3d-k3s-default|jq ".[0].Containers"| jq -r '.[]| select(.Name=="k3d-worker-server-0")|.IPv4Address' | cut -d/ -f1)
k3d kubeconfig get worker > /tmp/worker.client.kubeconfig
cp /tmp/worker.client.kubeconfig /tmp/worker.kubeconfig
sed -i "s/0.0.0.0:[0-9]\+/$internal_ip:6443/" /tmp/worker.kubeconfig
- name: Setup KubeVela core environment
run: |
make e2e-setup-core
make start-addon-mock-server
make load-image
make enable-addon-no-replicas
- name: Run server e2e test
run: |
export ALIYUN_ACCESS_KEY_ID=${{ secrets.ALIYUN_ACCESS_KEY_ID }}
export ALIYUN_ACCESS_KEY_SECRET=${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
docker run --rm -v `pwd`/e2e-plugins:/plugins oamdev/velaux:latest cp -r -a /app/velaux/plugins/ /plugins/
make e2e-server-test
- name: Test addon enable
run: |
make enable-addon
- name: Upload coverage report
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/e2e_apiserver_test.out
flags: server-e2e-tests
name: codecov-umbrella
- name: Clean e2e profile
run: rm /tmp/e2e_apiserver_test.out

54
.github/workflows/staticcheck.yml vendored Normal file
View File

@ -0,0 +1,54 @@
name: Static Check
on:
push:
branches:
- main
- release-*
workflow_dispatch: {}
pull_request:
branches:
- main
- release-*
env:
# Common versions
GO_VERSION: '1.22.0'
jobs:
detect-noop:
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: '16'
cache: 'yarn'
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Install Yarn
run: npm install --global yarn
- name: upgrade yarn
run: yarn set version 3.6.0
- run: yarn install
- run: yarn lint
name: Check Frontend Code Style
- run: yarn test
- run: make check-diff
name: Check Server Code Style

23
.gitignore vendored
View File

@ -17,7 +17,30 @@ node_modules/
# Dependency directories (remove the comment below to include it)
vendor/
build
# IDE
.idea
.vscode
.eslintcache
.env
package-lock.json
yarn-error.log
.DS_Store
dist
/packages/**/compiled
.yarn/.cache/
.yarn/cache/
.yarn/unplugged
.yarn/install-state.gz
.pnp.*
tsconfig.tsbuildinfo
e2e-plugins
npm-artifacts
bin

226
.golangci.yml Normal file
View File

@ -0,0 +1,226 @@
run:
timeout: 10m
skip-files:
- "zz_generated\\..+\\.go$"
- ".*_test.go$"
skip-dirs:
- "hack"
- "e2e"
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
linters-settings:
errcheck:
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default.
check-type-assertions: false
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: false
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*
exhaustive:
# indicates that switch statements are to be considered exhaustive if a
# 'default' case is present, even if all enum members aren't listed in the
# switch
default-signifies-exhaustive: true
govet:
# report about shadowed variables
check-shadowing: false
revive:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/kubevela/velaux
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 30
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
dupl:
# tokens count to trigger issue, 150 by default
threshold: 100
goconst:
# minimal length of string constant, 3 by default
min-len: 3
# minimal occurrences count to trigger, 3 by default
min-occurrences: 5
lll:
# tab width in spaces. Default to 1.
tab-width: 1
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unparam:
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
max-func-lines: 30
gocritic:
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint` run to see all tags and checks.
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
enabled-tags:
- performance
settings: # settings passed to gocritic
captLocal: # must be valid enabled check name
paramsOnly: true
rangeValCopy:
sizeThreshold: 32
makezero:
# Allow only slices initialized with a length of zero. Default is false.
always: false
linters:
enable:
- megacheck
- govet
- gocyclo
- gocritic
- goconst
- goimports
- gofmt # We enable this as well as goimports for its simplify mode.
- revive
- unconvert
- misspell
- nakedret
- exportloopref
disable:
- deadcode
- scopelint
- structcheck
- varcheck
- rowserrcheck
- sqlclosecheck
- errchkjson
- contextcheck
presets:
- bugs
- unused
fast: false
issues:
# Excluding configuration per-path and per-linter
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test(ing)?\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- exportloopref
- unparam
# Ease some gocritic warnings on test files.
- path: _test\.go
text: "(unnamedResult|exitAfterDefer)"
linters:
- gocritic
# These are performance optimisations rather than style issues per se.
# They warn when function arguments or range values copy a lot of memory
# rather than using a pointer.
- text: "(hugeParam|rangeValCopy):"
linters:
- gocritic
# This "TestMain should call os.Exit to set exit code" warning is not clever
# enough to notice that we call a helper method that calls os.Exit.
- text: "SA3000:"
linters:
- staticcheck
- text: "k8s.io/api/core/v1"
linters:
- goimports
# This is a "potential hardcoded credentials" warning. It's triggered by
# any variable with 'secret' in the same, and thus hits a lot of false
# positives in Kubernetes land where a Secret is an object type.
- text: "G101:"
linters:
- gosec
- gas
# This is an 'errors unhandled' warning that duplicates errcheck.
- text: "G104:"
linters:
- gosec
- gas
# The Azure AddToUserAgent method appends to the existing user agent string.
# It returns an error if you pass it an empty string lettinga you know the
# user agent did not change, making it more of a warning.
- text: \.AddToUserAgent
linters:
- errcheck
- text: "don't use an underscore"
linters:
- revive
- text: "package-comments: should have a package comment"
linters:
- revive
- text: "error-strings: error strings should not be capitalized or end with punctuation or a newline"
linters:
- revive
# Independently from option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
# excluded by default patterns execute `golangci-lint run --help`.
# Default value for this option is true.
exclude-use-default: false
# Show only new issues: if there are unstaged changes or untracked files,
# only those changes are analyzed, else only changes in HEAD~ are analyzed.
# It's a super-useful option for integration of golangci-lint into existing
# large codebase. It's not practical to fix all existing issues at the moment
# of integration: much better don't allow issues in new code.
# Default is false.
new: false
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0

5
.prettierrc.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
trailingComma: 'es5',
singleQuote: true,
printWidth: 120,
};

6
.stylelintrc.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
extends: [require.resolve('@umijs/fabric/dist/stylelint')],
rules: {
// your rules
},
};

874
.yarn/releases/yarn-3.6.0.cjs vendored Executable file

File diff suppressed because one or more lines are too long

20
.yarn/sdks/eslint/bin/eslint.js vendored Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}
// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);

20
.yarn/sdks/eslint/lib/api.js vendored Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint
require(absPnpApiPath).setup();
}
}
// Defer to the real eslint your application uses
module.exports = absRequire(`eslint`);

6
.yarn/sdks/eslint/package.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"name": "eslint",
"version": "8.34.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}

5
.yarn/sdks/integrations.yml vendored Normal file
View File

@ -0,0 +1,5 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!
integrations:
- vscode

20
.yarn/sdks/prettier/index.js vendored Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/index.js
require(absPnpApiPath).setup();
}
}
// Defer to the real prettier/index.js your application uses
module.exports = absRequire(`prettier/index.js`);

6
.yarn/sdks/prettier/package.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"name": "prettier",
"version": "2.8.7-sdk",
"main": "./index.js",
"type": "commonjs"
}

20
.yarn/sdks/typescript/bin/tsc vendored Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/bin/tsc your application uses
module.exports = absRequire(`typescript/bin/tsc`);

20
.yarn/sdks/typescript/bin/tsserver vendored Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/bin/tsserver your application uses
module.exports = absRequire(`typescript/bin/tsserver`);

20
.yarn/sdks/typescript/lib/tsc.js vendored Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsc.js
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/lib/tsc.js your application uses
module.exports = absRequire(`typescript/lib/tsc.js`);

225
.yarn/sdks/typescript/lib/tsserver.js vendored Normal file
View File

@ -0,0 +1,225 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
}
const {isAbsolute} = require(`path`);
const pnpApi = require(`pnpapi`);
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const isPortal = str => str.startsWith("portal:/");
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
return `${locator.name}@${locator.reference}`;
}));
// VSCode sends the zip paths to TS using the "zip://" prefix, that TS
// doesn't understand. This layer makes sure to remove the protocol
// before forwarding it to TS, and to add it back on all returned paths.
function toEditorPath(str) {
// We add the `zip:` prefix to both `.zip/` paths and virtual paths
if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) {
// We also take the opportunity to turn virtual paths into physical ones;
// this makes it much easier to work with workspaces that list peer
// dependencies, since otherwise Ctrl+Click would bring us to the virtual
// file instances instead of the real ones.
//
// We only do this to modules owned by the the dependency tree roots.
// This avoids breaking the resolution when jumping inside a vendor
// with peer dep (otherwise jumping into react-dom would show resolution
// errors on react).
//
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
str = resolved;
}
}
str = normalize(str);
if (str.match(/\.zip\//)) {
switch (hostInfo) {
// Absolute VSCode `Uri.fsPath`s need to start with a slash.
// VSCode only adds it automatically for supported schemes,
// so we have to do it manually for the `zip` scheme.
// The path needs to start with a caret otherwise VSCode doesn't handle the protocol
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// 2021-10-08: VSCode changed the format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
// 2022-05-06: VSCode changed the format in 1.68
// Before | ^/zip/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;
case `vscode <1.68`: {
str = `^/zip${str}`;
} break;
case `vscode`: {
str = `^/zip/${str}`;
} break;
// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
case `coc-nvim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = resolve(`zipfile:${str}`);
} break;
// Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)
// We have to resolve the actual file system path from virtual path,
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile://${str}`;
} break;
default: {
str = `zip:${str}`;
} break;
}
} else {
str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`);
}
}
return str;
}
function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
// before `zipfile:`
return process.platform === `win32`
? str.replace(/^.*zipfile:\//, ``)
: str.replace(/^.*zipfile:/, ``);
} break;
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
return str.replace(/^zipfile:\/\//, ``);
} break;
case `vscode`:
default: {
return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
} break;
}
}
// Force enable 'allowLocalPluginLoads'
// TypeScript tries to resolve plugins using a path relative to itself
// which doesn't work when using the global cache
// https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238
// VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but
// TypeScript already does local loads and if this code is running the user trusts the workspace
// https://github.com/microsoft/vscode/issues/45856
const ConfiguredProject = tsserver.server.ConfiguredProject;
const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;
ConfiguredProject.prototype.enablePluginsWithOptions = function() {
this.projectService.allowLocalPluginLoads = true;
return originalEnablePluginsWithOptions.apply(this, arguments);
};
// And here is the point where we hijack the VSCode <-> TS communications
// by adding ourselves in the middle. We locate everything that looks
// like an absolute path of ours and normalize it.
const Session = tsserver.server.Session;
const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;
let hostInfo = `unknown`;
Object.assign(Session.prototype, {
onMessage(/** @type {string | object} */ message) {
const isStringMessage = typeof message === 'string';
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
if (
parsedMessage != null &&
typeof parsedMessage === `object` &&
parsedMessage.arguments &&
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
// The RegExp from https://semver.org/ but without the caret at the start
/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
) ?? []).map(Number)
if (major === 1) {
if (minor < 61) {
hostInfo += ` <1.61`;
} else if (minor < 66) {
hostInfo += ` <1.66`;
} else if (minor < 68) {
hostInfo += ` <1.68`;
}
}
}
}
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
return typeof value === 'string' ? fromEditorPath(value) : value;
});
return originalOnMessage.call(
this,
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
);
},
send(/** @type {any} */ msg) {
return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {
return typeof value === `string` ? toEditorPath(value) : value;
})));
}
});
return tsserver;
};
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/lib/tsserver.js your application uses
module.exports = moduleWrapper(absRequire(`typescript/lib/tsserver.js`));

View File

@ -0,0 +1,225 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
}
const {isAbsolute} = require(`path`);
const pnpApi = require(`pnpapi`);
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const isPortal = str => str.startsWith("portal:/");
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
return `${locator.name}@${locator.reference}`;
}));
// VSCode sends the zip paths to TS using the "zip://" prefix, that TS
// doesn't understand. This layer makes sure to remove the protocol
// before forwarding it to TS, and to add it back on all returned paths.
function toEditorPath(str) {
// We add the `zip:` prefix to both `.zip/` paths and virtual paths
if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) {
// We also take the opportunity to turn virtual paths into physical ones;
// this makes it much easier to work with workspaces that list peer
// dependencies, since otherwise Ctrl+Click would bring us to the virtual
// file instances instead of the real ones.
//
// We only do this to modules owned by the the dependency tree roots.
// This avoids breaking the resolution when jumping inside a vendor
// with peer dep (otherwise jumping into react-dom would show resolution
// errors on react).
//
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
str = resolved;
}
}
str = normalize(str);
if (str.match(/\.zip\//)) {
switch (hostInfo) {
// Absolute VSCode `Uri.fsPath`s need to start with a slash.
// VSCode only adds it automatically for supported schemes,
// so we have to do it manually for the `zip` scheme.
// The path needs to start with a caret otherwise VSCode doesn't handle the protocol
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// 2021-10-08: VSCode changed the format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
// 2022-05-06: VSCode changed the format in 1.68
// Before | ^/zip/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;
case `vscode <1.68`: {
str = `^/zip${str}`;
} break;
case `vscode`: {
str = `^/zip/${str}`;
} break;
// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
case `coc-nvim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = resolve(`zipfile:${str}`);
} break;
// Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)
// We have to resolve the actual file system path from virtual path,
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile://${str}`;
} break;
default: {
str = `zip:${str}`;
} break;
}
} else {
str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`);
}
}
return str;
}
function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
// before `zipfile:`
return process.platform === `win32`
? str.replace(/^.*zipfile:\//, ``)
: str.replace(/^.*zipfile:/, ``);
} break;
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
return str.replace(/^zipfile:\/\//, ``);
} break;
case `vscode`:
default: {
return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
} break;
}
}
// Force enable 'allowLocalPluginLoads'
// TypeScript tries to resolve plugins using a path relative to itself
// which doesn't work when using the global cache
// https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238
// VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but
// TypeScript already does local loads and if this code is running the user trusts the workspace
// https://github.com/microsoft/vscode/issues/45856
const ConfiguredProject = tsserver.server.ConfiguredProject;
const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;
ConfiguredProject.prototype.enablePluginsWithOptions = function() {
this.projectService.allowLocalPluginLoads = true;
return originalEnablePluginsWithOptions.apply(this, arguments);
};
// And here is the point where we hijack the VSCode <-> TS communications
// by adding ourselves in the middle. We locate everything that looks
// like an absolute path of ours and normalize it.
const Session = tsserver.server.Session;
const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;
let hostInfo = `unknown`;
Object.assign(Session.prototype, {
onMessage(/** @type {string | object} */ message) {
const isStringMessage = typeof message === 'string';
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
if (
parsedMessage != null &&
typeof parsedMessage === `object` &&
parsedMessage.arguments &&
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
// The RegExp from https://semver.org/ but without the caret at the start
/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
) ?? []).map(Number)
if (major === 1) {
if (minor < 61) {
hostInfo += ` <1.61`;
} else if (minor < 66) {
hostInfo += ` <1.66`;
} else if (minor < 68) {
hostInfo += ` <1.68`;
}
}
}
}
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
return typeof value === 'string' ? fromEditorPath(value) : value;
});
return originalOnMessage.call(
this,
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
);
},
send(/** @type {any} */ msg) {
return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {
return typeof value === `string` ? toEditorPath(value) : value;
})));
}
});
return tsserver;
};
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/lib/tsserverlibrary.js your application uses
module.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`));

20
.yarn/sdks/typescript/lib/typescript.js vendored Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/typescript.js
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/lib/typescript.js your application uses
module.exports = absRequire(`typescript/lib/typescript.js`);

6
.yarn/sdks/typescript/package.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"name": "typescript",
"version": "4.4.4-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}

3
.yarnrc.yml Normal file
View File

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

View File

@ -1,21 +1,22 @@
# CONTRIBUTING Guide
## About velacp
## About VelaUX
The [KubeVela](https://github.com/oam-dev/kubevela) User Experience (UX) Dashboard. Designed as an extensible, application-oriented delivery platform.
KubeVela control plane (velacp) includes the UI/CLI and HTTP server components to provide application and cluster management experience based on KubeVela & K8s.
To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](https://github.com/oam-dev/kubevela/blob/master/CODE_OF_CONDUCT.md).
This document is a guide to help you through the process of contributing to velacp.
This document is a guide to help you through the process of contributing to VelaUX.
## Become a contributor
You can contribute to velacp in several ways. Here are some examples:
You can contribute to VelaUX in several ways. Here are some examples:
* Contribute to the velacp codebase.
* Contribute to the VelaUX codebase.
* Report and triage bugs.
* Write technical documentation and blog posts, for users and contributors.
* Organize meetups and user groups in your local area.
* Help others by answering questions about velacp.
* Help others by answering questions about VelaUX.
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
@ -23,13 +24,13 @@ For more ways to contribute, check out the [Open Source Guides](https://opensour
Unsure where to begin contributing to KubeVela? Start by browsing issues labeled `good first issue` or `help wanted`.
- [Good first issue](https://github.com/oam-dev/velacp/labels/good%20first%20issue) issues are generally straightforward to complete.
- [Help wanted](https://github.com/oam-dev/velacp/labels/help%20wanted) issues are problems we would like the community to help us with regardless of complexity.
- [Good first issue](https://github.com/oam-dev/velaux/labels/good%20first%20issue) issues are generally straightforward to complete.
- [Help wanted](https://github.com/oam-dev/velaux/labels/help%20wanted) issues are problems we would like the community to help us with regardless of complexity.
If you're looking to make a code change, see how to set up your environment for [frontend development](docs/contributing/frontend.md) and [backend development](docs/contributing/backend.md).
If you're looking to make a code change, see [how to set up your environment](docs/contributing/velaux.md).
When you're ready to contribute, it's time to [Create a pull request](https://github.com/oam-dev/kubevela/blob/master/contribute/create-pull-request.md).
### Report bugs / Suggest enhancements / Answering questions etc.
velacp follows the KubeVela [CONTRIBUTING Guide](https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md)
VelaUX follows the KubeVela [CONTRIBUTING Guide](https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md)

View File

@ -1,6 +1,17 @@
# Build the manager binary
FROM golang:1.15 as builder
ARG BASE_IMAGE
FROM node:16-alpine as ui-builder
ARG VERSION
WORKDIR /app/velaux
ADD . .
ENV VERSION=${VERSION}
RUN apk add --no-cache git make clang build-base python3
RUN yarn install && yarn build
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as server-builder
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-https://goproxy.cn}
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
@ -9,19 +20,28 @@ COPY go.sum go.sum
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY controllers/ controllers/
# Copy the go source for building server
COPY cmd/server/ cmd/server/
COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
ARG TARGETARCH
ARG VERSION
ARG GITVERSION
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
USER nonroot:nonroot
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
-o apiserver-${TARGETARCH} cmd/server/main.go
ENTRYPOINT ["/manager"]
FROM ${BASE_IMAGE:-alpine@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501}
# This is required by daemon connecting with cri
RUN apk add --no-cache ca-certificates bash expat
WORKDIR /app/velaux
ARG TARGETARCH
ENV PATH=$PATH:/app/velaux
COPY --from=server-builder /workspace/apiserver-${TARGETARCH} /app/velaux/server
COPY --from=ui-builder /app/velaux/public /app/velaux/public
CMD ["server"]

49
Dockerfile.e2e Normal file
View File

@ -0,0 +1,49 @@
ARG BASE_IMAGE
FROM node:16-alpine as ui-builder
ARG VERSION
WORKDIR /app/velaux
ADD . .
ENV VERSION=${VERSION}
RUN apk add --no-cache git
RUN yarn install && yarn build && yarn packages:plugins
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as server-builder
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-https://goproxy.cn}
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# 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
# Copy the go source for building server
COPY cmd/server/ cmd/server/
COPY pkg/ pkg/
# Build
ARG TARGETARCH
ARG VERSION
ARG GITVERSION
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
-o apiserver-${TARGETARCH} cmd/server/main.go
FROM ${BASE_IMAGE:-alpine@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501}
# This is required by daemon connecting with cri
RUN apk add --no-cache ca-certificates bash expat
WORKDIR /app/velaux
ARG TARGETARCH
ENV PATH=$PATH:/app/velaux
COPY --from=server-builder /workspace/apiserver-${TARGETARCH} /app/velaux/server
COPY --from=ui-builder /app/velaux/public /app/velaux/public
COPY --from=ui-builder /app/velaux/plugins/app-demo/dist /app/velaux/plugins/app-demo
COPY --from=ui-builder /app/velaux/plugins/node-dashboard/dist /app/velaux/plugins/node-dashboard
CMD ["server"]

38
Dockerfile.local Normal file
View File

@ -0,0 +1,38 @@
ARG BASE_IMAG
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as server-builder
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-https://goproxy.cn}
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# 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
COPY vendor vendor
# Copy the go source for building server
COPY cmd/server/ cmd/server/
COPY pkg/ pkg/
# Build
ARG TARGETARCH
ARG VERSION
ARG GITVERSION
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
-o apiserver-${TARGETARCH} cmd/server/main.go
FROM ${BASE_IMAGE:-alpine@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501}
# This is required by daemon connecting with cri
RUN apk add --no-cache ca-certificates bash expat
WORKDIR /app/velaux
ARG TARGETARCH
ENV PATH=$PATH:/app/velaux
COPY --from=server-builder /workspace/apiserver-${TARGETARCH} /app/velaux/server
COPY ./public /app/velaux/public
CMD ["server"]

203
Makefile
View File

@ -1,103 +1,24 @@
# VelaCP version
VELA_CP_VERSION ?= master
# Repo info
GIT_COMMIT ?= git-$(shell git rev-parse --short HEAD)
include makefiles/const.mk
include makefiles/build.mk
ERR = echo ${TIME} ${RED}[FAIL]${CNone}
OK = echo ${TIME} ${GREEN}[ OK ]${CNone}
PROJECT_VERSION_VAR := github.com/oam-dev/velacp/pkg/version.Version
PROJECT_GITVERSION_VAR := github.com/oam-dev/velacp/pkg/version.GitRevision
LDFLAGS ?= "-X $(PROJECT_VERSION_VAR)=$(PROJECT_VERSION) -X $(PROJECT_GITVERSION_VAR)=$(GIT_COMMIT)"
GOX = go run github.com/mitchellh/gox
TARGETS := darwin/amd64 linux/amd64 windows/amd64
DIST_DIRS := find * -type d -maxdepth 0 -exec
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
all: build
build: build-ui build-cp
build-ui:
cd ui/ && yarn build && cd ..
build-cp:
go build -o _bin/velacp ./cmd/velacp/main.go
build-cli:
go build -o _bin/velactl ./cmd/velactl/main.go
cross-build:
GO111MODULE=on CGO_ENABLED=0 $(GOX) -ldflags $(LDFLAGS) -parallel=2 -output="_bin/{{.OS}}-{{.Arch}}/velacp" -osarch="$(TARGETS)" ./cmd/velacp/
compress:
( \
echo "\n## Release Info\nVERSION: $(PROJECT_VERSION)" >> README.md && \
echo "GIT_COMMIT: $(GIT_COMMIT_LONG)\n" >> README.md && \
cd _bin && \
$(DIST_DIRS) cp -r ../ui/dist {} \; && \
$(DIST_DIRS) cp ../LICENSE {} \; && \
$(DIST_DIRS) cp ../README.md {} \; && \
$(DIST_DIRS) tar -zcf velacp-{}.tar.gz {} \; && \
$(DIST_DIRS) zip -r velacp-{}.zip {} \; && \
sha256sum velacp-* > sha256sums.txt \
)
proto:
hack/gen_proto.sh
# Run tests
test: fmt vet
go test ./pkg/... ./cmd/...
# Run go fmt against code
fmt:
go fmt ./pkg/... ./cmd/...
# Run go vet against code
vet:
go vet ./pkg/... ./cmd/...
reviewable: fmt vet lint staticcheck
go mod tidy
# Execute auto-gen code commands and ensure branch is clean.
check-diff: reviewable
git --no-pager diff
git diff --quiet || ($(ERR) please run 'make reviewable' to include all changes && false)
@$(OK) branch is clean
run: build-cp
_bin/velacp server \
--db-url=${MONGO_URL} \
--db-name=vela
staticcheck: staticchecktool
$(STATICCHECK) ./...
lint: golangci
$(GOLANGCILINT) run ./...
GOLANGCILINT_VERSION ?= v1.31.0
all: docker-build
.PHONY: golangci
golangci:
ifeq (, $(shell which golangci-lint))
ifeq ($(shell $(GLOBAL_GOLANGCILINT) version --format short), $(GOLANGCILINT_VERSION))
@$(OK) golangci-lint is already installed
GOLANGCILINT=$(GLOBAL_GOLANGCILINT)
else ifeq ($(shell $(GOBIN_GOLANGCILINT) version --format short), $(GOLANGCILINT_VERSION))
@$(OK) golangci-lint is already installed
GOLANGCILINT=$(GOBIN_GOLANGCILINT)
else
@{ \
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' ;\
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v$(GOLANGCILINT_VERSION) ;\
echo 'Successfully installed' ;\
}
GOLANGCILINT=$(GOBIN)/golangci-lint
else
GOLANGCILINT=$(shell which golangci-lint)
endif
.PHONY: staticchecktool
@ -106,9 +27,105 @@ ifeq (, $(shell which staticcheck))
@{ \
set -e ;\
echo 'installing honnef.co/go/tools/cmd/staticcheck ' ;\
GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck ;\
go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 ;\
}
STATICCHECK=$(GOBIN)/staticcheck
else
STATICCHECK=$(shell which staticcheck)
endif
.PHONY: goimports
goimports:
ifeq (, $(shell which goimports))
@{ \
set -e ;\
go install golang.org/x/tools/cmd/goimports@6546d82b229aa5bd9ebcc38b09587462e34b48b6 ;\
}
GOIMPORTS=$(GOBIN)/goimports
else
GOIMPORTS=$(shell which goimports)
endif
.PHONY: e2e-setup-core
e2e-setup-core: install-vela install-core install-addon
.PHONY: install-vela
install-vela:
curl -fsSl https://kubevela.io/script/install.sh | bash -s v1.9.0-alpha.3
install-core:
vela install -v v1.9.0-alpha.2 -y
install-addon:
vela addon enable fluxcd
vela addon enable vela-workflow --override-definitions
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.kubernetes.io/name=vela-workflow -n vela-system --timeout=600s
start-addon-mock-server:
go run ./e2e-test/addon &
load-image:
k3d image import oamdev/velaux:latest || { echo >&2 "kind not installed or error loading image: $(VELA_CORE_TEST_IMAGE)"; exit 1; }
enable-addon-no-replicas:
vela addon enable ./addon replicas=0
enable-addon:
vela addon enable ./addon
.PHONY: e2e-server-test
e2e-server-test:
go test -v -coverpkg=./... -coverprofile=/tmp/e2e_apiserver_test.out ./e2e-test
@$(OK) tests pass
unit-test-server:
go test -gcflags=all=-l -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/...)
setup-test-server:
curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/$(shell go env GOOS)/$(shell go env GOARCH)
chmod +x kubebuilder
sudo mv kubebuilder /usr/local/bin/
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
${eval OUTPUT = $(shell ${GOBIN}/setup-envtest --bin-dir /tmp use)}
${eval BIN_PATH=$(lastword $(subst Path:, ,${OUTPUT}))}
sudo mkdir -p /usr/local/kubebuilder/bin
sudo mv ${BIN_PATH}/* /usr/local/kubebuilder/bin
build-swagger:
go run ./cmd/server/main.go build-swagger ./docs/apidoc/swagger.json
lint: golangci
@$(INFO) lint
@$(GOLANGCILINT) run --timeout 5m
vet:
@$(INFO) go vet
@go vet $(shell go list ./...)
fmt: goimports
go fmt ./...
$(GOIMPORTS) -local github.com/kubevela/velaux -w $$(go list -f {{.Dir}} ./...)
staticcheck: staticchecktool
@$(INFO) staticcheck
@$(STATICCHECK) $(shell go list ./...)
mod:
go mod tidy
reviewable: mod fmt vet staticcheck lint
# Execute auto-gen code commands and ensure branch is clean.
check-diff: reviewable
git --no-pager diff
git diff --quiet || ($(ERR) please run 'make reviewable' to include all changes && false)
@$(OK) branch is clean
run-server:
go run ./cmd/server/main.go
build-ui:
@$(INFO) Building UI
yarn build
build-test-image: build-ui
@$(INFO) Building image
docker build -t velaux:latest -f Dockerfile.local .

9
OWNERS
View File

@ -1,3 +1,8 @@
owners:
- hongchaodeng
- sunny0826
- barnettZQG
approvers:
emeritus-members:
- wangbow
- hanxie-crypto

22
PROJECT
View File

@ -1,22 +0,0 @@
domain: velacp.oam.dev
repo: github.com/oam-dev/velacp
resources:
- group: velacp.oam.dev
kind: Environment
version: v1alpha1
- group: velacp.oam.dev
kind: Application
version: v1alpha1
- group: velacp.oam.dev
kind: Cluster
version: v1alpha1
- group: velacp.oam.dev
kind: Catalog
version: v1alpha1
- group: velacp.oam.dev
kind: Package
version: v1alpha1
- group: velacp.oam.dev
kind: AppTemplate
version: v1alpha1
version: "2"

101
README.md
View File

@ -1,47 +1,90 @@
# velacp
![alt](docs/images/KubeVela-03.png)
KubeVela control plane (velacp) includes the UI/CLI and HTTP server components to provide application and cluster management experience based on KubeVela & K8s.
[![Go Report Card](https://goreportcard.com/badge/github.com/kubevela/velaux)](https://goreportcard.com/report/github.com/kubevela/velaux)
![Docker Pulls](https://img.shields.io/docker/pulls/oamdev/velaux)
## Architecture
## Overview
This project is based on the following tech stacks:
[VelaUX](https://github.com/kubevela/velaux) is a web portal for KubeVela end users, and also functions as an opinionated application delivery platform. Additionally, it operates as a highly adaptable plugin framework, empowering developers to create bespoke plugins and smoothly integrate them into the KubeVela platform. This approach delivers unparalleled flexibility and customization options for scaling up the platform's capabilities.
- [Protobuf](https://developers.google.com/protocol-buffers/docs/gotutorial)
- Golang and [Echo](https://echo.labstack.com/)
- React and [Ant Design Pro](https://pro.ant.design/)
- Mongodb
### Highlights
![alt](docs/images/velacp-arch.png)
*Customizable User Interface*: With VelaUX, enterprises can tailor the user interface to their specific needs for managing applications and infrastructure. This feature leads to a more intuitive and efficient user experience, resulting in increased productivity and better resource utilization.
## Quickstart
*Easy Integration*: VelaUX is designed for seamless integration with the KubeVela platform, simplifying the deployment and management of cloud-native atomic capabilities within the platform. This makes it easier for enterprises to build platforms that meet their needs for continuous application delivery, observability, security, and other requirements based on these cloud-native atomic capabilities.
Build cli and server binaries:
*Out-of-Box Platform*: VelaUX provides a comprehensive set of features that empower enterprises to deploy and monitor their applications effectively. These features include multi-cluster and multi-environment support, pipeline management, observability, and more. Additionally, VelaUX streamlines the complexities of Kubernetes, making it simpler for users to manage their deployments.
```
mkdir -p _bin/
make
## Quick Start
### Users
Please refer to this guide to install: [https://kubevela.net/docs/install](https://kubevela.net/docs/install)
### Developers
#### Build the frontend
Make sure you have installed [yarn 2.0](https://yarnpkg.com/getting-started/install), This is required.
Install frontend dependencies and build the frontend.
```shell
yarn install
yarn build
```
Setup a mongodb instance. Check the [official doc](https://docs.mongodb.com/guides/server/install/).
#### Start the server
Start velacp server:
1. Install the Go 1.19+.
2. Prepare a KubeVela core environment.
```bash
_bin/velacp server \
--db-url=${MONGO_URL} \
--db-name=vela
```
```shell
## Linux or Mac
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash
## Windows
powershell -Command "iwr -useb https://static.kubevela.net/script/install-velad.ps1 | iex"
The dashboard will be served at http://localhost:8000 .
velad install
```
### Cluster
3. Init the dependencies.
![alt](docs/images/cluster-list.png)
![alt](docs/images/cluster-detail.png)
```shell
vela addon enable ./addon replicas=0
```
### Application
4. Start the server on local
![alt](docs/images/app-list.png)
![alt](docs/images/app-input.png)
![alt](docs/images/app-detail.png)
```shell
# Install all dependencies
go mod tidy
# Setting the kube config
export KUBECONFIG=$(velad kubeconfig --host)
# Start the server
make run-server
```
Then, you can open the http://127.0.0.1:8000. More info refer to [contributing](./docs/contributing/velaux.md)
## Community
- Slack: [CNCF Slack](https://slack.cncf.io/) #kubevela channel (*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" />
## Contributing
Check out [CONTRIBUTING](./CONTRIBUTING.md) to see how to develop with KubeVela.
## Report Vulnerability
Security is a first priority thing for us at KubeVela. If you come across a related issue, please send email to security@mail.kubevela.io .
## Code of Conduct
KubeVela adopts [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

8
addon/NOTES.cue Normal file
View File

@ -0,0 +1,8 @@
info: """
To open the dashboard directly by port-forward:
vela port-forward -n vela-system addon-velaux 8000:8000
Please refer to https://kubevela.io/docs/reference/addons/velaux for more VelaUX addon installation and visiting method.
"""
notes: (info)

View File

@ -0,0 +1,77 @@
import (
"encoding/base64"
"encoding/json"
"strconv"
"vela/config"
)
metadata: {
name: "image-registry"
alias: "Image Registry"
scope: "project"
description: "Config information to authenticate image registry"
sensitive: false
}
template: {
output: {
apiVersion: "v1"
kind: "Secret"
metadata: {
name: context.name
namespace: context.namespace
labels: {
"config.oam.dev/catalog": "velacore-config"
"config.oam.dev/type": "image-registry"
}
}
if parameter.auth != _|_ {
type: "kubernetes.io/dockerconfigjson"
}
if parameter.auth == _|_ {
type: "Opaque"
}
stringData: {
if parameter.auth != _|_ && parameter.auth.username != _|_ {
".dockerconfigjson": json.Marshal({
"auths": (parameter.registry): {
"username": parameter.auth.username
"password": parameter.auth.password
if parameter.auth.email != _|_ {
"email": parameter.auth.email
}
"auth": base64.Encode(null, (parameter.auth.username + ":" + parameter.auth.password))
}
})
}
if parameter.insecure != _|_ {
"insecure-skip-verify": strconv.FormatBool(parameter.insecure)
}
if parameter.useHTTP != _|_ {
"protocol-use-http": strconv.FormatBool(parameter.useHTTP)
}
}
}
validation: config.#ImageRegistry & {
$params: parameter
}
parameter: {
// +usage=Image registry FQDN, such as: index.docker.io
registry: *"index.docker.io" | string
// +usage=Authenticate the image registry
auth?: {
// +usage=Private Image registry username
username: string
// +usage=Private Image registry password
password: string
// +usage=Private Image registry email
email?: string
}
// +usage=For the registry server that uses the self-signed certificate
insecure?: bool
// +usage=For the registry server that uses the HTTP protocol
useHTTP?: bool
}
}

View File

@ -0,0 +1,56 @@
metadata: {
name: "nacos-config"
alias: "Nacos Configuration"
description: "Write the configuration to the nacos"
sensitive: false
scope: "system"
}
template: {
nacos: {
// The endpoint can not references the parameter.
endpoint: {
// Users must create a config base the nacos-server template firstly.
name: "nacos"
}
format: parameter.contentType
// could references the parameter
metadata: {
dataId: parameter.dataId
group: parameter.group
if parameter.appName != _|_ {
appName: parameter.appName
}
if parameter.namespaceId != _|_ {
namespaceId: parameter.namespaceId
}
if parameter.tenant != _|_ {
tenant: parameter.tenant
}
if parameter.tag != _|_ {
tag: parameter.tag
}
}
content: parameter.content
}
parameter: {
// +usage=Configuration ID
dataId: string
// +usage=Configuration group
group: *"DEFAULT_GROUP" | string
// +usage=The configuration content.
content: {
...
}
contentType: *"json" | "yaml" | "properties" | "toml"
// +usage=The app name of the configuration
appName?: string
// +usage=The namespaceId of the configuration
namespaceId?: string
// +usage=The tenant, corresponding to the namespace ID field of Nacos
tenant?: string
// +usage=The tag of the configuration
tag?: string
}
}

View File

@ -0,0 +1,38 @@
metadata: {
name: "nacos-server"
alias: "Nacos Server"
description: "Config the Nacos server connectors"
sensitive: false
scope: "system"
}
template: {
parameter: {
// +usage=Directly configure the Nacos server address
servers?: [...{
// +usage=the nacos server address
ipAddr: string
// +usage=nacos server port
port: *8849 | int
// +usage=nacos server grpc port, default=server port + 1000, this is not required
grpcPort?: int
}]
// +usage=Discover the Nacos servers by the client.
client?: {
// +usage=the endpoint for get Nacos server addresses
endpoint: string
// +usage=the AccessKey for kms
accessKey?: string
// +usage=the SecretKey for kms
secretKey?: string
// +usage=the regionId for kms
regionId?: string
// +usage=the username for nacos auth
username?: string
// +usage=the password for nacos auth
password?: string
// +usage=it's to open kms,default is false. https://help.aliyun.com/product/28933.html
openKMS?: bool
}
}
}

16
addon/metadata.yaml Normal file
View File

@ -0,0 +1,16 @@
name: velaux
version: v1.8.0-rc.3
description: KubeVela User Experience (UX). An extensible, application-oriented delivery and management Platform.
icon: https://static.kubevela.net/images/logos/KubeVela%20-03.png
url: https://kubevela.io
tags:
- Official
- Dashboard
deployTo:
controlPlane: true
runtimeCluster: false
system:
vela: ">=v1.6.0"

28
addon/parameter.cue Normal file
View File

@ -0,0 +1,28 @@
parameter: {
// +usage=Specify the image hub of velaux, eg. "acr.kubevela.net"
repo?: string
// +usage=Specify the database type, current support KubeAPI(default) and MongoDB.
dbType: *"kubeapi" | "mongodb"
// +usage=Specify the database name, for the kubeapi db type, it represents namespace.
database?: string
// +usage=Specify the MongoDB URL. it only enabled where DB type is MongoDB.
dbURL?: string
// +usage=Specify the domain, if set, ingress will be created if the gateway driver is nginx.
domain?: string
// +usage=Specify the name of the certificate cecret, if set, means enable the HTTPs.
secretName?: string
// +usage=Specify the gateway type.
gatewayDriver: *"nginx" | "traefik"
// +usage=Specify the serviceAccountName for apiserver
serviceAccountName: *"kubevela-ux" | string
// +usage=Specify the service type.
serviceType: *"ClusterIP" | "NodePort" | "LoadBalancer"
// +usage=Specify the names of imagePullSecret for private image registry, eg. "{a,b,c}"
imagePullSecrets?: [...string]
// +usage=Specify the replicas.
replicas: *1 | int
// +usage=Specify nodeport. This will be ignored if serviceType is not NodePort.
nodePort: *30000 | int
// +usage=Enable impersonation means impersonating the login user to request the KubeAPI.
enableImpersonation: true | *false
}

20
addon/readme.md Normal file
View File

@ -0,0 +1,20 @@
# VelaUX
VelaUX provides end-to-end application delivery and management experience, including API services and UI dashboard.
## Installation
There are the following precautions
1. If you are used in production, please configure the MongoDB database.
2. Configure the Domain parameter to generate Ingress resources, otherwise, only Service resources will be generated.
## Feedback
If you have any questions or feedback during use, please contact us through the following methods.
- Create Issue: [https://github.com/oam-dev/velaux/issues](https://github.com/oam-dev/velaux/issues)
- Slack: [CNCF Slack](https://slack.cncf.io/) #kubevela channel (_English_)
- Join DingTalk Group: 23310022
- Join Wechat Group: Broker wechat to add you into the user group.
<img src="https://static.kubevela.net/images/barnett-wechat.jpg" width="200" />

17
addon/readme_cn.md Normal file
View File

@ -0,0 +1,17 @@
# VelaUX 介绍
VelaUX 提供端到端的应用交付和管理体验,其中包括了 API 服务和 UI 控制面板。
## 安装说明
1. 如果是生产使用,建议配置 MongoDB 数据库。
2. 配置 Domain 参数即可生成 Ingress 资源,否则只会生成 Service 资源。
## 使用反馈
您在使用过程中有任何疑问或反馈,请通过以下方式与我们取得联系。
- 提交 Issue: [https://github.com/oam-dev/velaux/issues](https://github.com/oam-dev/velaux/issues)
- 加入钉钉群: 23310022
- 加入微信群: 添加管理员微信并注明反馈 VelaUX 问题
<img src="https://static.kubevela.net/images/barnett-wechat.jpg" width="200" />

View File

@ -0,0 +1,50 @@
package main
additionalPrivileges: {
type: "k8s-objects"
name: "velaux-additional-privileges"
properties: objects: [
{
apiVersion: "rbac.authorization.k8s.io/v1"
kind: "ClusterRoleBinding"
metadata: name: "clustergateway:kubevela:ux"
roleRef: {
apiGroup: "rbac.authorization.k8s.io"
kind: "ClusterRole"
name: "cluster-admin"
}
subjects: [{
kind: "Group"
name: "kubevela:ux"
apiGroup: "rbac.authorization.k8s.io"
}, {
kind: "ServiceAccount"
name: parameter["serviceAccountName"]
namespace: "vela-system"
}]
},
{
apiVersion: "v1"
kind: "ServiceAccount"
metadata: {
name: parameter["serviceAccountName"]
namespace: "vela-system"
}
secrets: [
{
name: parameter["serviceAccountName"] + "-token"
},
]
},
{
apiVersion: "v1"
kind: "Secret"
metadata: {
name: parameter["serviceAccountName"] + "-token"
namespace: "vela-system"
annotations: "kubernetes.io/service-account.name": parameter["serviceAccountName"]
}
type: "kubernetes.io/service-account-token"
},
]
}

View File

@ -0,0 +1,94 @@
package main
_version: context.metadata.version
database: *[ if parameter["database"] != _|_ {
"--datastore-database=" + parameter["database"]
}] | []
dbURL: *[ if parameter["dbURL"] != _|_ {
"--datastore-url=" + parameter["dbURL"]
}] | []
enableImpersonation: *[ if parameter["enableImpersonation"] {
"--feature-gates=EnableImpersonation=true"
}] | []
_nginxTrait: *[
if parameter["domain"] != _|_ && parameter["gatewayDriver"] == "nginx" {
{
type: "gateway"
properties: {
domain: parameter["domain"]
http: {
"/": 8000
}
class: "nginx"
}
}
},
] | []
_traefikTrait: *[
if parameter["domain"] != _|_ && parameter["gatewayDriver"] == "traefik" {
{
type: "http-route"
properties: {
domains: [ parameter["domain"]]
rules: [{port: 8000}]
}
}
},
] | []
_httpsTrait: *[ if parameter["secretName"] != _|_ && parameter["domain"] != _|_ && parameter["gatewayDriver"] == "traefik" {
type: "https-route"
properties: {
domains: [ parameter["domain"]]
rules: [{port: 8000}]
secrets: [{
name: parameter["secretName"]
}]
}}] | []
server: {
name: "velaux-server"
type: "webservice"
properties: {
if parameter["repo"] == _|_ {
image: "oamdev/velaux:" + _version
}
if parameter["repo"] != _|_ {
image: parameter["repo"] + "/" + "oamdev/velaux:" + _version
}
if parameter["imagePullSecrets"] != _|_ {
imagePullSecrets: parameter["imagePullSecrets"]
}
if parameter["serviceType"] != _|_ {
exposeType: parameter["serviceType"]
}
cmd: ["server", "--datastore-type=" + parameter["dbType"], "--feature-gates=EnableCacheJSFile=true"] + database + dbURL + enableImpersonation
ports: [
{
port: 8000
protocol: "TCP"
expose: true
if parameter["serviceType"] == "NodePort" {
nodePort: parameter["nodePort"]
}
},
]
}
dependsOn: ["velaux-additional-privileges"]
traits: [
{
type: "service-account"
properties: name: parameter["serviceAccountName"]
},
{type: "scaler", properties: replicas: parameter["replicas"]},
] + _nginxTrait + _traefikTrait + _httpsTrait
}

View File

@ -0,0 +1,37 @@
- jsonKey: dbType
label: DBType
validate:
required: true
defaultValue: kubeapi
options:
- label: MongoDB
value: mongodb
- label: KubeAPI
value: kubeapi
sort: 1
- jsonKey: dbURL
label: DatabaseURL
sort: 3
conditions:
- jsonKey: dbType
op: "=="
value: "mongodb"
validate:
required: true
- jsonKey: database
sort: 7
validate:
defaultValue: kubevela
required: true
- jsonKey: serviceAccountName
disable: true
- jsonKey: serviceType
sort: 8
- jsonKey: domain
sort: 9
- jsonKey: gatewayDriver
sort: 10
- jsonKey: repo
sort: 11
- jsonKey: imagePullSecrets
sort: 13

View File

@ -0,0 +1,2 @@
- jsonKey: objects
uiType: K8sObjectsCode

View File

@ -0,0 +1,223 @@
- uiType: ImageInput
jsonKey: image
label: Image
sort: 1
- jsonKey: imagePullSecret
sort: 2
disable: true
- jsonKey: restart
sort: 3
uiType: Select
validate:
required: true
defaultValue: Never
options:
- label: Never
value: Never
- label: OnFailure
value: OnFailure
- jsonKey: count
sort: 4
uiType: Number
validate:
required: true
defaultValue: 1
min: 0
max: 128
- jsonKey: memory
uiType: MemoryNumber
sort: 5
label: Memory
description: Specifies the memory resource required for the container, If set to 0, there is no limit.
validate:
required: true
defaultValue: "1024Mi"
style:
colSpan: 12
- jsonKey: cpu
uiType: CPUNumber
sort: 7
label: CPU
description: Specifies the cpu resource required for the container, If set to 0, there is no limit.
validate:
required: true
defaultValue: "0.5"
style:
colSpan: 12
- jsonKey: cmd
label: CMD
sort: 9
- jsonKey: env
sort: 10
label: ENV
subParameterGroupOption:
- label: Add By Value
keys:
- name
- value
- label: Add By Secret
keys:
- name
- valueFrom
subParameters:
- jsonKey: valueFrom
label: Secret Selector
uiType: Ignore
subParameters:
- jsonKey: configMapKeyRef
disable: true
- jsonKey: secretKeyRef
uiType: Ignore
subParameters:
- jsonKey: name
label: Secret Name
uiType: SecretSelect
sort: 1
- jsonKey: key
label: Secret Key
uiType: SecretKeySelect
sort: 3
uiType: Structs
- jsonKey: readinessProbe
uiType: Group
label: ReadinessProbe
subParameters:
- jsonKey: hostAliases
disable: true
- jsonKey: timeoutSeconds
sort: 1
style:
colSpan: 12
- jsonKey: failureThreshold
sort: 4
style:
colSpan: 12
- jsonKey: initialDelaySeconds
sort: 7
style:
colSpan: 12
validate:
defaultValue: 5
required: true
- jsonKey: periodSeconds
sort: 9
style:
colSpan: 12
- jsonKey: successThreshold
sort: 11
style:
colSpan: 12
- jsonKey: exec
sort: 14
- jsonKey: httpGet
sort: 19
subParameters:
- jsonKey: port
sort: 1
validate:
required: true
min: 1
style:
colSpan: 12
- jsonKey: path
sort: 3
validate:
required: true
pattern: ^/(.*)$
style:
colSpan: 12
- jsonKey: httpHeaders
sort: 5
- jsonKey: tcpSocket
sort: 19
subParameters:
- jsonKey: port
validate:
required: true
min: 1
sort: 13
- jsonKey: livenessProbe
uiType: Group
label: LivenessProbe
subParameters:
- jsonKey: hostAliases
disable: true
- jsonKey: timeoutSeconds
sort: 1
style:
colSpan: 12
- jsonKey: failureThreshold
sort: 4
style:
colSpan: 12
- jsonKey: initialDelaySeconds
sort: 7
style:
colSpan: 12
validate:
defaultValue: 5
required: true
- jsonKey: periodSeconds
sort: 9
style:
colSpan: 12
- jsonKey: successThreshold
sort: 11
style:
colSpan: 12
- jsonKey: exec
sort: 14
- jsonKey: httpGet
sort: 19
subParameters:
- jsonKey: port
sort: 1
validate:
required: true
min: 1
style:
colSpan: 12
- jsonKey: path
sort: 3
validate:
required: true
pattern: ^/(.*)$
style:
colSpan: 12
- jsonKey: httpHeaders
sort: 5
- jsonKey: tcpSocket
sort: 19
subParameters:
- jsonKey: port
validate:
required: true
min: 1
sort: 15
- jsonKey: annotations
sort: 19
- jsonKey: labels
sort: 21
- description: Specify image pull policy for your service
jsonKey: imagePullPolicy
label: Image Pull Policy
uiType: Select
sort: 24
validate:
defaultValue: IfNotPresent
options:
- label: IfNotPresent
value: IfNotPresent
- label: Always
value: Always
- label: Never
value: Never
- jsonKey: volumes
disable: true

View File

@ -0,0 +1,301 @@
- uiType: ImageInput
jsonKey: image
label: Container Image
sort: 1
- jsonKey: imagePullSecret
sort: 2
disable: true
- jsonKey: memory
uiType: MemoryNumber
sort: 4
label: Memory
description: Specifies the memory resource required for the container, If set to 0, there is no limit.
validate:
required: true
defaultValue: "1024Mi"
style:
colSpan: 12
- jsonKey: cpu
uiType: CPUNumber
sort: 5
label: CPU
description: Specifies the cpu resource required for the container, If set to 0, there is no limit.
validate:
required: true
defaultValue: "0.5"
style:
colSpan: 12
- jsonKey: exposeType
sort: 6
validate:
- jsonKey: ports
label: Service Ports
sort: 7
subParameters:
- jsonKey: port
sort: 1
validate:
required: true
min: 1
- jsonKey: protocol
sort: 3
- jsonKey: name
sort: 4
disable: true
- jsonKey: expose
sort: 5
validate:
required: true
defaultValue: [{"port": 80, "protocol": "TCP", "expose": true}]
- jsonKey: cmd
label: CMD
sort: 9
- jsonKey: env
sort: 10
label: ENV
subParameterGroupOption:
- label: Add By Value
keys:
- name
- value
- label: Add By Secret
keys:
- name
- valueFrom
subParameters:
- jsonKey: valueFrom
label: Secret Selector
uiType: Ignore
subParameters:
- jsonKey: configMapKeyRef
disable: true
- jsonKey: secretKeyRef
uiType: Ignore
subParameters:
- jsonKey: name
label: Secret Name
uiType: SecretSelect
sort: 1
- jsonKey: key
label: Secret Key
uiType: SecretKeySelect
sort: 3
uiType: Structs
- jsonKey: volumeMounts
label: Persistent Storage
description: "Set the path and type that the service needs to persist."
uiType: Group
subParameters:
- jsonKey: configMap
disable: true
- jsonKey: secret
disable: true
- jsonKey: pvc
label: Storage By PVC
sort: 1
subParameters:
- jsonKey: name
sort: 1
validate:
required: true
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])$
- jsonKey: claimName
sort: 3
- jsonKey: mountPath
sort: 5
validate:
required: true
pattern: ^/(.*)$
- jsonKey: hostPath
label: Storage By HostPath
sort: 3
subParameters:
- jsonKey: name
sort: 1
validate:
required: true
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])$
- jsonKey: path
label: Host Path
sort: 3
validate:
required: true
pattern: ^/(.*)$
- jsonKey: mountPath
sort: 5
validate:
required: true
pattern: ^/(.*)$
- jsonKey: emptyDir
label: Temporary Storage
sort: 5
subParameters:
- jsonKey: name
sort: 1
validate:
required: true
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])$
- jsonKey: medium
sort: 3
validate:
required: false
options:
- label: Memory
value: memory
- label: Dir
value: ""
- jsonKey: mountPath
sort: 5
validate:
required: true
pattern: ^/(.*)$
sort: 12
- jsonKey: readinessProbe
uiType: Group
label: ReadinessProbe
subParameters:
- jsonKey: hostAliases
disable: true
- jsonKey: timeoutSeconds
sort: 1
style:
colSpan: 12
- jsonKey: failureThreshold
sort: 4
style:
colSpan: 12
- jsonKey: initialDelaySeconds
sort: 7
style:
colSpan: 12
validate:
defaultValue: 5
required: true
- jsonKey: periodSeconds
sort: 9
style:
colSpan: 12
- jsonKey: successThreshold
sort: 11
style:
colSpan: 12
- jsonKey: exec
sort: 14
- jsonKey: httpGet
sort: 19
subParameters:
- jsonKey: port
sort: 1
validate:
required: true
min: 1
style:
colSpan: 12
- jsonKey: path
sort: 3
validate:
required: true
pattern: ^/(.*)$
style:
colSpan: 12
- jsonKey: httpHeaders
sort: 5
- jsonKey: tcpSocket
sort: 19
subParameters:
- jsonKey: port
validate:
required: true
min: 1
sort: 13
- jsonKey: livenessProbe
uiType: Group
label: LivenessProbe
subParameters:
- jsonKey: hostAliases
disable: true
- jsonKey: timeoutSeconds
sort: 1
style:
colSpan: 12
- jsonKey: failureThreshold
sort: 4
style:
colSpan: 12
- jsonKey: initialDelaySeconds
sort: 7
style:
colSpan: 12
validate:
defaultValue: 5
required: true
- jsonKey: periodSeconds
sort: 9
style:
colSpan: 12
- jsonKey: successThreshold
sort: 11
style:
colSpan: 12
- jsonKey: exec
sort: 14
- jsonKey: httpGet
sort: 19
subParameters:
- jsonKey: port
sort: 1
validate:
required: true
min: 1
style:
colSpan: 12
- jsonKey: path
sort: 3
validate:
required: true
pattern: ^/(.*)$
style:
colSpan: 12
- jsonKey: httpHeaders
sort: 5
- jsonKey: tcpSocket
sort: 19
subParameters:
- jsonKey: port
validate:
required: true
min: 1
sort: 15
- jsonKey: annotations
sort: 19
- jsonKey: labels
sort: 21
- description: Specify image pull policy for your service
jsonKey: imagePullPolicy
label: Image Pull Policy
uiType: Select
sort: 24
validate:
defaultValue: IfNotPresent
options:
- label: IfNotPresent
value: IfNotPresent
- label: Always
value: Always
- label: Never
value: Never
- jsonKey: addRevisionLabel
disable: true
- jsonKey: port
disable: true
- jsonKey: volumes
disable: true

View File

@ -0,0 +1,24 @@
- jsonKey: registry
sort: 1
- jsonKey: insecure
sort: 3
style:
colSpan: 12
- jsonKey: useHTTP
sort: 5
style:
colSpan: 12
- jsonKey: auth
subParameters:
- jsonKey: username
sort: 1
style:
colSpan: 12
- jsonKey: password
sort: 3
style:
colSpan: 12
uiType: Password
- jsonKey: email
sort: 8

View File

@ -0,0 +1,14 @@
- jsonKey: dataId
sort: 1
style:
colSpan: 8
- jsonKey: group
sort: 3
style:
colSpan: 8
- jsonKey: contentType
sort: 5
style:
colSpan: 8
- jsonKey: content
sort: 7

View File

@ -0,0 +1,43 @@
- sort: 100
jsonKey: servers
subParameters:
- sort: 100
label: IPAddr
jsonKey: ipAddr
- sort: 101
label: Port
jsonKey: port
- sort: 102
label: GRPCPort
jsonKey: grpcPort
- sort: 101
jsonKey: client
subParameters:
- sort: 100
jsonKey: endpoint
- sort: 101
jsonKey: accessKey
uiType: Password
- sort: 102
jsonKey: secretKey
uiType: Password
- sort: 104
style:
colSpan: 12
jsonKey: regionId
- sort: 109
style:
colSpan: 12
jsonKey: openKMS
uiType: Switch
- sort: 110
jsonKey: username
uiType: Input
style:
colSpan: 12
- sort: 113
jsonKey: password
uiType: Password
style:
colSpan: 12

View File

@ -0,0 +1,6 @@
- sort: 100
jsonKey: selector
uiType: ComponentSelect
- sort: 101
jsonKey: components
uiType: ComponentPatches

View File

@ -0,0 +1,4 @@
- jsonKey: replicas
validate:
required: true
min: 0

View File

@ -0,0 +1,86 @@
- jsonKey: pvc
sort: 1
label: PersistentVolumeClaim
subParameters:
- jsonKey: name
sort: 1
validate:
required: true
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])$
maxLength: 32
- jsonKey: mountPath
sort: 3
validate:
required: true
pattern: ^/(.*)$
- jsonKey: resources
sort: 7
validate:
required: true
defaultValue: {requests: {storage: "8Gi"}, limits: {storage: "8Gi"}}
subParameters:
- jsonKey: requests
uiType: Ignore
style:
colSpan: 12
subParameters:
- jsonKey: storage
uiType: DiskNumber
label: Request Storage
validate:
required: true
immutable: true
sort: 1
- jsonKey: limits
sort: 3
uiType: Ignore
style:
colSpan: 12
subParameters:
- jsonKey: storage
uiType: DiskNumber
label: Limit Storage
validate:
required: true
immutable: true
- jsonKey: storageClassName
sort: 9
description: If not specified, the cluster default StorageClass is used.
- jsonKey: accessModes
sort: 11
validate:
required: false
defaultValue: ["ReadWriteOnce"]
- jsonKey: volumeMode
sort: 12
description: You can set the value of volumeMode to Block to use a volume as a raw block device.
uiType: Select
validate:
defaultValue: Filesystem
options:
- label: Filesystem
value: Filesystem
- label: Block
value: Block
- jsonKey: volumeName
sort: 14
description: The VolumeName is the binding reference to the PersistentVolume backing this claim.
- jsonKey: selector
sort: 17
- jsonKey: dataSource
sort: 19
description: It will create a new volume based on the contents of the specified data source.
- jsonKey: dataSourceRef
sort: 20
disable: true
- jsonKey: mountOnly
disable: true
- jsonKey: secret
sort: 3
disable: true
- jsonKey: configMap
sort: 5
disable: true
- jsonKey: emptyDir
disable: true

View File

@ -0,0 +1,14 @@
- sort: 10
label: Policies
jsonKey: policies
uiType: PolicySelect
validate:
required: true
- sort: 20
jsonKey: parallelism
style:
colSpan: 12
- sort: 30
jsonKey: auto
style:
colSpan: 12

View File

@ -0,0 +1,8 @@
- jsonKey: parallel
validate:
defaultValue: false
sort: 5
- jsonKey: policy
sort: 1
- jsonKey: env
sort: 3

View File

@ -0,0 +1,96 @@
- jsonKey: dingding
sort: 1
description: Support push messages to Dingding Group.
subParameters:
- jsonKey: url
uiType: Ignore
sort: 1
subParameters:
- jsonKey: value
label: Webhook
uiType: Input
validate:
required: true
- jsonKey: message
description: Specify the message that you want to sent
sort: 3
uiType: Ignore
subParameters:
- jsonKey: msgtype
disable: true
- jsonKey: link
disable: true
- jsonKey: markdown
disable: true
- jsonKey: at
disable: true
- jsonKey: actionCard
disable: true
- jsonKey: feedCard
disable: true
- jsonKey: text
uiType: Ignore
subParameters:
- jsonKey: content
label: Message
description: Specify the message that you want to sent
- jsonKey: email
sort: 3
description: Support push email message.
subParameters:
- jsonKey: from
sort: 1
subParameters:
- jsonKey: host
sort: 1
- jsonKey: port
sort: 3
- jsonKey: address
sort: 5
- jsonKey: password
sort: 7
uiType: Ignore
subParameters:
- jsonKey: value
label: Password
uiType: Password
validate:
required: true
- jsonKey: alias
sort: 9
- jsonKey: to
sort: 3
- jsonKey: content
sort: 5
subParameters:
- jsonKey: subject
sort: 1
- jsonKey: body
sort: 3
- jsonKey: slack
sort: 5
description: Support push messages to slack channel.
subParameters:
- jsonKey: url
uiType: Ignore
sort: 1
subParameters:
- jsonKey: value
label: Webhook
uiType: Input
validate:
required: true
- jsonKey: message
uiType: Ignore
subParameters:
- jsonKey: blocks
disable: true
- jsonKey: attachments
disable: true
- jsonKey: thread_ts
disable: true
- jsonKey: mrkdwn
disable: true
- jsonKey: text
label: Message
description: Specify the message that you want to sent

View File

@ -0,0 +1,12 @@
- jsonKey: url
sort: 1
label: URL
uiType: Ignore
subParameters:
- jsonKey: value
label: URL
uiType: Input
validate:
required: true
- jsonKey: data
sort: 3

9
addon/template.cue Normal file
View File

@ -0,0 +1,9 @@
package main
output: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
spec: {
components: [additionalPrivileges, server]
}
}

View File

@ -0,0 +1,37 @@
import (
"vela/ql"
)
parameter: {
name: string
namespace?: string
cluster?: string
kind: string
apiVersion: string
}
response: ql.#Read & {
value: {
apiVersion: parameter.apiVersion
kind: parameter.kind
metadata: {
name: parameter.name
if parameter.namespace != _|_ {
namespace: parameter.namespace
}
}
}
if parameter.cluster != _|_ {
cluster: parameter.cluster
}
}
if response.err == _|_ {
status: {
resource: response.value
}
}
if response.err != _|_ {
status: {
error: response.err
}
}

View File

@ -0,0 +1,33 @@
import (
"vela/ql"
)
parameter: {
appName?: string
appNs?: string
}
secretList: ql.#List & {
resource: {
apiVersion: "v1"
kind: "Secret"
}
filter: {
matchingLabels: {
"created-by": "terraform-controller"
if parameter.appName != _|_ && parameter.appNs != _|_ {
"app.oam.dev/name": parameter.appName
"app.oam.dev/namespace": parameter.appNs
}
}
}
}
status: {
if secretList.err == _|_ {
secrets: secretList.list.items
}
if secretList.err != _|_ {
error: secretList.err
}
}

View File

@ -0,0 +1,30 @@
import (
"vela/ql"
)
parameter: {
appName: string
appNs: string
}
resources: ql.#ListResourcesInApp & {
app: {
name: parameter.appName
namespace: parameter.appNs
filter: {
"apiVersion": "terraform.core.oam.dev/v1beta2"
"kind": "Configuration"
}
withStatus: true
}
}
status: {
if resources.err == _|_ {
"cloud-resources": [ for i, resource in resources.list {
resource.object
}]
}
if resources.err != _|_ {
error: resources.err
}
}

View File

@ -0,0 +1,43 @@
import (
"vela/ql"
)
collectLogs: ql.#CollectLogsInPod & {
cluster: parameter.cluster
namespace: parameter.namespace
pod: parameter.pod
options: {
container: parameter.container
previous?: parameter.previous
sinceSeconds?: parameter.sinceSeconds
sinceTime?: parameter.sinceTime
timestamps?: parameter.timestamps
tailLines?: parameter.tailLines
limitBytes?: parameter.limitBytes
}
}
status: collectLogs.outputs
parameter: {
// +usage=Specify the cluster of the pod
cluster: string
// +usage=Specify the namespace of the pod
namespace: string
// +usage=Specify the name of the pod
pod: string
// +usage=Specify the name of the container
container: string
// +usage=If true, return previous terminated container logs
previous: *false | bool
// +usage=If set, show logs in relative times
sinceSeconds: *null | int
// +usage=RFC3339 timestamp, if set, show logs since this time
sinceTime: *null | string
// +usage=If true, add timestamp at the beginning of every line
timestamps: *false | bool
// +usage=If set, return the number of lines from the end of logs
tailLines: *null | int
// +usage=If set, limit the size of returned bytes
limitBytes: *null | int
}

View File

@ -0,0 +1,55 @@
import (
"vela/ql"
)
parameter: {
name: string
namespace: string
cluster: *"" | string
type: "deployment" | "statefulset" | "pod"
}
schema: {
"deployment": {
apiVersion: "apps/v1"
kind: "Deployment"
}
"statefulset": {
apiVersion: "apps/v1"
kind: "StatefulSet"
}
"pod": {
apiVersion: "v1"
kind: "Pod"
}
}
pod: ql.#Read & {
value: {
apiVersion: schema[parameter.type].apiVersion
kind: schema[parameter.type].kind
metadata: {
name: parameter.name
namespace: parameter.namespace
}
}
cluster: parameter.cluster
}
eventList: ql.#SearchEvents & {
value: {
apiVersion: schema[parameter.type].apiVersion
kind: schema[parameter.type].kind
metadata: pod.value.metadata
}
cluster: parameter.cluster
}
status: {
if eventList.err == _|_ {
events: eventList.list
}
if eventList.err != _|_ {
error: eventList.err
}
}

79
addon/views/pod-view.cue Normal file
View File

@ -0,0 +1,79 @@
import (
"vela/ql"
)
parameter: {
name: string
namespace: string
cluster: *"" | string
}
pod: ql.#Read & {
value: {
apiVersion: "v1"
kind: "Pod"
metadata: {
name: parameter.name
namespace: parameter.namespace
}
}
cluster: parameter.cluster
}
eventList: ql.#SearchEvents & {
value: {
apiVersion: "v1"
kind: "Pod"
metadata: pod.value.metadata
}
cluster: parameter.cluster
}
podMetrics: ql.#Read & {
cluster: parameter.cluster
value: {
apiVersion: "metrics.k8s.io/v1beta1"
kind: "PodMetrics"
metadata: {
name: parameter.name
namespace: parameter.namespace
}
}
}
status: {
if pod.err == _|_ {
containers: [ for container in pod.value.spec.containers {
name: container.name
image: container.image
resources: {
if container.resources.limits != _|_ {
limits: container.resources.limits
}
if container.resources.requests != _|_ {
requests: container.resources.requests
}
if podMetrics.err == _|_ {
usage: {for containerUsage in podMetrics.value.containers {
if containerUsage.name == container.name {
cpu: containerUsage.usage.cpu
memory: containerUsage.usage.memory
}
}}
}
}
if pod.value.status.containerStatuses != _|_ {
status: {for containerStatus in pod.value.status.containerStatuses if containerStatus.name == container.name {
state: containerStatus.state
restartCount: containerStatus.restartCount
}}
}
}]
if eventList.err == _|_ {
events: eventList.list
}
}
if pod.err != _|_ {
error: pod.err
}
}

View File

@ -0,0 +1,59 @@
import (
"vela/ql"
)
parameter: {
type: string
namespace: *"" | string
cluster: *"" | string
}
schema: {
"secret": {
apiVersion: "v1"
kind: "Secret"
}
"configMap": {
apiVersion: "v1"
kind: "ConfigMap"
}
"pvc": {
apiVersion: "v1"
kind: "PersistentVolumeClaim"
}
"storageClass": {
apiVersion: "storage.k8s.io/v1"
kind: "StorageClass"
}
"ns": {
apiVersion: "v1"
kind: "Namespace"
}
"provider": {
apiVersion: "terraform.core.oam.dev/v1beta1"
kind: "Provider"
}
}
List: ql.#List & {
resource: schema[parameter.type]
filter: {
namespace: parameter.namespace
}
cluster: parameter.cluster
}
status: {
if List.err == _|_ {
if len(List.list.items) == 0 {
error: "failed to list \(parameter.type) in namespace \(parameter.namespace)"
}
if len(List.list.items) != 0 {
list: List.list.items
}
}
if List.err != _|_ {
error: List.err
}
}

View File

@ -0,0 +1,38 @@
import (
"vela/ql"
)
parameter: {
appName: string
appNs: string
cluster?: string
clusterNs?: string
}
resources: ql.#ListResourcesInApp & {
app: {
name: parameter.appName
namespace: parameter.appNs
filter: {
if parameter.cluster != _|_ {
cluster: parameter.cluster
}
if parameter.clusterNs != _|_ {
clusterNamespace: parameter.clusterNs
}
apiVersion: "v1"
kind: "Service"
}
withStatus: true
}
}
status: {
if resources.err == _|_ {
services: [ for i, resource in resources.list {
resource.object
}]
}
if resources.err != _|_ {
error: resources.err
}
}

62
babel.config.json Normal file
View File

@ -0,0 +1,62 @@
{
"babelrc": false,
// Note: order is bottom-to-top and/or right-to-left
"presets": [
[
"@babel/preset-env",
{
"bugfixes": true,
"browserslistEnv": "dev",
"useBuiltIns": "entry",
"corejs": "3.10"
}
],
[
"@babel/preset-typescript",
{
"allowNamespaces": true,
"allowDeclareFields": true
}
],
[
"@babel/preset-react",
{
"runtime": "automatic"
}
]
],
"plugins": [
[
"@babel/plugin-transform-typescript",
{
"allowNamespaces": true,
"allowDeclareFields": true
}
],
// added to mitigate https://github.com/babel/babel/issues/14289
// package (and following line) can be removed once the issue is fixed and released
"@babel/plugin-proposal-class-properties",
["@babel/plugin-proposal-object-rest-spread", { "loose": true }],
"@babel/plugin-transform-react-constant-elements",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-syntax-dynamic-import", // needed for `() => import()` in routes.ts
"angularjs-annotate",
"macros"
],
"env": {
"production": {
"presets": [
[
"@babel/preset-env",
{
"browserslistEnv": "production"
}
]
]
},
"hot": {
"plugins": ["react-refresh/babel"]
}
}
}

View File

@ -0,0 +1,51 @@
/*
Copyright 2022 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 options
import (
"flag"
cliflag "k8s.io/component-base/cli/flag"
"k8s.io/klog/v2"
"github.com/kubevela/velaux/pkg/features"
"github.com/kubevela/velaux/pkg/server/config"
)
// ServerRunOptions contains everything necessary to create and run api server
type ServerRunOptions struct {
GenericServerRunOptions *config.Config
}
// NewServerRunOptions creates a new ServerRunOptions object with default parameters
func NewServerRunOptions() *ServerRunOptions {
s := &ServerRunOptions{
GenericServerRunOptions: config.NewConfig(),
}
return s
}
// Flags returns the complete NamedFlagSets
func (s *ServerRunOptions) Flags() (fss cliflag.NamedFlagSets) {
fs := fss.FlagSet("generic")
s.GenericServerRunOptions.AddFlags(fs, s.GenericServerRunOptions)
features.APIServerMutableFeatureGate.AddFlag(fss.FlagSet("featuregate"))
local := flag.NewFlagSet("klog", flag.ExitOnError)
klog.InitFlags(local)
fs.AddGoFlagSet(local)
return fss
}

View File

@ -0,0 +1,28 @@
/*
Copyright 2022 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 options
import utilerrors "k8s.io/apimachinery/pkg/util/errors"
// Validate validates server run options, to find options' misconfiguration
func (s *ServerRunOptions) Validate() error {
var errors []error
errors = append(errors, s.GenericServerRunOptions.Validate()...)
return utilerrors.NewAggregate(errors)
}

151
cmd/server/app/server.go Normal file
View File

@ -0,0 +1,151 @@
/*
Copyright 2022 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 app
import (
"context"
"encoding/json"
"fmt"
"os"
"os/signal"
"syscall"
"github.com/kubevela/pkg/util/profiling"
restfulspec "github.com/emicklei/go-restful-openapi/v2"
"github.com/fatih/color"
"github.com/go-openapi/spec"
"github.com/spf13/cobra"
"k8s.io/klog/v2"
"github.com/kubevela/velaux/cmd/server/app/options"
"github.com/kubevela/velaux/pkg/server"
"github.com/oam-dev/kubevela/version"
)
// NewAPIServerCommand creates a *cobra.Command object with default parameters
func NewAPIServerCommand() *cobra.Command {
s := options.NewServerRunOptions()
cmd := &cobra.Command{
Use: "apiserver",
Long: `The KubeVela API server validates and configures data for the API objects.
The API Server services REST operations and provides the frontend to the
cluster's shared state through which all other components interact.`,
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive,unused
if err := s.Validate(); err != nil {
return err
}
return Run(s)
},
SilenceUsage: true,
}
fs := cmd.Flags()
namedFlagSets := s.Flags()
for _, set := range namedFlagSets.FlagSets {
fs.AddFlagSet(set)
}
buildSwaggerCmd := &cobra.Command{
Use: "build-swagger",
Short: "Build swagger documentation of KubeVela apiserver",
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive,unused
name := "docs/apidoc/latest-swagger.json"
if len(args) > 0 {
name = args[0]
}
func() {
swagger, err := buildSwagger(s)
if err != nil {
klog.Fatal(err.Error())
}
outData, err := json.MarshalIndent(swagger, "", "\t")
if err != nil {
klog.Fatal(err.Error())
}
swaggerFile, err := os.OpenFile(name, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600)
if err != nil {
klog.Fatal(err.Error())
}
defer func() {
if err := swaggerFile.Close(); err != nil {
klog.Errorf("close swagger file failure %s", err.Error())
}
}()
_, err = swaggerFile.Write(outData)
if err != nil {
klog.Fatal(err.Error())
}
fmt.Println("build swagger config file success")
}()
return nil
},
}
cmd.AddCommand(buildSwaggerCmd)
return cmd
}
// Run runs the specified APIServer. This should never exit.
func Run(s *options.ServerRunOptions) error {
// The server is not terminal, there is no color default.
// Force set to false, this is useful for the dry-run API.
color.NoColor = false
errChan := make(chan error)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go profiling.StartProfilingServer(errChan)
go func() {
if err := run(ctx, s, errChan); err != nil {
errChan <- fmt.Errorf("failed to run apiserver: %w", err)
}
}()
var term = make(chan os.Signal, 1)
signal.Notify(term, os.Interrupt, syscall.SIGTERM)
select {
case <-term:
klog.Infof("Received SIGTERM, exiting gracefully...")
case err := <-errChan:
klog.Errorf("Received an error: %s, exiting gracefully...", err.Error())
return err
}
klog.Infof("See you next time!")
return nil
}
func run(ctx context.Context, s *options.ServerRunOptions, errChan chan error) error {
klog.Infof("KubeVela information: version: %v, gitRevision: %v", version.VelaVersion, version.GitRevision)
server := server.New(*s.GenericServerRunOptions)
return server.Run(ctx, errChan)
}
func buildSwagger(s *options.ServerRunOptions) (*spec.Swagger, error) {
server := server.New(*s.GenericServerRunOptions)
config, err := server.BuildRestfulConfig()
if err != nil {
return nil, err
}
return restfulspec.BuildSwagger(*config), nil
}

30
cmd/server/main.go Normal file
View File

@ -0,0 +1,30 @@
/*
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 main
import (
"log"
"github.com/kubevela/velaux/cmd/server/app"
)
func main() {
cmd := app.NewAPIServerCommand()
if err := cmd.Execute(); err != nil {
log.Fatalln(err)
}
}

View File

@ -1,21 +0,0 @@
package main
import (
"log"
"github.com/oam-dev/velacp/pkg/commands"
"github.com/oam-dev/velacp/pkg/commands/server"
)
func main() {
app := commands.NewCLI(
"velacp",
"KubeVela control plane",
)
app.AddCommands(
server.NewServerCommand(),
)
if err := app.Run(); err != nil {
log.Fatal(err)
}
}

25
commitlint.config.js Normal file
View File

@ -0,0 +1,25 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
'type-enum': [
// 配置的具体规则这里是提交的type
// 报错级别 0为disable1为warning2为error 就是检查的级别
2,
'always',
// 枚举的type值不在下面的都报错
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
]
]
}
};

19877
docs/apidoc/swagger-3.0.json Normal file

File diff suppressed because it is too large Load Diff

16916
docs/apidoc/swagger.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,115 +0,0 @@
# How to Develop Backend Services
## Preparation
- Install [go](https://golang.org/dl/)
- Install [yarn](https://yarnpkg.com/)
- Install [protoc](https://grpc.io/docs/protoc-installation/) and [protoc-gen-go](https://grpc.io/docs/languages/go/quickstart/#prerequisites)
- Install [mongodb](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition)
## Development
In [frontend development](./frontend.md), developers will use mock backend services first.
But eventually the production rollout of velacp will have both frontend and backend services served.
Developing backend services in velacp has a well-defined architecture and systematic process. We will walk through the steps in the following.
Let's assume we are building a new service "Cluster".
The process goes as:
1. All public APIs, including records stored in database, should be defined in protobuf. In `pkg/proto/`, add a new protobuf definition:
```
touch pkg/proto/cluster.proto
```
Add definitions for cluster service API types:
```protobuf
message Cluster {
string name = 1;
...
}
```
1. Generate go code:
```
make proto
```
1. Add the service endpoints. First create a new service in `pkg/rest/services/`:
```
touch pkg/rest/services//cluster.go
```
Implement the services:
```go
type ClusterService struct {
...
}
func NewClusterService(store storeadapter.ClusterStore) *ClusterService {
return &ClusterService{
...
}
}
func (s *ClusterService) GetClusters(c echo.Context) error {
...
}
```
The new service needs to be registered to in `pkg/rest/rest_server.go`:
```go
func (s *restServer) registerServices() {
...
clusterService := services.NewClusterService(storeadapter.NewClusterStore(s.ds))
s.server.GET("/api/clusters", clusterService.GetClusters)
}
```
1. There is a generic datastore interface defined in `pkg/datastore/datastore.go`. Its mongo backend is implemented in `pkg/datastore/mongodb/mongodb.go`. For each service, you will implement a more specific store adapter to handle its own types and special logic, e.g. ClusterStore.
All specific store adapter is defined in `pkg/datastore/storeadapter/`. Create one for ClusterStore:
```
touch pkg/datastore/storeadapter/clusterstore.go
```
We can see its interface:
```go
type ClusterStore interface {
PutCluster(cluster *model.Cluster) error
ListClusters() ([]*model.Cluster, error)
DelCluster(name string) error
}
```
Its returned model, i.e. `model.Cluster`, is defined in the `pkg/proto/model/cluster.proto`.
1. Once the code is done, build it:
```
make build
```
This will include the frontend as well.
1. Start [mongodb](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#run-mongodb-community-edition).
Ensure env `MONGO_URL` is set, e.g. "127.0.0.1:27017".
1. Start velacp:
```bash
_bin/velacp server \
--db-url=${MONGO_URL} \
--db-name=vela
```
You can now test the APIs and UIs.

View File

@ -1,85 +0,0 @@
# How to Develop UI Components
## Preparation
- Install [yarn](https://yarnpkg.com/)
## Development
The UI code is under ui/ . First, go to the folder:
```
cd ui/
```
Developing UI components in velacp has a well-defined architecture and systematic process. We will walk through the steps in the following.
Let's assume we are building a new UI page "Cluster".
The process goes as:
1. In `config/routes.ts`, add your route and component.
1. Add a new component in src/pages/:
```
mkdir src/pages/Cluster/
```
Develop and add your component code there.
1. For remote services, create interfaces in `services/kubevela`:
```
touch clusterapi.ts
```
Add your API calls there:
```js
import { request } from "umi";
export async function listClusterNames() {
return request<{ clusters: string[] }>('/api/clusternames');
}
```
For API types, define in `src/services/kubevela/typings.d.ts`:
```js
declare namespace API {
export type ApplicationType = {
name: string;
desc?: string;
updatedAt?: number; // unix milliseconds
components?: ComponentType[];
};
}
```
They should belong to API global namespace.
1. To mock the backend APIs, create mock servers in `mock/`:
```
touch mock/cluster.tx
```
Expose the mock services:
```js
export default {
"GET /api/clusternames": getClusterNames,
"GET /api/clusters": getClusters,
"POST /api/clusters": postClusters,
};
```
1. Run the UI to see the result:
```bash
# run `yarn` first if you haven't installed dependencies
yarn start
```

View File

@ -0,0 +1,107 @@
# How to build a plugin
VelUX plugin could help you customs any page applications. Most default and extensional runtime APIs make you develop the application easies.
## 1. Build the local server environment.
Refer [contributing](./docs/contributing/velaux.md) guide.
## 2. Initialize the plugin project.
```bash
mkdir custom-plugins
$pluginName=<your_plugin_name>
git clone https://github.com/kubevela-contrib/velaux-plugin-template custom-plugins/$pluginName
cd custom-plugins/$pluginName
```
## 3. Edit the plugin metadata.
* src/plugin.json: Plugin metadata, you should change it.
* package.json: Project metadata, you should change the project name, version, and description etc.
Plugin metadata spec:
```cue
{
"type": "page-app",
"name": string,
"id": string,
"info": {
"keywords": []string,
"description": string,
"author": {
"name": string
},
"logos": {
"small": string,
"large": string
},
"screenshots": [],
"version": string,
"updated": string
},
"backend"?: bool,
"proxy"?: bool,
"backendType?": "kube-api" | "kube-service",
"routes"?: [
{
"path": string,
"permission": {
"resource": string,
"action": string
}
}
],
"backendService"?: {
"name": string
"namespace"?: string
},
"kubePermissions"?: [
{
"apiGroups": string[],
"resources": string[],
"verbs": string[],
}
]
}
```
There are some example plugin configs. https://github.com/kubevela/velaux/tree/main/docs/plugins
## 4. Develop the plugin
```bash
yarn install
yarn dev
```
### Request the backend API
```js
import { getBackendSrv } from '@velaux/ui';
// Request the core APIs
getBackendSrv().get('/api/v1/clusters').then(res=>{console.log(res)})
// Request the plugin proxy APIs
getBackendSrv().get(`/proxy/plugins/${pluginID}/${realPath}`).then(res=>{console.log(res)})
```
Core API Reference: https://kubevela.net/docs/platform-engineers/openapi/overview
### UI Components
```js
import { Table, Form } from '@velaux/ui';
```
UI Component Reference: https://fusion.design/pc/component/box?themeid=2
## 5. Start the server to debug the plugin
```bash
go run ./cmd/server/main.go --plugin-path <custom-plugins-path>
```

127
docs/contributing/velaux.md Normal file
View File

@ -0,0 +1,127 @@
# Contribute VelaUX
## Prepare the local environment
### Install VelaCore
1. Check requirements
* VelaD support installing KubeVela on machines based on these OS: Linux, macOS, Windows.
* If you are using Linux or macOS, make sure your machine have `curl` installed.
* If you are using macOS or Windows, make sure you've already installed [Docker](https://www.docker.com/products/docker-desktop).
2. Download the binary.
* MacOS/Linux
```bash
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash
```
* Windows
```bash
powershell -Command "iwr -useb https://static.kubevela.net/script/install-velad.ps1 | iex"
```
3. Install
```bash
velad install
```
4. Install VelaUX environment
```bash
vela addon enable ./addon
```
## Start the server on local
Make sure you have installed [yarn 2.0](https://yarnpkg.com/getting-started/install), This is required.
```shell
yarn install
yarn build-packages
## Build the frontend and watch the code changes
yarn dev
```
### Start the server
```shell
## Setting the KUBECONFIG environment
export KUBECONFIG=$(velad kubeconfig --host)
make run-server
```
Waiting the server started, open http://127.0.0.1:8000 via the browser.
Now, the local environment is built successfully, you could write the server or frontend code.
Notes:
* If you change the frontend code, it will take effect after the website refresh.
* If you change the server code, it will take effect after restarted the server.
### Check the code style
```shell
# Frontend
yarn lint
# Server
make reviewable
```
### Test the code
For testing server kubebuilder and its dependency tools are required. To install them you can use:
```shell
make setup-test-server
```
Frontend:
```shell
yarn test
```
Server:
```shell
make unit-test-server
make e2e-server-test
```
### Generate the OpenAPI schema
```shell
make build-swagger
```
### Config yarn2 in vscode
Add following config in `settings.json`
```json
{
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
```
## Develop the plugin
Reference: [How to build a plugin](./how-to-build-plugin)
## References
* UI framework: [@alifd/next](https://fusion.design/)
* Icons: [react-icons](https://react-icons.github.io/react-icons)

View File

@ -1,96 +0,0 @@
# Environment
User scenarios:
- Users want to define base application template and add patches based on environment. For example, in dev environment users would use ephemeral disk, while in prod environment use persistent volumes.
- Users want to define environments as the shared-bases for applications. For example, applications might need shared definitions, secrets, health checks, network gateways, etc.
To support the above scenarios, we will add the following concepts:
- AppTemplate that defines the template base as well as the env-based patches:
```yaml
name: example-app-template
base: # the base template
components:
- name: backend
settings:
cmd:
- /bin/myservice
traits:
- name: logging
properties:
rotate: 1d
patch: # kustomize-style overlay patch to base template based on env matching
- envs:
- dev # the name of the Environment
components:
- name: backend
settings:
image: dev/myimage
traits:
- name: scaler
properties:
replicas: 1
- envs:
- prod-beijing
- prod-shenzhen
components:
- name: backend
settings:
image: production/myimage
traits:
- name: scaler
properties:
replicas: 10
```
- Environment that defines a shared-base for applications:
```yaml
name: prod
clusters: # deploy to the following clusters
- prod-cluster
secrets: # The secrets that will be created for applications if not existed.
- name: redis
data:
url: redis-url
password: redis-password
definitions: # The definitions that will be created for applications if not existed.
- type: Component
name: function
source:
git: catalog-url
path: pacakge/function
- type: Trait
name: logging
source:
git: catalog-url
path: package/logging
```
> Note: we will define a definition catalog/package format: https://github.com/hongchaodeng/catalog-example
With the above concepts, the user story goes as:
- The operations/admin team sets up environments first
- The developer users prepare app templates and individual patches for each environment that will have apps to deploy to.
- Users choose a template, then choose an environment, and deploy!
- velacp will render the final Application based on the template and env
- velacp will prepare the necessary secrets, definitions in the environment for the applications
- The Application can use any of the definitions, secrets in this env.
```
Applicaton deployment workflow:
Env -> Controller -> (Secrets + Definitions)
AppTemplate + Env -> velacp -> Application -> Controller
```
Notes:
- AppTemplate will be implemented in velacp. Environment will be implemented as a CRD.

View File

@ -1,133 +0,0 @@
# Environment
DEPRECATED!!!
## 1. Introduction
An environment is a shared infra-base consisting of the same clusters, packages (equiv. capabilities), etc.
to which the applications are deployed.
Below are two examples of `staging-env` and `prod-env` environments:
```yaml
name: staging-env
clusters:
- name: staging-cluster
packages:
- catalog: staging-catalog
package: inmem-logging
---
name: prod-env
clusters:
- name: prod-cluster
packages:
- catalog: prod-catalog
package: loki-logging
```
We are going to explain what an environment includes in the following.
## 2. Clusters
An environment consists of a group of clusters. For example, multiple small clusters from different data centers could form a staging environment to simplify management and serve maximum availability. While each production environment might consist of only one cluster and users need to calibrate high availability for their apps.
When deploying apps to an environment, you might specify only the environment which will deploy to all clusters. Or you might pick some clusters within an environment.
```yaml
# When deploying an app you could choose env and select clusters within the env.
name: example-app
env: env-1
clusters:
- cluster-1
```
The clusters that environments reference to are abstraction over a k8s cluster. It could be an existing one which should have credentials set, or a need-to-be-created one that VelaCP can call over some cloud providers (e.g. ACK, GKE, EKS) to create one.
### Cluster Setup Workflow
Before creating any Environment, users need to create Clusters first. Here is an example:
```yaml
name: prod-cluster
spec:
external: # This is pointing to externally managed clusters without VelaCP reconciling
kubeconfig: "..."
managed: # This would trigger cluster reconciler in VelaCP to create and manage a cluster
provider: ack
parameters:
master:
instanceType: ecs.g6.large
worker:
instanceType: ecs.g6.small
replicas: 3
cni: terway
```
Once the cluster is setup, then create environments to reference it:
```yaml
name: prod-env
clusters:
- prod-cluster
```
## 3. Packages
Within an environment, deployment on all clusters should be consistent. Thus, all packages should be installed the same across clusters.
To provide such guarantee, environment includes `packages` list to ensure those dependencies are declared and installed consistently.
A package is an abstraction over manifests to prepare infrastructure environments. It could be Helm Charts, Kube resources, or Terraform resources. You can use it to set up Operators (Prometheus, ELK, Istio), RBAC rules, OAM Definitions, etc.
### Package Setup Workflow
First of all, the packages should be uploaded to a remote store. We support two kinds of storage backends:
- Git.
- Object storage.
The catalog and package structure must follow predefined format. Here is an example of the structure format: [catalog-example](https://github.com/hongchaodeng/catalog-example).
Before creating the Environment, create the Catalogs first. Here is an example:
```yaml
name: prod-catalog
spec:
git:
url: https://github.com/hongchaodeng/catalog-example
rootdir: catalog/
oss:
url: https://oss.aliyun.com/bucket_name/
```
Finally create the environment:
```yaml
name: prod-env
clusters:
- prod-cluster
packages:
- catalog: prod-catalog
package: grafana
```
By doing this, the environment reconciler from VelaCP would retrieve the packages from the catalog, and then:
- if the package is not installed, install the package
- if the package has been installed and version is older, upgrade the package
Note that the pacakge could be of type of Helm Chart or Kube resources or Terraform resources, no worry about that.
VelaCP will take care of them under the hood and use corresponding tooling to do the installation:
- Kube resources: same as `kubectl apply`
- Helm chart: same as `helm install`/`helm upgrade`
- Terraform resources: same as `terraform apply`
## 4. Env-based Config Patch
You can also do per-environment configuration management based on app templates.
Check out [this doc](env_based_patch.md)

BIN
docs/images/KubeVela-03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

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