mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-28 02:18:36 +00:00
Create LoadBalancer service for single-node MySQL
[mysql] Bugfix: external=true did not work for MySQL deployed with a single replica, since the MariaDB operator does not create separate primary and secondary services for a single-node DB. A special condition is added to make the "all-node" service a LoadBalancer if external=true and replicas=1. Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.8.1
|
||||
version: 0.8.2
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -61,7 +61,9 @@ spec:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||||
|
||||
{{- if and .Values.external (eq (int .Values.replicas) 1) }}
|
||||
type: LoadBalancer
|
||||
{{- end }}
|
||||
storage:
|
||||
size: {{ .Values.size }}
|
||||
resizeInUseVolumes: true
|
||||
@@ -70,7 +72,7 @@ spec:
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.external }}
|
||||
{{- if and .Values.external (gt (int .Values.replicas) 1) }}
|
||||
primaryService:
|
||||
type: LoadBalancer
|
||||
{{- end }}
|
||||
|
||||
@@ -63,7 +63,8 @@ mysql 0.6.0 93bdf411
|
||||
mysql 0.7.0 6130f43d
|
||||
mysql 0.7.1 632224a3
|
||||
mysql 0.8.0 62cb694d
|
||||
mysql 0.8.1 HEAD
|
||||
mysql 0.8.1 4369b031
|
||||
mysql 0.8.2 HEAD
|
||||
nats 0.1.0 e9716091
|
||||
nats 0.2.0 6c5cf5bf
|
||||
nats 0.3.0 78366f19
|
||||
|
||||
Reference in New Issue
Block a user