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

Add clsuterName to support clusters with non-default names #236

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xirehat
Copy link

@xirehat xirehat commented Nov 5, 2024

By adding clusterName to values, you can install OpenCost in clusters with names other than cluster.local and connect to Prometheus correctly.

This fixes #235

@xirehat
Copy link
Author

xirehat commented Nov 12, 2024

@mattray @toscott @brito-rafa

@AjayTripathy
Copy link
Collaborator

Thanks for this PR @xirehat ... can you share a bit more on how this was tested, and regression tested (ie that it still works for clusters using svc.local)?

@xirehat
Copy link
Author

xirehat commented Nov 15, 2024

When I run helm template opencost -f values.yaml ./ with empty clusterName: "", output shows me this:

...
          env:
            - name: PROMETHEUS_SERVER_ENDPOINT
              value: "http://prometheus-server.prometheus-system.svc.cluster.local:80"
...

When I run helm template opencost -f values.yaml ./ with clusterName: "example.production", output shows me this:

...
          env:
            - name: PROMETHEUS_SERVER_ENDPOINT
              value: "http://prometheus-server.prometheus-system.svc.example.production:80"
...

It works properly. @AjayTripathy

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