apiVersion: apps/v1 kind: Deployment metadata: name: supabase-kong spec: replicas: 1 selector: matchLabels: component: kong template: metadata: labels: component: kong spec: containers: - name: kong image: kong/kong:3.4.2 command: ["/bin/sh", "/home/kong/kong-entrypoint.sh"] ports: - containerPort: 8000 - containerPort: 8443 env: - name: LD_LIBRARY_PATH value: "/usr/local/kong/lib" - name: KONG_DATABASE value: "off" - name: KONG_DECLARATIVE_CONFIG value: /usr/local/kong/kong.yml - name: KONG_DNS_ORDER value: LAST,A,CNAME - name: KONG_DNS_NOT_FOUND_TTL value: "1" - name: KONG_PLUGINS value: request-transformer,cors,key-auth,acl,basic-auth,request-termination,ip-restriction,post-function - name: KONG_NGINX_PROXY_PROXY_BUFFER_SIZE value: 160k - name: KONG_NGINX_PROXY_PROXY_BUFFERS value: 64 160k - name: KONG_PROXY_ACCESS_LOG value: /dev/stdout combined - name: SUPABASE_ANON_KEY valueFrom: secretKeyRef: name: supabase-secrets key: anonKey - name: SUPABASE_SERVICE_KEY valueFrom: secretKeyRef: name: supabase-secrets key: serviceRoleKey - name: DASHBOARD_USERNAME value: "{{ .dashboardUsername }}" - name: DASHBOARD_PASSWORD valueFrom: secretKeyRef: name: supabase-secrets key: dashboardPassword volumeMounts: - name: kong-config mountPath: /home/kong/temp.yml subPath: kong.yml - name: kong-config mountPath: /home/kong/kong-entrypoint.sh subPath: kong-entrypoint.sh - name: kong-output mountPath: /usr/local/kong livenessProbe: exec: command: ["kong", "health"] initialDelaySeconds: 15 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: exec: command: ["kong", "health"] initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 5 failureThreshold: 3 resources: requests: memory: 256Mi cpu: 100m volumes: - name: kong-config configMap: name: supabase-kong-config - name: kong-output emptyDir: {}