kruise icon indicating copy to clipboard operation
kruise copied to clipboard

[feature request] sidecarset support inject serviceaccount

Open magicsong opened this issue 5 months ago • 4 comments

Use Case: For example, if a sidecar container needs to access Kubernetes resources such as ConfigMaps, Secrets, or interact with the API server for other reasons, it would require a ServiceAccount with appropriate permissions. Injecting the ServiceAccount directly through the SidecarSet simplifies this process and makes it more manageable.

Proposed Implementation:

Extend the SidecarSet specification to include an optional serviceAccountName field. When applying the SidecarSet to a Pod, inject the specified ServiceAccount into the sidecar container configuration.

By the way, there is no reason to ask user's pod to inject a service account which not used by their app

magicsong avatar Sep 14 '24 02:09 magicsong