provider-sql

module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: Apache-2.0

README

Crossplane Provider for SQL

A Crossplane provider for SQL. A Crossplane provider for RDBMS schema management/manipulation. Note that provider-sql orchestrates relational database servers by creating databases, users, etc. It does not create server instances themselves. provider-sql can be used in conjunction with other providers (e.g. provider-azure) to define a composite resource that creates both an RDBMS server and a new database schema.

To reduce load on the managed databases and increase responsiveness with many managed resources, this provider reconciles its managed resources every 10 minutes.

It currently supports MySQL, PostgreSQL and MSSQL.

Usage

  1. Create a connection secret:

    To create provider-sql managed resources, you will first need a K8s secret with the connection details to an existing SQL server.

    This secret could either be created automatically by provisioning an SQL server with a Crossplane provider (e.g. a CloudSQLInstance with provider-gcp) or you can create for an existing server as follows:

    kubectl create secret generic db-conn \
      --from-literal=username=admin \
      --from-literal=password='t0ps3cr3t' \
      --from-literal=endpoint=my.sql-server.com \
      --from-literal=port=3306
    
  2. Create managed resource for your SQL server flavor:

Contributing

  1. Fork the project and clone locally.
  2. Create a branch with the changes.
  3. Install go version 1.17.
  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.

Directories

Path Synopsis
Package apis contains Kubernetes API for the Template provider.
Package apis contains Kubernetes API for the Template provider.
mssql/v1alpha1
Package v1alpha1 contains the core resources of the SQL provider.
Package v1alpha1 contains the core resources of the SQL provider.
mysql/v1alpha1
Package v1alpha1 contains the core resources of the SQL provider.
Package v1alpha1 contains the core resources of the SQL provider.
postgresql/v1alpha1
Package v1alpha1 contains the core resources of the SQL provider.
Package v1alpha1 contains the core resources of the SQL provider.
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL