Skip to content

Commit

Permalink
Template Prometheus values (#100)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Ray <[email protected]>
Co-authored-by: Matt Ray <[email protected]>
  • Loading branch information
dnskr and mattray authored Aug 28, 2023
1 parent e78139e commit abd01a5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
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:
- kubecost
- opencost
- monitoring
version: 1.19.0
version: 1.19.1
maintainers:
- name: mattray
url: https://mattray.dev
Expand Down
3 changes: 2 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.18.1](https://img.shields.io/badge/Version-1.18.1-informational?style=flat-square)
![Version: 1.19.1](https://img.shields.io/badge/Version-1.19.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 1.105.2](https://img.shields.io/badge/AppVersion-1.105.2-informational?style=flat-square)

Expand Down Expand Up @@ -116,6 +116,7 @@ $ helm install opencost opencost/opencost
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.automountServiceAccountToken | bool | `true` | Whether pods running as this service account should have an API token automatically mounted |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
6 changes: 3 additions & 3 deletions charts/opencost/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ Create the name of the controller service account to use
*/}}
{{- define "opencost.prometheusServerEndpoint" -}}
{{- if .Values.opencost.prometheus.external.enabled -}}
{{ .Values.opencost.prometheus.external.url }}
{{ tpl .Values.opencost.prometheus.external.url . }}
{{- else -}}
{{- $host := .Values.opencost.prometheus.internal.serviceName }}
{{- $ns := .Values.opencost.prometheus.internal.namespaceName }}
{{- $host := tpl .Values.opencost.prometheus.internal.serviceName . }}
{{- $ns := tpl .Values.opencost.prometheus.internal.namespaceName . }}
{{- $port := .Values.opencost.prometheus.internal.port | int }}
{{- printf "http://%s.%s.svc:%d" $host $ns $port -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/opencost/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ opencost:
# -- Use external Prometheus (eg. Grafana Cloud)
enabled: false
# -- External Prometheus url
url: 'https://prometheus.example.com/prometheus'
url: "https://prometheus.example.com/prometheus"
internal:
# -- Use in-cluster Prometheus
enabled: true
Expand Down

0 comments on commit abd01a5

Please sign in to comment.