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

Documentation on how to use OpenCost with an existing prometheus installation on OpenShift? #226

Open
kastl-ars opened this issue Sep 27, 2024 · 5 comments

Comments

@kastl-ars
Copy link

Hi all,

I would like to run OpenCost in OpenShift, but am unsure before even starting due to the various options in the values.yaml regarding authentication to an external Prometheus.

https://github.com/opencost/opencost-helm-chart/blob/main/charts/opencost/values.yaml#L320

Our OpenShift cluster has a thanos-querier service running, that requires authentication using the serviceaccount token. How would I put this into the values.yaml?

I figured something like the following could work, but I am not sure if the bearertoken works with a Kubernetes serviceAccount token or needs some other format?

  prometheus:
    secret_name: ~
    existingSecretName: my-existing-service-account-token-secret
    username: ""
    username_key: ""
    password: ""
    password_key: ""
    bearer_token: ""
    bearer_token_key: "token" # the key used for the token in the my-existing-service-account-token-secret secret
    external:
      enabled: true
      url: "https://thanos-querier...."

Any hints are highly appreciated.

Kind Regards,
Johannes

@kastl-ars
Copy link
Author

One addition: The service account token should already be mounted inside the pod, as the automountServiceAccountToken setting is true. Is there any way to tell the pod to use that file?

Especially as the name of the token secret for the serviceAccount is not predictable, how would I specify this beforehand?

@AjayTripathy
Copy link
Collaborator

cc @jessegoodier can someone on your team help get this documented? Seems valuable.

@jessegoodier
Copy link

jessegoodier commented Oct 1, 2024

cc @jessegoodier can someone on your team help get this documented? Seems valuable.

Ishaan is working on this. I'm sure it is possible, will look at how other tools are doing it.

@kastl-ars
Copy link
Author

Any news on this?

@jessegoodier
Copy link

Yes! #226
Getting closer. I can't commit to timing though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants