* 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: enhance rt logic and add docs
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
* Fix: test conflict
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
* rollout controller use last target as source and add whole process e2e-test
* modify makefile use regex include all rollout related test
* add example
* fix golint
* more wait time
* pending pod may let rollout stock in rollingBatches
* fix docs and tests comments
modify docs example
modify cue and yaml
* less pod in test avoid pod pending
* WIP almost finish main logic
WIP make reviewable
finish manual test
fix rollout plan related test
WIP refactro some logic
WIP finish e2e-test
* fix failed e2e-test
* fix failed interagtion test
* move rollout to trait packege
* modify e2e-test testdata change apiVersion
* add v1alpha1 to scheme in test
* more wait time
* fix comment
* split rollout test
fix makefile
* rename test name
delete equal quata
try to fix
fix
* add more test
* add application component name duplication check in webhook
* Helm test will not clean up the test data, and the application test of the component with the same name created failed during e2e.
* fix the problems encountered during the test:
* ignore the parsing failure caused by the existing application without definition when checking;
* after the addition is successful, the resources left by the helm test are automatically cleaned up;
Co-authored-by: chwetion <chwetion@foxmail.com>
* refine assemble and dispatch
Signed-off-by: roy wang <seiwy2010@gmail.com>
* remove app context in app controller
modify clean up app revision
remove old resource tracker related logic
fix unit tests
Signed-off-by: roy wang <seiwy2010@gmail.com>
* fix e2e-test
- get rid of appCtx in test cases
- fix test cases according other logic changes in app controller
remove whole appcontext_test.go file
disable rollout related e2e test provisionally
disable resource tracker related e2e test provisionally
Signed-off-by: roy wang <seiwy2010@gmail.com>
* add finalizer logic for app controller
Signed-off-by: roywang <seiwy2010@gmail.com>
* add new apply option MustBeControllableByAny
make dispatch idempotent
Signed-off-by: roywang <seiwy2010@gmail.com>
* refactor rollout
* fix rollout finalize succeed
Signed-off-by: roywang <seiwy2010@gmail.com>
* add update trait and gc test
fix lint
* fix flaky e2e test
Signed-off-by: roywang <seiwy2010@gmail.com>
* fix comment
* fix comments and add sourceRevision dispatch
delete useless
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
* fix app finalizer backward compatible
Signed-off-by: roywang <seiwy2010@gmail.com>
* fix backward compatability for deprecation of appContext
add unit test for apply option
add e2e test
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
* fix app controller unit test
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
* refine app controller apply logic
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
* fix e2e test of resource tracker
fix e2e test of rollout plan
fix flaky e2e tests
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
* refine comments and remove useless codes
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
* disable appCtx controller
add Component handler into app controller
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
Co-authored-by: wangyike <wangyike.wyk@alibaba-inc.com>
* add scale implementation
* fine tune the logic and adjust e2e test
* fix tests and fine tune logic
* try to fix flaky verification
* allow zero size step
* fix scale down check
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>
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