Skip to main content
Use this reference to customize the costgraph-selfhosted Helm chart. For a starting values file and deployment commands, follow Install self-hosted CostGraph.

Configuration structure

Set shared connections and credentials under global. Set each component’s image, resources, and scheduling under its workload block. The following table shows where to place each type of setting. Components use their own securityContext and containerSecurityContext. Set nodeSelector, tolerations, affinity, and podAnnotations on each workload. These settings have no global defaults.

Component settings

Each component has a top-level key, such as backend. Its workload block matches the Kubernetes resource it creates. For example, this configuration sets the backend’s replica count and resource requests.
Configure the following fields inside the workload block.Use maps for env, volumes, and volumeMounts. For example, set env.LOG_LEVEL.value to info, or use env.DB_URL.valueFrom.secretKeyRef for a Secret reference. Map entries let Helm override one value without replacing the others.Add enabled alongside the usual fields when configuring a probe.

Enable or disable components

Set <component>.enabled to control the whole component. Set its workload’s enabled value to control the pods while retaining the service and configuration. Bundled data stores use separate switches. Keep backend.enabled set to true. CostGraph requires the API to operate.

Apply component overrides

Keep your existing configuration in my-values.yaml when applying overrides. The following examples use the costgraph release and namespace.
Set the backend replica count and CPU request.

Container images

Set image.repository, image.tag, and image.pullPolicy inside each component’s workload block. Changing one component’s image does not update other components. For example, set the aggregator’s image tag in your values file. Replace IMAGE_TAG with the tag you want to deploy.

Mirror bundled images

Bundled data stores use public registries. To use a private mirror, override image.repository and image.tag in each enabled workload. Mirror images must preserve the default major versions and runtime users. If the mirror requires authentication, set imagePullSecrets on each data store’s workload. vmalert uses global.imagePullSecrets. A private mirror removes the need to reach Docker Hub for these images. CostGraph images still require registry.costgraph.ai. See Network access.

Registry credentials

Create a registry pull Secret when you use global.controlPlane.existingSecret. Replace DEPLOYMENT_API_KEY with your deployment API key.
Reference the Secret globally and on each application component.
When global.imagePullSecrets is set, the chart does not create costgraph-selfhosted-registry. It fails to render if an application component still references that Secret.
array
Registry pull Secrets used by chart-managed workloads, including vmalert and the database check Job. Also set deployment.imagePullSecrets on the backend, dashboard, ingestion API, and aggregator.

Credentials and data stores

Use existingSecret settings for production credentials. Helm stores credentials supplied directly in values files in release history.

Control plane and pricing

Configure authentication for your self-hosted license and pricing catalog.
string
Deployment API key for the CostGraph control plane and image pulls from registry.costgraph.ai.
string
Name of a Secret containing control-plane-api-key and pricing-api-key. This takes precedence over global.controlPlane.apiKey.Copy the deployment API key into both entries unless CostGraph issued a separate pricing key. The backend requires pricing-api-key to start. Configure registry credentials separately when you use this setting.
string
Control plane endpoint. Defaults to https://api.costgraph.ai.
string
CostGraph’s public key, included in the chart. Keep this value in place. The chart fails to render without it.
string
Key for downloading the pricing catalog. Leave empty to reuse global.controlPlane.apiKey.

PostgreSQL

Connect an external database for production, or enable the bundled database for evaluation.
string
Connection string for your PostgreSQL database, including the password, such as postgres://user:password@host:5432/database. Prefer global.postgres.existingSecret for production.
string
Name of a Secret whose postgres-url value contains the full connection URL, including the password. This takes precedence over global.postgres.url.
boolean
Apply pending database migrations when the backend starts. Leave enabled unless you run migrations separately.
boolean
Run PostgreSQL inside the cluster. Configure its resources under postgres.statefulSet.resources, and its storage with postgres.storage and postgres.storageClass.Use an external database for production. If you use Argo CD with the bundled database, follow Preserve generated credentials.

Metrics store

Use VictoriaMetrics to store the metrics CostGraph queries for cost and usage views.
string
URL of your VictoriaMetrics service. CostGraph requires v1.111.0 or later. Earlier versions reject queries used for node, volume, and workload metrics.
boolean
Run VictoriaMetrics inside the cluster. Set retention in months with victoriametrics.retentionPeriod. Configure storage with victoriametrics.storage and victoriametrics.storageClass.

Redis

Connect Redis or Valkey for caching, or enable the bundled Valkey instance.
string
Connection URL for Redis or Valkey. If the URL contains a password, use global.redis.existingSecret to keep it out of the ConfigMap.
string
Name of a Secret containing the connection URL under redis-url. This takes precedence over global.redis.url.
boolean
Run Valkey inside the cluster. The chart omits the redis component when this setting is false.

Network and browser access

Configure the public dashboard address, ingress routes, and trusted proxies.

Dashboard URL

Use a public URL that matches how you access the deployment.
string
Public URL for the dashboard, sign-in redirects, and invitation links. Use the address you open in a browser, including http:// or https://.With ingress enabled, leave empty to use the first ingress host. The chart uses HTTPS when ingress.tls covers that host. Set an explicit URL when TLS terminates before the ingress, or when ingress is disabled.If you also configure ingress, the URL’s host must appear in ingress.hosts.
string
Comma-separated browser origins allowed to call the API. Defaults to global.appBaseURL.

Ingress

The ingress routes requests from your hostname to the enabled services.
boolean
Create an Ingress resource. When enabled, ingress.hosts must contain at least one host.
string
Ingress class used by your ingress controller.
object
Annotations to add to the Ingress resource.
array
Hosts and their paths. The chart adds routes for enabled backend, dashboard, and ingestion API components.
array
Kubernetes Ingress TLS entries for your hosts and certificates.

Trusted proxies

CostGraph reads X-Forwarded-For only from trusted proxies to identify client addresses for sign-in rate limits and request logs. Private network ranges are trusted by default. To restrict trust to your ingress controller or load balancer, set TRUSTED_PROXIES to its comma-separated CIDR ranges.
CostGraph rejects invalid CIDRs at startup.

Integrations

Configure provider sign-in, Graph AI, and Slack for your deployment.

OAuth sign-in

Register an OAuth app with each provider you want to connect. Set its redirect URL to {APP_BASE_URL}/integrations/oauth/callback. Add the following entries under backend.deployment.env. The provider slug is DIGITALOCEAN, LINODE, CONVEX, or PLANETSCALE. Providers without OAuth credentials use the token form. Follow Connect with OAuth for a configuration example.

Graph AI

Connect the dashboard assistant to your model provider. Follow Graph AI for setup.
boolean
default:"false"
Enable Graph AI at /graphai on your CostGraph URL.
string
required
Model for Graph AI responses. Use <provider>/<model>, such as anthropic/claude-sonnet-4-5.
string
Model for generated dashboards and reports. Defaults to graphAi.model and must support structured JSON output.
string
Name of a Secret containing environment variables for Graph AI. Include your provider key, such as ANTHROPIC_API_KEY, and COSTGRAPH_READ_DATABASE_URL.Optional keys include OPENAI_BASE_URL, ANTHROPIC_BASE_URL, and RDS_CA_PATH.
object
Environment variables supplied directly in your values file instead of through graphAi.existingSecret. Helm stores these values in release history.
string
Hostname for the CostGraph MCP server. Leave empty to disable the endpoint. See Connect MCP clients.

Workflow sandboxes

