Skip to content

Staging#125

Merged
Shashank0701-byte merged 4 commits intomainfrom
staging
Apr 10, 2026
Merged

Staging#125
Shashank0701-byte merged 4 commits intomainfrom
staging

Conversation

@Shashank0701-byte
Copy link
Copy Markdown
Owner

@Shashank0701-byte Shashank0701-byte commented Apr 10, 2026

Summary by CodeRabbit

  • New Features

    • Added automatic pod scaling (HPA) to scale the app between 3 and 10 replicas targeting ~70% CPU.
  • Documentation

    • Expanded Kubernetes docs with autoscaling details, testing guidance, and Metrics Server notes.
  • Chores

    • Improved CI validation to include autoscaler manifest checks and tightened manifest validation in PRs.

feat: Added the Horizontal Pod Autoscaler (HPA) to the System-Craft Kubernetes setup
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
system-craft Ready Ready Preview, Comment Apr 10, 2026 10:12pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e88a5e08-2b8a-407f-b241-0d2910665a4e

📥 Commits

Reviewing files that changed from the base of the PR and between 40718b0 and 0e6dbb8.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

Added a new Kubernetes HorizontalPodAutoscaler (kubernetes/hpa.yaml) targeting the system-craft Deployment with minReplicas 3, maxReplicas 10 and 70% CPU utilization. CI workflow (.github/workflows/ci.yml) now validates hpa.yaml with kubeval; documentation (KUBERNETES.md) updated to describe autoscaling and test guidance.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/ci.yml
Added a kubeval check for kubernetes/hpa.yaml (invoked with --ignore-missing-schemas) alongside existing manifest validations; minor newline fix. Pay attention to the differing kubeval flags.
Kubernetes Manifests
kubernetes/hpa.yaml, kubernetes/deployment.yaml, kubernetes/service.yaml
New HorizontalPodAutoscaler (autoscaling/v2) system-craft-hpa targeting Deployment/system-craft with minReplicas: 3, maxReplicas: 10, CPU averageUtilization: 70. Note relation to fixed replica count in deployment.
Documentation
KUBERNETES.md
Expanded docs to include HPA details (CPU target, min/max), Metrics Server dependency, local testing (kubectl get hpa), and updated deployment/PR validation narrative to reflect autoscaling.

Sequence Diagram(s)

sequenceDiagram
  participant CI as CI Workflow
  participant Repo as Repository
  participant Kubeval as kubeval
  participant Cluster as Kubernetes Cluster
  participant Metrics as Metrics Server
  participant HPA as HorizontalPodAutoscaler
  participant Deployment as Deployment/Pods

  CI->>Repo: checkout manifests
  CI->>Kubeval: validate `deployment.yaml`, `service.yaml`, `hpa.yaml`
  Kubeval-->>CI: validation results

  Note over Cluster,Metrics: Runtime autoscaling flow
  Metrics->>HPA: provide CPU metrics
  HPA->>Deployment: scale replicas (3..10) based on CPU target (70%)
  Deployment->>Cluster: create/delete pods
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibbled code in the meadow bright,

Scaled from three to ten with pure delight,
Seventy percent, the CPU sings,
HPA hops in on springy springs,
Docs and CI cheer — a rabbit's bite of light!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Staging' is vague and does not convey meaningful information about the changeset, which involves adding Kubernetes HPA support with updated CI/CD validation and documentation. Use a descriptive title that summarizes the main change, such as 'Add Kubernetes HPA for autoscaling with metrics' or 'Implement autoscaling with HPA and CI validation'.
✅ 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 changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

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.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 10, 2026

Deploy Preview for system-craft-staging ready!

Name Link
🔨 Latest commit 0e6dbb8
🔍 Latest deploy log https://app.netlify.com/projects/system-craft-staging/deploys/69d97586ae181d0008ff4147
😎 Deploy Preview https://deploy-preview-125--system-craft-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@KUBERNETES.md`:
- Around line 21-24: Update the KUBERNETES.md text to accurately reflect the CI
workflow: change the PR step wording from “dry-run the manifests” to state that
the workflow runs kubeval checks (referencing .github/workflows/ci.yml and the
kubeval step), and change the deploy wording from “can be rolled out through the
Kubernetes manifests” to note that the deploy job only logs a trigger message
and does not perform an actual rollout (referencing the deploy job in
.github/workflows/ci.yml).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1aab94d4-caa6-49bf-9280-9d83dd350cd3

📥 Commits

Reviewing files that changed from the base of the PR and between cf9876d and 40718b0.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • KUBERNETES.md
  • kubernetes/hpa.yaml

Comment on lines +21 to +24
The CI/CD pipeline in `.github/workflows/ci.yml` is designed to work with these manifests:
1. **Validation**: Every PR can dry-run the manifests to catch syntax issues early.
2. **Build**: Docker images are pushed to GitHub Container Registry (GHCR).
3. **Deploy**: Push to `main` triggers the deployment notification.
3. **Deploy**: Changes to `main` can be rolled out through the Kubernetes manifests.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Documentation currently overstates what CI/CD actually does.

Line 22 says PRs “dry-run the manifests,” but the workflow runs kubeval checks. Line 24 implies rollout via manifests, while the deploy job currently logs a trigger message only. Please align wording with .github/workflows/ci.yml to avoid operator confusion.

Suggested doc update
-1. **Validation**: Every PR can dry-run the manifests to catch syntax issues early.
+1. **Validation**: Every PR validates Kubernetes manifests with `kubeval` to catch schema/syntax issues early.
...
-3. **Deploy**: Changes to `main` can be rolled out through the Kubernetes manifests.
+3. **Deploy**: On pushes to `main`, the workflow currently emits a deployment trigger message (manifest apply is not yet automated in this workflow).
📝 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
The CI/CD pipeline in `.github/workflows/ci.yml` is designed to work with these manifests:
1. **Validation**: Every PR can dry-run the manifests to catch syntax issues early.
2. **Build**: Docker images are pushed to GitHub Container Registry (GHCR).
3. **Deploy**: Push to `main` triggers the deployment notification.
3. **Deploy**: Changes to `main` can be rolled out through the Kubernetes manifests.
The CI/CD pipeline in `.github/workflows/ci.yml` is designed to work with these manifests:
1. **Validation**: Every PR validates Kubernetes manifests with `kubeval` to catch schema/syntax issues early.
2. **Build**: Docker images are pushed to GitHub Container Registry (GHCR).
3. **Deploy**: On pushes to `main`, the workflow currently emits a deployment trigger message (manifest apply is not yet automated in this workflow).
🧰 Tools
🪛 LanguageTool

[uncategorized] ~21-~21: The official name of this software platform is spelled with a capital “H”.
Context: ...ployment Strategy The CI/CD pipeline in .github/workflows/ci.yml is designed to work w...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@KUBERNETES.md` around lines 21 - 24, Update the KUBERNETES.md text to
accurately reflect the CI workflow: change the PR step wording from “dry-run the
manifests” to state that the workflow runs kubeval checks (referencing
.github/workflows/ci.yml and the kubeval step), and change the deploy wording
from “can be rolled out through the Kubernetes manifests” to note that the
deploy job only logs a trigger message and does not perform an actual rollout
(referencing the deploy job in .github/workflows/ci.yml).

feat: Added the Horizontal Pod Autoscaler (HPA) to the System-Craft Kubernetes setup
@Shashank0701-byte Shashank0701-byte merged commit 233d230 into main Apr 10, 2026
11 checks passed
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.

1 participant