aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-galera
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/mariadb-galera')
-rw-r--r--kubernetes/common/mariadb-galera/Chart.yaml2
-rw-r--r--kubernetes/common/mariadb-galera/templates/statefulset.yaml48
-rw-r--r--kubernetes/common/mariadb-galera/values.yaml7
3 files changed, 23 insertions, 34 deletions
diff --git a/kubernetes/common/mariadb-galera/Chart.yaml b/kubernetes/common/mariadb-galera/Chart.yaml
index 41d11a646e..552f6cc67d 100644
--- a/kubernetes/common/mariadb-galera/Chart.yaml
+++ b/kubernetes/common/mariadb-galera/Chart.yaml
@@ -18,7 +18,7 @@
apiVersion: v2
description: Chart for MariaDB Galera cluster
name: mariadb-galera
-version: 13.2.2
+version: 13.2.3
keywords:
- mariadb
- mysql
diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
index 66ce8abc6e..3011d93e5a 100644
--- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml
+++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
@@ -39,50 +39,24 @@ spec:
initContainers:
# we shouldn't need this but for unknown reason, it's fsGroup is not
# applied
- - name: fix-permission
+ {{- if .Values.mariadbConfiguration }}
+ - name: copy-config
command:
- /bin/sh
args:
- -c
- |
- chown -R {{ .Values.securityContext.user_id }}:{{ .Values.securityContext.group_id }} /data
- chown -R {{ .Values.securityContext.user_id }}:{{ .Values.securityContext.group_id }} /bootstrap/
- chown -R {{ .Values.securityContext.user_id }}:{{ .Values.securityContext.group_id }} /tmp/
- {{- if .Values.mariadbConfiguration }}
cp /config/my.cnf /actual/my.cnf
- chown -R {{ .Values.securityContext.user_id }}:{{ .Values.securityContext.group_id }} /actual
- {{- end }}
image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- securityContext:
- allowPrivilegeEscalation: false
- capabilities:
- drop:
- - ALL
- - CAP_NET_RAW
- add:
- - CHOWN
- - SYS_CHROOT
- runAsGroup: {{ .Values.securityContext.group_id }}
- readOnlyRootFilesystem: false
- runAsUser: 0
- runAsNonRoot: false
- seccompProfile:
- type: RuntimeDefault
+ {{ include "common.containerSecurityContext" . | indent 10 | trim }}
volumeMounts:
- - name: previous-boot
- mountPath: /bootstrap
- - name: mariadb-tmp-folder
- mountPath: /tmp
- - name: {{ include "common.fullname" . }}
- mountPath: /data
- {{- if .Values.mariadbConfiguration }}
- name: mariadb-galera-starting-config
mountPath: /config/my.cnf
subPath: my.cnf
- name: mariadb-galera-actual-config
mountPath: /actual
- {{- end }}
+ {{- end }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
@@ -185,6 +159,8 @@ spec:
{{ include "common.containerSecurityContext" . | indent 10 | trim }}
resources: {{ include "common.resources" . | nindent 12 }}
volumeMounts:
+ - name: tmp
+ mountPath: /tmp
- name: previous-boot
mountPath: /opt/bitnami/mariadb/.bootstrap
- name: {{ include "common.fullname" . }}
@@ -258,13 +234,19 @@ spec:
tolerations: {{- include "common.tplValue" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
{{- end }}
volumes:
+ - name: tmp
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.tmpSizeLimit }}
- name: previous-boot
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.bootSizeLimit }}
- name: mariadb-tmp-folder
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.tmpMariaDBSizeLimit }}
{{- if .Values.mariadbConfiguration }}
- name: mariadb-galera-actual-config
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.configSizeLimit }}
- name: mariadb-galera-starting-config
configMap:
name: {{ printf "%s-configuration" (include "common.fullname" .) }}
diff --git a/kubernetes/common/mariadb-galera/values.yaml b/kubernetes/common/mariadb-galera/values.yaml
index faab7af1b3..6684d6dcb3 100644
--- a/kubernetes/common/mariadb-galera/values.yaml
+++ b/kubernetes/common/mariadb-galera/values.yaml
@@ -609,6 +609,12 @@ resources:
memory: "3Gi"
unlimited: {}
+volumes:
+ bootSizeLimit: 50Mi
+ tmpSizeLimit: 200Mi
+ configSizeLimit: 50Mi
+ tmpMariaDBSizeLimit: 100Mi
+
## MariaDB Galera containers' liveness and readiness probes
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
##
@@ -689,6 +695,7 @@ metrics:
requests:
cpu: "0.5"
memory: "200Mi"
+
## MariaDB Galera metrics container's liveness and readiness probes
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
##