Skip to content

Commit

Permalink
chore: add provider install documentation (#174)
Browse files Browse the repository at this point in the history
Signed-off-by: Bastien CERIANI <[email protected]>
  • Loading branch information
Bastichou authored Jun 10, 2024
1 parent 15b7298 commit 4988633
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,32 @@ managed resources, this provider reconciles its managed resources every 10 minut

It currently supports **MySQL**, **PostgreSQL** and **MSSQL**.

## Install

Install the provider by using the following command after changing the image tag to the [latest release](https://marketplace.upbound.io/providers/crossplane-contrib/provider-sql/):

```bash
cat << EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-sql
spec:
package: xpkg.upbound.io/crossplane-contrib/provider-sql:v0.9.0
EOF
```

Alternatively, you can use Crossplane CLI:
```bash
up ctp provider install xpkg.upbound.io/crossplane-contrib/provider-sql:v0.9.0
```

Check the example:

- [Provider](./examples/provider.yaml)
- [deploymentRuntimeConfig](./examples/deploymentRuntimeConfig.yaml)


## Usage

1. Create a connection secret:
Expand All @@ -31,7 +57,7 @@ It currently supports **MySQL**, **PostgreSQL** and **MSSQL**.
--from-literal=port=3306
```

2. Create managed resource for your SQL server flavor:
2. Create managed resources for your SQL server flavor:

- **MySQL**: `Database`, `Grant`, `User` (See [the examples](examples/mysql))
- **PostgreSQL**: `Database`, `Grant`, `Extension`, `Role` (See [the examples](examples/postgresql))
Expand All @@ -45,7 +71,7 @@ It currently supports **MySQL**, **PostgreSQL** and **MSSQL**.

1. Fork the project and clone locally.
2. Create a branch with the changes.
3. Install go version 1.17.
3. Install go version 1.18.
4. Run `make` to initialize the "build". Make submodules used for CI/CD.
5. Run `make reviewable` to run code generation, linters, and tests.
6. Commit, push, and PR.
22 changes: 22 additions & 0 deletions examples/deploymentRuntimeConfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This DeploymentRuntimeConfig will override the provider-sql deployment tolerations.
---
apiVersion: pkg.crossplane.io/v1beta1
kind: DeploymentRuntimeConfig
metadata:
name: provider-sql
spec:
deploymentTemplate:
spec:
selector: {}
template:
spec:
containers: []
tolerations:
- effect: NoSchedule
key: node.kubernetes.io/role
operator: Equal
value: crossplane
- effect: NoSchedule
key: node.kubernetes.io/arch
operator: Equal
value: arm64
9 changes: 9 additions & 0 deletions examples/provider.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-sql
spec:
package: xpkg.upbound.io/crossplane-contrib/provider-sql:v0.9.0
runtimeConfigRef: # Optional
name: provider-sql # This is referencing the DeploymentRuntimeConfig in deploymentRuntimeConfig.yaml file

0 comments on commit 4988633

Please sign in to comment.