-
Notifications
You must be signed in to change notification settings - Fork 1
/
kube-stack.yml
64 lines (64 loc) · 1.6 KB
/
kube-stack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
apiVersion: apps/v1beta1
kind: List
items:
- apiVersion: v1
kind: Service
metadata:
name: authz-service
spec:
type: NodePort
selector:
app: postgrest-deployment
ports:
- protocol: "TCP"
port: 3000
targetPort: 3000
nodePort: 30001
name: "http"
- apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: postgrest-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:9.6-alpine
env:
- name: POSTGRES_DB
value: "authz"
- name: POSTGRES_USER
value: "postgres"
- name: POSTGRES_PASSWORD
value: "pass"
ports:
- containerPort: 5432
- name: postgrest
image: begriffs/postgrest:v0.4.2.0
ports:
- containerPort: 3000
volumeMounts:
- mountPath: /etc/postgrest.conf
name: postgrest-config
env:
- name: PGRST_DB_URI
value: "postgres://postgres:pass@postgres:5432/authz"
- name: PGRST_DB_SCHEMA
value: "public"
- name: PGRST_DB_ANON_ROLE
value: "postgres"
- name: PGRST_SERVER_HOST
value: "*4"
- name: PGRST_SERVER_PORT
value: "3000"
- name: PGRST_JWT_SECRET
value: "you_should_change_this"
volumes:
- name: postgrest-config
hostPath:
path: /Users/jiayu/GitHub/postgrest-authz-service/postgrest.conf