Skip to main content
Version: 3.7.0

Permission Description

This document provides a detailed description of the permissions required for SmartAgent Operator to run in a Kubernetes environment. Depending on the deployment mode (Full-stack or Application-only monitoring), the required resources and permissions vary. This document categorizes and explains the Kubernetes resources and their permission requirements under different deployment modes, helping users configure permissions correctly to ensure SmartAgent runs properly.

For users who focus on permission minimization, the document specifically marks optional permissions and read-only permissions, so that you can trim the permission configuration according to actual needs.


kubernetes.yaml (Full-stack or Application-only)

info

[Application-only Monitoring]: Refers to the resources required in the application-only monitoring mode.
[Full-stack]: Refers to the resources required in the full-stack deployment mode.
[Read-only]: Refers to permissions that only include get, list, watch, etc.
[Write permission optional]: Indicates that create, update, patch permissions can be removed.
[Optional]: Indicates that the marked permission or resource can be removed.

Resource TypeNameDescription
CRDsmartkubes.bonree.comExtends Kubernetes resource types to define agent configuration items, allowing agent deployment adjustments based on configuration in real time.
Deploymentsmartagent-operatorListens for Kubernetes custom resource (SmartKube) configuration changes, manages agent deployment accordingly, records deployment status and events; updates Secret: bonree-webhook-certs (used to store Webhook certificates), etc.
ServiceAccountsmartagent-operatorUsed to restrict permissions of Deployment: smartagent-operator.
Role [Read/Write]smartagent-operatorUsed to restrict access to resources in the bonree-agent namespace.
Write permissions: Daemonset, webhook, and other component management.
RoleBindingsmartagent-operatorBinds Role: smartagent-operator with ServiceAccount: smartagent-operator.
ClusterRole
ClusterRoleBinding
smartagent-operatorUsed to restrict access to cluster-wide resources.
[Optional] Write permissions
ServiceAccount [Full-stack]bonree-smartkube-smartagent[Optional] Used to enhance SmartAgent full-stack monitoring mode by collecting Kubernetes attributes.
ClusterRole
ClusterRoleBinding [Full-stack]
bonree-smartagent-enhance[Optional] Used to enhance SmartAgent full-stack monitoring mode by collecting Kubernetes attributes:
Service
Namespace UID
OwnerReferences
Pod IP addresses
Deployment
Service
MutatingWebhookConfiguration [Application-only]
bonree-webhookSee kubernetes-webhook-only.yaml for details.

kubernetes-webhook-only.yaml (Application-only)

warning

Note: CSI Driver-based agent injection is not supported.

info

[Read-only]: Refers to permissions that only include get, list, watch, etc.
[Write permission optional]: Indicates that create, update, patch permissions can be removed.
[Optional]: Indicates that the marked permission or resource can be removed.

Resource TypeNameDescription
CRD (Custom Resource)smartkubes.bonree.comExtends Kubernetes resource type (SmartKube) to define agent configuration items, allowing agent deployment adjustments based on configuration in real time.
Deployment
Service
MutatingWebhookConfiguration
bonree-webhookBased on Kubernetes Admission Webhooks, listens for changes in Pod resources in Kubernetes, modifies Pod configurations according to SmartKube custom resource configurations. Appends an Init Container to target Pods to deploy serverless agents, configure LD_PRELOAD and other environment variables, enabling automatic agent injection.
ServiceAccountbonree-webhookUsed to restrict permissions of Deployment: bonree-webhook.
Role
[Read/Write]
[Write permission optional]
bonree-webhookUsed to restrict access to resources in the bonree-agent namespace.
[Optional] Write permission: events, used to record serverless agent injection events into SmartKube resource instances.
RoleBindingbonree-webhookBinds Role: bonree-webhook with ServiceAccount: bonree-webhook.
ClusterRole
[Read/Write]
[Write permission optional]
bonree-webhookUsed to restrict access to cluster-wide resources.
[Optional] Read/Write permission: secrets, used to create injection information (including agent-sensitive configuration) in the target Pod's namespace, accessible by the initContainer. If this permission is not granted, environment variables (env) are used instead.
ClusterRoleBindingbonree-webhookBinds ClusterRole: bonree-webhook with ServiceAccount: bonree-webhook.
Secretbonree-webhook-certsStores Webhook service private key and certificate.

kubernetes-csi.yaml [Optional]

Used in application-only monitoring mode, caches serverless agents on nodes, and provides temporary volumes for injection.

Resource TypeNameDescription
Daemonsetbonree-smartagent-csi-driverBased on the interface configuration in SmartKube custom resource configuration, caches agent versions on demand, provides necessary CSI driver interfaces, so that agent module files can be securely mounted into Pods without modifying the application container image or configuration.
ServiceAccountbonree-smartagent-csi-driverUsed to restrict permissions of Daemonset: bonree-smartagent-csi-driver.
Role [Read/Write]bonree-smartagent-csi-driverUsed to restrict access to resources in the bonree-agent namespace. Write permissions: endpoints, used to provide CSI interfaces.
RoleBindingbonree-smartagent-csi-driverBinds Role: bonree-smartagent-csi-driver with ServiceAccount: bonree-smartagent-csi-driver.
ClusterRole [Read/Write]bonree-smartagent-csi-driverUsed to restrict access to cluster-wide resources. Write permissions: events, used to create mount events.
ClusterRoleBindingbonree-smartagent-csi-driverBinds ClusterRole: bonree-smartagent-csi-driver with ServiceAccount: bonree-smartagent-csi-driver.
CSIDrivercsi.smartagent.bonree.comProvides temporary volumes containing serverless agent files for target Pods.
PriorityClassbonree-high-priorityIncreases the scheduling priority of Daemonset: bonree-smartagent-csi-driver Pods.