-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Custom Pricing Provider in OpenCost for Public Cloud Kubernetes Clusters #2434
Conversation
Signed-off-by: Jan Lauber <jan.lauber@protonmail.ch>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Seems reasonable. Thanks for this PR! @thomasvn mind picking up this review when you get a moment? |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Thanks @janlauber for the PR! I've added some comments to the associated Github issue. |
@janlauber So the intended effect here is that if the user specifies |
@thomasvn yes, this is the intended effect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
Any news so far? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems logical, but I'd like to hear Sean's thoughts. I also just approved this PR to run CI, so we want to make sure that passes too (I assume it will).
pkg/cloud/provider/provider.go
Outdated
// Check for custom provider settings | ||
if env.IsUseCustomProvider() { | ||
// Use CSV provider if set | ||
if env.IsUseCSVProvider() { | ||
cp.provider = kubecost.CSVProvider | ||
} | ||
return cp | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sean-Holcomb do you see any downside to this short-circuit?
This pull request has been marked as stale because it has been open for 90 days with no activity. Please remove the stale label or comment or this pull request will be closed in 5 days. |
any news here? |
Do any @opencost/opencost-maintainers want to weigh in on this (assuming the test ges fixed)? |
Signed-off-by: Jan Lauber <jan.lauber@protonmail.ch>
I've fixed the code |
So let's get this merged? |
Quality Gate passedIssues Measures |
What does this PR change?
This PR introduces the ability to enforce the use of a custom pricing provider in OpenCost when deployed on GCP or other public cloud Kubernetes clusters. Previously, deploying on these platforms automatically defaulted to their respective public cloud providers, requiring API keys for pricing information. Now, users can activate a custom provider by setting
USE_CUSTOM_PROVIDER=true
, enabling custom pricing without the need for API keys.Does this PR relate to any other PRs?
How will this PR impact users?
Does this PR address any GitHub or Zendesk issues?
How was this PR tested?
Tested using a custom OpenCost image (
ghcr.io/janlauber/opencost:v1.109.0
) deployed in a GCP cluster, confirming the ability to utilize custom pricing withUSE_CUSTOM_PROVIDER
set to "true".Does this PR require changes to documentation?
Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?