Skip to content

Commit b0585a0

Browse files
authored
Merge pull request #911 from QuadmanSWE/docs-beware-crossplane-default-access
Wrote about crossplanes default limited access to third party custom …
2 parents 9f943f4 + a2bc8cd commit b0585a0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

content/v2.0-preview/whats-new/_index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,33 @@ compose-pg@{animate: true}
207207
This opens composition to exciting new use cases - for example building custom
208208
app models with Crossplane.
209209

210+
### Beware Crossplane's default access
211+
212+
Crossplane by default can only access a limited set of kubernetes resources beyond what gets configured by any providers.
213+
214+
To grant access to additional resource resource types, create additional `ClusterRoles` and include them in the default Crossplane `ClusterRole` through [aggregation](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles). Crossplane's default ClusterRole aggregates using a selector for the label `rbac.crossplane.io/aggregate-to-crossplane: "true"`
215+
216+
If you don't include this you may experience RBAC issues composing third party custom resources.
217+
218+
Here is an example of allowing Crossplane handle the lifecycle of CloudNativePG PostgreSQL `Cluster`.
219+
220+
``` yaml
221+
apiVersion: rbac.authorization.k8s.io/v1
222+
kind: ClusterRole
223+
metadata:
224+
name: cnpg:aggregate-to-crossplane
225+
labels:
226+
app: crossplane
227+
rbac.crossplane.io/aggregate-to-crossplane: "true"
228+
rules:
229+
- apiGroups:
230+
- postgresql.cnpg.io
231+
resources:
232+
- clusters
233+
verbs:
234+
- "*"
235+
```
236+
210237
## Backward compatibility
211238

212239
Crossplane v2 makes the following breaking changes:

0 commit comments

Comments
 (0)