Skip to content

Conversation

howardjohn
Copy link
Contributor

Description

Setting replicas breaks things like HPA, etc. For some reason in Envoy, probably some notion of backwards compat, we made the user have to opt-in to omitting it; this doesn't really make sense so default it in agentgateway.

Enable metrics scraping

Change Type

/kind new_feature

Changelog

NONE

Additional Notes

@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 20:11
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the default deployment configuration for agentgateway by removing hardcoded replica counts and enabling Prometheus metrics scraping. The changes allow for better compatibility with Kubernetes autoscaling features like HPA while providing observability through metrics collection.

  • Removes hardcoded replicas: 1 setting to allow HPA and other autoscaling mechanisms to function properly
  • Adds Prometheus annotations for metrics scraping on port 15020 with path /metrics

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/deployer/gateway_parameters.go Sets deployment replicas to nil in agentgateway parameters to enable autoscaling
internal/kgateway/helm/kgateway/templates/gateway/agent-gateway-deployment.yaml Adds Prometheus scraping annotations to pod template
test/deployer/testdata/agentgateway-out.yaml Updated test output reflecting removed replicas and added Prometheus annotations
test/deployer/testdata/agentgateway-omitdefaultsecuritycontext-ref-gwp-on-gw-out.yaml Updated test output for omit security context variant
test/deployer/testdata/agentgateway-omitdefaultsecuritycontext-out.yaml Updated test output for omit security context variant

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none labels Oct 6, 2025
@jenshu jenshu added this pull request to the merge queue Oct 6, 2025
Merged via the queue into kgateway-dev:main with commit d1191f5 Oct 6, 2025
28 checks passed
josh-pritchard pushed a commit to josh-pritchard/kgateway that referenced this pull request Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants