values.yaml. The defaults work for most clusters; this page covers the options you’re most likely to change.
Global settings
API key for authenticating with CostGraph. Don’t commit a real key. Prefer
existingSecret in production.Where cluster metrics are sent. A self-hosted install points this at its own
ingestion endpoint; left unset, metrics go to hosted CostGraph.
Top level, not under
global. It does not reach the component workloads. See
Component configuration.Affects the ClusterRole (
<fullname>-view), the ClusterRoleBinding and the
ServiceAccount only. Every component’s objects are named from its own
applicationName.Component configuration
All four CostGraph components in this chart (operatorKubernetes,
operatorPrometheus, aiGatewayScraper and flowtrace) take the same shape:
daemonSet: differs only where
Kubernetes forces it to: replicas is ignored, and strategy becomes
updateStrategy. Enabling, sizing or scheduling any component is therefore the
same operation.
enabled gates the whole component. <component>.deployment.enabled (or
.daemonSet.enabled) is the narrower switch that keeps the configuration and
drops the pods.
env is a map, not a list: env.LOG_LEVEL.value: info, or
env.API_KEY.valueFrom.secretKeyRef. A map means --set can override one
variable without clobbering its siblings.flowtrace.maxUnavailable (rollout speed)
and operatorPrometheus.scrapeTargets.
The same contract covers the self-hosted chart. See the
values reference for the full description,
including the three value tiers and the Argo CD caveat.
Resource exporter
operatorKubernetes watches cluster resources and exports them to CostGraph.
Its workload settings sit under operatorKubernetes.deployment.
Deploy the resource exporter. Wired as the
condition on the dependency, so
turning it off renders nothing at all.The chart’s top-level
imagePullSecrets does not reach this Deployment, so a
private exporter image needs the secret repeated here.Additional environment variables, as a map of name to
value or valueFrom,
so a single variable can be overridden with --set without clobbering its
siblings.Operational/Compute Metrics scraper
operatorPrometheus scrapes in-cluster metrics endpoints and remote-writes them to CostGraph.
AI gateway scraper
aiGatewayScraper reads token usage from AI gateways running in the cluster and
remote-writes it to the short-retention tier. It is a second instance of the
same scraper image; the difference is remoteWritePath, because raw gateway
series are high cardinality and are not intended to live as long as the
operator’s scraped metrics.
Short-retention tier. Recording rules distil these series before anything
reaches 90-day retention.
scrapeTargets. Targets are served by CostGraph from the
connections you create in Settings > Integrations. They are fetched at
start and refreshed while it runs, so connecting a gateway leaves these values
untouched. See AI gateways.
A target you define yourself in operatorPrometheus.scrapeTargets takes
precedence over a served one. A served target is applied only when it carries a
metric-name filter.
Network Metrics scraper
flowtrace scrapes per-container network metrics and, optionally, host-process network metrics, then remote-writes them to CostGraph.
See Network flow tracing for what it records.
The DaemonSet mounts the host filesystems at:
- cgroupfs:
/host/sys/fs/cgroup. - procfs:
/host/proc. - bpffs:
/sys/fs/bpf, while request capture is on.
Its workload. Same keys as a
deployment: block, minus replicas. The
defaults set containerSecurityContext.privileged and runAsUser: 0.
Resolving container identity from other processes’ /proc entries requires
both,
and withhold the service account token because no Kubernetes API access is
needed.system-node-critical is appropriate here but is namespace-restricted on some
clusters, so it is left unset rather than defaulted.Rollout speed. Raise it on large fleets, for example
"10%".Remote-write endpoint for collected metrics. The values file ships it empty:
the chart falls back to
global.remoteWriteURL, and to
https://tsdb.costgraph.ai when that is empty too.Container network flows are collected by default. Host-process network flows are collected only when this is enabled.
Collect per-request HTTP metrics: request and response sizes, the host each request
was sent to, and any
X-CostGraph-* request headers. While on, the DaemonSet runs in
the host PID namespace and mounts /sys/fs/bpf. See
Request header attribution.Scrape targets
operatorPrometheus.scrapeTargets is a map of the in-cluster /metrics endpoints to scrape. The chart ships defaults for cAdvisor, kube-state-metrics, node-exporter, and the kubelet (DCGM is off). Add a source by appending an entry. No new operator image is required.
Each entry accepts:
pod discovers and scrapes matching pods; node scrapes each node’s kubelet through the API-server proxy.Stamp
costgraph_instance_hostname and costgraph_instance_id on node-scoped sources like cAdvisor and node-exporter.OpenCost API
openCostApi serves the OpenCost allocation API from inside the cluster, for
tools that resolve a Kubernetes Service rather than call a URL. kubectl cost
is one. The component is an nginx that proxies to CostGraph and attaches the
operator’s API key. It pins every request to global.clusterName, so a tool run
here reports this cluster rather than every cluster on your account.
Leave it off while OpenCost or Kubecost still runs in the cluster. They own
these Service names until you remove them.
Add a second Service under the name Kubecost clients resolve. The
/model
path those clients request is served either way; this adds the name and port.Where the proxy sends requests. A self-hosted install points this at its own
backend.
opencost or kubecost. See OpenCost
API for the flags that cover the difference.
Bundled exporters
The chart pulls in the metrics sources as subcharts. Disable any you already run in the cluster. Disableflowtrace if you do not need network tracing.
Host-level metrics (CPU, memory, disk, network). The port defaults to
9101
rather than the upstream 9100. The subchart binds a hostPort, and 9100
collides with a node exporter the cluster already runs. The operator’s
scrape target follows prometheus-node-exporter.service.port, so change it
there only.NVIDIA GPU metrics. Enable only on clusters with GPU nodes; restrict it to GPU nodes with
dcgm-exporter.nodeSelector and dcgm-exporter.tolerations. What CostGraph does with these measurements is covered in Accelerators.A second, isolated DCGM exporter carrying only the profiling counters (SM
active, SM occupancy, PCIe byte rates). It is separate because a card whose
driver refuses profiling makes the exporter exit. Keeping those counters out
of the shared exporter means such a node fails alone. Otherwise it takes
utilisation, memory and power down with it, and stalls the rollout for every
other GPU. See Accelerators.
Port the profiling exporter listens on. It shares a node with the preceding
exporter, which binds
9400, so the two cannot share a port.Narrow the profiling DaemonSet. By default it schedules wherever the shared
exporter does, and tolerates the
nvidia.com/gpu taint the same way.Per-container and, optionally, host per-process network metrics (bytes sent/received, packets sent/received, connection count).
CostGraph AutoPilot
CostGraph AutoPilot keeps workload requests right-sized. Everything is off by default. The settings live underglobal.autopilot.
Turns AutoPilot on for this cluster. Workloads still need an
annotation before anything is applied.
How sizing is applied when a workload does not set
autopilot.costgraph.ai/via. webhook or vpa.Pauses all applying on this cluster. Pods start unchanged and running pods are not resized.
Targets older than this are ignored: pods start unchanged, resizing stops, and VPAs that CostGraph created are switched to
Off. Keep it at least three times how often CostGraph recalculates targets (every 5 minutes by default). The default of 30m is safe.Installs the admission webhook that sets requests on new pods. It needs Kubernetes 1.28 or later, and fails open: if it is unavailable, pods are created unchanged. Resizing running pods in place needs Kubernetes 1.33 or later.
Allows CostGraph to create and update Vertical Pod Autoscalers for workloads that use
via: vpa. Grants the permissions this needs. See Vertical Pod Autoscaler. If you turn it off after it was on, the VPAs CostGraph created stay in place. Delete them with kubectl delete vpa -A -l costgraph.ai/managed=true.Allows CostGraph to create its own
karpenter.sh/v1 NodePools. Grants the permissions this needs. CostGraph never edits NodePools you created. See Karpenter node pools.The Karpenter weight of every NodePool CostGraph creates, from 1 to 100. The default of
0 uses 50. See Created pool properties.Allows AutoPilot to change the MIG partition layout of GPU nodes after someone approves the plan. Grants the operator
patch and update on nodes and create on pods/eviction. See GPU partition changes.Allows CostGraph to grow PersistentVolumeClaims of workloads annotated with
autopilot.costgraph.ai/storage: auto. Grants the operator patch on persistentvolumeclaims. See Persistent volumes.serviceAccount.create is false.
Deploying with Argo CD or Flux
If you deploy with a GitOps tool that renders the chart without cluster access (Argo CD, Flux), setautopilotWebhookTLS.ca, autopilotWebhookTLS.crt and autopilotWebhookTLS.key (base64-encoded PEM). Otherwise every render generates a new webhook certificate and restarts the webhook pods.
Full values reference
Complete values.yaml
Complete values.yaml
Node and volume pricing
Nodes and volumes outside a supported cloud are priced withcostgraph.ai/pricing-id.compute and costgraph.ai/pricing-id.storage
labels. See On-prem pricing.