Files
website/helm/ezscale-website/templates/mariadb-grant.yaml
Andrew c46f02bca5 feat(helm): mariadb-operator Database/User/Grant CRDs
When mariadb.enabled=true, references the in-cluster MariaDB this
chart deploys. When false, references an external CR via
mariadb.externalRef. Privileges scoped to the website's database
only — no global ALL PRIVILEGES.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 22:55:06 -04:00

20 lines
586 B
YAML

apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: {{ include "ezscale-website.fullname" . }}-grant
labels: {{- include "ezscale-website.labels" . | nindent 4 }}
spec:
mariaDbRef:
{{- if .Values.mariadb.enabled }}
name: {{ include "ezscale-website.fullname" . }}-mariadb
{{- else }}
name: {{ .Values.mariadb.externalRef.name }}
namespace: {{ .Values.mariadb.externalRef.namespace }}
{{- end }}
username: {{ .Values.mariadb.username }}
host: "%"
privileges:
- "ALL PRIVILEGES"
database: {{ .Values.mariadb.database }}
table: "*"