PC-822 Implement Heartbeat sender to Dakr#282
Conversation
Code Review 👍 Approved with suggestions 4 resolved / 6 findingsClean heartbeat implementation with good separation of concerns. Two minor suggestions: ensure cluster ID is reliably resolved (especially in PAT-exchange deployments) and complete the interface doc comment. 💡 Edge Case: Heartbeat cluster ID may always be "unknown" in PAT-exchange flow📄 internal/controller/custom.go:242
If deployments that use the PAT exchange flow don't also set Consider caching the cluster ID on the controller (e.g., from the PAT exchange result or from the context Suggested fix💡 Quality: Incomplete doc comment on ReportHealth interface method📄 internal/transport/interface.go:32 The Suggested fix✅ 4 resolved✅ Edge Case: No initial heartbeat sent until first 60s tick fires
✅ Quality: Double BuildReport call creates inconsistent log vs. heartbeat
✅ Quality: Unused mockDakrClient in test file
✅ Quality:
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
* RPC for Dakr * Gitar fixes * ci: retrigger pipeline * Retrigger vercel
[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):
🔬 QA / Verification Steps
Describe the steps a reviewer should take to verify your changes:
make testto verify all tests pass.")make create-kind && make deploy.")✅ Global Checklist
Please check all boxes that apply:
Summary by Gitar
OperatorHealthServiceRPC for periodic health reporting to Dakr, enabling real-time operator visibilityRealDakrClientwithoperatorHealthClientto callReportHealthRPCrunHealthReportingto send initial heartbeat on startup and every 60s thereafter; RPC failures logged but don't crash operatorCLUSTER_IDenv var; defaults to "unknown" if not setCpuThrottledFractionmetric to track CFS bandwidth throttling (merged from main)container_cpu_cfs_throttled_periods_totalandcontainer_cpu_cfs_periods_totalwith 5m rateThis will update automatically on new commits.