Skip to content

Commit 931d0b9

Browse files
committed
helm: Update readyset chart to 0.3.0
- Update README.md with instructions on using the chart - Update NOTES.txt with more accurate information on connecting to the readyset-adapter - Rename secret readyset-db-url to readyset-upstream-database to match the README.md instructions Change-Id: I3ada60ee53ac782941837652aa5c4ddec8f8ae5d Reviewed-on: https://gerrit.readyset.name/c/readyset/+/5013 Reviewed-by: David Kim <[email protected]> Reviewed-by: Alex Martin <[email protected]> Tested-by: Buildkite CI
1 parent d491231 commit 931d0b9

File tree

6 files changed

+131
-7
lines changed

6 files changed

+131
-7
lines changed

helm/readyset/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ annotations:
77
type: application
88

99
# Versions are expected to follow Semantic Versioning (https://semver.org/)
10-
version: 0.2.0
10+
version: 0.3.0
1111

1212
# appVersion is not expected to follow Semantic Versioning (https://semver.org)
1313
appVersion: "latest"

helm/readyset/README.md

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,95 @@
11
# ReadySet Helm Chart
22

3-
Coming soon
3+
> :exclamation: This chart is currently alpha-level quality
4+
5+
## Overview
6+
7+
This is the official ReadySet Helm chart for deploying a ReadySet cluster on Kubernetes.
8+
9+
## Kubernetes platform support
10+
11+
This chart aims to install with minimal configuration required for both GKE and EKS currently. We are soon expanding our testing suite to cover other providers and configurations and we will document a support matrix soon.
12+
13+
## Preconfiguration
14+
15+
Assuming you have a Kubernetes cluster that you are able to deploy apps to with Helm you will need to configure a kubernetes secret that contains the information needed for ReadySet to connect to your upstream database. You can configure this secret with the follow block
16+
17+
```
18+
export READYSET_USER=your-username
19+
export READYSET_PASS=your-password
20+
export DATABASE_NAME=your-database-name
21+
export DATABASE_HOST=your-database-host
22+
export DATABASE_TYPE=your-database-type # mysql OR psql
23+
export DATABASE_URI="${DATABASE_TYPE}://${READYSET_USER}:${READYSET_PASS}@${DATABASE_HOST}/${DATABASE_NAME}"
24+
25+
# The name `readyset-upstream-database` is expected by the chart, do not rename it!
26+
kubectl create secret generic readyset-upstream-database \
27+
--from-literal=url="${DATABASE_TYPE}://${READYSET_USER}:${READYSET_PASS}@${DATABASE_HOST}/${DATABASE_NAME}" \
28+
--from-literal=host="${DATABASE_HOST}" \
29+
--from-literal=username="${READYSET_USER}" \
30+
--from-literal=password=${READYSET_PASS} \
31+
--from-literal=database=${DATABASE_NAME} \
32+
--from-literal=database_type=${DATABASE_TYPE}
33+
```
34+
35+
## Add the repo
36+
37+
Provided you have Helm installed, a simple
38+
```
39+
helm repo add readyset https://helm.releases.readyset.io
40+
```
41+
will configure the ReadySet Helm repository
42+
43+
### Search the repo for releases
44+
45+
You can search the ReadySet repo explicitly by
46+
```
47+
$ helm search repo readyset/readyset
48+
NAME CHART VERSION APP VERSION DESCRIPTION
49+
readyset/readyset 0.2.0 latest Official ReadySet Chart
50+
```
51+
or you can search via ArtifactHub
52+
```
53+
$ helm search hub readyset
54+
URL CHART VERSION APP VERSION DESCRIPTION
55+
https://artifacthub.io/packages/helm/readyset/r... 0.2.0 latest Official ReadySet Chart
56+
```
57+
58+
## Deploying the chart
59+
60+
```
61+
helm install readyset readyset/readyset --version=0.2.0 --dry-run
62+
```
63+
See below for configuring the cluster beyond the default values.
64+
65+
## Configuring the chart
66+
67+
To configure the chart for your environment, you can run the following command
68+
```
69+
helm show values readyset/readyset > values.yaml
70+
```
71+
to dump a yaml document of the default configuration values. Edit them to your liking and deploy the chart as described above but add the values file like the following example
72+
```
73+
helm install readyset readyset/readyset --version=0.2.0 --values=values.yaml
74+
```
75+
76+
## When the chart has successfully deployed
77+
78+
A message will be displayed with instructions on connecting to your ReadySet instance. They will look similar to the following:
79+
80+
```
81+
Congrats, ReadySet has been deployed!!
82+
83+
CHART NAME: readyset
84+
CHART VERSION: 0.3.0
85+
APP VERSION: latest
86+
87+
Give the chart approximately 5 minutes to deploy. When the service is ready, you should see all pods up.
88+
89+
For connecting to the readyset-adapter via MySQL:
90+
91+
mysql -u $(kubectl get secret readyset-upstream-database -o jsonpath="{.data.username}" | base64 -d) \
92+
-h $(kubectl get svc readyset-adapter --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") \
93+
--password=$(kubectl get secret readyset-upstream-database -o jsonpath="{.data.password}" | base64 -d) \
94+
--database=$(kubectl get secret readyset-upstream-database -o jsonpath="{.data.database}" | base64 -d)
95+
```

helm/readyset/templates/NOTES.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1-
1. Get the application URL by running these commands:
2-
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "readyset.fullname" . }}-adapter --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
3-
echo http://$SERVICE_IP:{{ .Values.readyset.adapter.httpPort }}/metrics
1+
Congrats, ReadySet has been deployed!!
2+
3+
CHART NAME: {{ .Chart.Name }}
4+
CHART VERSION: {{ .Chart.Version }}
5+
APP VERSION: {{ .Chart.AppVersion }}
6+
7+
Give the chart approximately 5 minutes to deploy. When the service is ready, you should see all pods up.
8+
9+
For connecting to MySQL:
10+
11+
mysql -u $(kubectl get secret readyset-upstream-database -o jsonpath="{.data.username}" | base64 -d) \
12+
-h $(kubectl get svc readyset-adapter --template {{ "\"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}\"" }}) \
13+
--password=$(kubectl get secret readyset-upstream-database -o jsonpath="{.data.password}" | base64 -d) \
14+
--database=$(kubectl get secret readyset-upstream-database -o jsonpath="{.data.database}" | base64 -d)

helm/readyset/templates/readyset-adapter-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ spec:
9393
- name: UPSTREAM_DB_URL
9494
valueFrom:
9595
secretKeyRef:
96-
name: readyset-db-url
96+
name: readyset-upstream-database
9797
key: url
9898
- name: LOG_FORMAT
9999
value: "json"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: readyset-server
6+
namespace: default
7+
labels: {{ include "readyset.labels" . | nindent 4 }}
8+
annotations:
9+
service.beta.kubernetes.io/aws-load-balancer-type: external
10+
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
11+
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
12+
spec:
13+
type: LoadBalancer
14+
selector:
15+
app.kubernetes.io/name: "readyset"
16+
app.kubernetes.io/component: "server"
17+
ports:
18+
- name: monitoring
19+
port: {{ .Values.readyset.server.httpPort | default (include "readyset.server.httpPort" . ) }}
20+
targetPort: {{ .Values.readyset.server.httpPort | default (include "readyset.server.httpPort" . ) }}
21+
protocol: TCP

helm/readyset/templates/readyset-server-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ spec:
104104
- name: UPSTREAM_DB_URL
105105
valueFrom:
106106
secretKeyRef:
107-
name: readyset-db-url
107+
name: readyset-upstream-database
108108
key: url
109109
- name: VOLUME_ID
110110
valueFrom:

0 commit comments

Comments
 (0)