Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for enabling the Carbon Cost API #211

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/opencost/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keywords:
- finops
- monitoring
- opencost
version: 1.38.1
version: 1.39.0
maintainers:
- name: mattray
url: https://mattray.dev
Expand Down
4 changes: 3 additions & 1 deletion charts/opencost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

OpenCost and OpenCost UI

![Version: 1.37.1](https://img.shields.io/badge/Version-1.37.1-informational?style=flat-square)
![Version: 1.39.0](https://img.shields.io/badge/Version-1.39.0-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 1.110.0](https://img.shields.io/badge/AppVersion-1.110.0-informational?style=flat-square)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/opencost)](https://artifacthub.io/packages/search?repo=opencost)
Expand Down Expand Up @@ -42,6 +42,7 @@ $ helm install opencost opencost/opencost
| 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 |
Expand Down Expand Up @@ -95,6 +96,7 @@ $ helm install opencost opencost/opencost
| opencost.exporter.startupProbe.path | string | `"/healthz"` | Probe path |
| opencost.exporter.startupProbe.periodSeconds | int | `5` | Probe frequency in seconds |
| opencost.extraContainers | list | `[]` | extra sidecars to add to the pod. Useful for things like oauth-proxy for the UI |
| opencost.metrics.config.configmapName | string | `"custom-metrics"` | Customize the configmap name used for metrics |
| opencost.metrics.config.disabledMetrics | list | `[]` | List of metrics to be disabled |
| opencost.metrics.config.enabled | bool | `false` | Enables creating the metrics.json configuration as a ConfigMap |
| opencost.metrics.kubeStateMetrics.emitKsmV1Metrics | bool | `nil` | Enable emission of KSM v1 metrics |
Expand Down
4 changes: 4 additions & 0 deletions charts/opencost/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ spec:
- name: API_PORT
value: {{ .Values.opencost.exporter.apiPort | quote }}
{{- end }}
{{- if .Values.opencost.carbonCost.enabled }}
- name: CARBON_ESTIMATES_ENABLED
value: {{ .Values.opencost.carbonCost.enabled | quote }}
{{- end }}
- name: PROMETHEUS_SERVER_ENDPOINT
value: {{ include "opencost.prometheusServerEndpoint" . | quote }}
{{- if .Values.opencost.exporter.cloudProviderApiKey }}
Expand Down
4 changes: 4 additions & 0 deletions charts/opencost/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ opencost:
dataRetention:
dailyResolutionDays: 15

carbonCost:
# -- Enable carbon cost exposed in the API
enabled: false

cloudCost:
# -- Enable cloud cost ingestion and querying, dependant on valid integration credentials
enabled: false
Expand Down
Loading