* Feat: poll multi-cluster metrics and export to prometheus
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* pass context to polling loop
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* move metrics definition to montitor/metrics/multicluster.go
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* remove pod usage metric and make reviewable
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* revert the change of GetClusterMetricsFromMetricsAPI
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* revert the change of GetClusterMetricsFromMetricsAPI
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Separate the polling logic into a function
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* add start menber function
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* make refreshPeriod a menber var
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* fix typo
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Refactor: refactor multi cluster round trippers
Before adding more RoundTrippers, it would be better to expose common
logic in the utility package.
This commit exports `tryCancelRequest` at `utils` package, and make
`secretMultiClusterRoundTripper` implement `RoundTripperWrapper`
interface to allow chaining multiple round trippers.
Refs #3432
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Feat: reconcile app with scoped permissions
Currently, all Application resources are reconciled by the Roles bound
to the controller service account. This behavior gives us the power to
manage resources across multiple namespaces. However, this behavior can
be problematic in the soft-multitenancy environment.
This commit adds `serviceAccountName` to ApplicationSepc to reconcile
Application with the given service account for reconciling Application
with scoped permissions.
Refs #3432
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Refactor: extract context setter as method
https://github.com/oam-dev/kubevela/pull/3434#discussion_r825561603
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Feat: use annotation instead of spec
https://github.com/oam-dev/kubevela/issues/3432#issuecomment-1066460269
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Refactor: unify service account setter caller
https://github.com/oam-dev/kubevela/pull/3434#discussion_r825853612
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Refactor: rename GetServiceAccountName
https://github.com/oam-dev/kubevela/pull/3434#discussion_r826514565
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Fix: separate waiting and failed backoff time and make them configurable
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
* change var name in chart values
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
* fix ci
Signed-off-by: FogDong <dongtianxin.tx@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>
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>
1. add ConcurrentReconciles for setting the concurrent reconcile number of the controller
2. add DependCheckWait for setting the time to wait for ApplicationConfiguration's dependent-resource ready
* change to klog/v2
* add logfilepath opt in helm chart
* replace klog.InfoF with klog.InfoS and improve messages
Remove string formatting from log message, improve messages in klog.InfoS and use lowerCamelCase to fmt Name arguments in klog.InfoS
* fix klog.Error
for expected errors (errors that can happen during routine operations) use klog.InfoS and pass error in err key instead.
* use klog.KObj and klog.KRef for Kubernetes objects
ensure that kubernetes objects references are consistent within the codebase
* enable set logdebug level
* add log-file-max-size
* WIP refactor gc func
WIP write gc code
WIP update chart,cmd args
add cleanupRevison func into garbageCollection
add more test
finish unit-test
refactor use func implements
Complete e2e test
WIP rewrite some logic
add func test and rewirte context pointing to func
fix cilint
refactor some function
fix typo
fix ci error
change gc logic
after change gc number, fix all test
add check appRevision collection
WIP finish most code
* add rollout batch to fix rollout e2e-tet
* fix component name in rollout
* ignore gc error, just log the error
* delete 4 standard controllers related code
delete related yaml
delete setup controller
add back podspecworkload controller
try to fix e2e
update related docs
fix failed test
fix docs problem
remove useless scheme
up timeout for e2e-test
change doc structure
* fix go mod
solve failed test
add compatibility test for old crd
add app ns for cli
modify compatibility test
solve compatibility problem
add testing for GetDefinition func with cluster scope CRD
generate code for compatibility-test
move testdata generate to makefile
optimize ci pipeline for compatibility-test
* add webhooks
* app controller change
* add component revision and appconfig revision and test
* solidify the component revision logic and fix component revisoin bugs
* fix command cli e2e failure
* fix the bug caused by rawExtention
* fix UT test
* retry on component not found
* lint
* revert component revision create order
* support env and config storage driver
Signed-off-by: Weiping Cai <weiping.cai@daocloud.io>
* use driver.LocalDriverName to replace str
Signed-off-by: Weiping Cai <weiping.cai@daocloud.io>
* Support disable installation of builtin capabilities
Added vela core bootstrap flag `--enable-caps` to support no
installation for builtin capabiliteis
Feature #658
* revert flag to "disable-cpas"
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Address comments
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Fix vela install to include all dependencies
rewrite server dependency component install:
- Don't rely on crd name. Continue installing all charts.
- Rewrite signal handler to uninstall dependencies before exiting.
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
* fix
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
* design doc
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
* Support deployment via appfile
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
* design update
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
* comments
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
* update
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
* refactor
* add multi services example in design doc