* Feat: support nested parameters in addon parameters
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: show all params
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: search useful addon version automatically
Verify whether the current addon version meets the system version requirements according to the obtained specified version. There are two system version requirements: Vela core version, K8s version.
If meet the requirements and continue to perform the next task.
If the requirements are not met, obtain the highest version that meets the requirements
Refs #4181
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: Optimize function implementation and code order, and modify test cases
add more comments of function
optimize package import sequence
optimize user interaction logic and error information extraction logic
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: change template string of regular expression to const type string
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: filter by source addon in `vela def list`
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: change header year to 2022
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: use generic filters for extensibility
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: change variable addonFilter to addonName
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: update tests according to code changes
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: unify SearchDefinition params using filters
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: simplify tests
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: remove redundant code
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests with multiple filters
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: show SOURCE-ADDON column in `def list`, if any
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: add addon filter to apiserver definition-lists
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: fix lint issues
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Chore: update swagger doc accordingly
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for filter Applying
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: add a helper function to apply filters to lists
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: format imports
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: add OwnerAddon to DefinitionBase
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for OwnerAddon field
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add addon util tests
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: implement addon push command
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: split functions
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: add command usages
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for addon push command
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Chore: fix lint
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: fix old incomplete tests
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: also add test in pkg/addon
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: sort import
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: add break in for loop and remove default repo checks
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: format imports
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: add a cli option to keep original Chart.yaml
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: add more help text
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: fix typo in comments
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: add more help text
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: provider can't be added since 1.4 as context abused
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: add cache for remote terraform module in vela show
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: add message for terraform resource in error state
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: implement addon create command
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: make global vars local
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: fix typos
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: create test for file utils
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: use -p flag to manually specify paths
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: make changes according to comments
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: create empty scaffold if Chart-related paramaters are not provided
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: fix golangci-lint warnings
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add cli tests
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: show URL in errors if an invalid URL is detected
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: fixed the problems of display definition in web
Some ComponentDefinitions, TraitDefinitions, WorkflowDefinitions
failed to show the usage in web browser
Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
* set printable type for {}
Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
* support WorkflowSteps and Policies
Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
Co-authored-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
* Feat: support dry run for policy
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: upgrade runc package
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: skip endpoint table if no endpoints are found in addons
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: rename function name
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: update tests to also exclude endpoints
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: reduce code changes
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: enhance velq ql and support cue file
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* add statement
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix(cli): avoid issues when using dot as local addon path
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test(cli): add tests for `vela addon enable .`
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test(cli): use sample addon to test
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test(cli): fix typos in tests accordingly
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test(cli): correct file path
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test(cli): do not focus single test
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test(cli): fix typos in tests accordingly
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: correct error output
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
* more note info and filter prerelease addon version
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* wrap the error optimize the show info
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* fix golint
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* Feat(cli): Added an offline flag to the 'dry-run' command
Signed-off-by: Noorain Panjwani <noorain.panjwani@gmail.com>
* Using a fake client now for offline mode
Signed-off-by: Noorain Panjwani <noorain.panjwani@gmail.com>
* Fix(cli): try to get mapValue type name
Signed-off-by: Cuichen Li <cuichli@cisco.com>
* Fix: update output format based on comment and fix typo
Signed-off-by: Cuichen Li <cuichli@cisco.com>
* Style: make the change reviewable
Signed-off-by: Cuichen Li <cuichli@cisco.com>
* Fix: test
Signed-off-by: Cuichen Li <cuichli@cisco.com>
* Feat: support force delete Terraform typed application
If a Terraform typed application hangs on deletion, it could be forced to
delete by command line `vela delete xxx --force`
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix copyright
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Upgrade terraform controller api version
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add one more tests
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix two unit-tests
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: show available versions and dependencies in `addon status`
Also prettify output
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: show addon dependencies in `addon status`
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: adjust `addon status` output
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: remove spaces in `addon status` output
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: truncate string if available versions too long
if a local addon has been installed, the AVAILABLE-VERSIONS column of the registry one will not truncate. this commit fixes that.
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Perf: avoid unnecessary network requests to improve performance
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: do not display remote info for local addons
Limit Description length when using `addon list`
Use simpler method to get addon info
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for cli/addon limitStringLength, generateParameterString
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: fix output being empty if the searched addon does not exist anywhere
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for generateAddonInfo
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for generateAddonInfo and FindWholeAddonPackagesFromRegistry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: format code
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: correct unnecessarily focused tests
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: remove unused code blocks
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: remove unnecessary output to stdout
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: remove added registry after tests has been completed
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: new RegistryDataStore every test, to avoid panics
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: fix failing tests due to incorrect registry name
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: move logic to get addon package out of where it is supposed to get addon status
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add test cases for secret-getting in TestGetAddonStatus
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: return error if an addon is not installed, nor does it exist in the registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: rename GetAddonWholePackage to GetDetailedAddon as per wonderflow
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: require --verbose option to show details in `vela addon status`
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: require --verbose option to show details in `vela addon status`
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* chore: run make reviewable
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: fix configmap being already existed
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: fix output show addon does not exist when verbose is off and an addon is not installed, but it does exist in the registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: fix golangci-lint issues
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: resolve locally installed addons not being displayed
Addressed an issue where locally installed addons may not be displayed
if one with the same name is in the registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: revert incorrect auto-formatting
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: change original variable name to avoid confusions
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for outputs from `vela addon list`
when an addon with the same as registry one is locally installed
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: use more concise method to check length
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add one more test condition for dual addons
i.e. local and registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: simplify testing logic by removing unneeded looping
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: add missing license header
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: don't override user definied `region`
Fix #https://github.com/oam-dev/kubevela/issues/3384
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix check-diff
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix CI
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix CI
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix UT
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* revert some changes
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: use Terraform provider name as application in CLI
In CLI, use Terraform provider name as application name when
create a Provider. Also display there providers in VelaUX.
1). manually created a Terraform Provider object, like https://github.com/oam-dev/terraform-controller/blob/master/getting-started.md#aws
2). by enabling a Terraform provider addon in version older than v1.3.0
3). by create a Terraform provider via `vela provider add`
4). by VelaUX
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add UTs
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
- For VelaUX, hidden a provider name (users don't need to manual set it). Used
the application/component name (config name) to be the provider name.
- Store description of a config to the annotation of the config application
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: support alias in cluster
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
* Fix: add test for cluster alias
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
* support auth
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* add test
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
fix check diff
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
fix test
fix
add comments
fix test
* add tests
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
fix
add more test
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* add more test
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* extract set auth info as a global func
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* return bcode
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* add addons gitlab support
Signed-off-by: Namo <lgj112113@163.com>
* add addons gitlab support
Signed-off-by: Namo <lgj112113@163.com>
* test file edit
Signed-off-by: Namo <lgj112113@163.com>
* typo edit
Signed-off-by: Namo <lgj112113@163.com>
* notes edit
Signed-off-by: Namo <lgj112113@163.com>
* move third party imports block
Signed-off-by: Namo <lgj112113@163.com>
* code format edit
Signed-off-by: Namo <lgj112113@163.com>
* notes edit
Signed-off-by: Namo <lgj112113@163.com>
* create addon registry bug fix
Signed-off-by: Namo <lgj112113@163.com>
* add gitlab addon registry bug fix
Signed-off-by: Namo <lgj112113@163.com>
* add addon gitlab support test file
Signed-off-by: Namo <lgj112113@163.com>
* add addon gitlab support test note edit
Signed-off-by: Namo <lgj112113@163.com>
* add addon gitlab branch support and fix bug
Signed-off-by: Namo <lgj112113@163.com>
* addon gitlab registry repo name invalid
Signed-off-by: Namo <lgj112113@163.com>
Co-authored-by: Namo <lgj112113@163.com>
* Fix: support multiple-tenant cloud resources
Split terraform-xxx to two parts, the original addon will only install
definitions, and the provider object will be created by `vela provider`
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* continue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* continue 0302
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support `vela provider list`
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* generate a configmap in an addon terraform-xxx
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix listing providers
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support add a provider
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support delete a provider
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support legacy providers
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix bugs in using local filepath as markdown filename; fix bugs in parseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* ignore control character mismatch between lc.TerraformConfiguration and raw text
Signed-off-by: Nicola115 <2225992901@qq.com>
* goimports
Signed-off-by: Nicola115 <2225992901@qq.com>
* store remote and local in MarkDownReference struct
Signed-off-by: Nicola115 <2225992901@qq.com>
* gofmt
Signed-off-by: Nicola115 <2225992901@qq.com>
* fix too many argument bugs in generate.go:45
Signed-off-by: Nicola115 <2225992901@qq.com>
* fix invalid comment
Signed-off-by: Nicola115 <2225992901@qq.com>
* first commit
add more tests
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
fix ci
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
fix ci
fix test
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* fetch only definitions from registry for lagacy addon app
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
fix ci
* fix error test
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
* add doc-gen --local <LocalFile> and corresponding functions
Signed-off-by: Nicola115 <2225992901@qq.com>
* go format
Signed-off-by: Nicola115 <2225992901@qq.com>
* refactor the usage of vela def doc-gen from local file; refactor the function GenerateReferenceDoc
Signed-off-by: Nicola115 <2225992901@qq.com>
* gofmt and goimports
Signed-off-by: Nicola115 <2225992901@qq.com>
* update prompts info
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove parseLocalDefinition struct, using ComponentDefinition instead
Signed-off-by: Nicola115 <2225992901@qq.com>
* standardize the function ParseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* add unit test for ParseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove redundant functions
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove redundant lines and do goimports formatting
Signed-off-by: Nicola115 <2225992901@qq.com>
* Optimize error msg of addon enable/upgrade local path
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Fix and add unit test
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Run make reviewable to include all changes
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* remove test case for windows
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* fix unit test.
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Fix: retrieve Terraform variables from variables.tf
If Terraform modules/resources are stored in remote git repos, get
variables from file `varialbes.tf`, or from `main.tf`.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: prioritize namespace flag for `vela up`
Currently, CLI applies application to `default` namespace when there is
no explicit namespace in application spec, even if the namespace flag
is set.
This commit fixes issue by overriding the namespace if the namespace
flag is set.
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Test: add test cases for overriding namespaces
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
Besides generating a Terraform ComponentDefinition from a remote git repo,
support generate one from local HCL file
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
Added application samples for all Terraform typed ComponentDefinition,
and also localize the title for AWS and AZure
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: support generate cloud resource docs in Chinese
`vela def doc-gen` will also generate Chinese cloud resource docs
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Continue the development
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add ut
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add ut and fix linting issue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Address comments
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix `Should not use dot imports. (ST1001) ` issue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add copyright
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: vela up support read from stdin
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: addon name missed in output and fix test
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Chore: refine CLI output
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
Fix: add retry-on conflict on CLI
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: add cluster name in service endpoint
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add cli unit test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change `vela def gen-doc` to `vela def doc-gen`
Address the comments to change the command line name
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix CI
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Fix: Generate doc for Terraform typed ComponentDefinition
When the configuration of a Terraform Typed ComponentDefinition is in
remote Git, generate the properties for it. And generated outputs for
all Terraform ComponentDefinition
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Refactor: use createOrUpdateNamespace as a common util function
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: add ENV webservice handelr
* Fix: fix Env usecase logic
* Feat: Add Delete Env API
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: filter empty addon data
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: split makefiels and make it clear
* Feat: add k8s utils test
* Feat: Add env update interface
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: change env implementation
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: minor fix
* Revert "Fix: minor fix"
This reverts commit 9cafefa65a.
* Fix: use appusecase as parameter
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Refactor: align CLI vela env with new env design
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: minor fix
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: add page index and alias of env
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: fix tests and licence header
* Fix: fix makefile and add default target
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: update build swagger.json
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: change update env api
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: list env with alias
* Feat: add log to env delete
* Fix: can not get app status
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support update workflow and refactor code
* Fix: lint
* Fix: remove swagger check
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: fix cli vela delete
* Fix: update test
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: update test
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: app deploy unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: SortOrderDescending is not effective
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support default project/target/env
* Fix: make test and add swagger
* Fix: use separated datasource for unit test
* Fix: app rollback bug
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: fix e2e test
* Fix: kubeapi driver sort bug
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test
* Fix: api e2e test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test fix
* Fix: try fix e2e test
* Fix: api e2e test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: vela port-forward supports Addon Observability
Support port forwarding service of Addon Observability in
multiple clusters
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix CI issues
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Pause test case
Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
* fix lint
Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
* diable discover the open api of the CRD
Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
* fix definition test cases
Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
* Feat(cli): app status more info
Signed-off-by: wangyike <wangyike_wyk@163.com>
* more info
Signed-off-by: wangyike <wangyike_wyk@163.com>
* fix: delete invisible check
Signed-off-by: wangyike <wangyike_wyk@163.com>
* Fix: cli add addon registry
add more detail info for addon workflow info
Signed-off-by: wangyike <wangyike_wyk@163.com>
* fix: set app status in addon status directly
Signed-off-by: wangyike <wangyike_wyk@163.com>
* add e2e test
Signed-off-by: wangyike <wangyike_wyk@163.com>
Refined the logic to display logs for Terraform typed applications,
and upated the namespace of the pod running Terraform jobs
Fix https://github.com/oam-dev/kubevela/issues/2670
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: add more fields for Terraform types definitions in api schema
Added `writeConnectionStringSecrecto`, `region` and `deleteResoruce`
fields for Terraform types definitions in OpenAPI schema
* fix ci issue
* fix header
* Fix: install Terraform and apply the support for a provider in one jump
- Fix issue: addon name should not include forward-slash "/" cloud-resource fix addon name should not include forward-slash "/" #2588
- Install terraform and the provider in one jump. Instead of installing terraform
and terraform-xxx in two steps
* Fix: support naming a terraform provider
Support set the name for a terraform provider.
Fix#2595
* Style: format
Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
* Fix: vela status from app.status.services
* Feat: refine cli and support terraform logs
* Feat: support remote exec
* Feat: port-forward support multicluster
* Fix: vela status+port-forward test
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat(rollout): fill rolloutBatches if empty when scale up/down (#2569)
* Feat: fill rolloutBatches if empty
* Fix: fix unit-test
* Test: add more test
Fix: lint
Fix: fix lint
* Update release.yml (#2537)
* Feat: add registry, merge registry and cap center (#2528)
* Feat: add registry command
* Refactor: comp/trait command combine with registry
* Feat: refactor `vela comp/trait`
* Fix: import
* Fix: fix if type is autodetects.core.oam.dev
* Fix: fix list from url
* Fix: test
* Feat: add test
* Fix: remove dup test
* Fix: test
* Fix: test
* Fix: fix label filter
* Fix: reviewable
* Fix test
* fix personal repo in test
* Fix test
* Fix test
* add some boundary check
* reviewable
* Fix: fix nocalhost trait (#2577)
* fix incorrect addon status (#2576)
* Fix(cli): client-side throttling in vela CLI (#2581)
* fix cli throttling
* fix import
* set to a lower value
* remove addon with no defs (#2574)
* Feat: vela logs support multicluster (#2593)
* Feat: add basic multiple cluster logs
* fix context
* Fix select style
* Fix select style
* remove useless env
* fix naming
* Feat: vela cluster support use ocm to join/list/detach cluster (#2599)
* Feat: add render component and apply component remaining (#2587)
* Feat: add render component and apply component remaining
* fix ut
* fix e2e
* allow import package in custom status cue template (#2585)
Co-authored-by: chwetion <chwetion@foxmail.com>
* Fix: abnormal aux name (#2612)
* Feat: store workflow step def properties in cm (#2592)
* Fix: fix notification def
* Feat: store workflow step def properties in cm
* fix ci
* fix data race
* Fix: change Initializer to Application for addon Observability (#2615)
In this doc, updated the Observability implementation from initializer
to Application. I also store definitions as it's not well stored in
vela-templates/addons/observability
* Fix: fix backport param (#2611)
* Fix: add owner reference in workflow context cm (#2573)
* Fix: add owner reference in workflow context cm
* fix ci
* delete useless test case
* Fix: op.delete bugs (#2622)
* Fix: op.delete some bugs
* Fix: app status update error
Fix: make reviewable
* Fix: show reconcile error log (#2626)
* Feat: add reconcile timeout configuration for vela-core (#2630)
* Fix: patch status retry while conflict happens (#2629)
* Fix: allow definition schema cm can be same name in different definition type (#2618)
* Fix: fix definition schema cm name
* fix ut
* fix ut
* fix show
* add switch default case
* Feat: remove envbinding policy into workflow (#2556)
Fix: add more test
* Feat: add vela prob to test cluster (#2635)
* Fix: upgrade stern lib to avoid panic for vela logs (#2650)
* Fix: filter loggable workload in vela logs (#2651)
* Fix: filter loggable workload in vela logs
* reviewable
* Feat: add vela exec for multi cluster (#2299)
fix
support vela exec
* Fix: health check will check for multiclusters (#2645)
* Fix: minor fix for vela cli printing (#2655)
* Fix: minor fix for vela cli printing
* add dockerfile go mod cache
* Feat: support apiserver-related multicluster features (#2625)
* Feat: remove envbinding policy into workflow
Feat: add support for env change (env gc)
Fix: fix rollout timeout setting bug
* Feat: support disable trait and env without workflow
* Fix: add hint for replaced value
Co-authored-by: wyike <wangyike_wyk@163.com>
Co-authored-by: basefas <basefas@hotmail.com>
Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com>
Co-authored-by: Tianxin Dong <dongtianxin.tx@alibaba-inc.com>
Co-authored-by: yangsoon <yangsoonlx@gmail.com>
Co-authored-by: Chwetion <137953601@qq.com>
Co-authored-by: chwetion <chwetion@foxmail.com>
Co-authored-by: Jian.Li <74582607+leejanee@users.noreply.github.com>
Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: add registry command
* Refactor: comp/trait command combine with registry
* Feat: refactor `vela comp/trait`
* Fix: import
* Fix: fix if type is autodetects.core.oam.dev
* Fix: fix list from url
* Fix: test
* Feat: add test
* Fix: remove dup test
* Fix: test
* Fix: test
* Fix: fix label filter
* Fix: reviewable
* Fix test
* fix personal repo in test
* Fix test
* Fix test
* add some boundary check
* reviewable
* Feat: support serviceaccount in multicluster
* Fix: add compatibility & support sa
* Fix: add multicluster sa test
* Fix: add test for upgrade func
* Style: format
* Refactor: set rollout as a pointer reference
see issue #2289 for more details
Closes#2289
* Refactor: set rollout as a pointer reference
see issue #2289 for more details
Closes#2289
* Feat(trait): annotation and labels trait should also affect the workload object along with pod
* Feat(trait): annotation and labels trait should also affect the workload object along with pod
* Feat(trait): annotation and labels trait should also affect the workload object along with pod
* Feat(trait): annotation and labels trait should also affect the workload object along with pod
* Chore: deprecate containerized workload
* Chore: deprecate containerized workload
* Chore: run make reviewable as per review comment
* Chore: fix import
* Chore: merge with master
* Chore: merge with master
* Chore: remove references for containerized workload
* Chore: fix failiing e2e test
* Chore: fix failing e2e test
* Chore: fix failing e2e test
* Chore: fix failing e2e test
* Chore: fix e2e tests
* Chore: fix e2e tests
* Chore: fix e2e tests
* Chore: fix e2e tests
* Chore: fix e2e tests
* Chore: merge with upstream
Co-authored-by: Reeta Singh <reetas@twitter.com>
* Fix: add e2e plugin test back
* Fix: e2e rollout test and try change port to 37081
* Fix: add rollout plan test back
* Refactor: change the workflow state machine and add workflow succeed state
* Refactor: refine definition controller and fix e2e of app revision
* Refactor: unlock all the normal cases
* Fix: add helm schematic logic back into workflow
* Feat(trait): annotation and labels trait should also affect the workload object along with pod
* Feat(trait): annotation and labels trait should also affect the workload object along with pod
* Feat(trait): annotation and labels trait should also affect the workload object along with pod
* Feat(trait): annotation and labels trait should also affect the workload object along with pod
* Feat: vela show annotations display undefined should be refined
Co-authored-by: Reeta Singh <reetas@twitter.com>
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <zerjun@beatchain.co>
* Support Obsevability
- Support displaying and filter logs
- Support metrics and traces
* register datasource
* install prometheus
* install prometheus and register datasource
* Also install and register Prometheus
* remove unneeded file
* register datasource with clusterip
* register prometheus
* Support importing Grafana Dashboard
Added a trait to import Grafana Dashboard on component Grafana
* tmp
* 1. make observability as addon
2. make it more esay to gen addon
* use [[]] as gen addon delim
* url->urls
* add 2 url
* fix template
* fix args
* remove doc
* move url,fix test
* last modify!
* change arg name to grafana-domain
Co-authored-by: zzxwill <zzxwill@gmail.com>
* Feat allow users to specify component revision name
* Add unit tests
Signed-off-by: LeoLiuYan <929908264@qq.com>
* Add ExternalRevision field to ComponentManifest
* Add handleComponentRevisionNameUnspecified func
* Add unit tests for webhook
Signed-off-by: LeoLiuYan <929908264@qq.com>
* Add more unit tests
* Feat allow users to specify component revision name
* Add unit tests
Signed-off-by: LeoLiuYan <929908264@qq.com>
* Add ExternalRevision field to ComponentManifest
* Add handleComponentRevisionNameUnspecified func
* Add unit tests for webhook
Signed-off-by: LeoLiuYan <929908264@qq.com>
* Add more unit tests
* Try to fix webhook unit tests
* fix race (#2040)
* fix test bug
* More unit tst
* More unit test and trigger ci
Co-authored-by: yangsoon <yangsoonlx@gmail.com>
Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
* draft vela def enhancement
* add format and amend test
* fix generation bugs
* force CI
* work around lifecycle definition in avoid of vela show --web crash
* fix data race in envbinding
* upgrade K8s dependency to v0.21
* update CRD for new version of controller-runtime
* fix ci component revision create must fill Raw in runtime.RawExtension
* try fix test
* start control plane timeout set to 1min and fix tests
* add timeout for env test start and stop
* longer timeout time for BeforeSuit function
* upgrade kubebuilder and k8s cluster version to match with v1.21.2 in github action
* fix test
* fix resource tracker ownerRef override
* update developer guides
* enhance `addon enable` command
* fix: initializer requeue twice
fix: initializer won't update status while checking dependency
* not delete ns while disable addon
* add init delete webhook and test
* use poll func
* fix get init logic
* fix get init logic
* fix CI
* fix CI
* unfocus
* check diff
* CI
* - add: list/enable/disable an addon.
- add: test addon
- add: full flux addon
- fix: flaky test
* try again
* 1. add readme
2. gen demo file
* fix ci
* change name
* try again
* allow vela CLI to specify NS
* vela up support application yaml
* fix
* add default cap center to vela CLI
* add alias for `vela components`(`vela comp`,or `vela component`) and `vela traits`(`vela trait`)
* fix cap ls STATUS fields are always "uninstalled"
* fix vela up process
* Revert "allow vela CLI to specify NS"
This reverts commit 33f27362
will refactor to use Initializer
* add --discover for vela CLI
* * rfc capcenter to reuse registry type
* change default cap center to oss
* judge if application file in advance
* fix CI
* try CI
* fix error check
rfc appfile pkg: remove appConfig&component
fix unit test
rfc vela cli dryrun & livediff
fix unit test & e2e test
rfc app controller: remove appConfig&component
fix unit test & e2e test
fix rollout and webhook
fix use AppRevision as others' owner
move ComponentManifest to oam.types
add a util to make conversion between AppConfig and ComponentManifest
complete Component revision mechanism in app controller
add test for component revision
rename
fix unit tests
add clean up for component revision
fix unit test
Signed-off-by: roywang <seiwy2010@gmail.com>
* vela show support show the paramters of KUBE model ComponentDefinition
* fix
* fix
fix
* enchance test case and add function in show -web
fmt and vet
fix
fix522
* add resolve for kubedef type trait in reconcil process
* fix StoreOpenAPISchema args para and ret para
* fix GetCapabilityObject uncover
* Update samples for "vela show xxx --web"
Also stop generating components/traits docs under
docs/en/end-user and remove the command from Makefile
Fix#1602
* fix doc build issue
* Update references/plugins/references.go
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Enhance --web feature for "vela show"
- Find the capability in "vela-system" if notfound in the current ns
- Don't depend on local capabilities
* add ut for GetCapabilityByName in references/plugins/cluster.go
* add ut for GetNamespacedCapabilitiesFromCluster in references/plugins/cluster.go
* add ut for GenerateTerraformCapabilityProperties in references/plugins/references.go
* fix import issue
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
As we don't need to sync the defintiion .yaml and .cue to local and
then extract it, besides, there is a simliar function "SyncDefinitionsToLocal"
just besides it, rename function "SyncDefinitionToLocal" in order
not to cause confustions
* Support server-side Terraform as cloud resource provider
Provide another schematic `Terraform` to provision cloud
resource.
Fix#698
* make namespace optional
add unit-tests
* support vela show to generate componentdefinition usage
* add unit-tests
* tidy go mod
* clean go mod and updated go sum
* Remove `variable` from `properties` of Terraform compoent
* don't literally set component catagory
* refine error message when a capability could not be found
* fix ut
* Code refactor and add unittests
* fix ci issues
* Update references/plugins/references.go
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* add test cases
* fix ci issue
* revert lowercase of "Properties"
* fix ci issue
* add ut for appfile
* fix e2e issue
* add docs
* fix official site build
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Enable "vela show" to support namespaced capability
Provide option `-namespace`, if not set, the default namespace
is default. If not found, as by default, capabilities are located in
vela-system, it will continue to retrieve the capability in
vela-system directory.
Fix#1520
* add e2e tests
* Address comments: Revert env context back
Get namespace from env, instead of adding option "-namespace"
* fix unittest issue
* Address comments
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* fix e2e
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
move dry-run and live-diff into an independent pkg
WIP add sample and doc
WIP unit test for live-diff
add unit test
Signed-off-by: roy wang <seiwy2010@gmail.com>
* add podDisruptive to traitdefinition
* fix docs & example
* fix diff and add docs
* use bool type for podDisruptive
Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
* Support cloud resource provisioning and consuming (Crossplane)
Provided a way to store secret for cloud resource generated by
Crossplane and to consume the secret
Refer to #1128
* Separate cloud resource producer and consumer in two applications
* add unit test to check whether application can consume cloud resource secret
* update Cloud Resource doc
* Provisioning and consuming cloud resource in different applications v1 (one cloud resource)
* one component consumes two cloud resources
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
fix diff
update example and test data version
fix convert function
fix e2e for helm
clean up creationTimestamp in a hack way
fix ci
pending package suit test
fix group version
fix ci
fix ut
rename type to kind
fix example
fix conflicts
Co-authored-by: yangsoon <yangsoonlx@gmail.com>
* generate appRevision and create AC with the same name
* Update pkg/controller/core.oam.dev/v1alpha2/application/application_controller_test.go
* fix ci
Co-authored-by: Ryan Zhang <yangzhangrice@hotmail.com>