Categorygithub.com/connctd/sqlbee
module
0.4.1
Repository: https://github.com/connctd/sqlbee.git
Documentation: pkg.go.dev

# README

SQLBee

SQLBee pollinates your unsuspecting pods with cloud sql proxy sidecars so your services can easily connect to your cloud sql instance. When using GCP Cloud SQL it is recommended to use cloudsql-proxy as a sidecar in your pods. Of course you can add this sidecar manually to all your pods requiting database access, but this is a tedious and possibly error prone (outdated images, typos etc.) process. SQLBee simply injects the same sidecar into all your pods. In case you some of your pods are little different than others you can customize the injection via annotations.

Usage

Deploy SQLBee (docker.io/connctd/sqlbee) as a mutating admission webhook (see https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/). In the deployment folder an example configuration is provided. You will need have secret with a credentials.json with permissions for Cloud SQL to be used by the sidecar. Other authentication aren't currently supported You can either use the same secret everywhere or customize it per pod via annotations.

Depending on whether you set the annotationRequired parameter you either need to add the annotation sqlbee.connctd.io.inject: "true" to your pod specifications or you need to add nothing at all to inject your pods with a cloud-sql-proxy sidecar.

Command line arguments

NameDefault valueDescriptionRequired
certnonePath to the server certificate to be usedyes
keynonePath to the servers private keyyes
instancenoneName of the default cloud sql instance if not specified via annotationno
secretnoneName of a secret containing the GCP credentials for this cloud-sql-proxyno
ca-mapnoneName of a config map containing root certificatesno
annotationRequiredfalseWhether to only inject the sidecar if the annotation is presentno
loglevelinfoThe log levelno

Annotations

NameDescriptionRequired
sqlbee.connctd.io.injectWether to inject with a cloud-sql-proxyno
sqlbee.connctd.io.imageImage to be used, default gcr.io/cloudsql-docker/gce-proxy:1.13no
sqlbee.connctd.io.instancecloud-sql instance to connect to, required if no default is setmaybe
sqlbee.connctd.io.secretSecret containing credentialsno
sqlbee.connctd.io.caMapConfig map containing root certificatesno
sqlbee.connctd.io.cpuRequestvalue of the sidecar cpu request, defaults to "30m"no
sqlbee.connctd.io.memRequestvalue of the sidecar memory request, defaults to "50Mi"no

# Packages

No description provided by the author
No description provided by the author