Skip to content

Irfan gitops#12

Open
bashairfan0911 wants to merge 67 commits intoLondheShubham153:mainfrom
bashairfan0911:irfan-gitops
Open

Irfan gitops#12
bashairfan0911 wants to merge 67 commits intoLondheShubham153:mainfrom
bashairfan0911:irfan-gitops

Conversation

@bashairfan0911
Copy link

@bashairfan0911 bashairfan0911 commented Oct 3, 2025

Summary by CodeRabbit

  • New Features

    • Monitoring stack enabled by default with dashboards accessible via ingress and port-forward; added service monitoring for all microservices.
    • Helper scripts to push changes, trigger ArgoCD syncs, and quickly open Grafana/Prometheus.
    • Updated homepage text in the UI.
  • Documentation

    • New and expanded guides: Quick Start, How to Access, ArgoCD Sync, Branching Strategy, Commands reference, History, and enhanced README with architecture, deployment, and GitOps workflow.
  • Chores

    • Updated repository references and container image sources/tags across services.
    • Improved addon install reliability with waits/timeouts; minor resource and autoscaling defaults adjusted.

LondheShubham153 and others added 30 commits July 26, 2025 20:02
bashairfan0911 and others added 25 commits October 2, 2025 16:04
@coderabbitai
Copy link

coderabbitai bot commented Oct 3, 2025

Walkthrough

Adds extensive documentation (guides, quick start, access/monitoring, history), utility PowerShell scripts, ArgoCD source repo URL updates, Helm values updates for images and resources, UI text tweaks, Kubernetes monitoring resources (Ingress, ServiceMonitors), and Terraform changes enabling monitoring and adding waits/timeouts.

Changes

Cohort / File(s) Summary
Documentation (new/expanded guides)
ARGOCD-SYNC-GUIDE.md, BRANCHING_STRATEGY.md, COMMANDS-TO-RUN.md, GIT-COMMANDS.md, HISTORY.md, HOW-TO-ACCESS.md, QUICK-START.md, access-monitoring.md, terraform/README.md, README.md
Adds/overhauls GitOps, branching, commands, access/monitoring, history, quick start, and Terraform docs; major README rewrite with architecture, flow, and operations.
ArgoCD repo source updates
argocd/applications/retail-store-*.yaml
spec.source.repoURL switched to https://github.com/bashairfan0911/retail-store-sample-app for cart, catalog, checkout, orders, ui apps.
ArgoCD project source policy
argocd/projects/retail-store-project.yaml
Updated spec.sourceRepos[0] to new GitHub repo URL.
Monitoring K8s resources
monitoring-ingress.yaml, retail-store-servicemonitors.yaml
Adds Ingress paths for Grafana/Prometheus; adds ServiceMonitors for ui, catalog, carts, checkout, orders.
Terraform monitoring enablement
terraform/addons.tf, terraform/variables.tf
Enables kube-prometheus-stack; adds wait=true/timeout=600 for cert-manager/ingress/monitoring; sets enable_monitoring default to true.
Utility scripts (PowerShell)
push-to-github.ps1, start-monitoring.ps1, sync-argocd.ps1
New scripts to push commits, start Grafana/Prometheus port-forwards, and force ArgoCD app refresh.
Helm chart values updates (images/configs)
src/cart/chart/values.yaml, src/catalog/chart/values.yaml, src/checkout/chart/values.yaml, src/orders/chart/values.yaml, src/ui/chart/values.yaml
Switch service images to new ECR repo/tags; infra images to public ECR (MySQL, Redis, Postgres, RabbitMQ); UI chart significantly expanded; resource/autoscaling/security tweaks.
Service READMEs updates
src/ui/README.md, src/catalog/README.md, src/cart/README.md, src/checkout/README.md, src/orders/README.md
Adds status/version metadata; expands configs/endpoints; no runtime code changes.
UI template text
src/ui/src/main/resources/templates/home.html
Updates hero title/subtitle text.
Script removal
scripts/update-helm-values.sh
Deletes Helm values update script.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant GH as GitHub Repo
  participant CI as (optional) CI/CD
  participant Argo as ArgoCD
  participant K8s as Kubernetes (EKS)
  participant Mon as Monitoring (Prometheus/Grafana)

  Dev->>GH: git add/commit/push (push-to-github.ps1)
  note over GH,Argo: Repo URLs updated in ArgoCD Applications/Project
  GH-->>Argo: Repo change detected (poll/notify)
  Dev->>Argo: (optional) Force refresh (sync-argocd.ps1)
  Argo->>K8s: Apply Helm charts (updated image repos/tags)
  K8s-->>Argo: Sync & health status
  K8s-->>Mon: ServiceMonitors scrape /actuator/prometheus
  Dev->>Mon: Access via Ingress/port-forward (start-monitoring.ps1)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • iemafzalhassan

