supabase-community / supabase-kubernetes

Helm 3 charts to deploy a Supabase on Kubernetes
Apache License 2.0
435 stars 118 forks source link

Deploy failed Supabase in Azure Kubernetes Service #52

Open nguyenthanhtien opened 7 months ago

nguyenthanhtien commented 7 months ago

Bug report

Describe the bug

I try using this repo to deploy supabase in K8S, but when deploy with this repo, can't deploy to K8S, 2 pod supabase-auth, supabase-rest show error: https://github.com/supabase-community/supabase-kubernetes

To Reproduce

Steps to reproduce the behavior:

  1. Clone git https://github.com/supabase-community/supabase-kubernetes

  2. cd supabase-kubernetes/charts/supabase/

  3. Create JWT secret

    kubectl -n default create secret generic demo-supabase-jwt \
    --from-literal=anonKey='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICAgInJvbGUiOiAiYW5vbiIsCiAgICAiaXNzIjogInN1cGFiYXNlIiwKICAgICJpYXQiOiAxNjc1NDAwNDAwLAogICAgImV4cCI6IDE4MzMxNjY4MDAKfQ.ztuiBzjaVoFHmoljUXWmnuDN6QU2WgJICeqwyzyZO88' \
    --from-literal=serviceKey='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICAgInJvbGUiOiAic2VydmljZV9yb2xlIiwKICAgICJpc3MiOiAic3VwYWJhc2UiLAogICAgImlhdCI6IDE2NzU0MDA0MDAsCiAgICAiZXhwIjogMTgzMzE2NjgwMAp9.qNsmXzz4tG7eqJPh1Y58DbtIlJBauwpqx39UF-MwM8k' \
    --from-literal=secret='abcdefghijklmnopqrstuvwxyz123456'
  4. Create SMTP secret

    kubectl -n default create secret generic demo-supabase-smtp \
    --from-literal=username='your-mail@example.com' \
    --from-literal=password='example123456'
  5. Create DB secret

    kubectl -n default create secret generic demo-supabase-db \
    --from-literal=username='postgres' \
    --from-literal=password='example123456' 
  6. Install the chart helm -n default install demo -f values.example.yaml .

    Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

image image image

System information

Additional context

Add any other context about the problem here.

nguyenthanhtien commented 7 months ago

Anyone can support?

saendu commented 7 months ago

I had to change these tags to make it work:

rest:
  image:
    repository: postgrest/postgrest
    tag: latest
# Auth Service
auth:
  enabled: true # Disable the auth service
  image:
    repository: supabase/gotrue
    pullPolicy: IfNotPresent
    tag: "v2.145.0"
drpsyko101 commented 6 months ago

Supabase has stopped releasing images with latest tag for a while now. The newly merged #48 with the provided values.example.yaml has the latest image tag for all services respectively.

bartekus commented 6 months ago

As a side note, the values.example.yaml is missing enabled: true for:

Not sure if this is intentional but just mentioning it here vs opening new issue ticket or PR (which I certainly can if any of maintainers desires me to do so.)

drpsyko101 commented 6 months ago

@bartekus I'm afraid that the <service>.enable might not be as functional as you think. Because the reality is:

flowchart TD
    A[Analytics] --> B[Studio]
    A --> C[Kong]
    A --> D[Auth]
    E[Database] --> D
    A <--> E
    A --> F[Rest]
    E --> F
    A --> G[Realtime]
    E --> G
    E --> H[Storage]
    F --> H
    I[ImageProxy] -- optional --> H
    A --> J[Meta]
    E --> J
    A --> K[Functions]
    L[Vector] --> E
    L --> A
bartekus commented 6 months ago

Ahh I see, so it is safe to assume that even despite not explicit setting <service>.enable to true, the services are going to boot up and operate as expected? I'm not too concerned about turning them off more so than making sure they are not disengaged due to incorrect (albite trivial) config settings. Or am I misunderstanding this all together?

drpsyko101 commented 6 months ago

The switch is functional, but disabling one or the others may cause major instability overall. It may be deprecated in future releases except for db and minio which can be disabled to allow for external providers.