Skip to content

Commit e092b5c

Browse files
committed
Added Kubernetes support
1 parent 32de432 commit e092b5c

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

deploy/deployment.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
creationTimestamp: null
5+
labels:
6+
app: accounts
7+
name: accounts
8+
spec:
9+
replicas: 3
10+
selector:
11+
matchLabels:
12+
app: accounts
13+
strategy: {}
14+
template:
15+
metadata:
16+
creationTimestamp: null
17+
labels:
18+
app: accounts
19+
spec:
20+
containers:
21+
- image: us.icr.io/sn-labs-saschavolter/accounts:1
22+
name: accounts
23+
resources: {}
24+
env:
25+
- name: DATABASE_HOST
26+
value: postgresql
27+
- name: DATABASE_NAME
28+
valueFrom:
29+
secretKeyRef:
30+
name: postgresql
31+
key: database-name
32+
- name: DATABASE_PASSWORD
33+
valueFrom:
34+
secretKeyRef:
35+
name: postgresql
36+
key: database-password
37+
- name: DATABASE_USER
38+
valueFrom:
39+
secretKeyRef:
40+
name: postgresql
41+
key: database-user
42+
status: {}

deploy/service.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
creationTimestamp: null
5+
labels:
6+
app: accounts
7+
name: accounts
8+
spec:
9+
ports:
10+
- port: 8080
11+
protocol: TCP
12+
targetPort: 8080
13+
selector:
14+
app: accounts
15+
type: ClusterIP
16+
status:
17+
loadBalancer: {}

0 commit comments

Comments
 (0)