Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
9dff64a
setup EKS,argocd,helm,gateway-api,tls
Amitabh-DevOps Mar 16, 2026
b365d97
updated
Amitabh-DevOps Mar 16, 2026
607cc88
removed aws configure from userdata
Amitabh-DevOps Mar 16, 2026
077cd79
tested till phase 3
Amitabh-DevOps Mar 17, 2026
f6e0afb
tested till phase 3
Amitabh-DevOps Mar 17, 2026
f79be29
trying phase 4
Amitabh-DevOps Mar 17, 2026
548f0fc
trying phase 4
Amitabh-DevOps Mar 17, 2026
84c0c0f
switched to envoy gateway
Amitabh-DevOps Mar 17, 2026
22b129f
security: hardened K8s manifests by disabling privilege escalation
Amitabh-DevOps Mar 17, 2026
d479a4f
chore: update image tag to 22b129f418fc6fed133d06bf76cce4c955a27939 […
github-actions[bot] Mar 17, 2026
a9dd6c1
fix: added initialDelaySeconds to probes to prevent CrashLoopBackOff
Amitabh-DevOps Mar 17, 2026
bde1b75
chore: update image tag to a9dd6c13546e8da14fe5dd53574cb51a2f2409e4 […
github-actions[bot] Mar 17, 2026
9febef6
fix: added initContainer to wait for MySQL before app startup
Amitabh-DevOps Mar 17, 2026
39c28f4
chore: update image tag to 9febef6fe56c97798cdd885a52400c570aaee7d6 […
github-actions[bot] Mar 17, 2026
06904b6
docs: updated Envoy Gateway to v1.2.6 in README
Amitabh-DevOps Mar 17, 2026
e8c5c77
feat: automated EBS CSI Driver setup in eks-setup.sh
Amitabh-DevOps Mar 17, 2026
62a0e44
feat: added GatewayClass to Helm chart for automated provisioning
Amitabh-DevOps Mar 17, 2026
014eeb4
chore: update image tag to 62a0e444b8fba740ab82e3555127806eaa2a6964 […
github-actions[bot] Mar 17, 2026
5ef1c92
docs: updated cert-manager install instructions to enable Gateway API
Amitabh-DevOps Mar 17, 2026
ce4aaad
docs: corrected cert-manager gateway api enablement flag
Amitabh-DevOps Mar 17, 2026
8fa1859
docs: finalized README with 2026 Ollama SG standards
Amitabh-DevOps Mar 17, 2026
5ba631e
fix: added URLRewrite filter to Nginx route to prevent 404
Amitabh-DevOps Mar 17, 2026
01b71f6
chore: update image tag to 5ba631e8bd1218f02e8c8f76588931fe0b41ff4b […
github-actions[bot] Mar 17, 2026
30b23f0
docs: finalized README with simplified networking instructions for de…
Amitabh-DevOps Mar 17, 2026
09f734b
updated
Amitabh-DevOps Mar 17, 2026
bb6325b
updated default vpc
Amitabh-DevOps Mar 17, 2026
52fad54
changed cluster name
Amitabh-DevOps Mar 17, 2026
4323c05
fix: exclude us-east-1e from EKS control plane subnets
Amitabh-DevOps Mar 17, 2026
9eda883
updated private ip of ollama in values.yaml
Amitabh-DevOps Mar 17, 2026
77bf1be
chore: update image tag to 9eda883ac2bbd280d64884f8689335e15b6f5a71 […
github-actions[bot] Mar 17, 2026
0b824e9
updated
Amitabh-DevOps Mar 17, 2026
fcd025f
fix: resolve cert-manager conflict by removing redundant manual Certi…
Amitabh-DevOps Mar 17, 2026
5023993
chore: update image tag to fcd025fc520629efd738c2acfa468ac40efcf4e4 […
github-actions[bot] Mar 17, 2026
929bc0a
added mysql success ss
Amitabh-DevOps Mar 17, 2026
1e3ee77
docs: updated Helm chart structure in README
Amitabh-DevOps Mar 17, 2026
10296d6
docs: final README audit - fixed GatewayClass, numbering, and tech st…
Amitabh-DevOps Mar 17, 2026
a851dd7
docs: added cleanup instructions to README
Amitabh-DevOps Mar 17, 2026
0c9b7c7
migrated to kind, dockerhub
Amitabh-DevOps Mar 18, 2026
8be540e
migrated to kind, dockerhub
Amitabh-DevOps Mar 18, 2026
94e6d5d
added local branch trigger
Amitabh-DevOps Mar 18, 2026
8bb53ab
added image: kindest/node:v1.35.0
Amitabh-DevOps Mar 18, 2026
fe55efc
updated
Amitabh-DevOps Mar 18, 2026
5cf1c9f
updated
Amitabh-DevOps Mar 18, 2026
4357b4a
final sync for local branch
Amitabh-DevOps Mar 18, 2026
233ab14
updated
Amitabh-DevOps Mar 18, 2026
153b35d
test trigger
Amitabh-DevOps Mar 18, 2026
5210a3c
api crds, envoy setup shifted to readme, from kind setup
Amitabh-DevOps Mar 19, 2026
ab50bfc
shifted to nodeport from loadbalancer
Amitabh-DevOps Mar 19, 2026
9390c73
updated
Amitabh-DevOps Mar 19, 2026
b1a88bb
test trigger
Amitabh-DevOps Mar 19, 2026
479d5e8
chore: update image tag to b1a88bb5efe3ceefd6efba38b9a3d5043a43c767 […
github-actions[bot] Mar 19, 2026
a4684cf
fix: explicit port mapping in envoyproxy
Amitabh-DevOps Mar 19, 2026
f7f5899
Merge branch 'local' of https://github.com/Amitabh-DevOps/DevSecOps-B…
Amitabh-DevOps Mar 19, 2026
19a3c6d
test trigger
Amitabh-DevOps Mar 19, 2026
2aa2087
chore: update image tag to 19a3c6d66805f8a985c6b5a8a35b53c0fdb6cbfa […
github-actions[bot] Mar 19, 2026
082c1db
update: matching desired manifest structure for envoyproxy
Amitabh-DevOps Mar 19, 2026
c52db1b
chore: update image tag to 082c1db7b7be82dd3fc89a8e03a29c6aff607915 […
github-actions[bot] Mar 19, 2026
77fd656
fix: use infraPatch for static nodeports
Amitabh-DevOps Mar 19, 2026
4c3b5ac
chore: update image tag to 77fd6565f31206f45d6e5792155577848cc01f00 […
github-actions[bot] Mar 19, 2026
6089b7e
fix: robust infraPatch and ArgoCD sync policy
Amitabh-DevOps Mar 19, 2026
21b4755
chore: update image tag to 6089b7e78d77f5a9e24eea66c109a518d47605e0 […
github-actions[bot] Mar 19, 2026
a6ccc82
reverted to simple manifest
Amitabh-DevOps Mar 19, 2026
d21db23
chore: update image tag to a6ccc82c189931a9914f033b707208ca2c6c2498 […
github-actions[bot] Mar 19, 2026
b0326b9
added jsonpath again
Amitabh-DevOps Mar 19, 2026
90b56d4
reverted to simple manifest
Amitabh-DevOps Mar 19, 2026
7854582
chore: update image tag to 90b56d41090e2c9d22b9b492c660508c4065ea88 […
github-actions[bot] Mar 19, 2026
27abf95
updated email
Amitabh-DevOps Mar 19, 2026
e307038
chore: update image tag to 27abf9504c9b4c6136afe728a5d9e543e96884ed […
github-actions[bot] Mar 19, 2026
728159d
force the nodeport
Amitabh-DevOps Mar 19, 2026
fc4c46d
fix: restore gateway and remove duplicate envoyproxy
Amitabh-DevOps Mar 19, 2026
888818d
chore: update image tag to fc4c46da7e2f87b134fbe63fcb2ae2de00d94f92 […
github-actions[bot] Mar 19, 2026
0aee1b0
fix: 2026 definitive nodeport and sync policy
Amitabh-DevOps Mar 19, 2026
12ed0e9
chore: update image tag to 0aee1b0d8e7c2d6ff915ece6f14154ba91332d34 […
github-actions[bot] Mar 19, 2026
5ead6c0
updated
Amitabh-DevOps Mar 19, 2026
def0c8b
fix: simplified networking (HTTP only)
Amitabh-DevOps Mar 19, 2026
02914dc
chore: update image tag to def0c8b7302a7324985418b14393fefc20d54ab4 […
github-actions[bot] Mar 19, 2026
a60e9f1
chore: remove envoyproxy and minimize manifests
Amitabh-DevOps Mar 19, 2026
0460276
Merge branch 'local' of https://github.com/Amitabh-DevOps/DevSecOps-B…
Amitabh-DevOps Mar 19, 2026
22204b6
chore: update image tag to 046027635150c794dde294858f8e5552f6af0abe […
github-actions[bot] Mar 19, 2026
a8ab026
updated
Amitabh-DevOps Mar 19, 2026
5efdbd2
chore: update image tag to a8ab02640b05b6fd316215911bd26e2b6125f25d […
github-actions[bot] Mar 19, 2026
e5e8b17
feat: synchronize templated EnvoyProxy and finalize GitOps
Amitabh-DevOps Mar 19, 2026
29414c0
Merge branch 'local' of https://github.com/Amitabh-DevOps/DevSecOps-B…
Amitabh-DevOps Mar 19, 2026
21dd4e3
chore: update image tag to 29414c041908ee72e54e7b695dc2534a821e1728 […
github-actions[bot] Mar 19, 2026
bd5cf63
updated with tls and envoyproxy
Amitabh-DevOps Mar 19, 2026
4182ea4
Merge branch 'local' of https://github.com/Amitabh-DevOps/DevSecOps-B…
Amitabh-DevOps Mar 19, 2026
76de7c0
chore: update image tag to 4182ea43759cf888ce5df61a7cff0cc9757e4295 […
github-actions[bot] Mar 19, 2026
3652d52
updated with tls and envoyproxy
Amitabh-DevOps Mar 19, 2026
3803a75
Merge branch 'local' of https://github.com/Amitabh-DevOps/DevSecOps-B…
Amitabh-DevOps Mar 19, 2026
6ec2707
chore: update image tag to 3803a750a12569256612ec7b438a03d8bd9e92bc […
github-actions[bot] Mar 19, 2026
9ecb9c2
removed envoy proxy from gateway
Amitabh-DevOps Mar 19, 2026
68d4279
chore: update image tag to 9ecb9c211fea54672897878bf600571efc0fdc31 […
github-actions[bot] Mar 19, 2026
c22c388
working
Amitabh-DevOps Mar 19, 2026
d7b8731
Merge branch 'local' of https://github.com/Amitabh-DevOps/DevSecOps-B…
Amitabh-DevOps Mar 19, 2026
f48c2be
code changes to increase timeout for ollama
Amitabh-DevOps Mar 19, 2026
8d9b8a8
chore: update image tag to f48c2bef27d9fbcc546399a79f0dd11610ff65df […
github-actions[bot] Mar 19, 2026
9310e26
code changes to increase timeout for ollama
Amitabh-DevOps Mar 19, 2026
5523f47
chore: update image tag to 9310e2662d471de5b53dca832cc0bd03e54c9e39 […
github-actions[bot] Mar 19, 2026
18a9a98
added gemini
Amitabh-DevOps Mar 19, 2026
3196803
Merge branch 'local' of https://github.com/Amitabh-DevOps/DevSecOps-B…
Amitabh-DevOps Mar 19, 2026
2341b42
chore: update image tag to 3196803cd849fd1538f8594c76aeb710f7082e3a […
github-actions[bot] Mar 19, 2026
6b4ad86
shifted to gemini
Amitabh-DevOps Mar 19, 2026
80d273c
Merge branch 'local' of https://github.com/Amitabh-DevOps/DevSecOps-B…
Amitabh-DevOps Mar 19, 2026
39b66fe
chore: update image tag to 80d273c80f3962b4933c07bdd61e319970fd5336 […
github-actions[bot] Mar 19, 2026
0092de1
increased reponse length
Amitabh-DevOps Mar 19, 2026
26fa7c1
chore: update image tag to 0092de1fc943bc63a5bfe12332769a050e1094d4 […
github-actions[bot] Mar 19, 2026
467a767
removed ollama setup
Amitabh-DevOps Mar 19, 2026
da77c89
chore: update image tag to 467a767334ffec5e36f2cf3d7a547e052ec5a74b […
github-actions[bot] Mar 19, 2026
0bef754
increased token to 512
Amitabh-DevOps Mar 19, 2026
589b2d0
chore: update image tag to 0bef754433641f2b89d157f37bd816b5f6673a07 […
github-actions[bot] Mar 19, 2026
2cea33b
fixed truncation and response
Amitabh-DevOps Mar 19, 2026
a775198
chore: update image tag to 2cea33b69c45ff67a01deafc54d987030649f80f […
github-actions[bot] Mar 19, 2026
ccb1273
updated
Amitabh-DevOps Mar 19, 2026
24a32dc
updated
Amitabh-DevOps Mar 19, 2026
5c4fa6b
updated
Amitabh-DevOps Mar 19, 2026
ab75a3e
Merge branch 'local'
Amitabh-DevOps Mar 19, 2026
c2770df
chore: update image tag to ab75a3e0744471795ace08683359097b56d8215a […
github-actions[bot] Mar 19, 2026
a4feabc
updated
Amitabh-DevOps Mar 19, 2026
1a3df32
chore: update image tag to a4feabc43d587ed593b71c3f6c88539d73c5274d […
github-actions[bot] Mar 19, 2026
87843bb
updated and final
Amitabh-DevOps Mar 19, 2026
dd54af1
updated and final
Amitabh-DevOps Mar 19, 2026
6ac6664
updated and final
Amitabh-DevOps Mar 19, 2026
6bee400
updated and final
Amitabh-DevOps Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Exclude non-essential files from Docker build context
# This speeds up builds and reduces the attack surface

# Kubernetes/Helm/GitOps (not needed in image)
charts/
gitops/
scripts/

# Documentation and screenshots
screenshots/
*.md
HELP.md

# CI/CD configs
.github/

# Build output (will be rebuilt inside Docker)
target/

# IDE and OS files
.idea/
.vscode/
*.iml
*.iws
.git/

# Local dev files
docker-compose.yml
app-tier.yml
.env
27 changes: 11 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_call:

permissions:
id-token: write # Required for OIDC
contents: read

jobs:
Expand Down Expand Up @@ -77,31 +76,27 @@ jobs:
path: trivy-report.txt

# ============================================================
# GATE 7: PUSH TO ECR
# GATE 7: PUSH TO DOCKER HUB
# ============================================================
push_to_ecr:
name: Push to ECR
push_to_dockerhub:
name: Push to Docker Hub
runs-on: ubuntu-latest
needs: image_scan
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Configure AWS Credentials (OIDC)
uses: aws-actions/configure-aws-credentials@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build, Tag, and Push Image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
DOCKERHUB_REPO: ${{ secrets.DOCKERHUB_REPO }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build --pull -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker build --pull -t $DOCKERHUB_REPO:$IMAGE_TAG .
docker push $DOCKERHUB_REPO:$IMAGE_TAG

96 changes: 18 additions & 78 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,94 +1,34 @@
name: CD - Deploy & DAST

name: CD - GitOps Sync
on:
workflow_call:

permissions:
id-token: write # Required for OIDC
contents: read

jobs:

# ============================================================
# GATE 8: DEPLOY
# GATE 8: GITOPS UPDATE
# ============================================================
deploy:
name: Deploy to EC2 via SSH
gitops-update:
name: Update Helm Values for ArgoCD
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Create Deployment Directory
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: mkdir -p ~/bankapp

- name: Copy app-tier.yml to EC2
uses: appleboy/scp-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
source: "app-tier.yml"
target: "~/bankapp"

- name: Deploy via SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
# Login to ECR
aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
token: ${{ secrets.GITHUB_TOKEN }} # contents: write permission is set above — no PAT needed

cd ~/bankapp
- name: Update Image Tag in Helm values.yaml
run: |
sed -i 's/tag: .*/tag: "${{ github.sha }}"/' charts/bankapp/values.yaml

# Fetch secrets from Secrets Manager and create .env
aws secretsmanager get-secret-value --secret-id bankapp/prod-secrets --query SecretString --output text > secrets.json

# Extract variables and write to .env
echo "DB_HOST=$(jq -r .DB_HOST secrets.json)" > .env
echo "DB_PORT=$(jq -r .DB_PORT secrets.json)" >> .env
echo "DB_NAME=$(jq -r .DB_NAME secrets.json)" >> .env
echo "DB_USER=$(jq -r .DB_USER secrets.json)" >> .env
echo "DB_PASSWORD=$(jq -r .DB_PASSWORD secrets.json)" >> .env
echo "OLLAMA_URL=$(jq -r .OLLAMA_URL secrets.json)" >> .env
echo "ECR_REGISTRY=${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com" >> .env
echo "ECR_REPOSITORY=${{ secrets.ECR_REPOSITORY }}" >> .env
echo "IMAGE_TAG=${{ github.sha }}" >> .env

# Clean up
rm secrets.json

# Pull and Deploy using the app-tier.yml transferred via SCP
docker compose -f app-tier.yml pull
docker compose -f app-tier.yml up -d --build
- name: Commit and Push Changes
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add charts/bankapp/values.yaml
git commit -m "chore: update image tag to ${{ github.sha }} [skip ci]"
git push
Comment on lines +28 to +29

# ============================================================
# GATE 9: DAST - Dynamic Application Security Testing
# GATE 9: ARGOCD SYNC (Optional, ArgoCD can auto-sync)
# ============================================================
dast:
name: DAST - OWASP ZAP Baseline Scan
runs-on: ubuntu-latest
needs: deploy
steps:
- name: Run OWASP ZAP Baseline Scan
uses: zaproxy/[email protected]
continue-on-error: true # Workaround for ZAP's internal artifact upload bug
with:
target: 'http://${{ secrets.EC2_HOST }}:8080'
artifact_name: zapreport
fail_action: false
allow_issue_writing: false

- name: Upload ZAP Report
uses: actions/upload-artifact@v4
if: always()
with:
name: zap-dast-report
path: report_html.html
# Note: ArgoCD is configured to auto-sync in its manifest
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ jobs:
if: always()
with:
name: owasp-dependency-check-report
path: target/dependency-check-report.html
path: target/dependency-check-report.html
9 changes: 4 additions & 5 deletions .github/workflows/devsecops-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: DevSecOps Main Pipeline

on:
push:
branches: [ main, devsecops, k8s ]
branches: [ main ]
paths-ignore:
- '**.md'
- '.gitignore'
Expand All @@ -11,8 +11,7 @@ on:
- 'scripts/**'

permissions:
id-token: write
contents: read
contents: write # Required: cd.yml pushes updated values.yaml back to repo (workflow_call inherits this)
security-events: write

jobs:
Expand All @@ -24,15 +23,15 @@ jobs:
secrets: inherit

# ============================================================
# STAGE 2: Build - Maven + Trivy + ECR Push
# STAGE 2: Build - Maven + Trivy + Docker Hub Push
# ============================================================
build:
needs: ci
uses: ./.github/workflows/build.yml
secrets: inherit

# ============================================================
# STAGE 3: CD - Deploy + DAST
# STAGE 3: CD - GitOps Sync (ArgoCD)
# ============================================================
cd:
needs: build
Expand Down
Loading
Loading