Skip to content

Commit 4c79540

Browse files
committed
added k8 to loanservice
1 parent 64bce51 commit 4c79540

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

k8s/loanservice-deployment.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: loanservice-deployment
5+
labels:
6+
app: loanservice
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: loanservice
12+
template:
13+
metadata:
14+
labels:
15+
app: loanservice
16+
spec:
17+
containers:
18+
- name: loanservice
19+
image: pratikbagm/loanservice:latest
20+
ports:
21+
- containerPort: 8082
22+
env:
23+
- name: SPRING_DATASOURCE_URL
24+
value: jdbc:postgresql://host.docker.internal:5432/postgres
25+
- name: SPRING_DATASOURCE_USERNAME
26+
value: postgres
27+
- name: SPRING_DATASOURCE_PASSWORD
28+
value: root

k8s/loanservice-service.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: loanservice-service
5+
spec:
6+
type: NodePort
7+
selector:
8+
app: loanservice
9+
ports:
10+
- protocol: TCP
11+
port: 8082
12+
targetPort: 8082
13+
nodePort: 30082

loanservice/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@
117117
</excludes>
118118
</configuration>
119119
</plugin>
120+
<plugin>
121+
<groupId>org.springframework.boot</groupId>
122+
<artifactId>spring-boot-maven-plugin</artifactId>
123+
<version>3.5.0</version>
124+
<configuration>
125+
<mainClass>com.p2plending.loanservice.LoanserviceApplication</mainClass>
126+
</configuration>
127+
</plugin>
120128
</plugins>
121129
</build>
122130

0 commit comments

Comments
 (0)