Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR change?
When i install kubecost helm chart with an external grafana, some dashboards are created with hardcoded uid's for datasources which makes grafana error out when loading the panels. See example
This change parametrizes the uid for datasource. We already do this in other dashboards which are working as expected. I copied the parameterization from other working dashboards.
See https://kubecost.slack.com/archives/CLFV60Y90/p1737446014836879 for more context
After applying the fixes from this PR, i was able to browse the dashboards correctly:
![Screenshot 2025-01-30 at 11 48 05 AM](https://private-user-images.githubusercontent.com/2296947/408272207-d35e7d0c-7b8e-4b48-b546-a227f87d1bf9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDA4MTAsIm5iZiI6MTczOTA0MDUxMCwicGF0aCI6Ii8yMjk2OTQ3LzQwODI3MjIwNy1kMzVlN2QwYy03YjhlLTRiNDgtYjU0Ni1hMjI3Zjg3ZDFiZjkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMTg0ODMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Zjc3ZWExNWE5OGYyYjQ2ZGZhODBiZDQ1YjhhOWRhNzkyYzZjMzYzN2M4NjllODA4ODZiZmE2NWVjNDc3MmQ3YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.FB0ZPaLtvJerTd7Tdd8i9PjZsMXjr0jt4TvztyJprLg)
Does this PR rely on any other PRs?
No
How does this PR impact users? (This is the kind of thing that goes in release notes!)
Fixes some broken templating in grafana dashboards
Links to Issues or tickets this PR addresses or fixes
https://kubecost.slack.com/archives/CLFV60Y90/p1737446014836879
https://kubecost.atlassian.net/servicedesk/customer/portal/3/SUP-6670
What risks are associated with merging this PR? What is required to fully test this PR?
Install kubecost with grafana sidecar and dashboards will fail out of the box. Update the dashboard configmaps to see the error get resolved
How was this PR tested?
I updated the grafana dashboard configmaps manually which fixed the invalida datasource error
Have you made an update to documentation? If so, please provide the corresponding PR.
No