forked from DevMadhup/Springboot-BankApp
-
Notifications
You must be signed in to change notification settings - Fork 367
pushed #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Swayamnakshane
wants to merge
37
commits into
LondheShubham153:DevOps
Choose a base branch
from
Swayamnakshane:prd
base: DevOps
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
pushed #25
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
0977b7e
pushed
SwayamNac 157c4f6
Update docker-compose.yml
Swayamnakshane df53f74
Update Dockerfile
Swayamnakshane 3eb7751
Update bankapp-deployment.yml
Swayamnakshane 43b6b2a
Delete kubernetes/bankapp-hpa.yml
Swayamnakshane a291f89
Delete kubernetes/bankapp-ingress.yml
Swayamnakshane 6837bfe
Update bankapp-namespace.yaml
Swayamnakshane 96ef1f2
Update bankapp-service.yaml
Swayamnakshane a71528a
Update configmap.yaml
Swayamnakshane e9d9390
Delete kubernetes/letsencrypt-clusterissuer.yaml
Swayamnakshane 3ff137e
Update mysql-deployment.yml
Swayamnakshane 1574abe
Update mysql-service.yaml
Swayamnakshane 7f3a681
Update persistent-volume-claim.yaml
Swayamnakshane c540fd6
Update persistent-volume.yaml
Swayamnakshane b5e8149
Update secrets.yaml
Swayamnakshane e6c9727
Update configmap.yaml
Swayamnakshane 6e8aee2
Update mysql-deployment.yml
Swayamnakshane 86ad8bd
Update mysql-service.yaml
Swayamnakshane d0a31ff
Update mysql-deployment.yml
Swayamnakshane 502420f
Update mysql-deployment.yml
Swayamnakshane 02d37d5
Update mysql-deployment.yml
Swayamnakshane dfdfd18
Update mysql-deployment.yml
Swayamnakshane c56bbe9
Update mysql-deployment.yml
Swayamnakshane ddcb169
Update mysql-deployment.yml
Swayamnakshane 15d0f21
Update secrets.yaml
Swayamnakshane 37b6c4e
Update bankapp-deployment.yml
Swayamnakshane e0b3c45
Update persistent-volume.yaml
Swayamnakshane cb930ce
Update persistent-volume-claim.yaml
Swayamnakshane ccff992
Update mysql-deployment.yml
Swayamnakshane d0b6471
Update mysql-deployment.yml
Swayamnakshane 64223fb
Update persistent-volume-claim.yaml
Swayamnakshane 5f2c13e
Update persistent-volume-claim.yaml
Swayamnakshane 7d724c0
Update persistent-volume.yaml
Swayamnakshane b02e0a8
Update mysql-deployment.yml
Swayamnakshane 1bc0ed5
Update mysql-deployment.yml
Swayamnakshane f3357df
Update docker-compose.yml
Swayamnakshane 1b5fc72
Update bankapp-deployment.yml
Swayamnakshane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,12 @@ | ||
| #---------------------------------- | ||
| # Stage 1 | ||
| #---------------------------------- | ||
|
|
||
| # Import docker image with maven installed | ||
| FROM maven:3.8.3-openjdk-17 as builder | ||
|
|
||
| # Add maintainer, so that new user will understand who had written this Dockerfile | ||
| MAINTAINER Madhup Pandey<madhuppandey2908@gmail.com> | ||
|
|
||
| # Add labels to the image to filter out if we have multiple application running | ||
| LABEL app=bankapp | ||
|
|
||
| # Set working directory | ||
| WORKDIR /src | ||
|
|
||
| # Copy source code from local to container | ||
| COPY . /src | ||
|
|
||
| # Build application and skip test cases | ||
| #---------------------------------stage1----------------------------------------- | ||
| FROM maven:3.9.6-eclipse-temurin-17-alpine AS builder | ||
| WORKDIR /app | ||
| COPY . . | ||
| RUN mvn clean install -DskipTests=true | ||
|
|
||
| #-------------------------------------- | ||
| # Stage 2 | ||
| #-------------------------------------- | ||
|
|
||
| # Import small size java image | ||
| FROM openjdk:17-alpine as deployer | ||
|
|
||
| # Copy build from stage 1 (builder) | ||
| COPY --from=builder /src/target/*.jar /src/target/bankapp.jar | ||
|
|
||
| # Expose application port | ||
| EXPOSE 8080 | ||
|
|
||
| # Start the application | ||
| ENTRYPOINT ["java", "-jar", "/src/target/bankapp.jar"] | ||
|
|
||
| #---------------------------------stage2----------------------------------------- | ||
| FROM openjdk:17-slim | ||
| WORKDIR /app | ||
| COPY --from=builder /app/target/*.jar /app/target/bank.jar | ||
| EXPOSE 8081 | ||
| CMD ["java","-jar","/app/target/bank.jar"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,63 +1,67 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| apiVersion: apps/v1 | ||
| metadata: | ||
| name: bank-deployment | ||
| namespace: bank | ||
| labels: | ||
| app: bankapp-deploy | ||
| name: bankapp-deploy | ||
| namespace: bankapp-namespace | ||
| app: bankapp | ||
| spec: | ||
| replicas: 2 # Keep replicas >= 2 for high availability | ||
| replicas: 3 | ||
| selector: | ||
| matchLabels: | ||
| app: bankapp-deploy | ||
| app: bankapp | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: bankapp-deploy | ||
| app: bankapp | ||
| spec: | ||
| containers: | ||
| - name: bankapp | ||
| image: trainwithshubham/bankapp-eks:v2 | ||
| - name: bank-pod | ||
| image: swayamnakshane/mybank:latest | ||
| ports: | ||
| - containerPort: 8080 | ||
| - containerPort: 8080 | ||
|
|
||
|
|
||
| env: | ||
| - name: SPRING_DATASOURCE_URL | ||
| - name: SPRING_DATASOURCE_PASSWORD | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| name: bankapp-config | ||
| key: SPRING_DATASOURCE_URL | ||
| secretKeyRef: | ||
| name: bank-secret | ||
| key: SPRING_DATASOURCE_PASSWORD | ||
|
|
||
| - name: SPRING_DATASOURCE_USERNAME | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| name: bankapp-config | ||
| name: bank-configmap | ||
| key: SPRING_DATASOURCE_USERNAME | ||
| - name: MYSQL_DATABASE | ||
|
|
||
| - name: SPRING_DATASOURCE_URL | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| name: bankapp-config | ||
| key: MYSQL_DATABASE | ||
| - name: SPRING_DATASOURCE_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: mysql-secret | ||
| key: SPRING_DATASOURCE_PASSWORD | ||
| # readinessProbe: | ||
| # httpGet: | ||
| # path: /actuator/health # Update this based on your app's health endpoint | ||
| # port: 8080 | ||
| # initialDelaySeconds: 10 | ||
| # periodSeconds: 5 | ||
| # livenessProbe: | ||
| # httpGet: | ||
| # path: /actuator/health # Update this based on your app's health endpoint | ||
| # port: 8080 | ||
| # initialDelaySeconds: 30 | ||
| # periodSeconds: 10 | ||
| name: bank-configmap | ||
| key: SPRING_DATASOURCE_URL | ||
|
|
||
|
|
||
| # livenessProbe: | ||
| # httpGet: | ||
| # path: /actuator/health | ||
| # port: 8080 | ||
| # initialDelaySeconds: 10 | ||
| # periodSeconds: 5 | ||
| # failureThreshold: 3 | ||
| # | ||
| # readinessProbe: | ||
| # httpGet: | ||
| # path: /actuator/health | ||
| # port: 8080 | ||
| # initialDelaySeconds: 5 | ||
| # periodSeconds: 5 | ||
| # failureThreshold: 3 | ||
|
|
||
| resources: | ||
| requests: | ||
| memory: "512Mi" | ||
| cpu: "250m" | ||
| limits: | ||
| memory: "1Gi" | ||
| cpu: "500m" | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: bankapp-namespace | ||
| labels: | ||
| name: bankapp-namespace | ||
| name: bank |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: bankapp-service | ||
| namespace: bankapp-namespace | ||
| labels: | ||
| app: bankapp | ||
| name: bank-svc | ||
| namespace: bank | ||
| spec: | ||
| selector: | ||
| app: bankapp-deploy | ||
| app: bankapp | ||
| ports: | ||
| - protocol: TCP | ||
| port: 8080 | ||
| targetPort: 8080 | ||
| - protocol: TCP | ||
| targetPort: 8080 | ||
| port: 8080 | ||
| nodePort: 30080 | ||
| type: NodePort | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: bankapp-config | ||
| namespace: bankapp-namespace | ||
| name: bank-configmap | ||
| namespace: bank | ||
| data: | ||
| MYSQL_DATABASE: BankDB | ||
| SPRING_DATASOURCE_URL: jdbc:mysql://mysql-svc.bankapp-namespace.svc.cluster.local:3306/BankDB?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC | ||
| MYSQL_DATABASE: bankappdb | ||
| SPRING_DATASOURCE_USERNAME: root | ||
| SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/bankappdb?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify container port matches application listener.
The container is exposing port
8080, but upstream changes (Dockerfile/Docker‑compose) reference port8081. Please confirm which port the Spring Boot app actually listens on—mismatch here will break readiness/liveness probes and Service routing.🏁 Script executed:
Length of output: 411
🏁 Script executed:
Length of output: 1755
Update Dockerfile EXPOSE to match Spring Boot’s default port (8080)
All Kubernetes and Helm templates target port 8080 and no
server.portoverride was found, so the Spring Boot app listens on 8080 by default. The Dockerfile still exposes 8081, which will cause confusion (e.g. withdocker run -P).• Dockerfile (line 11): change the exposed port to 8080
Suggested diff:
🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 22-22: wrong indentation: expected 8 but found 10
(indentation)