Poem

Hop-hop, I push and sync on cue,
New charts, new URLs—Argo knew.
Prom scrapes, Grafana sings,
Ingress opens shiny wings.
Terraform hums, “Monitoring on!”
Docs abound from dusk to dawn.
Carrot-merge—review, be gone! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “Irfan gitops” is vague and does not clearly summarize the primary changes in the pull request, which include adding extensive GitOps documentation, updating ArgoCD application repository URLs, and modifying various Helm chart values and scripts. It fails to convey the scope or main intent of the changeset. Update the title to a concise, descriptive sentence that reflects the key changes, for example: “Add GitOps documentation and update ArgoCD application repository URLs.”
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit's high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bashairfan0911
Copy link
Author

add Monitoring

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
monitoring-ingress.yaml (1)

1-40: Add subpath routing settings for Grafana and Prometheus: Configure GF_SERVER_ROOT_URL and GF_SERVER_SERVE_FROM_SUB_PATH in the Grafana deployment and add --web.external-url/--web.route-prefix flags to Prometheus so assets and UI load correctly under /grafana and /prometheus.

src/orders/README.md (1)

21-27: Fix incorrect environment variable name

Line 22 lists RETAIL_CHECKOUT_PERSISTENCE_PROVIDER, but this README documents the Orders service. Copying that name verbatim will cause operators to export the wrong variable—orders actually reads RETAIL_ORDERS_PERSISTENCE_PROVIDER. Please correct the key (and default description if needed) to prevent misconfiguration.

-| `RETAIL_CHECKOUT_PERSISTENCE_PROVIDER`        | The persistence provider to use, can be `in-memory` or `postgres`.                      | `in-memory`   |
+| `RETAIL_ORDERS_PERSISTENCE_PROVIDER`          | The persistence provider to use, can be `in-memory` or `postgres`.                     | `in-memory`   |
🧹 Nitpick comments (11)
GIT-COMMANDS.md (1)

162-164: Format the repository link per markdownlint.

markdownlint (MD034) flags the bare URL here—wrap it in Markdown link syntax to satisfy the rule.

