k8s/infrastructure/databases/mariadb-clusters/mariadb.yaml
2026-04-25 11:43:34 +12:00

35 lines
778 B
YAML

apiVersion: k8s.mariadb.com/v1alpha1
kind: MariaDB
metadata:
name: mariadb
namespace: mariadb-databases
spec:
replicas: 1
#replication:
#enabled: true
# primary:
# automaticFailover: true
myCnf: |
[mariadb]
# Kimai migrations can include zero-date defaults; relax NO_ZERO_DATE / strict handling.
sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
rootPasswordSecretKeyRef:
name: mariadb-secrets
key: password
storage:
size: 20Gi
# Optional but recommended
service:
type: ClusterIP
# Helps with stable operation in GitOps
updateStrategy:
type: ReplicasFirstPrimaryLast
# Basic resource safety
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: "1"
memory: 1Gi