Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
f7aaa11
Added Argocd ui image
LondheShubham153 Jul 26, 2025
712e1bb
Added branching strategies
LondheShubham153 Jul 26, 2025
85771f7
Delete scripts directory
LondheShubham153 Jul 26, 2025
e21bb09
added minor change to ui
LondheShubham153 Jul 26, 2025
e5004c9
🚀 Update ui Helm chart to e21bb09 - ECR: retail-store-ui - Commit: e2…
Jul 26, 2025
afc1aa3
added minor changes to src for build and push
LondheShubham153 Jul 26, 2025
ebbcd66
🚀 Update cart Helm chart to afc1aa3 - ECR: retail-store-cart - Commit…
Jul 26, 2025
83d64ee
🚀 Update checkout Helm chart to afc1aa3 - ECR: retail-store-checkout …
Jul 26, 2025
fc47b84
🚀 Update catalog Helm chart to afc1aa3 - ECR: retail-store-catalog - …
Jul 26, 2025
310568e
🚀 Update orders Helm chart to afc1aa3 - ECR: retail-store-orders - Co…
Jul 26, 2025
db791a4
added minor changes to src microservices (testing)
LondheShubham153 Jul 27, 2025
0e0b785
🚀 Update cart Helm chart to db791a4 - ECR: retail-store-cart - Commit…
Jul 27, 2025
389e366
🚀 Update ui Helm chart to db791a4 - ECR: retail-store-ui - Commit: db…
Jul 27, 2025
0e02e9e
🚀 Update checkout Helm chart to db791a4 - ECR: retail-store-checkout …
Jul 27, 2025
595db51
🚀 Update catalog Helm chart to db791a4 - ECR: retail-store-catalog - …
Jul 27, 2025
2d18936
🚀 Update orders Helm chart to db791a4 - ECR: retail-store-orders - Co…
Jul 27, 2025
6812858
Update home.html
LondheShubham153 Jul 27, 2025
591ddea
🚀 Update ui Helm chart to 6812858 - ECR: retail-store-ui - Commit: 68…
Jul 27, 2025
e960bbd
Chores: Enhnaced README.md
iemafzalhassan Aug 1, 2025
825421c
Update README.md
iemafzalhassan Aug 1, 2025
eaeb6dc
Update README.md
bashairfan0911 Oct 1, 2025
740f11e
Update README.md
bashairfan0911 Oct 1, 2025
774ac0d
Update README.md
bashairfan0911 Oct 1, 2025
d3bdf65
Update retail-store-cart.yaml
bashairfan0911 Oct 2, 2025
7f0b56c
Update retail-store-catalog.yaml
bashairfan0911 Oct 2, 2025
9990f77
Update retail-store-checkout.yaml
bashairfan0911 Oct 2, 2025
da35fa5
Update retail-store-orders.yaml
bashairfan0911 Oct 2, 2025
ff2d1e5
Update retail-store-ui.yaml
bashairfan0911 Oct 2, 2025
ab7bbd1
Update retail-store-project.yaml
bashairfan0911 Oct 2, 2025
ae05428
Update README files
bashairfan0911 Oct 2, 2025
0c6ecbf
Update README files to trigger CI/CD
bashairfan0911 Oct 2, 2025
d2f383a
Update README.md
bashairfan0911 Oct 2, 2025
9bdf908
🚀 Update ui Helm chart to d2f383a - ECR: retail-store-ui - Commit: d2…
Oct 2, 2025
7f8b612
Resolve merge conflicts
bashairfan0911 Oct 2, 2025
4ac6edc
Update README.md
bashairfan0911 Oct 2, 2025
2929d73
🚀 Update cart Helm chart to 4ac6edc - ECR: retail-store-cart - Commit…
Oct 2, 2025
ab647e0
Update README.md
bashairfan0911 Oct 2, 2025
64cab68
Update README.md
bashairfan0911 Oct 2, 2025
9915d27
Update README.md
bashairfan0911 Oct 2, 2025
c614046
🚀 Update catalog Helm chart to ab647e0 - ECR: retail-store-catalog - …
Oct 2, 2025
a71cce2
🚀 Update checkout Helm chart to 64cab68 - ECR: retail-store-checkout …
Oct 2, 2025
87d5835
🚀 Update orders Helm chart to 9915d27 - ECR: retail-store-orders - Co…
Oct 2, 2025
d260107
Fix ECR repository URLs and image tags for all services
bashairfan0911 Oct 2, 2025
23bb562
Merge branch 'gitops' of https://github.com/bashairfan0911/retail-sto…
bashairfan0911 Oct 2, 2025
61cb2ff
Update addons.tf
bashairfan0911 Oct 2, 2025
47f5345
Update values.yaml
bashairfan0911 Oct 2, 2025
d473ca4
🚀 Update cart Helm chart to 47f5345 - ECR: retail-store-cart - Commit…
Oct 2, 2025
1739e6b
updated
bashairfan0911 Oct 2, 2025
83ddeb0
🚀 Update checkout Helm chart to 1739e6b - ECR: retail-store-checkout …
Oct 2, 2025
71b0ad4
🚀 Update catalog Helm chart to 1739e6b - ECR: retail-store-catalog - …
Oct 2, 2025
4958fcf
🚀 Update cart Helm chart to 1739e6b - ECR: retail-store-cart - Commit…
Oct 2, 2025
c2e6376
🚀 Update ui Helm chart to 1739e6b - ECR: retail-store-ui - Commit: 17…
Oct 2, 2025
92f04f2
🚀 Update orders Helm chart to 1739e6b - ECR: retail-store-orders - Co…
Oct 2, 2025
c28916c
Fix UI chart: Add missing certManager and ingress configuration
bashairfan0911 Oct 2, 2025
ae3337d
Add istio configuration to UI chart
bashairfan0911 Oct 2, 2025
bc463a1
🚀 Update ui Helm chart to c28916c - ECR: retail-store-ui - Commit: c2…
Oct 2, 2025
d1ccf68
Add complete app configuration to UI chart
bashairfan0911 Oct 2, 2025
a435ca2
Update terraform addons config
bashairfan0911 Oct 2, 2025
161f5b0
Fix cart values.yaml syntax error
bashairfan0911 Oct 2, 2025
38efcb1
Fix cart service endpoint name
bashairfan0911 Oct 2, 2025
c138a5a
🚀 Update cart Helm chart to 161f5b0 - ECR: retail-store-cart - Commit…
Oct 2, 2025
035cd5f
🚀 Update ui Helm chart to 38efcb1 - ECR: retail-store-ui - Commit: 38…
Oct 2, 2025
c9c0763
Add monitoring stack with Grafana and Prometheus, complete access doc…
bashairfan0911 Oct 2, 2025
4bd1533
Add ArgoCD sync automation and comprehensive sync guide
bashairfan0911 Oct 2, 2025
a271efe
Update all service README files with deployment status
bashairfan0911 Oct 2, 2025
c53172f
Update all service README files with deployment status
bashairfan0911 Oct 2, 2025
f8a6af0
updates
bashairfan0911 Oct 3, 2025
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
267 changes: 267 additions & 0 deletions ARGOCD-SYNC-GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
# 🔄 ArgoCD Sync Guide

