Skip to content

Add pmax threshold check#288

Merged
Tzvonimir merged 1 commit into
mainfrom
tzvonimir/pmax-check
Feb 19, 2026
Merged

Add pmax threshold check#288
Tzvonimir merged 1 commit into
mainfrom
tzvonimir/pmax-check

Conversation

@Tzvonimir
Copy link
Copy Markdown
Contributor

@Tzvonimir Tzvonimir commented Feb 19, 2026

[Title]

📚 Description of Changes

Provide an overview of your changes and why they’re needed. Link to any related issues (e.g., "Fixes #123"). If your PR fixes a bug, resolves a feature request, or updates documentation, please explain how.

  • What Changed:
    (Describe the modifications, additions, or removals.)

  • Why This Change:
    (Explain the problem this PR addresses or the improvement it provides.)

  • Affected Components:
    (Which component does this change affect? - put x for all components)

  • Compose

  • K8s

  • Other (please specify)

❓ Motivation and Context

Why is this change required? What problem does it solve?

  • Context:
    (Provide background information or link to related discussions/issues.)

  • Relevant Tasks/Issues:
    (e.g., Fixes: #GitHub Issue)

🔍 Types of Changes

Indicate which type of changes your code introduces (check all that apply):

  • BUGFIX: Non-breaking fix for an issue.
  • NEW FEATURE: Non-breaking addition of functionality.
  • BREAKING CHANGE: Fix or feature that causes existing functionality to not work as expected.
  • ENHANCEMENT: Improvement to existing functionality.
  • CHORE: Changes that do not affect production (e.g., documentation, build tooling, CI).

🔬 QA / Verification Steps

Describe the steps a reviewer should take to verify your changes:

  1. (Step one: e.g., "Run make test to verify all tests pass.")
  2. (Step two: e.g., "Deploy to a Kind cluster with make create-kind && make deploy.")
  3. (Additional steps as needed.)

✅ Global Checklist

Please check all boxes that apply:

  • I have read and followed the CONTRIBUTING guidelines.
  • My code follows the code style of this project.
  • I have updated the documentation as needed.
  • I have added tests that cover my changes.
  • All new and existing tests have passed locally.
  • I have run this code in a local environment to verify functionality.
  • I have considered the security implications of this change.

Summary by Gitar

  • New spike protection metrics:
    • Added cpu_pmax and mem_pmax fields to ContainerHistoricalMetrics protobuf for capturing maximum resource usage over 24-hour window
    • Enables MPA autoscaler to account for traffic spikes in resource allocation decisions
  • Historical metrics collector enhancement:
    • Extended fetchContainerPercentiles() with max_over_time() Prometheus queries for CPU and memory peaks
    • Results properly converted to appropriate units (cores→millicores for CPU, bytes for memory)

This will update automatically on new commits.

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Feb 19, 2026

Code Review ✅ Approved

Clean, well-implemented addition of Pmax fields for spike protection. Proto changes are backward-compatible, PromQL queries follow established patterns, error handling is non-fatal and consistent with existing code. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@Tzvonimir Tzvonimir changed the title Add pmax treshold check Add pmax threshold check Feb 19, 2026
@Tzvonimir Tzvonimir merged commit b9b3bf4 into main Feb 19, 2026
42 of 43 checks passed
@Tzvonimir Tzvonimir deleted the tzvonimir/pmax-check branch February 19, 2026 18:12
Parthiba-Hazra pushed a commit that referenced this pull request May 5, 2026
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.

2 participants