Add RBAC rules

Proprietary

Add RBAC rules to ClusterRoles or namespaced Roles.

org.openrewrite.kubernetes.rbac.AddRuleToRole

Required

Type of RBAC resource to which this recipe adds a rule.

Glob pattern of the name of the RBAC resource to which this recipe adds a rule.

Comma-separated list of API groups to which this rule refers. Separate values with commas.

Comma-separated list of Kubernetes resource types to which this rule refers. Separate values with commas.

The API verbs to enable with this rule. Separate values with commas.

Optional

Comma-separated list of names of Kubernetes resources to which this rule applies. Separate values with commas.

Matching files will be modified. This is a glob expression.

mod run . --recipe=org.openrewrite.kubernetes.rbac.AddRuleToRole \ -P rbacResourceType=ClusterRole \ -P rbacResourceName=my-cluster-role \ -P apiGroups=,v1 \ -P resources=pods \ -P verbs=get,list

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.