## Why Changes Don't Reflect Immediately

ArgoCD checks your Git repository for changes every **3 minutes** by default. This is normal behavior!

---

## ⚡ Quick Sync (Force Immediate Update)

### Option 1: Use the Script (Recommended)
```powershell
.\sync-argocd.ps1
```

This will:
1. List all applications
2. Force refresh each application
3. Show current sync status

---

### Option 2: Manual Refresh via kubectl

**Refresh all applications:**
```bash
kubectl patch application retail-store-ui -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
kubectl patch application retail-store-catalog -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
kubectl patch application retail-store-cart -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
kubectl patch application retail-store-checkout -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
kubectl patch application retail-store-orders -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
```

**Or refresh a specific application:**
```bash
kubectl patch application retail-store-ui -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
```

---

### Option 3: Use ArgoCD UI

**Step 1:** Start port forwarding
```bash
kubectl port-forward svc/argocd-server -n argocd 8080:80
```

**Step 2:** Open browser to http://localhost:8080

**Step 3:** Login with:
- Username: `admin`
- Password: Get it with:
```bash
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d
```

**Step 4:** Click on an application and click "REFRESH" or "SYNC"

---

## 🔍 Check Sync Status

### View all applications
```bash
kubectl get applications -n argocd
```

### View detailed status
```bash
kubectl get application retail-store-ui -n argocd -o yaml
```

### Check last sync time
```bash
kubectl get applications -n argocd -o custom-columns=NAME:.metadata.name,SYNC:.status.sync.status,HEALTH:.status.health.status,LAST-SYNC:.status.operationState.finishedAt
```

---

## ⏱️ Understanding ArgoCD Sync Behavior

### Automatic Sync (Enabled)
Your applications have `automated: true` which means:
- ✅ ArgoCD checks Git every **3 minutes**
- ✅ Automatically syncs when changes are detected
- ✅ `selfHeal: true` - fixes drift if someone manually changes resources
- ✅ `prune: true` - removes resources deleted from Git

### Sync Frequency
Default: **3 minutes**

To change this, you would need to modify ArgoCD's ConfigMap:
```bash
kubectl edit configmap argocd-cm -n argocd
```

Add:
```yaml
data:
timeout.reconciliation: 60s # Check every 60 seconds
```

---

## 📋 Complete Workflow

### 1. Make Changes to Code
```bash
# Edit files
vim src/ui/chart/values.yaml
```

### 2. Commit and Push
```bash
git add .
git commit -m "Update UI configuration"
git push origin gitops
```

### 3. Force Sync (Optional - for immediate update)
```powershell
.\sync-argocd.ps1
```

### 4. Verify Changes
```bash
# Check application status
kubectl get applications -n argocd

# Check pods
kubectl get pods -n retail-store

# Check if new version is deployed
kubectl describe pod -n retail-store <pod-name> | grep Image
```

---

## 🐛 Troubleshooting

### Application shows "OutOfSync"
This is normal! It means ArgoCD detected changes but hasn't synced yet.

**Solution:** Wait 3 minutes or force sync:
```powershell
.\sync-argocd.ps1
```

### Application shows "Unknown" or "Progressing"
The application is being deployed.

**Check status:**
```bash
kubectl get pods -n retail-store
kubectl logs -n retail-store <pod-name>
```

### Application shows "Degraded" or "Failed"
There's an issue with the deployment.

**Check details:**
```bash
kubectl get application retail-store-ui -n argocd -o yaml
kubectl describe pod -n retail-store <pod-name>
kubectl logs -n retail-store <pod-name>
```

### Changes not appearing after 5+ minutes
**Check if commit was pushed:**
```bash
git log --oneline -5
git status
```

**Check ArgoCD is watching correct branch:**
```bash
kubectl get application retail-store-ui -n argocd -o yaml | grep -A 5 "source:"
```

Should show:
```yaml
source:
repoURL: https://github.com/bashairfan0911/retail-store-sample-app
targetRevision: gitops
path: src/ui/chart
```

---

## 🎯 Best Practices

### 1. Always Push to Git First
```bash
git push origin gitops
```

### 2. Wait or Force Sync
Either:
- Wait 3 minutes for auto-sync
- Or run: `.\sync-argocd.ps1`

### 3. Verify Deployment
```bash
kubectl get pods -n retail-store
kubectl get applications -n argocd
```

### 4. Check Logs if Issues
```bash
kubectl logs -n retail-store -l app.kubernetes.io/name=ui --tail=50
```

---

## 📊 Monitoring ArgoCD

### Watch for changes in real-time
```bash
watch -n 5 kubectl get applications -n argocd
```

### View ArgoCD logs
```bash
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-server --tail=100 -f
```

### View repo-server logs (Git sync)
```bash
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-repo-server --tail=100 -f
```

---

## 🚀 Quick Reference

| Action | Command |
|--------|---------|
| **Force sync all** | `.\sync-argocd.ps1` |
| **Check status** | `kubectl get applications -n argocd` |
| **View details** | `kubectl get application <name> -n argocd -o yaml` |
| **Access UI** | `kubectl port-forward svc/argocd-server -n argocd 8080:80` |
| **Get password** | `kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' \| base64 -d` |

---

## 💡 Pro Tips

1. **Use the sync script after every push:**
```bash
git push origin gitops && .\sync-argocd.ps1
```

2. **Create an alias:**
```bash
# Add to your PowerShell profile
function Sync-ArgoCD { .\sync-argocd.ps1 }
Set-Alias -Name argocd-sync -Value Sync-ArgoCD
```

3. **Monitor in ArgoCD UI:**
- Keep ArgoCD UI open in browser
- Watch real-time sync status
- See detailed deployment logs

---

**Remember:** ArgoCD auto-sync is working! It just takes up to 3 minutes. Use the sync script for immediate updates! 🚀
Loading