Once Crossplane [is installed](applications.md#crossplane), it must be configured for
Once Crossplane [is installed](applications.md#crossplane), it must be configured for
use.
use.
## Introduction
The process of configuring Crossplane includes:
1. Configuring RBAC permissions.
1. Configuring Crossplane with a cloud provider.
1. Configure managed service access.
1. Setting up Resource classes.
1. Using Auto DevOps configuration options.
1. Connect to the PostgreSQL instance.
To allow Crossplane to provision cloud services such as PostgreSQL, the cloud provider
To allow Crossplane to provision cloud services such as PostgreSQL, the cloud provider
stack must be configured with a user account. For example:
stack must be configured with a user account. For example:
...
@@ -26,7 +33,7 @@ export NETWORK_NAME=default # the GCP network where your GKE is provisioned.
...
@@ -26,7 +33,7 @@ export NETWORK_NAME=default # the GCP network where your GKE is provisioned.
export REGION=us-central1 # the GCP region where the GKE cluster is provisioned.
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 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.
Manually grant GitLab's service account the ability to manage resources in the
Manually grant GitLab's service account the ability to manage resources in the
...
@@ -66,7 +73,7 @@ Once the file is created, apply it with the following command in order to create
...
@@ -66,7 +73,7 @@ Once the file is created, apply it with the following command in order to create
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
See [Configure Your Cloud Provider Account](https://crossplane.io/docs/v0.4/cloud-providers.html)
See [Configure Your Cloud Provider Account](https://crossplane.io/docs/v0.4/cloud-providers.html)
to configure the installed cloud provider stack with a user account.
to configure the installed cloud provider stack with a user account.
Resource classes are a way of defining a configuration for the required managed service. We will define the Postgres Resource class
Resource classes are a way of defining a configuration for the required managed service. We will define the Postgres Resource class
...
@@ -209,7 +216,7 @@ kubectl get cloudsqlinstanceclasses
...
@@ -209,7 +216,7 @@ kubectl get cloudsqlinstanceclasses
The Resource Classes allow you to define classes of service for a managed service. We could create another `CloudSQLInstanceClass` which requests for a larger or a faster disk. It could also request for a specific version of the database.
The Resource Classes allow you to define classes of service for a managed service. We could create another `CloudSQLInstanceClass` which requests for a larger or a faster disk. It could also request for a specific version of the database.
### Auto DevOps Configuration Options
## Auto DevOps Configuration Options
The Auto DevOps pipeline can be run with the following options:
The Auto DevOps pipeline can be run with the following options: