You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 21, 2026. It is now read-only.
Writing correct RBAC resources is tedious and error prone, and there's basically no reason to do it by hand. What I've been thinking of is adding an API for generating RBAC resources from an OperatorConfig (and possibly some other inputs). This could be used in a few different ways. One option would be something like the following quick sketch:
fnmain(){let operator_config = create_operator_config();if std::env::args().any(|arg| arg == "--print-rbac-role"){let rbac_roles = generate_rbac_cluster_role(&operator_config);println!("{}", rbac_roles);}else{// do the usual to run the operator}}
I think the bare minimum functionality that would be useful would be to only generate a ClusterRole as a yaml or json string from the OperatorConfig. A more complete feature set might allow the option to generate either a Role or ClusterRole (or maybe base that on the presence of a namespace in the config), allow for choice of format, or have additional options to generate Users and (Cluster)RoleBindings based on some additional input.
Writing correct RBAC resources is tedious and error prone, and there's basically no reason to do it by hand. What I've been thinking of is adding an API for generating RBAC resources from an
OperatorConfig(and possibly some other inputs). This could be used in a few different ways. One option would be something like the following quick sketch:I think the bare minimum functionality that would be useful would be to only generate a ClusterRole as a yaml or json string from the OperatorConfig. A more complete feature set might allow the option to generate either a Role or ClusterRole (or maybe base that on the presence of a namespace in the config), allow for choice of format, or have additional options to generate Users and (Cluster)RoleBindings based on some additional input.