NewCompare CPU & GPU pricing across AWS, Azure & GCP
Cost Operator

Configuration

Helm values, collection intervals, access tiers, and org-wide commitment collection for the Cost Operator (trezr).

Configuration

trezr is configured through its Helm chart, oci://registry-1.docker.io/devzeroinc/trezr. It has no CRDs. Change a value with --set on helm upgrade, or with dz install cost --upgrade --set <key>=<value>.

Core Values

ValueDefaultDescription
trezr.clusterName(required)Cluster name reported to DevZero.
trezr.region(required)Cloud region of the cluster.
trezr.cloudProviderawsaws, gcp, or azure.
trezr.dakrUrlhttps://dakr.devzero.ioDevZero API endpoint.
namespacedevzero-systemNamespace for every object the chart creates.
serviceAccount.annotations{}The cloud identity: an IRSA role ARN, a GCP service account, or an Azure client id.
podLabels{}Extra pod labels. Azure Workload Identity needs azure.workload.identity/use: "true".
replicaCount1Replicas. With leader election on, only one collects at a time.
trezr.leaderElecttrueRun with leader election.

Cluster Token

trezr uses the Read Operator's cluster token. You do not need to set it.

ValueDefaultDescription
trezr.tokenFromSecret{name: devzero-zxporter-token, key: CLUSTER_TOKEN}Read the token from this Secret first. Only read from trezr's own namespace. trezr reads it again when DevZero rejects the token, so a rotated token is picked up without a restart. Set to null to turn it off.
trezr.tokenFromConfigMap{name: devzero-zxporter-env-config, namespace: "", key: CLUSTER_TOKEN}Fallback for older Read Operator installs that kept the token in a ConfigMap. Current installs keep it in the Secret above. An empty namespace means trezr's own.
trezr.clusterToken""Set the token directly. Stored in a Secret, never in the ConfigMap.

Collection Intervals

ValueDefaultWhat it controls
trezr.intervals.reservations6hHow often commitments are listed
trezr.intervals.costExplorer24hHow often utilization and spend are read
trezr.intervals.cur24hHow often the selected billing export is read, on every cloud
trezr.intervals.curConfigPoll10mHow often trezr asks DevZero which export you picked

Billing exports refresh about once a day, so reading them more often than every 24 hours rarely finds new rows. On AWS, each Cost Explorer call is billed, so a shorter costExplorer interval costs more.

Cloud Values

ValueDefaultDescription
trezr.aws.orgMode.managementAccountRoleARN""A role in the management account to assume, to collect Reserved Instances and Savings Plans across the whole AWS Organization.
curScratch.mountPath/var/tmp/trezr-curWhere CUR files are downloaded before they are read.
curScratch.sizeLimit2GiSize limit of that scratch volume.

Org mode needs permissions on both sides:

  1. The management account role must trust this cluster's IRSA role. It must allow ec2:DescribeReservedInstances, savingsplans:DescribeSavingsPlans, savingsplans:DescribeSavingsPlanRates, and organizations:ListAccounts.
  2. trezr's IRSA role must allow sts:AssumeRole on the management account role. The default policy in AWS Setup does not include it. Add this statement:
{
  "Effect": "Allow",
  "Action": "sts:AssumeRole",
  "Resource": "arn:aws:iam::<management-account-id>:role/<role-name>"
}

Resources

ValueDefault
resources.requests.cpu100m
resources.requests.memory256Mi
resources.limits.cpu200m
resources.limits.memory512Mi

Reading CUR parquet files needs more memory than the API calls. Raise the memory limit if trezr is OOM-killed during a billing export read.

Access Tiers

At startup, trezr checks which commitment APIs its identity can call. The result is its access tier. DevZero shows it next to your commitments, so you can see what is missing.

The tier is only a label. trezr still makes every call on schedule, and a call it has no permission for fails on its own. Billing export reads are not part of the check.

trezr checks its access only at startup. After you change its roles, restart it: kubectl rollout restart -n devzero-system deploy/trezr.

TierWhenWhat you get
FullReserved Instance and Savings Plan calls (including rates) succeedReserved Instances and Savings Plans
StandardReserved Instances succeed, Savings Plans failReserved Instances only
Minimalec2:DescribeReservedInstances failsNo commitments

Cost Explorer is not part of the check. Without the ce:* actions, utilization and spend are missing at any tier.

Admission Policies

If an admission controller requires labels on every object, the trezr chart supports two values:

  • global.commonLabels adds labels to every object the chart creates.
  • podLabels adds labels to the trezr pod only.

The chart has no commonAnnotations or podAnnotations. See Admission Policy Labels.

On this page