apiVersion: apps/v1
kind: Deployment
metadata:
  name: db
  labels:
    app: db
  annotations:
    keel.sh/policy: "patch"
    keel.sh/trigger: "poll"
    keel.sh/pollSchedule: "@daily"
spec:
  replicas: 1
  revisionHistoryLimit: 0
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: db
  template:
    metadata:
      labels:
        app: db
    spec:
      containers:
        - name: db
          image: mariadb:10.6
          env:
            - name: MARIADB_ALLOW_EMPTY_ROOT_PASSWORD
              value: "yes"
          volumeMounts:
            - name: data-volume
              mountPath: /var/lib/mysql
      volumes:
        - name: data-volume
          persistentVolumeClaim:
            claimName: db-data
