Skip to content

Commit 79901ba

Browse files
authored
Merge pull request fluxcd#2256 from fluxcd/obj-workload-id-rbac
Add RBAC patch to remove Object-level Workload Identity
2 parents c275ccb + 241c7f7 commit 79901ba

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

content/en/flux/installation/configuration/multitenancy.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,40 @@ patches:
157157
kind: ClusterRole
158158
name: "(flux-view|flux-edit)-flux-system"
159159
```
160+
161+
### Flux Object-level Workload Identity RBAC
162+
163+
Starting with v2.6, Flux supports object-level workload identity, which requires
164+
additional RBAC permissions to be granted to the controllers so that they can create `ServiceAccount` tokens:
165+
166+
```yaml
167+
apiVersion: rbac.authorization.k8s.io/v1
168+
kind: ClusterRole
169+
metadata:
170+
name: crd-controller
171+
rules:
172+
# excerpt from the existing rules
173+
- apiGroups:
174+
- ""
175+
resources:
176+
- serviceaccounts/token
177+
verbs:
178+
- create
179+
```
180+
181+
If you wish to disable the object-level workload identity RBAC in Flux 2.6 or later, you can do so with the following patch:
182+
183+
```yaml
184+
apiVersion: kustomize.config.k8s.io/v1beta1
185+
kind: Kustomization
186+
resources:
187+
- gotk-components.yaml
188+
- gotk-sync.yaml
189+
patches:
190+
- patch: |
191+
- op: remove
192+
path: /rules/10
193+
target:
194+
kind: ClusterRole
195+
name: "crd-controller-flux-system"
196+
```

content/en/flux/security/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ These include:
177177
- Can get, list, and watch namespaces and secrets
178178
- Can get, list, watch, create, patch, and delete configmaps and their status
179179
- Can get, list, watch, create, patch, and delete coordination.k8s.io leases
180+
- Can create ServiceAccount tokens used for object-level workload identity
180181
2. A `crd-controller` `ClusterRoleBinding`:
181182
- References `crd-controller` `ClusterRole` above
182183
- Bound to a service accounts for every Flux controller

0 commit comments

Comments
 (0)