Skip to content

Commit

Permalink
Refs ScientaNL#35: Update README.md with helm install options.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmirks committed Apr 12, 2019
1 parent 7ece10c commit 2daac2b
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,39 @@ use the following command to use the statefulset in kubernetes
```
kubectl create -f ./k8s/proxysql.statefulset.yaml
```

## Helm Install

You can install using the helm repository using the following command:

```bash
helm install --name db-proxy deploy/charts/proxysql-cluster
```

| Parameter | Description | Default |
|----|-----------|-------------|
| `image.repository` | `proxysql` image repo | `scienta/k8s-proxysql-cluster` |
| `image.tag` | `proxysql` image tag | `1.0.0` |
| `numReplicas` | Number of replicas to create in StatefulSet | `3` |
| `proxysql.admin.username` | Admin username for `proxysql` | `admin` |
| `proxysql.admin.password` | Admin password for `proxysql` | `admin` |
| `proxysql.admin.iface` | Listen network for `proxysql` service | `0.0.0.0` |
| `proxysql.admin.port` | Listen port for `proxysql` service | `6032` |
| `proxysql.clusterAdmin.username` | Cluster user username used by `proxysql` nodes to sync | `cluster1` |
| `proxysql.clusterAdmin.password` | Cluster user password used by `proxysql` nodes to sync | `secret1pass` |
| `proxysql.queryCacheSizeMb` | (Optional) Query cache size | `nil` |
| `proxysql.dataDir` | Directory to store `proxysql` tables, etc. | `/var/lib/proxysql` |
| `proxysql.webEnabled` | Enable `proxysql` web dashboard | `true` |
| `mysql.iface` | Listen network for `mysql` service connections | `0.0.0.0` |
| `mysql.port` | Listen port fo `mysql` service connections | `3306` |
| `mysql.monitor.username` | Monitor username on MySQL instances for `proxysql` health checks | `monitor` |
| `mysql.monitor.password` | Monitor password on MySQL instances for `proxysql` health checks | `monitor` |
| `mysql.admin.username` | Root / admin username on MySQL instances | `root` |
| `mysql.admin.password` | Root / admin password on MySQL instances | `insecurepassword` |
| `cronjob.enabled` | Enable k8s `CronJob` to sync `proxysql` configurations | `false` |
| `resources` | CPU / Memory Limits and Requests | `{}` |
| `tolerations` | Pod tolerations | '{}' |

## Workings
When the container is run with the --k8s-cluster argument the following happens:
- the container checks if there is a node available at the proxysql service
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/proxysql-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

Set up [ProxySql](http://www.proxysql.com) in a cluster configuration.

See `values.yaml` for configuration details.
See `values.yaml` for configuration details.
2 changes: 1 addition & 1 deletion deploy/charts/proxysql-cluster/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
spec:
restartPolicy: Always
containers:
- image: {{ .Values.image | quote }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
name: proxysql
imagePullPolicy: "Always"
ports:
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/proxysql-cluster/templates/sync-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
restartPolicy: OnFailure
containers:
- name: proxysql-sync
image: {{ .Values.image | quote }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: Always
args: ["--sync"]
env:
Expand Down
6 changes: 4 additions & 2 deletions deploy/charts/proxysql-cluster/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# values.yaml

# Docker image to use for deployment
image: "scienta/k8s-proxysql-cluster:1.0.0"
image:
repository: "scienta/k8s-proxysql-cluster"
tag: "1.0.0"

# Default number of ProxySQL replicas
numReplicas: 3
Expand All @@ -18,7 +20,7 @@ proxysql:
username: cluster1
password: secret1pass
# Query Cache Size
queryCacheSizeMb: 256
# queryCacheSizeMb: 256
# ProxySQL needs a cluster name
dataDir: "/var/lib/proxysql"
webEnabled: true
Expand Down

0 comments on commit 2daac2b

Please sign in to comment.