Controller which mirrors Role & EnvironmentRoleBinding resources to Roles and RoleBindings in all matching Environment namespaces
Controller which replicas Role and EnvironmentRoleBinding resources to Roles and RoleBindings in all matching Environment namespaces.
RBAC in Kubernetes is either global with ClusterRoles or is namespace based with Roles per Namespace.
We use a Custom Resource called EnvironmentRoleBinding which binds Roles and its bindings from the development environment into each Environment’s Namespace.
e.g. each EnvironmentRoleBinding will result in a RoleBinding and Role resource being create in each matching Environment. So when a Preview environment is created it will have the correct Role and RoleBinding resources added.
jx controller role [flags]
# watch for changes in Role and EnvironmentRoleBindings in the dev namespace
# and update the Role + RoleBinding resources in each environment namespace
jx controller role
# update the current RoleBinding resources in each environment based on the current EnvironmentRoleBindings
jx controller role --no-watch
-h, --help help for role
-n, --no-watch To disable watching of the resources - to enable one-shot mode
Options inherited from parent commands
-b, --batch-mode Runs in batch mode without prompting for user input (default true)
--install-dependencies Enables automatic dependencies installation when required
--no-brew Disables brew package manager on MacOS when installing binary dependencies
--skip-auth-secrets-merge Skips merging the secrets from local files with the secrets from Kubernetes cluster
--verbose Enables verbose output