1---
2kind: Service
3apiVersion: v1
4metadata:
5 namespace: ${ZED_KUBE_NAMESPACE}
6 name: postgrest
7 annotations:
8 service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
9 service.beta.kubernetes.io/do-loadbalancer-certificate-id: ${ZED_DO_CERTIFICATE_ID}
10spec:
11 type: LoadBalancer
12 selector:
13 app: postgrest
14 ports:
15 - name: web
16 protocol: TCP
17 port: 443
18 targetPort: 8080
19
20---
21apiVersion: apps/v1
22kind: Deployment
23metadata:
24 namespace: ${ZED_KUBE_NAMESPACE}
25 name: postgrest
26
27spec:
28 replicas: 1
29 selector:
30 matchLabels:
31 app: postgrest
32 template:
33 metadata:
34 labels:
35 app: postgrest
36 spec:
37 containers:
38 - name: postgrest
39 image: "postgrest/postgrest"
40 ports:
41 - containerPort: 8080
42 protocol: TCP
43 env:
44 - name: PGRST_SERVER_PORT
45 value: "8080"
46 - name: PGRST_DB_URI
47 valueFrom:
48 secretKeyRef:
49 name: database
50 key: url
51 - name: PGRST_JWT_SECRET
52 valueFrom:
53 secretKeyRef:
54 name: postgrest
55 key: jwt_secret