Run the commands a workflow executes in sandboxes in your cluster. Follow Run workflows in your cluster for setup.
boolean
default:"false"
Run the relay that sandboxes take their work from. Requires ingress.enabled and backend.automation.enabled.
string
required
Hostname the relay is served on over https. Add it to ingress.tls.
string
required
ID of the self-hosted environment you created in the Claude Console, starting with env_.
object
Annotations for the relay’s Ingress. Raise your controller’s read and send timeouts, because the relay holds a connection open for as long as a session runs.
string
default:"costgraph-selfhosted-automation"
Secret holding RELAY_ENVIRONMENT_KEY. Must match backend.automation.existingSecret.

Slack

Enable Graph AI before connecting a Slack app. Setting global.slack.clientId or global.slack.existingSecret enables Slack. Follow Slack for app setup.
string
default:"socket"
socket opens an outbound connection to Slack. webhook accepts Slack requests through your CostGraph URL and adds the Slack routes to ingress.
string
Name of a Secret containing SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, and SLACK_SIGNING_SECRET. Socket mode also requires SLACK_APP_TOKEN.These entries take precedence over the corresponding values in global.slack.
string
Client ID from Basic Information > App Credentials in your Slack app settings.
string
Client secret from App Credentials. Required when you set global.slack.clientId.
string
Signing secret from App Credentials. Required in both connection modes.
string
App-level token starting with xapp- and carrying the connections:write scope. Required in socket mode.

Component reference

Configure each application service and bundled data store through its top-level block.
object
Serve the API and create the release ServiceAccount through backend.rbac.serviceAccount.Set replicas, resources, images, and environment variables under backend.deployment. Configure service ports under backend.service.ports.
object
Serve the web UI. Configure its image under dashboard.deployment.image.Set dashboard.apiBaseURL when the API uses a different host from global.appBaseURL. Leave dashboard.cognitoOAuthDomain and dashboard.graphAiBaseURL empty unless CostGraph supplies values for your deployment.
object
Receive metrics from your collectors. Use ingestionApi.logLevel for logging and ingestionApi.maxBodyBytes for the request size limit. Increase the limit if the service rejects remote write requests as too large.
object
Convert raw metrics into workload costs. Disabling this component stops cost breakdowns even if metrics still arrive.Use aggregator.features to enable or disable ENABLE_GPU, ENABLE_HPA, ENABLE_NETWORK_POLICY, ENABLE_EPHEMERAL_STORAGE, ENABLE_DISK_IOPS, and ENABLE_NETWORK_TRACE.ENABLE_NETWORK_TRACE defaults to "true". Set it to "false" to stop processing network flow tracing into traffic lines in Context.
object
Evaluate recording rules for daily rollups and recent cost views. The chart creates two Deployments from vmalert.deployment, one for each rule set.Rules come from the aggregator image, so aggregator.deployment.image.tag must be set. Each Deployment has a Service exposing /api/v1/rules. This component has no configurable service or rbac block.
object
Configure the bundled Valkey cache. Enable it through global.redis.bundled.enabled. It stores data in an emptyDir volume. For an external service, use global.redis.
object
Configure the bundled PostgreSQL database. Enable it through global.postgres.bundled.enabled.Set postgres.database, postgres.username, postgres.password, postgres.storage, and postgres.storageClass. An empty password generates a value during installation. Configure the workload under postgres.statefulSet.
object
Configure the bundled metrics store. Enable it through global.metricsStore.bundled.enabled. Set retention in months with victoriametrics.retentionPeriod, storage with victoriametrics.storage and victoriametrics.storageClass, and workload settings under victoriametrics.statefulSet.

Optional charts

Install these charts within the self-hosted release when you need their functionality. Each is disabled by default and accepts its own chart values under the named block. Use --wait during installation or upgrades to check that enabled workloads become ready.
object
Collect metrics from the cluster running CostGraph. Set operator.enabled=true, global.clusterName, and global.apiKey.global.backendURL and global.remoteWriteURL default to the internal API and ingestion service addresses. The chart rejects empty addresses or a disabled ingestion API when the operator writes to that service.See CostGraph Operator overview for collector setup.
object
Push billing data from sources CostGraph cannot query directly. Enable with focusExporter.enabled=true and place exporter settings under focusExporter.
object
Run workflow commands in sandboxes in this cluster. Enable with agentRuntime.enabled=true. Requires agentRelay. See Run workflows in your cluster.
string
required
This installation’s relay, https:// followed by agentRelay.host. Required when agentRuntime.enabled is true.

