Repository navigation
[monitoring] Fix infra dashboards missing in default variant - #2365
Conversation
The default variant deploys monitoring to the cozy-monitoring namespace, but the infra dashboards condition only checked for tenant-root. This adds cozy-monitoring to the condition, consistent with the existing pattern in vmagent.yaml. Fixes cozystack#2349 Signed-off-by: mattia-eleuteri <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated a Helm template conditional to render infrastructure dashboards when Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request updates the dashboard template to include the cozy-monitoring namespace alongside tenant-root for rendering infrastructure dashboards. The reviewer suggests avoiding hardcoded namespace names in the template logic by making the condition configurable via values.yaml, which would improve the chart's flexibility and maintainability across different environments.
| {{- end }} | ||
| {{- end }} | ||
| {{- if eq .Release.Namespace "tenant-root" }} | ||
| {{- if or (eq .Release.Namespace "tenant-root") (eq .Release.Namespace "cozy-monitoring") }} |
There was a problem hiding this comment.
Hardcoding specific namespace names like tenant-root and cozy-monitoring directly in the template logic reduces the flexibility and maintainability of the chart. If the monitoring stack is deployed in a different namespace (e.g., in a custom variant or a production environment with a different naming convention), these infrastructure dashboards will not be rendered. While this approach is consistent with other components like vmagent.yaml, consider making this condition configurable via values.yaml (e.g., by using a boolean flag or a configurable list of namespaces) to better support custom deployment scenarios.
Andrei Kvapil (kvaps)
left a comment
There was a problem hiding this comment.
LGTM, thank you!
|
Successfully created backport PR for |
What this PR does
cozy-monitoringnamespace to the infra dashboards rendering condition indashboards.yamlcozy-monitoring, but the condition from [monitoring] Scope infrastructure dashboards to tenant-root only #2197 only checked fortenant-root, causing all infrastructure dashboards to be missingvmagent.yamlwhich already handles both namespacesRelease note
Fixes #2349
Summary by CodeRabbit