Skip to content

Conversation

@lwpk110
Copy link

@lwpk110 lwpk110 commented Oct 16, 2025

Ⅰ. Describe what this PR did

  1. Add support for gateway.metrics.labels in the PodMonitor template
  2. Set Default Selector Labels for kube-prometheus-stack: Configured the default PodMonitor selector label release: kube-prome in values.yaml to ensure seamless auto-discovery by kube-prometheus-stack monitoring systems.

Ⅱ. Does this pull request fix one issue?

fixes #3021

Ⅲ. Why don't you add test cases (unit test/integration test)?

no need

Ⅳ. Describe how to verify it

helm template higress-core . --set gateway.metrics.enabled=true > foo.yaml

Ⅴ. Special notes for reviews

no

@CLAassistant
Copy link

CLAassistant commented Oct 16, 2025

CLA assistant check
All committers have signed the CLA.

@lingma-agents
Copy link

lingma-agents bot commented Oct 16, 2025

修复 PodMonitor 标签选择器配置以支持网关指标

变更概述
  • 问题修复

    • 修复了在启用网关指标时,PodMonitor 资源缺少正确标签选择器的问题。
    • 添加了 .Values.gateway.metrics.PodMonitorSelector 配置项,允许用户自定义 PodMonitor 的标签选择器。
    • 默认设置了 release: kube-prome 标签,确保与 kube-prometheus-stack 的自动发现机制兼容。
  • 配置调整

    • values.yaml 中新增 gateway.metrics.PodMonitorSelector 字段,默认值为 {release: kube-prome}
    • 更新了 podmonitor.yaml 模板,在元数据标签中加入对 PodMonitorSelector 的支持。
  • 文档

    • values.yaml 中添加注释说明 PodMonitorSelector 的用途和默认值的意义。
变更文件
文件路径 变更说明
helm/​core/​templates/​podmonitor.​yaml 在 PodMonitor 模板的元数据标签部分增加了对 `.Values.gateway.metrics.PodMonitorSelector` 的支持,以便可以动态注入标签选择器。
helm/core/values.yaml 在网关指标配置下新增 `PodMonitorSelector` 字段,并设置默认值为 `release: kube-prome`,用于匹配 kube-prometheus-stack 的标签要求。

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.07%. Comparing base (ef31e09) to head (2256ab4).
⚠️ Report is 754 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3022      +/-   ##
==========================================
+ Coverage   35.91%   45.07%   +9.16%     
==========================================
  Files          69       82      +13     
  Lines       11576    10898     -678     
==========================================
+ Hits         4157     4912     +755     
+ Misses       7104     5639    -1465     
- Partials      315      347      +32     

see 97 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@johnlanni
Copy link
Collaborator

@lwpk110 Please also update the README for helm:
image

@lwpk110 lwpk110 force-pushed the bugfix/podmonitor_lables branch from 8cf8302 to b250803 Compare October 24, 2025 03:12
@lwpk110
Copy link
Author

lwpk110 commented Oct 24, 2025

@johnlanni Have done

@lwpk110 lwpk110 force-pushed the bugfix/podmonitor_lables branch 2 times, most recently from 2256ab4 to 5350a0e Compare October 26, 2025 12:30
@lwpk110 lwpk110 force-pushed the bugfix/podmonitor_lables branch from 5350a0e to a74cd7f Compare November 6, 2025 06:01
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.

【Bug】: PodMonitor 缺少自定义标签支持 || [Bug]: PodMonitor lacks custom tag support

4 participants