Deployment maintenance

Preserve generated keys during upgrades and review the database check before changing deployment settings.

Preserve generated credentials

Use helm install and helm upgrade to deploy the chart. Helm can read existing Secrets through lookup and reuse their generated keys.
Argo CD renders the chart with helm template, which cannot read existing cluster Secrets. Applying regenerated keys invalidates issued API keys and makes saved integration credentials unreadable.
For Argo CD, establish the Secrets before syncing and configure it to preserve their data. Pre-creating a Secret alone does not prevent a sync from overwriting it.
Configure both ignoreDifferences and RespectIgnoreDifferences=true. The following Application settings preserve the data in an existing generated Secret.
This configuration does not protect a Secret during its initial creation. Establish the deployment and back up its generated keys before allowing Argo CD to manage it.See Respect ignore differences configs in the Argo CD documentation for sync behavior.Use an external PostgreSQL database through global.postgres.existingSecret to avoid regenerating a bundled database password during rendering. If you use bundled PostgreSQL, its password must remain consistent across the database and application Secrets.
The generated Secret has helm.sh/resource-policy: keep, which protects it from deletion during helm uninstall. It does not prevent a sync from overwriting its data.

Database checks

The database check validates whether PostgreSQL can support the application schema.
boolean
Run a database check before upgrades that use an external PostgreSQL database. A failed check stops the upgrade. The chart does not run this Job on first install or with bundled PostgreSQL.Follow Verify the installation to run the check after installation.

Deployment labels and analytics

Use these settings to identify the deployment and control what it reports to CostGraph.
string
Name shown for this deployment in the CostGraph dashboard. Defaults to the Helm release name.
string
Chart name used in generated labels.
boolean
default:"true"
Send anonymous product analytics. Set to false to disable analytics.
boolean
default:"true"
Send a daily count of server errors and unpriced machine or disk types with the billing quantities. Counts carry the API route pattern and error type, or the provider, type, and region. They don’t include error messages, names, IDs, or cost figures. Set to false to send nothing.

Migrate an existing values file

Helm accepts unknown keys without warning. Compare your overrides with the current paths before upgrading so unsupported keys do not silently fall back to defaults.

Self-hosted chart values

Move overrides to the following paths in costgraph-selfhosted. The bundled data store switches remain global.postgres.bundled.enabled, global.redis.bundled.enabled, and global.metricsStore.bundled.enabled.

Operator chart values

The operator components use the same workload structure. Move overrides to the following paths in costgraph-operator. Keep flowtrace.maxUnavailable and operatorPrometheus.scrapeTargets at component level. The component’s enabled setting controls the whole component. Its workload’s enabled setting controls the pods.

Kubernetes resource names

Component resources use applicationName without a Helm release prefix. Check the existing resource names before upgrading.
Renaming a StatefulSet creates a new resource with empty volumes. It does not adopt the previous PersistentVolumeClaims. Back up bundled PostgreSQL and VictoriaMetrics before an upgrade that changes their names.
The operator chart uses the following names. fullnameOverride affects the operator’s ClusterRole, ClusterRoleBinding, and ServiceAccount. Set each component’s applicationName to control its workload names. Self-hosted resources use the costgraph-selfhosted prefix instead of <release>-costgraph-selfhosted. Use these guides for deployment steps and collector configuration.

Install self-hosted CostGraph

Prepare a values file, deploy the chart, and verify the installation.

Operator configuration

Configure the collector running in each monitored cluster.