Prerequisites
From CostGraph, one thing: a deployment API key, created in the dashboard under Settings → API Keys. It is the only credential you need. The image registry authenticates with the same key, and the chart wires that up for you. From your side:- Kubernetes and Helm 3+
- Postgres 14+, with
citextandpg_trgm - Redis
- VictoriaMetrics
- The URL your users will reach the dashboard on
Install
1
Add the Helm repository
2
Write a values file
my-values.yaml
appBaseURL must be the address people actually open in a browser, not an
internal Service DNS name. It shapes the links in invitation email.3
Install
Evaluating without a database
To try it before standing up Postgres, Redis and VictoriaMetrics, replace those three blocks withbundled.enabled: true on each and the chart runs them
in-cluster:
Keeping credentials out of values
For production, put credentials in Secrets you manage and reference them withexistingSecret rather than inline values, so nothing sensitive is written into
Helm release history:
When you use
controlPlane.existingSecret, create the image pull secret
yourself as well and set imagePullSecrets:Network access it needs
Outbound HTTPS (443) to these hosts:
Nothing needs to reach the deployment from outside your network.
Connecting your spend
Installing the chart gives you CostGraph. It does not give it anything to report on yet. That comes from the same sources as hosted CostGraph:
Connect whichever apply to you. Provider integrations need only a read-only
credential and nothing deployed.
Pointing them at your install
Everything you deploy defaults to hosted CostGraph, so on a self-hosted install you redirect it at your own address. For the operator, in every cluster you want costs for, including the one running CostGraph:
The agent and the API take the same treatment: give them your own address in
place of
api.costgraph.ai, and your deployment API key.
Pricing hardware that is not in a cloud
A resource in a public cloud is priced from that provider’s published rates, matched on its instance type and region. Hardware you own has no published rate, so you register what it costs you and tag the resources that bill at it. This applies whether you measure them with the operator or the agent. Register the rate once, then tag everything that bills at it:Pricing IDs
Registering rates, the label spellings each platform accepts, and how a rate
is inherited from a node to the volumes on it.
Labels are inherited: tagging a node prices the volumes attached to it, so you
rarely need to label every object. A node is in no namespace, so labelling a
namespace never changes a node’s own rate.
Operating
Resources are named<release>-costgraph-selfhosted. The examples below assume
helm install costgraph ...; helm status costgraph prints them with your own
release name filled in.
Check health at any time. This reads the database and makes no outbound call:
The one thing you must not delete
On first install the chart generates encryption keys into a Secret named<release>-costgraph-selfhosted-generated. Everything you have saved is tied to
them.
Helm keeps this Secret across upgrades and uninstalls, so normally you need do
nothing. But it cannot be regenerated.
Upgrades
Upgrade in place. Pending migrations are applied on start:Every setting
values.yaml documents each setting inline, next to the value it controls: