Skip to content

Commit 5585612

Browse files
committed
mysql: change init container to busybox and nc
In the future, we want to add support for other databases to this helm chart, such as ClickHouse for OLAP workloads. Each of these new databases will require their own init containers to check if the main port is available. Instead of using multiple container images for multiple tools, let's simplify the setup using netcat `nc` inside `busybox` image.
1 parent 18f9dee commit 5585612

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

charts/buildbuddy-enterprise/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: BuildBuddy Enterprise
33
name: buildbuddy-enterprise
4-
version: 0.0.273 # Chart version
4+
version: 0.0.274 # Chart version
55
appVersion: 2.65.0 # Version of deployed app
66
keywords:
77
- buildbuddy

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 nc -z {{ .Release.Name }}-mysql 3306; do echo waiting for {{ .Release.Name }}-mysql service; sleep 5; done;"]
5858
{{- end }}
5959
{{- if .Values.extraInitContainers }}
6060
{{- .Values.extraInitContainers | toYaml | nindent 6 }}

charts/buildbuddy-enterprise/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ extraVolumeMounts: []
395395

396396
## Container image that is used to ping mysql until it's up.
397397
initContainerImage:
398-
repository: appropriate/curl
398+
repository: busybox
399399
tag: latest
400400
imagePullPolicy: IfNotPresent
401401

charts/buildbuddy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: BuildBuddy Open Source
33
name: buildbuddy
4-
version: 0.0.233 # Chart version
4+
version: 0.0.234 # Chart version
55
appVersion: 2.65.0 # Version of deployed app
66
keywords:
77
- buildbuddy

charts/buildbuddy/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
- name: "init-mysql"
3232
image: "{{ .Values.initContainerImage.repository }}:{{ .Values.initContainerImage.tag }}"
3333
imagePullPolicy: {{ .Values.initContainerImage.imagePullPolicy }}
34-
command: ["sh", "-c", "until curl --max-time 10 http://{{ .Release.Name }}-mysql:3306; do echo waiting for {{ .Release.Name }}-mysql; sleep 5; done;"]
34+
command: ["sh", "-c", "until nc -z http://{{ .Release.Name }}-mysql 3306; do echo waiting for {{ .Release.Name }}-mysql service; sleep 5; done;"]
3535
{{- end }}
3636
{{- if .Values.extraInitContainers }}
3737
{{- .Values.extraInitContainers | toYaml | nindent 6 }}

charts/buildbuddy/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ extraVolumeMounts: []
196196

197197
## Container image that is used to ping mysql until it's up.
198198
initContainerImage:
199-
repository: appropriate/curl
199+
repository: busybox
200200
tag: latest
201201
imagePullPolicy: IfNotPresent
202202

0 commit comments

Comments
 (0)