Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Mikel Landa <[email protected]>
  • Loading branch information
Mikel-Landa committed Jun 11, 2024
2 parents 28aca4e + 4988633 commit c4922ad
Show file tree
Hide file tree
Showing 55 changed files with 3,994 additions and 2,470 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:

env:
# Common versions
GO_VERSION: '1.18'
GOLANGCI_VERSION: 'v1.47.1'
GO_VERSION: '1.21'
GOLANGCI_VERSION: 'v1.54.0'
DOCKER_BUILDX_VERSION: 'v0.8.2'

# Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:
# a step 'if env.AWS_USR' != ""', so we copy these to succinctly test whether
# credentials have been provided before trying to run steps that need them.
CONTRIB_DOCKER_USR: ${{ secrets.CONTRIB_DOCKER_USR }}
XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }}
AWS_USR: ${{ secrets.AWS_USR }}

jobs:
Expand All @@ -41,6 +42,14 @@ jobs:
username: ${{ secrets.CONTRIB_DOCKER_USR }}
password: ${{ secrets.CONTRIB_DOCKER_PSW }}

- name: Login to Upbound
uses: docker/login-action@v1
if: env.XPKG_ACCESS_ID != ''
with:
registry: xpkg.upbound.io
username: ${{ secrets.XPKG_ACCESS_ID }}
password: ${{ secrets.XPKG_TOKEN }}

- name: Promote Artifacts in S3 and Docker Hub
if: env.AWS_USR != '' && env.CONTRIB_DOCKER_USR != ''
run: make -j2 promote BRANCH_NAME=${GITHUB_REF##*/}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ KIND_NODE_IMAGE_TAG ?= v1.23.4
# ====================================================================================
# Setup Kubernetes tools

UP_VERSION = v0.18.0
UP_VERSION = v0.31.0
UP_CHANNEL = stable
-include build/makelib/k8s_tools.mk

Expand Down
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.
1 change: 0 additions & 1 deletion apis/mssql/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 30 additions & 48 deletions apis/mssql/v1alpha1/zz_generated.managed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/mysql/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c4922ad

Please sign in to comment.