Files
Factory/metal3-chart/charts/mariadb/templates/deployment.yaml
Nicolas Belouin 5208e8124b
Some checks failed
Check Release Manifest Local Charts Versions / Check Release Manifest Local Charts Versions (pull_request) Successful in 15s
Build PR in OBS / Build PR in OBS (pull_request_target) Failing after 3h1m30s
Bump mariadb chart
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-06-10 15:16:17 +02:00

94 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "mariadb.fullname" . }}
labels:
{{- include "mariadb.labels" . | nindent 4 }}
spec:
replicas: {{.Values.replicaCount}}
selector:
matchLabels:
{{- include "mariadb.selectorLabels" . | nindent 6 }}
strategy:
type: Recreate
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "mariadb.selectorLabels" . | nindent 8 }}
spec:
{{- $volmounts := toYaml .Values.volumeMounts | trim | nindent 12 }}
{{- $volumes := toYaml .Values.volumes | trim | nindent 8 }}
serviceAccountName: {{ include "mariadb.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: mariadb
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
envFrom:
- configMapRef:
name: mariadb-cm
env:
- name: MARIADB_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: ironic-mariadb
lifecycle:
preStop:
exec:
command:
- sh
- -c
- mysqladmin shutdown -uironic -p$(printenv MARIADB_PASSWORD)
livenessProbe:
exec:
command:
- healthcheck.sh
- --connect
- --innodb_initialized
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
ports:
- containerPort: 3306
name: mariadb
protocol: TCP
readinessProbe:
exec:
command:
- healthcheck.sh
- --connect
- --innodb_initialized
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
volumeMounts:
- name: mariadb-conf
mountPath: /etc/mysql/conf.d
- name: mariadb-run
mountPath: /run/mysql
{{- $volmounts }}
{{- with .Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: mariadb-conf
configMap:
name: mariadb-config
- name: mariadb-run
emptyDir:
sizeLimit: 20Mi
{{- $volumes }}