* 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>
* 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>
* 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>
* 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>
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>
* 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>
* 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
* 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(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>
* 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>
* 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
* 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
* 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>