File tree Expand file tree Collapse file tree 9 files changed +88
-15
lines changed
Expand file tree Collapse file tree 9 files changed +88
-15
lines changed Original file line number Diff line number Diff line change 1- apiVersion : apps/v1
1+ apiVersion : apps/v1
22kind : Deployment
33metadata :
44 name : treetracker-query-api
@@ -15,18 +15,10 @@ spec:
1515 labels :
1616 app : treetracker-query-api
1717 spec :
18- affinity :
19- nodeAffinity :
20- requiredDuringSchedulingIgnoredDuringExecution :
21- nodeSelectorTerms :
22- - matchExpressions :
23- - key : doks.digitalocean.com/node-pool
24- operator : In
25- values :
26- - microservices-node-pool
2718 containers :
2819 - name : treetracker-query-api
29- image : greenstand/treetracker-query-api:TAG
20+ image : greenstand/treetracker-query-api:v1.2.3
21+ imagePullPolicy : IfNotPresent
3022 ports :
3123 - containerPort : 80
3224 env :
Original file line number Diff line number Diff line change 1+ apiVersion : kustomize.config.k8s.io/v1beta1
2+ kind : Kustomization
13resources :
4+ - namespace.yaml
25 - deployment.yaml
3- - mapping.yaml
46 - service.yaml
57 - database-connection-sealed-secret.yaml
8+ - postgrest-config.yaml
9+ - postgrest-deployment.yaml
10+ - postgrest-service.yaml
11+ - postgrest-ingress.yaml
12+
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : ConfigMap
3+ metadata :
4+ name : postgrest-config
5+ namespace : webmap
6+ data :
7+ postgrest.conf : |
8+ db-uri = "$(PGRST_DB_URI)"
9+ db-schema = "public"
10+ db-anon-role = "readonly_user"
11+ server-port = 3000
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : postgrest
5+ namespace : webmap
6+ spec :
7+ replicas : 1
8+ selector :
9+ matchLabels :
10+ app : postgrest
11+ template :
12+ metadata :
13+ labels :
14+ app : postgrest
15+ spec :
16+ containers :
17+ - name : postgrest
18+ image : postgrest/postgrest:v12.0.2
19+ ports :
20+ - containerPort : 3000
21+ env :
22+ - name : PGRST_DB_URI
23+ valueFrom :
24+ secretKeyRef :
25+ name : query-api-database-connection
26+ key : db
27+ - name : PGRST_DB_SCHEMA
28+ value : " public"
29+ - name : PGRST_DB_ANON_ROLE
30+ value : " readonly_user"
31+ - name : PGRST_SERVER_PORT
32+ value : " 3000"
Original file line number Diff line number Diff line change 1+ apiVersion : networking.k8s.io/v1
2+ kind : Ingress
3+ metadata :
4+ name : postgrest-ingress
5+ namespace : webmap
6+ annotations :
7+ nginx.ingress.kubernetes.io/rewrite-target : /$2
8+ spec :
9+ rules :
10+ - http :
11+ paths :
12+ - path : /query-postgrest(/|$)(.*)
13+ pathType : Prefix
14+ backend :
15+ service :
16+ name : postgrest-service
17+ port :
18+ number : 3000
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+ metadata :
4+ name : postgrest-service
5+ namespace : webmap
6+ spec :
7+ selector :
8+ app : postgrest
9+ ports :
10+ - port : 3000
11+ targetPort : 3000
12+ type : ClusterIP
Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ apiVersion: v1
22kind : Service
33metadata :
44 name : treetracker-query-api
5+ namespace : webmap
56spec :
67 selector :
78 app : treetracker-query-api
89 ports :
910 - name : http
1011 protocol : TCP
1112 port : 80
12- targetPort : 3006
13+ targetPort : 3006 # change if container doesn't use 3006
You can’t perform that action at this time.
0 commit comments