opencost
by OpenCost
Helm chartv2.5.35App 1.121.5Verified publisher
OpenCost and OpenCost UI
About this chart
opencost
OpenCost and OpenCost UI
Maintainers
| Name | Url | |
|---|---|---|
| jessegoodier | ||
| toscott | ||
| mittal-ishaan | ||
| brito-rafa | [email protected] |
Installing the Chart
To install the chart with the release name opencost:
$ helm install opencost opencost/opencost
Values
| Key | Type | Default | Description |
|---|---|---|---|
| annotations | object | {} | Annotations to add to the all the resources |
| clusterName | string | "cluster.local" | Override the default name of cluster - Can be found in /etc/kubernetes/admin.conf: clusters -> cluster -> name |
| external.nodeLabels.configMapName | string | "" | |
| external.nodeLabels.key | string | "" | |
| external.nodeLabels.namespace | string | "" | |
| external.nodeLabels.route | string | "" | |
| extraObjects | list | [] | Array of extra K8s manifests rendered through tpl and owned by the release. |
| extraVolumes | list | [] | A list of volumes to be added to the pod |
| fullnameOverride | string | "" | Overwrite all resources name created by the chart |
| imagePullSecrets | list | [] | List of secret names to use for pulling the images |
| loglevel | string | "info" | |
| nameOverride | string | "" | Overwrite the default name of the chart |
| namespaceOverride | string | "" | Override the deployment namespace |
| networkPolicies.enabled | bool | false | Specifies whether networkpolicies should be created |
| networkPolicies.extraEgress | list | [] | Extra egress rule |
| networkPolicies.prometheus | object | {"labels":{"app.kubernetes.io/name":"prometheus"},"namespace":"prometheus-system","port":9090} | Internal Prometheus settings related to NetworkPolicies |
| networkPolicies.prometheus.labels | object | {"app.kubernetes.io/name":"prometheus"} | Labels applied to the Prometheus server pod(s) |
| networkPolicies.prometheus.namespace | string | "prometheus-system" | Namespace where internal Prometheus is installed |
| networkPolicies.prometheus.port | int | 9090 | Pod port of in-cluster Prometheus |
| opencost.affinity | object | {} | Affinity settings for pod assignment |
| opencost.carbonCost.enabled | bool | false | Enable carbon cost exposed in the API |
| opencost.cloudCost.enabled | bool | false | Enable cloud cost ingestion and querying, dependant on valid integration credentials |
| opencost.cloudCost.monthToDateInterval | int | 6 | The number of standard runs before a Month-to-Date run occurs |
| opencost.cloudCost.queryWindowDays | int | 7 | The max number of days that any single query will be made to construct Cloud Costs |
| opencost.cloudCost.refreshRateHours | int | 6 | Number of hours between each run of the Cloud Cost pipeline |
| opencost.cloudCost.runWindowDays | int | 3 | Number of days into the past that a Cloud Cost standard run will query for |
| opencost.cloudIntegrationJSON | string | "" | Raw JSON for cloud-integration.json. Creates a Secret named <fullname>-cloud-integration in the release namespace. Mutually exclusive with opencost.cloudIntegrationSecret. |
| opencost.cloudIntegrationSecret | string | "" | Existing Secret containing cloud-integration.json for Cloud Costs. See https://www.opencost.io/docs/configuration/#cloud-costs. Create with: kubectl create secret generic <SECRET_NAME> --from-file=cloud-integration.json -n opencost. Mutually exclusive with opencost.cloudIntegrationJSON. |
| opencost.customPricing.configPath | string | "/tmp/custom-config" | Path for the pricing configuration. |
| opencost.customPricing.configmapName | string | "custom-pricing-model" | Customize the configmap name used for custom pricing |
| opencost.customPricing.costModel | object | {"CPU":1.25,"GPU":0.95,"RAM":0.5,"description":"Modified pricing configuration.","discount":"","internetNetworkEgress":0.12,"regionNetworkEgress":0.01,"spotCPU":0.006655,"spotRAM":0.000892,"storage":0.25,"zoneNetworkEgress":0.01} | More information about these values here: https://www.opencost.io/docs/configuration/on-prem#custom-pricing-using-the-opencost-helm-chart |
| opencost.customPricing.createConfigmap | bool | true | Configures the pricing model provided in the values file. |
| opencost.customPricing.enabled | bool | false | Enables custom pricing configuration |
| opencost.customPricing.provider | string | "custom" | Sets the provider type for the custom pricing file. |
| opencost.exporter.adminToken.enabled | bool | false | When true, the chart creates the admin-token Secret (if value is set) or mounts existingSecret as ADMIN_TOKEN. When false, ADMIN_TOKEN is not set and no secret is deployed. |
| opencost.exporter.adminToken.existingSecret | string | "" | Use an existing Secret for the admin token (recommended). Secret must contain the key below. |
| opencost.exporter.adminToken.secretKey | string | "ADMIN_TOKEN" | Key in the Secret that holds the admin token (used for both value-created and existing secrets). |
| opencost.exporter.adminToken.value | string | "" | If set, the chart creates a Secret with this value and sets ADMIN_TOKEN from it (not recommended for production; use existingSecret instead). |
| opencost.exporter.apiHttpRoute | object | {"annotations":{},"enabled":false,"hostnames":[],"labels":{},"parentRefs":[{"name":"","namespace":"","sectionName":""}],"rules":[{"backendRefs":[{"name":"","port":9003}],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]} | HTTPRoute for OpenCost API (Gateway API) |
| opencost.exporter.apiHttpRoute.annotations | object | {} | Annotations for HTTPRoute resource |
| opencost.exporter.apiHttpRoute.enabled | bool | false | Enable HTTPRoute resource |
| opencost.exporter.apiHttpRoute.hostnames | list | [] | Hostnames for the HTTPRoute |
| opencost.exporter.apiHttpRoute.labels | object | {} | Labels for HTTPRoute resource |
| opencost.exporter.apiHttpRoute.parentRefs | list | See values.yaml | Gateway API parent references |
| opencost.exporter.apiHttpRoute.rules | list | See values.yaml | HTTPRoute rules. Each rule supports an optional filters list at the rule level and per-backendRef filters for Gateway API filter configuration (e.g. basic auth via ExtensionRef, header modification via RequestHeaderModifier, etc.). |
| opencost.exporter.apiIngress.annotations | object | {} | Annotations for Ingress resource |
| opencost.exporter.apiIngress.enabled | bool | false | Ingress for OpenCost API |
| opencost.exporter.apiIngress.hosts | list | See values.yaml | A list of host rules used to configure the Ingress |
| opencost.exporter.apiIngress.ingressClassName | string | "" | Ingress controller which implements the resource |
| opencost.exporter.apiIngress.servicePort | string | "http" | Redirect ingress to an extraPort defined on the service such as oauth-proxy |
| opencost.exporter.apiIngress.tls | list | [] | Ingress TLS configuration |
| opencost.exporter.apiPort | int | 9003 | |
| opencost.exporter.aws.access_key_id | string | "" | AWS secret key id |
| opencost.exporter.aws.secret_access_key | string | "" | AWS secret access key |
| opencost.exporter.cloudProviderApiKey | string | "" | The GCP Pricing API requires a key. This is supplied just for evaluation. |
| opencost.exporter.collectorDataSource.enabled | bool | false | |
| opencost.exporter.collectorDataSource.networkPort | int | 3001 | The port at which network pods are open to egress |
| opencost.exporter.collectorDataSource.retention10m | int | 36 | The number of 10m intervals the Collector DataSource should maintain |
| opencost.exporter.collectorDataSource.retention1d | int | 15 | The number of 1d intervals the Collector DataSource should maintain |
| opencost.exporter.collectorDataSource.retention1h | int | 49 | The number of 1h intervals the Collector DataSource should maintain |
| opencost.exporter.collectorDataSource.scrapeInterval | string | "30s" | define the interval at which the collector scrapes for data points (10s, 15s, 1m) |
| opencost.exporter.command | list | [] | Optional command to override the default container command |
| opencost.exporter.csv_path | string | "" | |
| opencost.exporter.defaultClusterId | string | "default-cluster" | Default cluster ID to use if cluster_id is not set in Prometheus metrics. |
| opencost.exporter.env | list | [] | List of additional environment variables to set in the container |
| opencost.exporter.extraArgs | list | [] | List of extra arguments for the command, e.g.: log-format=json |
| opencost.exporter.extraEnv | object | {} | Any extra environment variables you would like to pass on to the pod |
| opencost.exporter.extraEnvFrom | list | [] | Extra environment variables from secrets or configmaps |
| opencost.exporter.extraVolumeMounts | list | [] | A list of volume mounts to be added to the pod |
| opencost.exporter.image | object | {"fullImageName":null,"pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"opencost/opencost","tag":"1.121.5@sha256:29e7becb7b04b935d85031c7fb43bb3731b53899b3f05353c83c5850619ade3e"} | This overrides the above defaultClusterId. Ensure the ConfigMap exists and contains the required CLUSTER_ID key. clusterIdConfigmap: cluster-id-configmap |
| opencost.exporter.image.fullImageName | string | nil | Override the full image name for development purposes |
| opencost.exporter.image.pullPolicy | string | "IfNotPresent" | Exporter container image pull policy |
| opencost.exporter.image.registry | string | "ghcr.io" | Exporter container image registry |
| opencost.exporter.image.repository | string | "opencost/opencost" | Exporter container image name |
| opencost.exporter.image.tag | string | "1.121.5@sha256:29e7becb7b04b935d85031c7fb43bb3731b53899b3f05353c83c5850619ade3e" | Exporter container image tag |
| opencost.exporter.inferenceCostTracking.collectionInterval | string | "2m" | Background collection interval |
| opencost.exporter.inferenceCostTracking.enabled | bool | false | Enable inference cost tracking |
| opencost.exporter.inferenceCostTracking.modelLabel | string | "llm-d.ai/model" | Pod label whose value is the vLLM model name. Must match the model_name label on vLLM Prometheus metrics |
| opencost.exporter.inferenceCostTracking.sharedInfraLabel | string | "llm-d.ai/inference-shared" | Pod label key identifying shared infra pods (EPP, gateway) |
| opencost.exporter.inferenceCostTracking.sharedInfraLabelValue | string | "true" | Label value that marks a pod as shared infra |
| opencost.exporter.livenessProbe.enabled | bool | true | Whether probe is enabled |
| opencost.exporter.livenessProbe.failureThreshold | int | 3 | Number of failures for probe to be considered failed |
| opencost.exporter.livenessProbe.initialDelaySeconds | int | 10 | Number of seconds before probe is initiated |
| opencost.exporter.livenessProbe.path | string | "/healthz" | Probe path |
| opencost.exporter.livenessProbe.periodSeconds | int | 20 | Probe frequency in seconds |
| opencost.exporter.livenessProbe.timeoutSeconds | int | 1 | Number of seconds after which the probe times out |
| opencost.exporter.persistence.accessMode | string | "" | Access mode for persistent volume |
| opencost.exporter.persistence.annotations | object | {} | Annotations for persistent volume |
| opencost.exporter.persistence.enabled | bool | false | |
| opencost.exporter.persistence.mountPath | string | "/mnt/export" | The path that the PV will be mounted to the exporter at |
| opencost.exporter.persistence.size | string | "" | Size for persistent volume |
| opencost.exporter.persistence.storageClass | string | "" | Storage class for persistent volume |
| opencost.exporter.prometheusDataSource.queryResolutionSeconds | int | 300 | |
| opencost.exporter.readinessProbe.enabled | bool | true | Whether probe is enabled |
| opencost.exporter.readinessProbe.failureThreshold | int | 3 | Number of failures for probe to be considered failed |
| opencost.exporter.readinessProbe.initialDelaySeconds | int | 10 | Number of seconds before probe is initiated |
| opencost.exporter.readinessProbe.path | string | "/healthz" | Probe path |
| opencost.exporter.readinessProbe.periodSeconds | int | 10 | Probe frequency in seconds |
| opencost.exporter.readinessProbe.successThreshold | int | 1 | Minimum consecutive successes for the probe to be considered successful after having failed |
| opencost.exporter.readinessProbe.timeoutSeconds | int | 1 | Number of seconds after which the probe times out |
| opencost.exporter.replicas | int | 1 | Number of OpenCost replicas to run |
| opencost.exporter.resources.limits | object | {"memory":"1Gi"} | CPU/Memory resource limits |
| opencost.exporter.resources.requests | object | {"cpu":"10m","memory":"55Mi"} | CPU/Memory resource requests |
| opencost.exporter.securityContext | object | {} | The security options the container should be run with |
| opencost.exporter.startupProbe.enabled | bool | true | Whether probe is enabled |
| opencost.exporter.startupProbe.failureThreshold | int | 30 | Number of failures for probe to be considered failed |
| opencost.exporter.startupProbe.initialDelaySeconds | int | 10 | Num |
Deploy opencost with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has opencost on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartopencost is pinned at v2.5.35 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply