Skip to content

Commit

Permalink
Merge pull request #27 from mkilchhofer/feature/fixed_version_and_val…
Browse files Browse the repository at this point in the history
…ues_documentation

feat: Install pinned version rather than latest tag
  • Loading branch information
toscott authored Mar 15, 2023
2 parents 2dc3078 + b1c8be8 commit 66bc827
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 76 deletions.
11 changes: 9 additions & 2 deletions charts/opencost/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
apiVersion: v2
appVersion: 1.9.8
appVersion: 1.101.2
name: opencost
description: OpenCost and OpenCost UI
version: 1.3.1
type: application
keywords:
- cost-optimization
- finops
- kubecost
- opencost
- monitoring
version: 1.4.0
maintainers:
- name: mattray
url: https://mattray.dev
91 changes: 49 additions & 42 deletions charts/opencost/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# opencost

Opencost and Opencost UI
OpenCost and OpenCost UI

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: 1.9.8](https://img.shields.io/badge/AppVersion-1.9.8-informational?style=flat-square)
![Version: 1.4.0](https://img.shields.io/badge/Version-1.4.0-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 1.100.2](https://img.shields.io/badge/AppVersion-1.100.2-informational?style=flat-square)

## Maintainers

Expand All @@ -12,7 +14,7 @@ Opencost and Opencost UI

## Installing the Chart

To install the chart with the release name `my-release`:
To install the chart with the release name `opencost`:

```console
$ helm install opencost opencost/opencost
Expand All @@ -22,45 +24,50 @@ $ helm install opencost opencost/opencost

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| annotations | object | `{}` | |
| opencost.exporter.defaultClusterId | string | `"default-cluster"` | |
| opencost.exporter.extraEnv | object | `{}` | |
| opencost.exporter.image.registry | string | `"quay.io"` | |
| opencost.exporter.image.repository | string | `"kubecost1/kubecost-cost-model"` | |
| opencost.exporter.image.tag | string | `"latest"` | |
| opencost.exporter.resources.limits.cpu | string | `"999m"` | |
| opencost.exporter.resources.limits.memory | string | `"1G"` | |
| opencost.exporter.resources.requests.cpu | string | `"10m"` | |
| opencost.exporter.resources.requests.memory | string | `"55M"` | |
| opencost.metrics.serviceMonitor.additionalLabels | object | `{}` | |
| opencost.metrics.serviceMonitor.enabled | bool | `false` | |
| opencost.metrics.serviceMonitor.metricRelabelings | list | `[]` | |
| opencost.metrics.serviceMonitor.namespace | string | `""` | |
| opencost.metrics.serviceMonitor.namespaceSelector | object | `{}` | |
| opencost.metrics.serviceMonitor.relabelings | list | `[]` | |
| opencost.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | |
| opencost.metrics.serviceMonitor.targetLabels | list | `[]` | |
| opencost.prometheus.external.enabled | bool | `false` | |
| opencost.prometheus.external.url | string | `"https://mimir-dev-push.infra.alto.com/prometheus"` | |
| opencost.prometheus.internal.enabled | bool | `true` | |
| opencost.prometheus.internal.namespaceName | string | `"opencost"` | |
| opencost.prometheus.internal.port | int | `9090` | |
| opencost.prometheus.internal.serviceName | string | `"my-prometheus"` | |
| opencost.tolerations | list | `[]` | |
| opencost.ui.enabled | bool | `true` | |
| opencost.ui.image.registry | string | `"quay.io"` | |
| opencost.ui.image.repository | string | `"kubecost1/opencost-ui"` | |
| opencost.ui.image.tag | string | `"latest"` | |
| opencost.ui.resources.limits.cpu | string | `"999m"` | |
| opencost.ui.resources.limits.memory | string | `"1G"` | |
| opencost.ui.resources.requests.cpu | string | `"10m"` | |
| opencost.ui.resources.requests.memory | string | `"55M"` | |
| service.annotations | object | `{}` | |
| service.labels | object | `{}` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automountServiceAccountToken | bool | `true` | |
| serviceAccount.create | bool | `true` | |
| annotations | object | `{}` | Annotations to add to the Deployment |
| extraVolumes | list | `[]` | A list of volumes to be added to the pod |
| opencost.affinity | object | `{}` | Affinity settings for pod assignment |
| opencost.exporter.cloudProviderApiKey | string | `""` | The GCP Pricing API requires a key. This is supplied just for evaluation. |
| opencost.exporter.defaultClusterId | string | `"default-cluster"` | Default cluster ID to use if cluster_id is not set in Prometheus metrics. |
| opencost.exporter.extraEnv | object | `{}` | Any extra environment variables you would like to pass on to the pod |
| opencost.exporter.extraVolumeMounts | list | `[]` | A list of volume mounts to be added to the pod |
| opencost.exporter.image.registry | string | `"quay.io"` | Exporter container image registry |
| opencost.exporter.image.repository | string | `"kubecost1/kubecost-cost-model"` | Exporter container image name |
| opencost.exporter.image.tag | string | `""` (use appVersion in Chart.yaml) | Exporter container image tag |
| opencost.exporter.resources.limits | object | `{"cpu":"999m","memory":"1Gi"}` | CPU/Memory resource limits |
| opencost.exporter.resources.requests | object | `{"cpu":"10m","memory":"55Mi"}` | CPU/Memory resource requests |
| opencost.metrics.serviceMonitor.additionalLabels | object | `{}` | Additional labels to add to the ServiceMonitor |
| opencost.metrics.serviceMonitor.enabled | bool | `false` | Create ServiceMonitor resource for scraping metrics using PrometheusOperator |
| opencost.metrics.serviceMonitor.honorLabels | bool | `false` | HonorLabels chooses the metric's labels on collisions with target labels |
| opencost.metrics.serviceMonitor.metricRelabelings | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion |
| opencost.metrics.serviceMonitor.namespace | string | `""` | Specify if the ServiceMonitor will be deployed into a different namespace (blank deploys into same namespace as chart) |
| opencost.metrics.serviceMonitor.relabelings | list | `[]` | RelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields |
| opencost.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | Interval at which metrics should be scraped |
| opencost.nodeSelector | object | `{}` | Node labels for pod assignment |
| opencost.prometheus.bearer_token | string | `""` | Prometheus Bearer token |
| opencost.prometheus.external.enabled | bool | `false` | Use external Prometheus (eg. Grafana Cloud) |
| opencost.prometheus.external.url | string | `"https://mimir-dev-push.infra.alto.com/prometheus"` | External Prometheus url |
| opencost.prometheus.internal.enabled | bool | `true` | Use in-cluster Prometheus |
| opencost.prometheus.internal.namespaceName | string | `"opencost"` | Namespace of in-cluster Prometheus |
| opencost.prometheus.internal.port | int | `9090` | Service port of in-cluster Prometheus |
| opencost.prometheus.internal.serviceName | string | `"my-prometheus"` | Service name of in-cluster Prometheus |
| opencost.prometheus.password | string | `""` | Prometheus Basic auth password |
| opencost.prometheus.username | string | `""` | Prometheus Basic auth username |
| opencost.tolerations | list | `[]` | Toleration labels for pod assignment |
| opencost.topologySpreadConstraints | list | `[]` | Assign custom TopologySpreadConstraints rules |
| opencost.ui.enabled | bool | `true` | Enable OpenCost UI |
| opencost.ui.image.registry | string | `"quay.io"` | UI container image registry |
| opencost.ui.image.repository | string | `"kubecost1/opencost-ui"` | UI container image name |
| opencost.ui.image.tag | string | `""` (use appVersion in Chart.yaml) | UI container image tag |
| opencost.ui.resources.limits | object | `{"cpu":"999m","memory":"1Gi"}` | CPU/Memory resource limits |
| opencost.ui.resources.requests | object | `{"cpu":"10m","memory":"55Mi"}` | CPU/Memory resource requests |
| podAnnotations | object | `{}` | Annotations to add to the OpenCost Pod |
| service.annotations | object | `{}` | Annotations to add to the service |
| service.labels | object | `{}` | Labels to add to the service account |
| service.type | string | `"ClusterIP"` | Kubernetes Service type |
| 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 |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Expand Down
6 changes: 4 additions & 2 deletions charts/opencost/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
{{ template "chart.versionBadge" . }}
{{ template "chart.typeBadge" . }}
{{ template "chart.appVersionBadge" . }}

{{ template "chart.maintainersSection" . }}

## Installing the Chart

To install the chart with the release name `my-release`:
To install the chart with the release name `opencost`:

```console
$ helm install opencost opencost/{{ template "chart.name" . }}
Expand Down
4 changes: 2 additions & 2 deletions charts/opencost/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- image: "{{ .Values.opencost.exporter.image.registry }}/{{ .Values.opencost.exporter.image.repository }}:{{ .Values.opencost.exporter.image.tag }}"
- image: "{{ .Values.opencost.exporter.image.registry }}/{{ .Values.opencost.exporter.image.repository }}:{{ .Values.opencost.exporter.image.tag | default (printf "prod-%s" .Chart.AppVersion) }}"
name: {{ include "opencost.fullname" . }}
resources:
{{- toYaml .Values.opencost.exporter.resources | nindent 12 }}
Expand Down Expand Up @@ -98,7 +98,7 @@ spec:
{{- end }}
imagePullPolicy: Always
{{- if .Values.opencost.ui.enabled }}
- image: "{{ .Values.opencost.ui.image.registry }}/{{ .Values.opencost.ui.image.repository }}:{{ .Values.opencost.ui.image.tag }}"
- image: "{{ .Values.opencost.ui.image.registry }}/{{ .Values.opencost.ui.image.repository }}:{{ .Values.opencost.ui.image.tag | default (printf "prod-%s" .Chart.AppVersion) }}"
name: opencost-ui
resources:
{{- toYaml .Values.opencost.ui.resources | nindent 12 }}
Expand Down
89 changes: 61 additions & 28 deletions charts/opencost/values.yaml
Original file line number Diff line number Diff line change
@@ -1,90 +1,123 @@
serviceAccount:
# -- Specifies whether a service account should be created
create: true
# -- Annotations to add to the service account
annotations: {}
# eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/eksctl-opencost

# -- Whether pods running as this service account should have an API token automatically mounted
automountServiceAccountToken: true

# -- Annotations to add to the Deployment
annotations: {}

# -- Annotations to add to the OpenCost Pod
podAnnotations: {}

service:
# -- Annotations to add to the service
annotations: {}
# -- Labels to add to the service account
labels: {}
# -- Kubernetes Service type
type: ClusterIP

opencost:
exporter:
# The GCP Pricing API requires a key. This is supplied just for evaluation.
# cloudProviderApiKey: 'asdfasdfasdf'
# Default cluster ID to use if cluster_id is not set in Prometheus metrics.
# -- The GCP Pricing API requires a key. This is supplied just for evaluation.
cloudProviderApiKey: ""
# -- Default cluster ID to use if cluster_id is not set in Prometheus metrics.
defaultClusterId: 'default-cluster'
image:
# -- Exporter container image registry
registry: quay.io
# -- Exporter container image name
repository: kubecost1/kubecost-cost-model
tag: latest
# -- Exporter container image tag
# @default -- `""` (use appVersion in Chart.yaml)
tag: ""
resources:
# -- CPU/Memory resource requests
requests:
cpu: '10m'
memory: '55M'
memory: '55Mi'
# -- CPU/Memory resource limits
limits:
cpu: '999m'
memory: '1G'
## @param extraVolumeMounts A list of volume mounts to be added to the pod
memory: '1Gi'
# -- A list of volume mounts to be added to the pod
extraVolumeMounts: []
extraEnv:
{}
# -- Any extra environment variables you would like to pass on to the pod
extraEnv: {}
# FOO: BAR

metrics:
serviceMonitor:
# -- Create ServiceMonitor resource for scraping metrics using PrometheusOperator
enabled: false
# -- Additional labels to add to the ServiceMonitor
additionalLabels: {}
## The label to use to retrieve the job name from.
## jobLabel: "app.kubernetes.io/name"
namespace: ''
namespaceSelector: {}
## Default: scrape .Release.Namespace only
## To scrape all, use the following:
## namespaceSelector:
## any: true
# -- Specify if the ServiceMonitor will be deployed into a different namespace (blank deploys into same namespace as chart)
namespace: ""
# -- Interval at which metrics should be scraped
scrapeInterval: 30s
# honorLabels: true
targetLabels: []
# -- HonorLabels chooses the metric's labels on collisions with target labels
honorLabels: false
# -- RelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields
relabelings: []
# -- MetricRelabelConfigs to apply to samples before ingestion
metricRelabelings: []

prometheus:
# username:
# password:
# bearer_token:
# -- Prometheus Basic auth username
username: ""
# -- Prometheus Basic auth password
password: ""
# -- Prometheus Bearer token
bearer_token: ""
external:
# -- Use external Prometheus (eg. Grafana Cloud)
enabled: false
# -- External Prometheus url
url: 'https://mimir-dev-push.infra.alto.com/prometheus'
internal:
# -- Use in-cluster Prometheus
enabled: true
# -- Service name of in-cluster Prometheus
serviceName: my-prometheus
# -- Namespace of in-cluster Prometheus
namespaceName: opencost
# -- Service port of in-cluster Prometheus
port: 9090

ui:
# -- Enable OpenCost UI
enabled: true
image:
# -- UI container image registry
registry: quay.io
# -- UI container image name
repository: kubecost1/opencost-ui
tag: latest
# -- UI container image tag
# @default -- `""` (use appVersion in Chart.yaml)
tag: ""
resources:
# -- CPU/Memory resource requests
requests:
cpu: '10m'
memory: '55M'
memory: '55Mi'
# -- CPU/Memory resource limits
limits:
cpu: '999m'
memory: '1G'
memory: '1Gi'

# -- Toleration labels for pod assignment
tolerations: []
# -- Node labels for pod assignment
nodeSelector: {}
# -- Affinity settings for pod assignment
affinity: {}
# -- Assign custom TopologySpreadConstraints rules
topologySpreadConstraints: []
## @param extraVolumes A list of volumes to be added to the pod
##

# -- A list of volumes to be added to the pod
extraVolumes: []

0 comments on commit 66bc827

Please sign in to comment.