Skip to content

RBAC

Appears in

  • .Values.rbac

Naming scheme

  • Primary: $FullName (release-name-chart-name)
  • Non-Primary: $FullName-$RBACName (release-name-chart-name-RBACName)

Target Selector

  • allServiceAccounts (bool): Whether to assign all service accounts or not to the (Cluster)RoleBinding
  • serviceAccounts (list): Define the service account(s) to assign the (Cluster)RoleBinding
  • serviceAccounts (empty): Assign the primary service account to the primary rbac

rbac

Create rbac objects

Keyrbac
Typemap
Required
Helm tpl
Default{}

Example

rbac: {}

$name

Define rbac

Keyrbac.$name
Typemap
Required
Helm tpl
Default{}

Example

rbac:
rbac-name: {}

enabled

Enables or Disables the rbac

Keyrbac.$name.enabled
Typebool
Required
Helm tpl
Defaultfalse

Example

rbac:
rbac-name:
enabled: true

primary

Sets the rbac as primary

Keyrbac.$name.primary
Typebool
Required
Helm tpl
Defaultfalse

Example

rbac:
rbac-name:
primary: true

namespace

Define the namespace for this object (Only when clusterWide is false)

Keyrbac.$name.namespace
Typestring
Required
Helm tpl
Default""

Example

rbac:
rbac-name:
namespace: some-namespace

clusterWide

Sets the rbac as cluster wide (ClusterRole, ClusterRoleBinding)

Keyrbac.$name.clusterWide
Typebool
Required
Helm tpl
Defaultfalse

Example

rbac:
rbac-name:
clusterWide: true

labels

Additional labels for rbac

Keyrbac.$name.labels
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

rbac:
rbac-name:
labels:
key: value

annotations

Additional annotations for rbac

Keyrbac.$name.annotations
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

rbac:
rbac-name:
annotations:
key: value

allServiceAccounts

Whether to assign all service accounts or not to the (Cluster)RoleBinding

Keyrbac.$name.allServiceAccounts
Typebool
Required
Helm tpl
Defaultunset

Example

rbac:
rbac-name:
allServiceAccounts: true

serviceAccounts

Define the service account(s) to assign the (Cluster)RoleBinding

Keyrbac.$name.serviceAccounts
Typelist
Required
Helm tpl
Default[]

Example

rbac:
rbac-name:
serviceAccounts:
- service-account-name

rules

Define the rules for the (Cluster)Role

Keyrbac.$name.rules
Typelist
Required
Helm tpl
Default[]

Example

rbac:
rbac-name:
rules: []

rules[].apiGroups

Define the apiGroups list for the rules for the (Cluster)Role

Keyrbac.$name.rules[].apiGroups
Typelist of string
Required
Helm tpl✅ (On entries only)
Default[]

Example

rbac:
rbac-name:
rules:
apiGroups:
- ""
- extensions

rules[].resources

Define the resources list for the rules for the (Cluster)Role

Keyrbac.$name.rules[].resources
Typelist of string
Required
Helm tpl✅ (On entries only)
Default[]

Example

rbac:
rbac-name:
rules:
resources:
- pods

rules[].resourceNames

Define the resourceNames list for the rules for the (Cluster)Role

Keyrbac.$name.rules[].resourceNames
Typelist of string
Required
Helm tpl✅ (On entries only)
Default[]

Example

rbac:
rbac-name:
rules:
resourceNames:
- my-pod

rules[].verbs

Define the verbs list for the rules for the (Cluster)Role

Keyrbac.$name.rules[].verbs
Typelist of string
Required
Helm tpl✅ (On entries only)
Default[]

Example

rbac:
rbac-name:
rules:
verbs:
- get
- list
- watch

subjects

Define subjects for (Cluster)RoleBinding

Keyrbac.$name.subjects
Typelist of map
Required
Helm tpl
Default[]

Example

rbac:
rbac-name:
rules:
subjects: []

subjects[].kind

Define the kind of subjects entry

Keyrbac.$name.subjects[].kind
Typestring
Required
Helm tpl
Default""

Example

rbac:
rbac-name:
subjects:
- kind: my-kind

subjects[].name

Define the name of subjects entry

Keyrbac.$name.subjects[].name
Typestring
Required
Helm tpl
Default""

Example

rbac:
rbac-name:
subjects:
- name: my-name

subjects[].apiGroup

Define the apiGroup of subjects entry

Keyrbac.$name.subjects[].apiGroup
Typestring
Required
Helm tpl
Default""

Example

rbac:
rbac-name:
subjects:
- apiGroup: my-api-group

Full Examples

rbac:
rbac-name:
enabled: true
primary: true
clusterWide: true
labels:
key: value
keytpl: "{{ .Values.some.value }}"
annotations:
key: value
keytpl: "{{ .Values.some.value }}"
allServiceAccounts: true
rules:
- apiGroups:
- ""
resources:
- "{{ .Values.some.value }}"
resourceNames:
- "{{ .Values.some.value }}"
verbs:
- get
- "{{ .Values.some.value }}"
- watch
subjects:
- kind: my-kind
name: "{{ .Values.some.value }}"
apiGroup: my-api-group
other-rbac-name:
enabled: true
namespace: some-namespace
serviceAccounts:
- service-account-name
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
subjects:
- kind: my-kind
name: my-name
apiGroup: my-api-group