Commit 4c0ed436 authored by Hordur Freyr Yngvason's avatar Hordur Freyr Yngvason

Fix crossplane docs RBAC section

parent 6dc8e6fc
...@@ -35,24 +35,21 @@ export REGION=us-central1 # the GCP region where the GKE cluster is provisioned. ...@@ -35,24 +35,21 @@ export REGION=us-central1 # the GCP region where the GKE cluster is provisioned.
## Configure RBAC permissions ## Configure RBAC permissions
- For a non-GitLab managed cluster(s), ensure that the service account for the token provided can manage resources in the `database.crossplane.io` API group. - For GitLab-managed clusters, RBAC is configured automatically.
Manually grant GitLab's service account the ability to manage resources in the
`database.crossplane.io` API group. The Aggregated ClusterRole allows us to do that.
NOTE: **Note:**
For a non-GitLab managed cluster, ensure that the service account for the token provided can manage resources in the `database.crossplane.io` API group.
​1. Save the following YAML as `crossplane-database-role.yaml`:
```shell - For non-GitLab managed clusters, ensure that the service account for the token provided can manage resources in the `database.crossplane.io` API group:
cat > crossplane-database-role.yaml <<EOF
apiVersion: rbac.authorization.k8s.io/v1 1. Save the following YAML as `crossplane-database-role.yaml`:
kind: ClusterRole
metadata: ```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: crossplane-database-role name: crossplane-database-role
labels: labels:
rbac.authorization.k8s.io/aggregate-to-edit: "true" rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules: rules:
- apiGroups: - apiGroups:
- database.crossplane.io - database.crossplane.io
resources: resources:
- postgresqlinstances - postgresqlinstances
...@@ -64,14 +61,13 @@ rules: ...@@ -64,14 +61,13 @@ rules:
- delete - delete
- patch - patch
- watch - watch
EOF ```
```
Once the file is created, apply it with the following command in order to create the necessary role: 1. Apply the cluster role to the cluster:
```shell ```shell
kubectl apply -f crossplane-database-role.yaml kubectl apply -f crossplane-database-role.yaml
``` ```
## Configure Crossplane with a cloud provider ## Configure Crossplane with a cloud provider
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment