feat(base-cluster/monitoring): also read secrets for datasources#1479
feat(base-cluster/monitoring): also read secrets for datasources#1479
Conversation
WalkthroughThe configuration for the Grafana sidecar in the kube-prometheus-stack Helm chart was updated to change the datasources resource type from "configmap" to "both," enabling the sidecar to manage both ConfigMaps and Secrets for datasources. Changes
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates the configuration for Grafana sidecars to read both configmaps and secrets for datasources.
- Updates the "resource" field from "configmap" to "both" to allow reading secrets.
- Adjusts the configuration in the kube-prometheus-stack Grafana template.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml (1)
97-97: Verify RBAC and chart metadata updates
With Secrets now in scope, please ensure the sidecar’s RBAC rules grantget,list, andwatchonsecrets(in addition toconfigmaps). Also update the chart’s documentation (README or values reference) and bump the chart version inChart.yamlto reflect this new capability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: generateDiffCommentBody
- GitHub Check: lint helm chart (base-cluster)
- GitHub Check: wait-for-checks
🔇 Additional comments (1)
charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml (1)
97-97: Enable both ConfigMaps and Secrets for datasources
Changingresourcefromconfigmaptobothcorrectly configures the Grafana sidecar to watch and load datasources from both ConfigMaps and Secrets, aligning with the PR’s objective.
🤖 I have diffed this beep boop"/$namespace/$kind/$name.yaml" for normal resources
|
🤖 I have created a release *beep* *boop* --- ## [8.1.0](base-cluster-v8.0.0...base-cluster-v8.1.0) (2025-06-06) ### Features * **base-cluster/monitoring:** allow upsizing tempo storage ([#1448](#1448)) ([db1a742](db1a742)) * **base-cluster/monitoring:** also read secrets for datasources ([#1479](#1479)) ([83ba8bd](83ba8bd)) * **base-cluster/monitoring:** configure service graph for grafana ([#1422](#1422)) ([8d4bb4c](8d4bb4c)) * **base-cluster/monitoring:** set code challenge for grafana ([#1500](#1500)) ([aa803da](aa803da)) * **base-cluster/monitoring:** set code_challenge_method for oauth2-proxy ([#1496](#1496)) ([b252cd7](b252cd7)) ### Bug Fixes * **base-cluster:** this prevents the user from installing this under another name ([#1418](#1418)) ([f4807e8](f4807e8)) ### Miscellaneous Chores * **base-cluster/docs:** update flux helmrelease command to update CRDs ([#1421](#1421)) ([a8fd535](a8fd535)) * **base-cluster/monitoring:** remove unnecessary open-telemetry-collector dashboard ([#1449](#1449)) ([520e9e1](520e9e1)) * **base-cluster:** change descheduler syntax ([#1483](#1483)) ([907bdae](907bdae)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced monitoring with support for upsizing tempo storage. - Enabled reading secrets for datasources and configuring the service graph in Grafana. - Added options to set the code challenge and code_challenge_method for Grafana and oauth2-proxy. - Introduced an optional persistence configuration for tracing ingester storage size. - **Bug Fixes** - Resolved an issue preventing installation of the chart under unintended names. - **Chores** - Updated helmrelease command for CRD updates. - Removed an unnecessary dashboard and adjusted descheduler syntax. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
see https://github.com/kiwigrid/k8s-sidecar#:~:text=string-,RESOURCE,-Resource%20type%2C%20which
Summary by CodeRabbit