-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeployment.yml
More file actions
41 lines (41 loc) · 1.02 KB
/
deployment.yml
File metadata and controls
41 lines (41 loc) · 1.02 KB
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: distributed-job-processor
labels:
app: distributed-job-processor
spec:
replicas: 3 # Set the number of replicas here
selector:
matchLabels:
app: distributed-job-processor
template:
metadata:
labels:
app: distributed-job-processor
spec:
containers:
- name: distributed-job-processor
image: distributed-job-processor:0.0.1
ports:
- containerPort: 8080
env:
- name: SPRING_DATASOURCE_URL
value: "jdbc:postgresql://host.docker.internal:5432/paymentsdb"
- name: SPRING_DATASOURCE_USERNAME
value: "puser"
- name: SPRING_DATASOURCE_PASSWORD
value: "ppass"
---
apiVersion: v1
kind: Service
metadata:
name: distributed-job-processor-service
spec:
selector:
app: distributed-job-processor
ports:
- protocol: TCP
port: 8080
targetPort: 8080
type: NodePort # Expose on a specific port for testing