### Helm Chart Installation Message Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/templates/NOTES.txt Displays a welcome message upon successful installation of the Helm chart. It dynamically includes the chart's name. ```go-template Thank you for installing {{ .Chart.Name }}! ``` -------------------------------- ### Install Supabase Helm Chart Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Steps to clone the repository, navigate to the chart directory, and install the Supabase Helm chart with a custom values file. This is the primary installation command. ```bash # Clone Repository git clone https://github.com/supabase-community/supabase-kubernetes # Switch to charts directory cd supabase-kubernetes/charts/supabase/ # Install the chart helm install demo -f values.example.yaml . ``` -------------------------------- ### Run Helm Chart Testing (Install) Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Executes the installation phase of the chart-testing tool within a Docker container. It installs charts into a Kubernetes cluster for testing purposes. ```shell # Run chart-testing (install) docker run -it \ --network host \ --workdir=/data \ --volume ~/.kube/config:/root/.kube/config:ro \ --volume $(pwd)/charts/supabase:/data \ quay.io/helmpack/chart-testing:v3.7.1 \ ct install --chart-dirs . --charts . ``` -------------------------------- ### Studio Dashboard Ingress Access Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/templates/NOTES.txt Conditionally displays the URL for the Studio dashboard if Kong ingress is enabled. It extracts the host from the ingress configuration. ```go-template {{ if .Values.kong.ingress.enabled }} Visit the Studio dashboard at http://{{ (index .Values.kong.ingress.hosts 0).host }} {{- end }} ``` -------------------------------- ### Kubernetes Secret for Database Credentials Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Example YAML structure for a Kubernetes secret to store database connection credentials, such as username, password, and database name. This is used by Supabase services to connect to the PostgreSQL database. ```yaml secret: db: username: password: database: ``` -------------------------------- ### Kubernetes Secret for SMTP Credentials Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Example YAML structure for a Kubernetes secret to configure SMTP mail server connection credentials, including username and password. This is used for email notifications and password resets. ```yaml secret: smtp: username: password: ``` -------------------------------- ### Kubernetes Secret for JWT Keys Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Example YAML structure for a Kubernetes secret to store JWT keys, including anonymous keys, service role keys, and the main JWT secret. These are essential for Supabase authentication. ```yaml secret: jwt: anonKey: serviceKey: secret: ``` -------------------------------- ### Access Supabase with Minikube Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Instructions for accessing the Supabase deployment when using Minikube. It involves retrieving the Minikube IP address and updating the /etc/hosts file to map a domain (e.g., example.com) to the Minikube IP. ```bash # Get Minikube IP minikube ip # Add IP to /etc/hosts (replace ) # example.com ``` -------------------------------- ### Supabase PostgreSQL Initialization and Migration Scripts Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Details on how initialization and migration scripts for Supabase PostgreSQL are handled in the new version. Initialization scripts are reworked to match Docker Compose, and migration scripts are exposed via a specific configuration path. ```yaml db.config # Mount your migration files here # Example: copy your local project's supabase/migration/* to this path ``` ```bash /docker-entrypoint-initdb.d/migrations/ ``` -------------------------------- ### Generate Migration Scripts for Clipboard Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md A bash script to read SQL migration files from a directory, format them for easy copying into a Kubernetes configuration, and output to standard output. ```bash #!/bin/bash for file in $1/*; do clipboard+=" $(basename $file): |\n" clipboard+=$(cat $file | awk '{print " "$0}') clipboard+="\n" done echo -e "$clipboard" ``` -------------------------------- ### Define Supabase Database Migration Scripts Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Specifies SQL migration scripts to be applied during database initialization. The keys are filenames and the values are the SQL content. ```yaml db: config: 20230101000000_profiles.sql: | create table profiles ( id uuid references auth.users not null, updated_at timestamp with time zone, username text unique, avatar_url text, website text, primary key (id), unique(username), constraint username_length check (char_length(username) >= 3) ); ``` -------------------------------- ### Run Helm Chart Testing (Lint) Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Executes the linting phase of the chart-testing tool within a Docker container. It validates Helm chart maintainer information and chart structure. ```shell # Run chart-testing (lint) docker run -it \ --workdir=/data \ --volume $(pwd)/charts/supabase:/data \ quay.io/helmpack/chart-testing:v3.7.1 \ ct lint --validate-maintainers=false --chart-dirs . --charts . ``` -------------------------------- ### Build and Package Helm Charts Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/README.md Executes a shell script to package Helm charts for publishing. This script is essential for preparing charts when making changes to the main branch. ```shell sh build.sh ``` -------------------------------- ### View Supabase Pod Status Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Command to list the status of Supabase pods deployed by the Helm chart. It filters pods by the instance label 'demo', showing their readiness, status, restarts, and age. ```bash kubectl get pod -l app.kubernetes.io/instance=demo ``` -------------------------------- ### JWT Secret Generation Hint Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Guidance on generating a secure JWT secret, suggesting a 64-byte base64 encoded string generated using OpenSSL. It also points to the Supabase documentation for generating API keys. ```APIDOC JWT Secret Generation: - Generate a 64-byte secret: openssl rand 64 | base64 - Use the JWT Tool for anon and service keys: https://supabase.com/docs/guides/hosting/overview#api-keys ``` -------------------------------- ### Configure Supabase S3 Storage Secrets and Environment Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Enables S3 object storage for Supabase storage by setting S3 key ID, access key, and environment variables. Optionally enables internal Minio deployment. ```yaml secret: s3: keyId: your-s3-key-id accessKey: your-s3-access-key storage: environment: # Set S3 endpoint if using external object-storage # GLOBAL_S3_ENDPOINT: http://minio:9000 STORAGE_BACKEND: s3 GLOBAL_S3_PROTOCOL: http GLOBAL_S3_FORCE_PATH_STYLE: true AWS_DEFAULT_REGION: stub minio: enabled: true ``` -------------------------------- ### Supabase Kubernetes Ingress Configuration Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Specifies the limited services that accept ingress traffic in the new Kubernetes deployment. This change is intended to enforce secure entry points into the stack. ```yaml Ingress limited to: - kong - db ``` -------------------------------- ### Supabase Storage Persistence Configuration Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Describes the behavior of Supabase Storage when persistence is disabled. An emptyDir volume will be created, which may cause incompatibility with previous versions if the persistent storage location differs. ```yaml supabase/storage: # If persistence is disabled: # An emptyDir will be created. # This might be incompatible with previous versions if storage location is not /var/lib/storage. ``` -------------------------------- ### Configure Ingress Class for Nginx Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Sets the ingress class name for Kubernetes ingress controllers, specifically for Nginx. This ensures traffic is routed correctly to the Supabase services. ```yaml kong: ingress: enabled: 'true' className: "nginx" annotations: nginx.ingress.kubernetes.io/rewrite-target: / ``` -------------------------------- ### Configure Supabase Analytics Secret Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Sets the Logflare secret API key for securing communication between Supabase services. The key must be at least 32 characters long. ```yaml secret: analytics: apiKey: your-super-secret-with-at-least-32-characters-long-logflare-key ``` -------------------------------- ### Configure Supabase Dashboard Secrets Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Sets the username and password required to access the Supabase Studio dashboard. It is recommended to update the default insecure password. ```yaml secret: dashboard: username: supabase password: this_password_is_insecure_and_should_be_updated ``` -------------------------------- ### Uninstall Supabase Helm Chart Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Commands to uninstall the Supabase Helm chart and clean up associated Kubernetes resources, specifically Persistent Volume Claims (PVCs) that might be retained. ```bash # Uninstall Helm chart helm uninstall demo # Backup and/or remove any Persistent Volume Claims that have keep annotation kubectl delete pvc demo-supabase-storage-pvc ``` -------------------------------- ### Supabase Vector HostPath Volume Requirement Source: https://github.com/supabase-community/supabase-kubernetes/blob/main/charts/supabase/README.md Details the requirement for Supabase Vector to access the /var/log/pods directory. This access is typically provided using a hostPath volume in Kubernetes environments. ```yaml supabase/vector: # Requires read access to /var/log/pods directory. # Provide with a hostPath volume in Kubernetes: # https://kubernetes.io/docs/concepts/storage/volumes/#hostpath ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.