Skip to content

Commit 4988633

Browse files
authored
chore: add provider install documentation (#174)
Signed-off-by: Bastien CERIANI <[email protected]>
1 parent 15b7298 commit 4988633

File tree

3 files changed

+59
-2
lines changed

3 files changed

+59
-2
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,32 @@ managed resources, this provider reconciles its managed resources every 10 minut
1212

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

15+
## Install
16+
17+
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/):
18+
19+
```bash
20+
cat << EOF | kubectl apply -f -
21+
apiVersion: pkg.crossplane.io/v1
22+
kind: Provider
23+
metadata:
24+
name: provider-sql
25+
spec:
26+
package: xpkg.upbound.io/crossplane-contrib/provider-sql:v0.9.0
27+
EOF
28+
```
29+
30+
Alternatively, you can use Crossplane CLI:
31+
```bash
32+
up ctp provider install xpkg.upbound.io/crossplane-contrib/provider-sql:v0.9.0
33+
```
34+
35+
Check the example:
36+
37+
- [Provider](./examples/provider.yaml)
38+
- [deploymentRuntimeConfig](./examples/deploymentRuntimeConfig.yaml)
39+
40+
1541
## Usage
1642

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

34-
2. Create managed resource for your SQL server flavor:
60+
2. Create managed resources for your SQL server flavor:
3561

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

4672
1. Fork the project and clone locally.
4773
2. Create a branch with the changes.
48-
3. Install go version 1.17.
74+
3. Install go version 1.18.
4975
4. Run `make` to initialize the "build". Make submodules used for CI/CD.
5076
5. Run `make reviewable` to run code generation, linters, and tests.
5177
6. Commit, push, and PR.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This DeploymentRuntimeConfig will override the provider-sql deployment tolerations.
2+
---
3+
apiVersion: pkg.crossplane.io/v1beta1
4+
kind: DeploymentRuntimeConfig
5+
metadata:
6+
name: provider-sql
7+
spec:
8+
deploymentTemplate:
9+
spec:
10+
selector: {}
11+
template:
12+
spec:
13+
containers: []
14+
tolerations:
15+
- effect: NoSchedule
16+
key: node.kubernetes.io/role
17+
operator: Equal
18+
value: crossplane
19+
- effect: NoSchedule
20+
key: node.kubernetes.io/arch
21+
operator: Equal
22+
value: arm64

examples/provider.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
apiVersion: pkg.crossplane.io/v1
3+
kind: Provider
4+
metadata:
5+
name: provider-sql
6+
spec:
7+
package: xpkg.upbound.io/crossplane-contrib/provider-sql:v0.9.0
8+
runtimeConfigRef: # Optional
9+
name: provider-sql # This is referencing the DeploymentRuntimeConfig in deploymentRuntimeConfig.yaml file

0 commit comments

Comments
 (0)