* Feat: enhance the application synchronizer
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add the API that rollbacks the application
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: enhance the test cases
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: use the klog/v2 package
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: grant the permission to read the ConfigMap in the vela-system namespace
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@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>