-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Description
Description
Improve the API of alpha kubeconfig generate
for service account based access.
Make it clear when the access will be generated namespaced and when cluster-wide.
For example:
# generate a permanent access (kubeconfig) for a new or existing ServiceAccount and a namespaced binding to a given ClusterRole
kyma alpha kubeconfig generate --serviceaccount <sa_name> --clusterrole <cr_name> --namespace <ns_name> --permanent
# generate time-constrained access (kubeconfig) for a new or existing ServiceAccount and a cluster-wide binding to a given ClusterRole
kyma alpha kubeconfig generate --serviceaccount <sa_name> --clusterrole <cr_name> --namespace <ns_name> --cluster-wide --time 2h
Reasons
The intension of alpha kubeconfig generate
with namespace flag is confusing as it suggests that the generated access should be limited to the namespace scope.