---
apiVersion: v1
kind: Secret
metadata:
  name: supabase-demo-credentials
  namespace: supabase-demo
stringData:
  url: postgresql://supabase_admin:1n1t-R00t!@cluster-example-rw.supabase-demo:5432/app
---
apiVersion: supabase.k8s.icb4dc0.de/v1alpha1
kind: Core
metadata:
  labels:
    app.kubernetes.io/name: supabase-operator
    app.kubernetes.io/managed-by: kustomize
  name: core-sample
  namespace: supabase-demo
spec:
  # public URL of the Supabase instance (API)
  # normally the Ingress/HTTPRoute endpoint
  externalUrl: http://localhost:8000/

  # public URL of the frontend
  # could be the same as the externalUrl if you're using one Ingress/HTTPRoute for both
  # or a different one if you prefer to separate API and frontend URLs
  # will be used by Supabase Auth to redirect users after login
  siteUrl: http://localhost:3000/
  database:
    # this field is write-only, it can be used to configure the DSN without having to create the secret manually
    # dsn: postgresql://supabase_admin:1n1t-R00t!@cluster-example-rw.supabase-demo:5432/app
    dsnSecretRef:
      name: supabase-demo-credentials
      key: url
  auth:
    disableSignup: false
    enableEmailAutoconfirm: true
    providers: {}
  postgrest:
    maxRows: 1000
  jwt:
    expiry: 3600
    # name of the secret containing the JWT secret
    # will be created if not found, make sure to refernce this secret in the APIGateway, Dashboard and Storage
    secretName: core-sample-jwt