jx controller role

list of jx commands

jx controller role

Controller which mirrors Role & EnvironmentRoleBinding resources to Roles and RoleBindings in all matching Environment namespaces

Synopsis

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]

Examples

  # 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

Options

  -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
      --verbose      Enables verbose output. The environment variable JX_LOG_LEVEL has precedence over this flag and allows setting the logging level to any value of: panic, fatal, error, warn, info, debug, trace

SEE ALSO

Auto generated by spf13/cobra on 2-Sep-2020