-- **Repository:** https://github.com/bashairfan0911/retail-store-sample-app
+- **Repository:** [https://github.com/bashairfan0911/retail-store-sample-app](https://github.com/bashairfan0911/retail-store-sample-app)
sync-argocd.ps1 (3)

5-7: Add error handling for kubectl failures.

The script doesn't check if kubectl is available or handle cases where the command fails (e.g., cluster unreachable, no applications found).

Consider adding error handling:

+# Check kubectl availability
+if (-not (Get-Command kubectl -ErrorAction SilentlyContinue)) {
+    Write-Host "Error: kubectl not found in PATH" -ForegroundColor Red
+    exit 1
+}
+
+# Verify cluster connectivity
+try {
+    kubectl cluster-info | Out-Null
+} catch {
+    Write-Host "Error: Cannot connect to Kubernetes cluster" -ForegroundColor Red
+    exit 1
+}
+
 # Get all applications
-$apps = kubectl get applications -n argocd -o jsonpath='{.items[*].metadata.name}'
+try {
+    $apps = kubectl get applications -n argocd -o jsonpath='{.items[*].metadata.name}' 2>&1
+    if ($LASTEXITCODE -ne 0) {
+        Write-Host "Error: Failed to get ArgoCD applications" -ForegroundColor Red
+        exit 1
+    }
+} catch {
+    Write-Host "Error: Failed to get ArgoCD applications: $_" -ForegroundColor Red
+    exit 1
+}
+
 $appList = $apps -split ' '
+
+if ($appList.Count -eq 0 -or [string]::IsNullOrWhiteSpace($appList[0])) {
+    Write-Host "No ArgoCD applications found in namespace argocd" -ForegroundColor Yellow
+    exit 0
+}

17-20: Add error feedback for patch operations.

The patch operation may fail silently for individual applications. Consider capturing and reporting failures.

 foreach ($app in $appList) {
     Write-Host "Refreshing $app..." -ForegroundColor Cyan
-    kubectl patch application $app -n argocd --type merge -p '{\"metadata\":{\"annotations\":{\"argocd.argoproj.io/refresh\":\"hard\"}}}'
+    $patchResult = kubectl patch application $app -n argocd --type merge -p '{\"metadata\":{\"annotations\":{\"argocd.argoproj.io/refresh\":\"hard\"}}}' 2>&1
+    if ($LASTEXITCODE -eq 0) {
+        Write-Host "  ✓ Successfully refreshed $app" -ForegroundColor Green
+    } else {
+        Write-Host "  ✗ Failed to refresh $app" -ForegroundColor Red
+    }
 }

22-24: Consider dynamic wait time based on application count.

The fixed 10-second sleep may be insufficient for large numbers of applications or too long for just a few applications.

 Write-Host ""
 Write-Host "Waiting for sync to complete..." -ForegroundColor Yellow
-Start-Sleep -Seconds 10
+$waitTime = [Math]::Min(30, [Math]::Max(5, $appList.Count * 2))
+Write-Host "Waiting $waitTime seconds for sync to propagate..." -ForegroundColor Gray
+Start-Sleep -Seconds $waitTime
start-monitoring.ps1 (1)

5-11: Add error handling and service validation.

The script doesn't verify that kubectl is available or that the monitoring services exist before attempting port-forwarding.

+# Verify kubectl is available
+if (-not (Get-Command kubectl -ErrorAction SilentlyContinue)) {
+    Write-Host "Error: kubectl not found in PATH" -ForegroundColor Red
+    exit 1
+}
+
+# Verify monitoring namespace and services exist
+Write-Host "Checking monitoring services..." -ForegroundColor Yellow
+$grafanaCheck = kubectl get svc -n monitoring kube-prometheus-stack-grafana 2>&1
+$prometheusCheck = kubectl get svc -n monitoring kube-prometheus-stack-prometheus 2>&1
+
+if ($LASTEXITCODE -ne 0) {
+    Write-Host "Error: Monitoring services not found. Is the monitoring stack installed?" -ForegroundColor Red
+    exit 1
+}
+
 # Start Grafana in new window
 Start-Process powershell -ArgumentList "-NoExit", "-Command", "Write-Host 'Grafana Port Forward - Keep this window open' -ForegroundColor Cyan; kubectl port-forward -n monitoring svc/kube-prometheus-stack-grafana 3000:80"
retail-store-servicemonitors.yaml (1)

1-94: Consider templating to reduce duplication.

The five ServiceMonitor definitions are nearly identical, differing only in metadata.name and spec.selector.matchLabels. This repetition can be reduced by using a Helm chart or Kustomize overlay to generate these resources from a template.

Example Helm template approach:

{{- range $service := list "ui" "catalog" "cart" "checkout" "orders" }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: retail-store-{{ $service }}
  namespace: monitoring
  labels:
    release: kube-prometheus-stack
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: {{ if eq $service "cart" }}carts{{ else }}{{ $service }}{{ end }}
  namespaceSelector:
    matchNames:
    - retail-store
  endpoints:
  - port: http
    path: /actuator/prometheus
    interval: 30s
{{- end }}
push-to-github.ps1 (3)

11-11: Add error handling for git commands.

The script runs git add . without checking for failures. If the command fails (e.g., due to repository corruption or filesystem issues), the script continues to commit and push, potentially with an empty changeset or in an inconsistent state.

Apply this diff to add error handling:

 # Add all changes
 Write-Host "Adding files..." -ForegroundColor Yellow
 git add .
+if ($LASTEXITCODE -ne 0) {
+    Write-Host "Error: git add failed" -ForegroundColor Red
+    exit 1
+}

Repeat similar checks after git commit (line 26) and git push (line 31).


21-23: Default commit message is too specific.

The default commit message "Add monitoring stack and access documentation" is tailored to a specific change and may not be appropriate for general use of this script.

Consider a more generic default message:

 if ([string]::IsNullOrWhiteSpace($commitMessage)) {
-    $commitMessage = "Add monitoring stack and access documentation"
+    $commitMessage = "Update repository"
 }

39-39: Hardcoded repository URL may break if the repo is forked or renamed.

The GitHub URL is hardcoded to bashairfan0911/retail-store-sample-app, which will not reflect the actual repository if the script is used in a fork or after a repository rename.

Dynamically detect the repository URL from the git remote:

+# Get remote URL
+$remoteUrl = git remote get-url origin
+$remoteUrl = $remoteUrl -replace '\.git$', '' -replace '^git@github\.com:', 'https://github.com/' -replace '^https://github\.com/', 'https://github.com/'
+
 Write-Host "View your changes at:" -ForegroundColor Cyan
-Write-Host "https://github.com/bashairfan0911/retail-store-sample-app/tree/$branch" -ForegroundColor White
+Write-Host "$remoteUrl/tree/$branch" -ForegroundColor White
src/ui/chart/values.yaml (1)

39-39: Unusual CPU request value.

The CPU request is set to 256m (256 millicores), which is an unusual value. Standard Kubernetes CPU requests typically use round numbers like 100m, 250m, 500m, or 1000m for clarity.

Consider adjusting to a standard value:

-    cpu: 256m
+    cpu: 250m
src/checkout/README.md (1)

26-28: Drop placeholder comments

The <!-- Test commit --> markers read like temporary scaffolding; leaving them in the README adds noise without value. Please remove them before merging.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fba5c7c and f8a6af0.

⛔ Files ignored due to path filters (3)
  • docs/images/EKS.gif is excluded by !**/*.gif
  • docs/images/architecture.png is excluded by !**/*.png
  • docs/images/argocd-ui.png is excluded by !**/*.png
📒 Files selected for processing (35)
  • ARGOCD-SYNC-GUIDE.md (1 hunks)
  • BRANCHING_STRATEGY.md (1 hunks)
  • COMMANDS-TO-RUN.md (1 hunks)
  • GIT-COMMANDS.md (1 hunks)
  • HISTORY.md (1 hunks)
  • HOW-TO-ACCESS.md (1 hunks)
  • QUICK-START.md (1 hunks)
  • README.md (1 hunks)
  • access-monitoring.md (1 hunks)
  • argocd/applications/retail-store-cart.yaml (1 hunks)
  • argocd/applications/retail-store-catalog.yaml (1 hunks)
  • argocd/applications/retail-store-checkout.yaml (1 hunks)
  • argocd/applications/retail-store-orders.yaml (1 hunks)
  • argocd/applications/retail-store-ui.yaml (1 hunks)
  • argocd/projects/retail-store-project.yaml (1 hunks)
  • monitoring-ingress.yaml (1 hunks)
  • push-to-github.ps1 (1 hunks)
  • retail-store-servicemonitors.yaml (1 hunks)
  • scripts/update-helm-values.sh (0 hunks)
  • src/cart/README.md (2 hunks)
  • src/cart/chart/values.yaml (1 hunks)
  • src/catalog/README.md (2 hunks)
  • src/catalog/chart/values.yaml (2 hunks)
  • src/checkout/README.md (2 hunks)
  • src/checkout/chart/values.yaml (2 hunks)
  • src/orders/README.md (1 hunks)
  • src/orders/chart/values.yaml (3 hunks)
  • src/ui/README.md (1 hunks)
  • src/ui/chart/values.yaml (3 hunks)
  • src/ui/src/main/resources/templates/home.html (1 hunks)
  • start-monitoring.ps1 (1 hunks)
  • sync-argocd.ps1 (1 hunks)
  • terraform/README.md (1 hunks)
  • terraform/addons.tf (3 hunks)
  • terraform/variables.tf (1 hunks)
💤 Files with no reviewable changes (1)
  • scripts/update-helm-values.sh
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
QUICK-START.md

16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


83-83: Bare URL used

(MD034, no-bare-urls)


84-84: Bare URL used

(MD034, no-bare-urls)


85-85: Bare URL used

(MD034, no-bare-urls)


86-86: Bare URL used

(MD034, no-bare-urls)


172-172: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

HISTORY.md

162-162: Bare URL used

(MD034, no-bare-urls)

HOW-TO-ACCESS.md

14-14: Bare URL used

(MD034, no-bare-urls)


44-44: Bare URL used

(MD034, no-bare-urls)


61-61: Bare URL used

(MD034, no-bare-urls)


84-84: Bare URL used

(MD034, no-bare-urls)


135-135: Bare URL used

(MD034, no-bare-urls)


136-136: Bare URL used

(MD034, no-bare-urls)


137-137: Bare URL used

(MD034, no-bare-urls)


138-138: Bare URL used

(MD034, no-bare-urls)


175-175: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

access-monitoring.md

12-12: Bare URL used

(MD034, no-bare-urls)


31-31: Bare URL used

(MD034, no-bare-urls)

BRANCHING_STRATEGY.md

7-7: Link fragments should be valid

(MD051, link-fragments)


8-8: Link fragments should be valid

(MD051, link-fragments)


9-9: Link fragments should be valid

(MD051, link-fragments)


10-10: Link fragments should be valid

(MD051, link-fragments)


11-11: Link fragments should be valid

(MD051, link-fragments)


12-12: Link fragments should be valid

(MD051, link-fragments)


13-13: Link fragments should be valid

(MD051, link-fragments)


14-14: Link fragments should be valid

(MD051, link-fragments)

GIT-COMMANDS.md

162-162: Bare URL used

(MD034, no-bare-urls)

ARGOCD-SYNC-GUIDE.md

48-48: Bare URL used

(MD034, no-bare-urls)

README.md

15-15: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


21-21: Link fragments should be valid

(MD051, link-fragments)


22-22: Link fragments should be valid

(MD051, link-fragments)


23-23: Link fragments should be valid

(MD051, link-fragments)


25-25: Link fragments should be valid

(MD051, link-fragments)


26-26: Link fragments should be valid

(MD051, link-fragments)


27-27: Link fragments should be valid

(MD051, link-fragments)


28-28: Link fragments should be valid

(MD051, link-fragments)


29-29: Link fragments should be valid

(MD051, link-fragments)


31-31: Link fragments should be valid

(MD051, link-fragments)


32-32: Link fragments should be valid

(MD051, link-fragments)


94-94: Link fragments should be valid

(MD051, link-fragments)


211-211: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


239-239: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


295-295: Spaces inside link text

(MD039, no-space-in-links)


295-295: Spaces inside link text

(MD039, no-space-in-links)


295-295: Link text should be descriptive

(MD059, descriptive-link-text)


296-296: Spaces inside link text

(MD039, no-space-in-links)


296-296: Spaces inside link text

(MD039, no-space-in-links)


296-296: Link text should be descriptive

(MD059, descriptive-link-text)


297-297: Link text should be descriptive

(MD059, descriptive-link-text)


298-298: Link text should be descriptive

(MD059, descriptive-link-text)


299-299: Link text should be descriptive

(MD059, descriptive-link-text)

COMMANDS-TO-RUN.md

25-25: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


52-52: Bare URL used

(MD034, no-bare-urls)


53-53: Bare URL used

(MD034, no-bare-urls)


64-64: Bare URL used

(MD034, no-bare-urls)


134-134: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🔇 Additional comments (18)
HISTORY.md (2)

1-579: Excellent comprehensive documentation!

This history file provides valuable operational context including:

  • Complete deployment timeline with troubleshooting steps
  • Reusable utility scripts for common operations
  • Architecture diagrams
  • Monitoring queries and access patterns
  • Lessons learned section

The documentation will significantly help team members understand the deployment process and operational procedures.

Note: The file contains specific cluster identifiers, URLs, and credentials (e.g., Grafana admin/prom-operator at lines 199, 377, 400) which is acceptable for internal documentation but should not be committed to public repositories if this contains sensitive infrastructure details.


162-162: Fix bare URL markdown lint issue.

The URL on Line 162 should be enclosed in angle brackets or converted to a proper markdown link to comply with markdown standards.

Apply this diff:

-│  │  │  • Node Exporter                        │    │     │
+│  │  │  • Node Exporter                        │    │     │

Actually, reviewing the context more carefully, Line 162 appears to be part of an ASCII diagram and doesn't contain a bare URL. The static analysis hint may be a false positive. Let me verify the actual line content.

Looking at Line 162 in the ASCII architecture diagram, it shows │ │ │ Monitoring Namespace │ │ │ which is not a URL. The markdownlint tool may have incorrectly flagged this line.

src/catalog/chart/values.yaml (2)

73-75: Good practice: Using official MySQL image.

Switching from a custom MySQL image to the official public MySQL image (public.ecr.aws/docker/library/mysql:8.0) is a good practice. This:

  • Reduces maintenance burden
  • Provides better security updates
  • Uses a stable, version-tagged release instead of commit hash

7-9: Ensure the new ECR image exists and pull permissions are configured

  • The image repository changed to 485126686729.dkr.ecr.us-west-2.amazonaws.com/retail-store-catalog and tag to 1739e6b.
  • Manually verify the ECR repo contains this tag and that your EKS service account/IAM role can pull it.
start-monitoring.ps1 (2)

26-28: Security note: Credentials displayed in script output.

The script displays the Grafana admin password (prom-operator) in plain text. While this is the default password for kube-prometheus-stack, ensure:

  • These credentials have been changed in production
  • This script is not run in environments where screen content might be recorded or shared

1-35: Useful automation script for monitoring access.

This script provides a convenient way to start monitoring stack access with automatic browser launching. Consider also creating equivalent scripts for stopping port-forwards or checking if port-forwards are already running.

src/catalog/README.md (1)

3-7: Good addition: Deployment metadata header.

The added metadata (Last Updated, ArgoCD auto-sync status, deployment status, version) provides valuable context for operators and aligns with GitOps practices.

src/cart/README.md (1)

3-7: Consistent documentation improvements.

The metadata header additions are consistent with the catalog service README, providing good operational visibility.

monitoring-ingress.yaml (1)

1-40: Consider security implications of exposing monitoring tools.

This configuration exposes Grafana and Prometheus via public Ingress without additional authentication layers (beyond the services' built-in auth). Consider:

  1. Adding authentication via an ingress authentication provider (oauth2-proxy, etc.)
  2. Using TLS/HTTPS with cert-manager certificates
  3. Restricting access via IP allowlisting if possible
  4. Implementing NetworkPolicies to limit namespace access

Note: The HISTORY.md file mentions this file was created but "not used" (line 465). If this Ingress is not intended to be active, consider removing it from the PR or clearly documenting its purpose.

terraform/addons.tf (2)

22-23: Good practice: Adding wait and timeout to helm releases.

Adding wait = true and timeout = 600 ensures that Terraform waits for each addon to be fully deployed before proceeding. This prevents race conditions and dependency issues during infrastructure provisioning.

The 600-second (10-minute) timeout is reasonable for initial helm chart deployments, especially for complex addons like cert-manager and monitoring stacks.

Also applies to: 33-34, 102-103


98-104: Monitoring stack default verified
enable_monitoring is defined in terraform/variables.tf with default = true and used only in addons.tf; confirm this matches your intended environments and document any cost implications of running the monitoring stack.

src/ui/chart/values.yaml (2)

1-1: Inconsistent summary.

The AI-generated summary claims this file contains "Default values for orders" but the file path is src/ui/chart/values.yaml. The comment on line 1 should match the component.


7-9: Verify new ECR image exists and is tested
The repository changed to 485126686729.dkr.ecr.us-west-2.amazonaws.com/retail-store-ui and tag to 38efcb1; confirm the image is pushed to ECR in us-west-2 and passes CI/QA tests.

retail-store-servicemonitors.yaml (1)

1-94: LGTM – confirm Service ports and endpoints at runtime
Ensure each Service in the retail-store namespace defines a port named http and that /actuator/prometheus is reachable on that port.

argocd/applications/retail-store-orders.yaml (1)

11-11: Repository and path verified: bashairfan0911/retail-store-sample-app (branch gitops, path src/orders/chart) exists and is accessible.

argocd/applications/retail-store-ui.yaml (1)

11-11: Verified new ArgoCD repo configuration
Repository bashairfan0911/retail-store-sample-app, branch gitops, and path src/ui/chart all exist and are accessible.

argocd/applications/retail-store-catalog.yaml (1)

11-11: Repository, branch and path verified
All checks passed for bashairfan0911/retail-store-sample-app@gitops at src/catalog/chart.

argocd/applications/retail-store-cart.yaml (1)

11-11: Verified repository, branch, and path accessibility
Repo bashairfan0911/retail-store-sample-app, branch gitops, and path src/cart/chart exist and are accessible.

## 🎯 Quick One-Liner (Push + Sync)

```bash
git add . && git commit -m "Update README files" && git push origin gitops && .\sync-argocd.ps1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Mixed bash and PowerShell syntax will fail on Unix-like systems.

The one-liner command mixes bash syntax with a PowerShell script invocation (.\sync-argocd.ps1), which will not work on Linux or macOS.

Provide separate commands for each platform:

-## 🎯 Quick One-Liner (Push + Sync)
+## 🎯 Quick One-Liner (Push + Sync)
+
+**PowerShell (Windows):**
+```powershell
+git add . ; git commit -m "Update README files" ; git push origin gitops ; .\sync-argocd.ps1
+```

-```bash
-git add . && git commit -m "Update README files" && git push origin gitops && .\sync-argocd.ps1
+**Bash (Linux/macOS):**
+```bash
+git add . && git commit -m "Update README files" && git push origin gitops && ./sync-argocd.sh

Note: This assumes a `sync-argocd.sh` script exists for Unix-like systems, or document that the user should run the equivalent kubectl commands manually.

<details>
<summary>🤖 Prompt for AI Agents</summary>

COMMANDS-TO-RUN.md around line 94: the one-liner mixes PowerShell and bash
syntax (uses .\sync-argocd.ps1 with bash-style &&) which will fail on Unix-like
systems; split into two platform-specific examples: provide a PowerShell version
that uses PowerShell-compatible separators (e.g., semicolons or PowerShell
chaining) and calls .\sync-argocd.ps1, and provide a Bash (Linux/macOS) version
that uses && and calls ./sync-argocd.sh (or, if no sync-argocd.sh exists, state
that users should run the equivalent kubectl/ArgoCD commands manually and add a
note to create a portable shell script).


</details>

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines +21 to +32
- [Quick Start](#-quick-start)
- [️ Architecture](#️-architecture)
- [Prerequisites](#-prerequisites)
- [Installation](#-installation)
- [Deployment](#-deployment)
- [Access Your Applications](#-access-your-applications)
- [GitOps Workflow](#-gitops-workflow)
- [Monitoring](#-monitoring)
- [Automation Scripts](#-automation-scripts)
- [Troubleshooting](#-troubleshooting)
- [Cleanup](#-cleanup)
- [Documentation](#-documentation)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix broken table-of-contents anchors.

Several ToC entries point to fragments like #-quick-start/#️-architecture, but the actual headings render as #quick-start, #architecture, etc., so the links 404 on GitHub. Please drop the stray leading characters in each affected fragment to restore navigation.

-- [Quick Start](#-quick-start)
-...
-- [Monitoring](#-monitoring)
+– [Quick Start](#quick-start)
+...
+– [Monitoring](#monitoring)

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

21-21: Link fragments should be valid

(MD051, link-fragments)


22-22: Link fragments should be valid

(MD051, link-fragments)


23-23: Link fragments should be valid

(MD051, link-fragments)


25-25: Link fragments should be valid

(MD051, link-fragments)


26-26: Link fragments should be valid

(MD051, link-fragments)


27-27: Link fragments should be valid

(MD051, link-fragments)


28-28: Link fragments should be valid

(MD051, link-fragments)


29-29: Link fragments should be valid

(MD051, link-fragments)


31-31: Link fragments should be valid

(MD051, link-fragments)


32-32: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
In README.md around lines 21 to 32, the table-of-contents links contain stray
leading characters (e.g. "#-quick-start", "#️-architecture") that don’t match
GitHub-generated heading anchors; update each ToC fragment to match the actual
heading slugs by removing the leading hyphens/emoji/special characters so links
become "#quick-start", "#architecture", etc., and verify every ToC entry exactly
matches the corresponding heading text lowercased and hyphenated per GitHub
anchor rules.

Comment on lines +284 to 287
# 3. Monitor deployment
# - Check GitHub Actions: https://github.com/bashairfan0911/actions
# - Check ArgoCD UI: https://localhost:9090
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Update the GitHub Actions URL.

https://github.com/bashairfan0911/actions resolves to a non-existent repo, so readers can’t monitor the workflow. Point this to the repo’s Actions tab (e.g., https://github.com/<owner>/<repo>/actions) so the instruction works.

-# - Check GitHub Actions: https://github.com/bashairfan0911/actions
+# - Check GitHub Actions: https://github.com/bashairfan0911/retail-store-sample-app/actions
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# 3. Monitor deployment
# - Check GitHub Actions: https://github.com/bashairfan0911/actions
# - Check ArgoCD UI: https://localhost:9090
```
# 3. Monitor deployment
# - Check GitHub Actions: https://github.com/bashairfan0911/retail-store-sample-app/actions
# - Check ArgoCD UI: https://localhost:9090
🤖 Prompt for AI Agents
In README.md around lines 284 to 287, the GitHub Actions URL currently points to
a non-existent repo; update the link to the repository's Actions tab by
replacing https://github.com/bashairfan0911/actions with the correct pattern
https://github.com/<owner>/<repo>/actions (substituting the actual owner and
repository name) so the "Check GitHub Actions" entry points to the project's
real Actions page.


The following environment variables are available for configuring the service:

<!-- Test commit -->
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove test commit comment.

Line 17 contains a <!-- Test commit --> comment that should be removed.

Apply this diff:

 ## Configuration
 The following environment variables are available for configuring the service:
-<!-- Test commit -->
 
 | Name                                            | Description                                                        | Default     |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<!-- Test commit -->
## Configuration
The following environment variables are available for configuring the service:
| Name | Description | Default |
🤖 Prompt for AI Agents
In src/cart/README.md around line 17, remove the stray HTML comment "<!-- Test
commit -->" so the file no longer contains the test commit comment; delete that
entire line and adjust surrounding blank lines if needed to keep formatting
consistent.

Comment on lines +28 to +32
<!-- Test commit -->
## Endpoints

<!-- Test commit -->
Several "utility" endpoints are provided with useful functionality for various scenarios:

<!-- Test commit -->
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove test commit comments.

Lines 28, 30, and 32 contain <!-- Test commit --> comments that appear to be development artifacts and should be removed before merging.

Apply this diff:

 | RETAIL_CATALOG_PERSISTENCE_PASSWORD        | Database password                                               | `""`           |
 | RETAIL_CATALOG_PERSISTENCE_CONNECT_TIMEOUT | Database connection timeout in seconds                          | `5`            |
-<!-- Test commit -->
 ## Endpoints
-<!-- Test commit -->
 Several "utility" endpoints are provided with useful functionality for various scenarios:
-<!-- Test commit -->
 
 | Method   | Name                     | Description                                                                        |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<!-- Test commit -->
## Endpoints
<!-- Test commit -->
Several "utility" endpoints are provided with useful functionality for various scenarios:
<!-- Test commit -->
| RETAIL_CATALOG_PERSISTENCE_PASSWORD | Database password | `""` |
| RETAIL_CATALOG_PERSISTENCE_CONNECT_TIMEOUT | Database connection timeout in seconds | `5` |
## Endpoints
Several "utility" endpoints are provided with useful functionality for various scenarios:
| Method | Name | Description |
🤖 Prompt for AI Agents
In src/catalog/README.md around lines 28 to 32, remove the three development
artifact HTML comments ("<!-- Test commit -->") on lines 28, 30, and 32 so the
README contains only the intended headings and text; update the file by deleting
those comment lines and verify spacing/newlines remain correct so the "##
Endpoints" heading and the subsequent paragraph render cleanly.

Comment on lines 53 to 57
variable "enable_monitoring" {
description = "Enable monitoring stack (Prometheus, Grafana)"
type = bool
default = false
default = true
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align docs with the new monitoring default.

Now that the default is true, the Terraform README still advertises enable_monitoring = false, which will confuse operators. Please update the docs to reflect the new default.

🤖 Prompt for AI Agents
In terraform/variables.tf around lines 53 to 57 the variable default for
enable_monitoring is now true, but the Terraform README still documents
enable_monitoring = false; update the README docs to state the new default of
true and any example HCL snippets to either omit the variable (to use the
default) or explicitly set enable_monitoring = true where examples previously
showed false so documentation and examples match the current code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants