Skip to content
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

OpenCost with external Azure Managed Prometheus - Workload Identity #1990

Open
v-esteves opened this issue Jun 20, 2023 · 9 comments
Open

OpenCost with external Azure Managed Prometheus - Workload Identity #1990

v-esteves opened this issue Jun 20, 2023 · 9 comments
Labels
enhancement New feature or request needs-follow-up needs-triage opencost OpenCost issues vs. external/downstream

Comments

@v-esteves
Copy link

Is your feature request related to a problem? Please describe.
We are starting to use OpenCost on Azure AKS and we want to avoid having Prometheus deployed on our clusters, and use a managed service for this.
Right now on OpenCost we have two options of authn/authz for external Prometheus: Basic Authentication and bearer token.
With a managed service, there isn't the option of basic auth, so we are stuck with bearer tokens. This isn't a good solution, since the token have a short lifetime and we would need to keep refreshing this value and that isn't feasible.

Describe the solution you'd like
Ideally using Workload Identity in order to avoid having to manage secrets.

Describe alternatives you've considered
Using a SPN ClientId and ClientSecret and OpenCost needs to support fetching and updating the token by itself -> Like it does for fetching the Azure Pricing Data.
While this solution is better than using bearer tokens, it isn't also ideal, since we would need to manage secrets for the SPN.

Additional context
AKS Workload Identity

@mattray mattray added enhancement New feature or request opencost OpenCost issues vs. external/downstream labels Jun 24, 2023
@mattray
Copy link
Collaborator

mattray commented Jun 24, 2023

Definitely a useful feature, we'd need someone using AKS to provide support for this.

@v-esteves
Copy link
Author

@mattray we have just rolled out OpenCost in all our AKS clusters and would be more than happy to help out with this enhancement.

@mattray
Copy link
Collaborator

mattray commented Jul 26, 2023

@v-esteves happy to review any PRs you have.

@Davidsoff
Copy link
Contributor

Davidsoff commented Aug 23, 2023

#2117 might be a start for this. Or at least related to workloadidentity

@sossickd
Copy link

sossickd commented Oct 13, 2023

We are looking into Opencost and would need Opencost to support workload identity.

I have included the issue / merge for workload identity for external-dns if this helps.

kubernetes-sigs/external-dns#2724

@dwbrown2
Copy link
Collaborator

@sossickd does #2117 look compatible with what you need?

@sossickd
Copy link

@dwbrown2 yes that looks relevant

@kwit75
Copy link

kwit75 commented Mar 25, 2024

any update on this?

@Davidsoff
Copy link
Contributor

should be fixed as of as part of #2363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-follow-up needs-triage opencost OpenCost issues vs. external/downstream
Projects
None yet
Development

No branches or pull requests

6 participants