apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
  name: {{ .Release.Name }}
  namespace: {{ .Release.Namespace }}
spec:
  mariaDbRef:
    name: mariadb
    namespace: default
  privileges:
    - "SELECT"
    - "INSERT"
    - "UPDATE"
    - "DELETE"
    - "CREATE"
    - "DROP"
    - "INDEX"
    - "ALTER"
    - "LOCK TABLES"
    - "EXECUTE"
  database: {{ .Values.db.name | quote }}
  table: "*"
  host: "%"
  username: {{ .Values.db.username | quote }}
  grantOption: true
  cleanupPolicy: Delete
