Systems Integration
KubeVela application natively supports impersonation even without the Authentication flag enabled. That means when the Authentication flag is disabled, you can manually set the identity to impersonate in the application's annotation fields. For example, the following guide will give an example on how to manually set the application to impersonate as a ServiceAccount.
#
ExampleLet's assume that we have two namespaces:
demo-service
: for managing applicationdemo-service-prod
: to deploy components for the production environment
In this example, we will make the Application use a specific ServiceAccount instead of the controller ServiceAccount.
#
Creating ServiceAccountCreate deployer
ServiceAccount in demo-service
namespace.
#
Creating Role/RoleBindingAllow deployer
ServiceAccount in demo-service
to manage Deployments in demo-service-prod
by creating Role/RoleBinding.
Notice that KubeVela application requires the identity to impersonate to have the privileges for writing ControllerRevision. If you use
--optimize-disable-component-revision
in the KubeVela controller, you can ignore this requirement.
#
Deploying an Application with ServiceAccountAfter deploying the Application, you can check the Application is deployed successfully.
If you set non-authorized ServiceAccount to the annotation, you can find an error message like below in the Application status.
#
Impersonate as User/GroupsIf you would like to let the application to impersonate as specific user and group, you can set the annotation app.oam.dev/username
and app.oam.dev/group
in the application respectively.