zed/crates/collab/k8s/postgrest.template.yml
Conrad Irwin 26a4b6af0b Disable Dangerous Downtime-causing Default
According to https://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers/#ssl-certificates

you can specify whether to disable automatic DNS record
creation for the certificate upon the load balancer’s creation using the
do-loadbalancer-disable-lets-encrypt-dns-records annotation. If you
specify true, we will not automatically create a DNS A record at the
apex of your domain to support the SSL certificate.
2024-01-03 19:55:17 -07:00

56 lines
1.3 KiB
YAML

---
kind: Service
apiVersion: v1
metadata:
namespace: ${ZED_KUBE_NAMESPACE}
name: postgrest
annotations:
service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
service.beta.kubernetes.io/do-loadbalancer-certificate-id: ${ZED_DO_CERTIFICATE_ID}
service.beta.kubernetes.io/do-loadbalancer-disable-lets-encrypt-dns-records: true
spec:
type: LoadBalancer
selector:
app: postgrest
ports:
- name: web
protocol: TCP
port: 443
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ${ZED_KUBE_NAMESPACE}
name: postgrest
spec:
replicas: 1
selector:
matchLabels:
app: postgrest
template:
metadata:
labels:
app: postgrest
spec:
containers:
- name: postgrest
image: "postgrest/postgrest"
ports:
- containerPort: 8080
protocol: TCP
env:
- name: PGRST_SERVER_PORT
value: "8080"
- name: PGRST_DB_URI
valueFrom:
secretKeyRef:
name: database
key: url
- name: PGRST_JWT_SECRET
valueFrom:
secretKeyRef:
name: postgrest
key: jwt_secret