costgraph-selfhosted Helm chart. For a starting values file and deployment commands, follow Install self-hosted CostGraph.
Configuration structure
Set shared connections and credentials underglobal. 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 asbackend. Its workload block matches the Kubernetes resource it creates.
For example, this configuration sets the backend’s replica count and resource requests.
Workload fields
Workload fields
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 inmy-values.yaml when applying overrides. The following examples use the costgraph release and namespace.
- Resources and replicas
- Bundled database
- Disable components
Set the backend replica count and CPU request.
Container images
Setimage.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, overrideimage.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 useglobal.controlPlane.existingSecret. Replace DEPLOYMENT_API_KEY with your deployment API key.
global.imagePullSecrets is set, the chart does not create costgraph-selfhosted-registry. It fails to render if an application component still references that Secret.
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
UseexistingSecret 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.Deployment API key for the CostGraph control plane and image pulls from
registry.costgraph.ai.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.CostGraph’s public key, included in the chart. Keep this value in place. The chart fails to render without it.
PostgreSQL
Connect an external database for production, or enable the bundled database for evaluation.Connection string for your PostgreSQL database, including the password, such as
postgres://user:password@host:5432/database. Prefer global.postgres.existingSecret for production.Name of a Secret whose
postgres-url value contains the full connection URL, including the password. This takes precedence over global.postgres.url.Apply pending database migrations when the backend starts. Leave enabled unless you run migrations separately.
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.URL of your VictoriaMetrics service. CostGraph requires v1.111.0 or later. Earlier versions reject queries used for node, volume, and workload metrics.
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.Connection URL for Redis or Valkey. If the URL contains a password, use
global.redis.existingSecret to keep it out of the ConfigMap.Name of a Secret containing the connection URL under
redis-url. This takes precedence over global.redis.url.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.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.Ingress
The ingress routes requests from your hostname to the enabled services.Hosts and their paths. The chart adds routes for enabled backend, dashboard, and ingestion API components.
Trusted proxies
CostGraph readsX-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.
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.Model for Graph AI responses. Use
<provider>/<model>, such as anthropic/claude-sonnet-4-5.Model for generated dashboards and reports. Defaults to
graphAi.model and must support structured JSON output.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.Environment variables supplied directly in your values file instead of through
graphAi.existingSecret. Helm stores these values in release history.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.Run the relay that sandboxes take their work from. Requires
ingress.enabled and backend.automation.enabled.ID of the self-hosted environment you created in the Claude Console, starting with
env_.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.
Secret holding
RELAY_ENVIRONMENT_KEY. Must match backend.automation.existingSecret.Slack
Enable Graph AI before connecting a Slack app. Settingglobal.slack.clientId or global.slack.existingSecret enables Slack. Follow Slack for app setup.
socket opens an outbound connection to Slack. webhook accepts Slack requests through your CostGraph URL and adds the Slack routes to ingress.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.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.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.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.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.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.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.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.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.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.
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.Push billing data from sources CostGraph cannot query directly. Enable with
focusExporter.enabled=true and place exporter settings under focusExporter.Run workflow commands in sandboxes in this cluster. Enable with
agentRuntime.enabled=true. Requires agentRelay. See Run workflows in your cluster.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
Usehelm install and helm upgrade to deploy the chart. Helm can read existing Secrets through lookup and reuse their generated keys.
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.
Preserve Secret data in Argo CD
Preserve Secret data in Argo CD
Configure both 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
ignoreDifferences and RespectIgnoreDifferences=true. The following Application settings preserve the data in an existing generated Secret.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.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.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.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 incostgraph-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 incostgraph-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 useapplicationName without a Helm release prefix. Check the existing resource names before upgrading.
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.
Related guides
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.