Skip to content

Implement Vertical Pod Autoscaling for FAQ System#697

Merged
RUKAYAT-CODER merged 3 commits into
rinafcode:mainfrom
Ajibose:faq-vpa-implementation
Jun 26, 2026
Merged

Implement Vertical Pod Autoscaling for FAQ System#697
RUKAYAT-CODER merged 3 commits into
rinafcode:mainfrom
Ajibose:faq-vpa-implementation

Conversation

@Ajibose

@Ajibose Ajibose commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Closes #383

Summary

  • Adds a Kubernetes Deployment manifest for the FAQ System (k8s/faq-system-deployment.yaml) with production-ready resource requests/limits, readiness/liveness probes, and health-check endpoints
  • Adds a VerticalPodAutoscaler (VPA) manifest (k8s/faq-system-vpa.yaml) using autoscaling.k8s.io/v1 that targets the FAQ System deployment and automatically adjusts CPU and memory resources
  • Adds a test file (k8s/faq-system-vpa.test.ts) with 13 vitest assertions covering both the deployment and VPA manifests, matching the existing k8s test conventions in the repository

VPA Configuration Details

Setting Value
API version autoscaling.k8s.io/v1
Update mode Auto (live pod updates)
Container targeted faq-system
Controlled resources CPU + Memory
Controlled values RequestsAndLimits
Min CPU 100m
Min Memory 128Mi
Max CPU 2000m (2 cores)
Max Memory 2Gi

Resource Limits and Requests

Initial deployment requests (before VPA takes effect):

CPU Memory
Requests 150m 256Mi
Limits 500m 512Mi

VPA will dynamically adjust these based on observed usage. The Auto mode allows VPA to update running pods without requiring manual restarts.

Test Results Confirmation

13 vitest assertions across 2 describe blocks validate:

  • Deployment metadata (name, namespace, labels)
  • Container image, port, imagePullPolicy
  • Environment variables (NODE_ENV, PORT)
  • Initial resource requests and limits
  • Readiness and liveness probe configuration
  • VPA API version and kind
  • VPA target reference pointing to the correct deployment
  • Update mode (Auto)
  • Container policy with min/max resource bounds
  • controlledValues: RequestsAndLimits setting

Performance Impact Assessment

  • Minimal startup impact: VPA operates as a Kubernetes controller outside the FAQ System pod itself
  • Auto mode: Pods are updated in-place where possible; on restart, new resource values are applied immediately
  • Resource efficiency: VPA eliminates over-provisioning by right-sizing CPU/memory to actual usage patterns
  • No HPA conflict: This deployment does not define an HPA, avoiding the known VPA+HPA interaction issue on the same resource metric

Documentation Updates

The VPA manifest is self-documenting via YAML comments-compatible structure. The test file serves as living documentation of the expected manifest contract.

@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

@Ajibose Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Great job so far

There’s just one blocker — the workflow is failing. Could you take a look and fix it so all checks pass?

Happy to review again once that’s done.
You can pull from the main first before pushing. The workflow should pass

@Ajibose

Ajibose commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Great job so far

There’s just one blocker — the workflow is failing. Could you take a look and fix it so all checks pass?

Happy to review again once that’s done. You can pull from the main first before pushing. The workflow should pass

Thanks. Please help me check now

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project

@RUKAYAT-CODER RUKAYAT-CODER merged commit a91bb8b into rinafcode:main Jun 26, 2026
4 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.

security FAQ System : Vertical Pod Autoscaling

2 participants