Skip to content

Commit eab6919

Browse files
committed
enterprise: upgrade mysql chart
The charts.helm.sh repo has reached EOL since 2020. https://github.com/helm/charts/blob/master/stable/mysql/README.md Switch to the bitnami chart which has the most stars on Artifact Hub. https://artifacthub.io/packages/search?ts_query_web=mysql&sort=stars&page=1 This chart is licensed under Apache License 2.0 so it should be safe to use. Note that for a production-ready deployment of MySQL, users should consider leveraging a cloud-hosted service, such as AWS RDS or GCP CloudSQL. MySQL also provides an official Operator (1) which could be installed as a helm-chart. (1): https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-introduction.html
1 parent 7c8e7a9 commit eab6919

File tree

7 files changed

+20
-28
lines changed

7 files changed

+20
-28
lines changed
-10.9 KB
Binary file not shown.
54 KB
Binary file not shown.

charts/buildbuddy-enterprise/requirements.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dependencies:
22
- name: mysql
3-
repository: https://charts.helm.sh/stable
4-
version: 1.6.4
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 11.1.0
55
- name: buildbuddy-redis
66
repository: https://helm.buildbuddy.io
77
version: 0.0.11
@@ -26,5 +26,5 @@ dependencies:
2626
- name: grafana
2727
repository: https://grafana.github.io/helm-charts
2828
version: 6.6.2
29-
digest: sha256:b6a06e3b2b111bd4696e7a74b0f13f6baf641fb6f95e98af0c5f6ae21d64b3c3
30-
generated: "2024-05-28T20:58:49.054721851Z"
29+
digest: sha256:9130dc21fe79e47451ce52b80ece2aefeca3cacfdfab57566b1163ccd645e06c
30+
generated: "2024-05-29T15:34:20.310841+02:00"

charts/buildbuddy-enterprise/requirements.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dependencies:
22
- name: mysql
3-
version: 1.6.4
4-
repository: https://charts.helm.sh/stable
3+
version: 11.1.0
4+
repository: https://charts.bitnami.com/bitnami
55
condition: mysql.enabled
66
- name: buildbuddy-redis
77
alias: redis

charts/buildbuddy-enterprise/templates/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ data:
2020
{{- end }}
2121

2222
{{- if .Values.mysql.enabled }}
23-
{{- $_ := set $c.database "data_source" (print "mysql://" .Values.mysql.mysqlUser ":" .Values.mysql.mysqlPassword "@tcp(" .Release.Name "-mysql:3306)/" .Values.mysql.mysqlDatabase) }}
23+
{{- $_ := set $c.database "data_source" (print "mysql://" .Values.mysql.auth.user ":" .Values.mysql.auth.password "@tcp(" .Release.Name "-mysql:3306)/" .Values.mysql.auth.database) }}
2424
{{- else if not .Values.config.database.data_source }}
2525
{{- $_ := set $c.database "data_source" "sqlite3:///tmp/buildbuddy-enterprise.db" }}
2626
{{- end }}

charts/buildbuddy-enterprise/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ spec:
5454
- name: "init-mysql"
5555
image: "{{ .Values.initContainerImage.repository }}:{{ .Values.initContainerImage.tag }}"
5656
imagePullPolicy: {{ .Values.initContainerImage.imagePullPolicy }}
57-
command: ["sh", "-c", "until curl --max-time 10 http://{{ .Release.Name }}-mysql:3306; do echo waiting for {{ .Release.Name }}-mysql; sleep 5; done;"]
57+
command: ["sh", "-c", "until curl --max-time 10 http://{{ .Release.Name }}-mysql-0:3306; do echo waiting for {{ .Release.Name }}-mysql-0; sleep 5; done;"]
5858
{{- end }}
5959
{{- if .Values.extraInitContainers }}
6060
{{- .Values.extraInitContainers | toYaml | nindent 6 }}

charts/buildbuddy-enterprise/values.yaml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -198,28 +198,20 @@ certmanager:
198198
## Either enable mysql here, or use your own data_source connection string
199199
## in the config block below.
200200
mysql:
201-
enabled: false
202-
mysqlRootPassword: ""
203-
mysqlUser: ""
204-
mysqlPassword: ""
205-
mysqlDatabase: buildbuddy
206-
207-
resources:
208-
requests:
209-
cpu: "2"
210-
memory: "4Gi"
211-
212-
configurationFiles:
213-
mysql.cnf: |-
201+
enabled: true
202+
auth:
203+
rootPassword: ""
204+
username: ""
205+
password: ""
206+
database: buildbuddy
207+
primary:
208+
# See the preset values in https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
209+
resourcesPreset: xlarge
210+
configuration: |-
214211
[mysqld]
215212
max_connections=4000
216-
repository: mysql
217-
imageTag: "8.0.18"
218-
# metrics:
219-
# enabled: true
220-
# annotations:
221-
# prometheus.io/scrape: "true"
222-
# prometheus.io/port: "9104"
213+
secondary:
214+
replicaCount: 0
223215

224216
redis:
225217
enabled: false

0 commit comments

Comments
 (0)