GCP-690 - feat: add GMP PodMonitoring support#217
Conversation
Add PodMonitoring CRD template (monitoring.googleapis.com/v1) for Google Managed Prometheus scraping. Disabled by default via monitoring.podMonitoring.enabled=false. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Warning Review limit reached
More reviews will be available in 2 minutes and 44 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds Google Managed Prometheus (GMP) support to the Helm chart via a new Security note: The Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
|
Hi @cristianoveiga. Thanks for your PR. I'm waiting for a openshift-hyperfleet member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@charts/templates/podmonitoring.yaml`:
- Around line 17-23: The PodMonitoring endpoint configuration in the monitoring
endpoint block does not account for the configurable TLS mode in
config.metrics.tls.enabled, which means GMP scraping will fail silently when TLS
is enabled. Add conditional logic around the endpoint definition to include
TLS-aware settings (such as scheme and tlsConfig) when
config.metrics.tls.enabled is true, ensuring the endpoint uses https and
appropriate TLS configuration instead of always defaulting to HTTP.
🪄 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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 54db6172-5019-433e-ba0b-8b7da29479a6
📒 Files selected for processing (4)
charts/README.mdcharts/templates/podmonitoring.yamlcharts/values.yamldocs/metrics.md
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual)openshift-hyperfleet/hyperfleet-broker(manual)
When config.metrics.tls.enabled=true, set scheme: https and apply monitoring.podMonitoring.tlsConfig.insecureSkipVerify (default: false). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
/ok-to-test |
Risk Score: 0 —
|
| Signal | Detail | Points |
|---|---|---|
| PR size | 88 lines | +0 |
| Sensitive paths | none | +0 |
Computed by hyperfleet-risk-scorer
Co-Authored-By: Claude <noreply@anthropic.com>
ffcdb1f to
63ae62f
Compare
|
/test validate-commits |
ciaranRoche
left a comment
There was a problem hiding this comment.
If you have a look in the makefile - https://github.com/openshift-hyperfleet/hyperfleet-api/blob/main/Makefile#L330
We have dedicated helm template test cases for ServiceMonitor, can you add similar here for PodMonitoring please, just to ensure we catch any syntax or template rendering issues please
Co-Authored-By: Claude <noreply@anthropic.com>
Summary
charts/templates/podmonitoring.yaml— creates amonitoring.googleapis.com/v1/PodMonitoringresource for Google Managed Prometheus scrapingmonitoring.podMonitoringsection tocharts/values.yaml(disabled by default)docs/metrics.mdwith GMP integration sectioncharts/README.mdvia helm-docsContext
GKE clusters using Google Managed Prometheus (GMP) use
PodMonitoringCRDs (monitoring.googleapis.com/v1) for scraping rather than Prometheus Operator'sServiceMonitor(monitoring.coreos.com/v1). This adds a parallel scraping path for GMP environments. BothserviceMonitorandpodMonitoringcan be independently enabled.Test plan
helm templaterendersPodMonitoringcorrectly whenmonitoring.podMonitoring.enabled=truePodMonitoringresource showsConfigurationCreateSuccesson a GMP-enabled clusterenabled: false) renders noPodMonitoringresourceserviceMonitorbehavior unchanged🤖 Generated with Claude Code