diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a0d1e7751ec0..58e60a82d8fc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -34,6 +34,7 @@ /charts/prometheus-nats-exporter/ @caarlos0 @okgolove /charts/prometheus-nginx-exporter/ @nlamirault @zeritti /charts/prometheus-node-exporter/ @gianrubio @zanhsieh @zeritti +/charts/prometheus-opencost-exporter/ @mattray /charts/prometheus-operator-admission-webhook/ @zeritti /charts/prometheus-operator-crds/ @dacamposol @desaintmartin @jkroepke @QuentinBisson /charts/prometheus-pgbouncer-exporter/ @stewartshea @zeritti diff --git a/charts/prometheus-opencost-exporter/.helmignore b/charts/prometheus-opencost-exporter/.helmignore new file mode 100644 index 000000000000..0e8a0eb36f4c --- /dev/null +++ b/charts/prometheus-opencost-exporter/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/prometheus-opencost-exporter/Chart.yaml b/charts/prometheus-opencost-exporter/Chart.yaml new file mode 100644 index 000000000000..55221ff89400 --- /dev/null +++ b/charts/prometheus-opencost-exporter/Chart.yaml @@ -0,0 +1,16 @@ +appVersion: 1.107.1 +version: 0.1.0 +description: Prometheus OpenCost Exporter +home: https://github.com/opencost/opencost +name: prometheus-opencost-exporter +sources: +- https://github.com/prometheus-community/opencost_exporter +apiVersion: v2 +type: application +keywords: +- opencost +- prometheus +- exporter +maintainers: +- email: mattray@kubecost.com + name: mattray diff --git a/charts/prometheus-opencost-exporter/README.md b/charts/prometheus-opencost-exporter/README.md new file mode 100644 index 000000000000..168a124b61da --- /dev/null +++ b/charts/prometheus-opencost-exporter/README.md @@ -0,0 +1,57 @@ +# Prometheus Opencost Exporter + +Prometheus exporter for [OpenCost](https://www.opencost.io) Kubernetes cost monitoring data. + +This chart bootstraps a Prometheus [OpenCost exporter](https://www.opencost.io/docs/integrations/opencost-exporter) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +The original source for this Helm chart is . + +## Prerequisites + +- Kubernetes 1.23+ +- Helm 3+ + +## Add Helm Chart Repository + +```console +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts +helm repo update +``` + +_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._ + +## Install Chart + +```console +helm install [RELEASE_NAME] prometheus-community/prometheus-opencost-exporter +``` + +_See [configuration](#configuring) below._ + +_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._ + +## Uninstall Chart + +```console +helm uninstall [RELEASE_NAME] +``` + +This removes all the Kubernetes components associated with the chart and deletes the release. + +_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._ + +### Other minor version upgrade + +```console +helm upgrade [RELEASE_NAME] [CHART] --install +``` + +_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._ + +## Configuring + +See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands: + +```console +helm show values prometheus-community/prometheus-opencost-exporter +``` diff --git a/charts/prometheus-opencost-exporter/templates/_helpers.tpl b/charts/prometheus-opencost-exporter/templates/_helpers.tpl new file mode 100644 index 000000000000..6eea1847b5c5 --- /dev/null +++ b/charts/prometheus-opencost-exporter/templates/_helpers.tpl @@ -0,0 +1,99 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "prometheus-opencost-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "prometheus-opencost-exporter.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "prometheus-opencost-exporter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "prometheus-opencost-exporter.labels" -}} +helm.sh/chart: {{ include "prometheus-opencost-exporter.chart" . }} +{{ include "prometheus-opencost-exporter.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "prometheus-opencost-exporter.selectorLabels" -}} +app.kubernetes.io/name: {{ include "prometheus-opencost-exporter.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "prometheus-opencost-exporter.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "prometheus-opencost-exporter.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "prometheus-opencost-exporter.prometheus.secretname" -}} + {{- if .Values.opencost.prometheus.secret_name -}} + {{- .Values.opencost.prometheus.secret_name -}} + {{- else -}} + {{- include "prometheus-opencost-exporter.fullname" . -}} + {{- end -}} +{{- end -}} + +{{/* +Create the name of the controller service account to use +*/}} +{{- define "prometheus-opencost-exporter.prometheusServerEndpoint" -}} + {{- if .Values.opencost.prometheus.external.enabled -}} + {{ tpl .Values.opencost.prometheus.external.url . }} + {{- else -}} + {{- $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 -}} +{{- end -}} + + +{{/* +Check that either prometheus external or internal is defined +*/}} +{{- define "isPrometheusConfigValid" -}} + {{- if and .Values.opencost.prometheus.external.enabled .Values.opencost.prometheus.internal.enabled -}} + {{- fail "Only use one of the prometheus setups, internal or external" -}} + {{- end -}} +{{- end -}} diff --git a/charts/prometheus-opencost-exporter/templates/clusterrole.yaml b/charts/prometheus-opencost-exporter/templates/clusterrole.yaml new file mode 100644 index 000000000000..a2dd0551a7ed --- /dev/null +++ b/charts/prometheus-opencost-exporter/templates/clusterrole.yaml @@ -0,0 +1,79 @@ +# Cluster role giving opencost to get, list, watch required resources +# No write permissions are required +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "prometheus-opencost-exporter.fullname" . }} + labels: {{- include "prometheus-opencost-exporter.labels" . | nindent 4 }} +rules: + - apiGroups: [""] + resources: + - configmaps + - deployments + - nodes + - pods + - services + - resourcequotas + - replicationcontrollers + - limitranges + - persistentvolumeclaims + - persistentvolumes + - namespaces + - endpoints + verbs: + - get + - list + - watch + - apiGroups: + - extensions + resources: + - daemonsets + - deployments + - replicasets + verbs: + - get + - list + - watch + - apiGroups: + - apps + resources: + - statefulsets + - deployments + - daemonsets + - replicasets + verbs: + - list + - watch + - apiGroups: + - batch + resources: + - cronjobs + - jobs + verbs: + - get + - list + - watch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - get + - list + - watch + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - get + - list + - watch + - apiGroups: + - storage.k8s.io + resources: + - storageclasses + verbs: + - get + - list + - watch diff --git a/charts/prometheus-opencost-exporter/templates/clusterrolebinding.yaml b/charts/prometheus-opencost-exporter/templates/clusterrolebinding.yaml new file mode 100644 index 000000000000..523056772e9b --- /dev/null +++ b/charts/prometheus-opencost-exporter/templates/clusterrolebinding.yaml @@ -0,0 +1,18 @@ +{{- if .Values.rbac.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "prometheus-opencost-exporter.fullname" . }} + labels: {{- include "prometheus-opencost-exporter.labels" . | nindent 4 }} + {{- with .Values.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "prometheus-opencost-exporter.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ template "prometheus-opencost-exporter.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/prometheus-opencost-exporter/templates/deployment.yaml b/charts/prometheus-opencost-exporter/templates/deployment.yaml new file mode 100644 index 000000000000..1df485ace588 --- /dev/null +++ b/charts/prometheus-opencost-exporter/templates/deployment.yaml @@ -0,0 +1,168 @@ +{{- include "isPrometheusConfigValid" . }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "prometheus-opencost-exporter.fullname" . }} + labels: {{- include "prometheus-opencost-exporter.labels" . | nindent 4 }} + {{- with .Values.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +spec: + replicas: {{ .Values.opencost.exporter.replicas }} + selector: + matchLabels: {{- include "prometheus-opencost-exporter.selectorLabels" . | nindent 6 }} + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + {{- include "prometheus-opencost-exporter.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.podAnnotations }} + annotations: {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} + {{- with .Values.podSecurityContext }} + securityContext: {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ template "prometheus-opencost-exporter.serviceAccountName" . }} + {{- with .Values.opencost.tolerations }} + tolerations: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.opencost.nodeSelector }} + nodeSelector: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.opencost.affinity }} + affinity: {{- toYaml . | nindent 8 }} + {{- end }} + {{- with.Values.opencost.topologySpreadConstraints }} + topologySpreadConstraints: {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ include "prometheus-opencost-exporter.fullname" . }} + image: "{{ .Values.opencost.exporter.image.registry }}/{{ .Values.opencost.exporter.image.repository }}:{{ .Values.opencost.exporter.image.tag | default (printf "prod-%s" .Chart.AppVersion) }}" + imagePullPolicy: {{ .Values.opencost.exporter.image.pullPolicy }} + ports: + - containerPort: 9003 + name: http + resources: {{- toYaml .Values.opencost.exporter.resources | nindent 12 }} + {{- if .Values.opencost.exporter.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /healthz + port: 9003 + initialDelaySeconds: {{ .Values.opencost.exporter.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.opencost.exporter.livenessProbe.periodSeconds }} + failureThreshold: {{ .Values.opencost.exporter.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.opencost.exporter.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /healthz + port: 9003 + initialDelaySeconds: {{ .Values.opencost.exporter.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.opencost.exporter.readinessProbe.periodSeconds }} + failureThreshold: {{ .Values.opencost.exporter.readinessProbe.failureThreshold }} + {{- end }} + {{- with .Values.opencost.exporter.securityContext }} + securityContext: {{- toYaml . | nindent 12 }} + {{- end }} + env: + - name: PROMETHEUS_SERVER_ENDPOINT + value: {{ include "prometheus-opencost-exporter.prometheusServerEndpoint" . | quote }} + {{- if .Values.opencost.exporter.cloudProviderApiKey }} + - name: CLOUD_PROVIDER_API_KEY + value: {{ .Values.opencost.exporter.cloudProviderApiKey | quote }} + {{- end }} + - name: CLUSTER_ID + value: {{ .Values.opencost.exporter.defaultClusterId | quote }} + {{- if .Values.opencost.exporter.aws.access_key_id }} + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + name: {{ include "prometheus-opencost-exporter.prometheus.secretname" . }} + key: AWS_ACCESS_KEY_ID + {{- end }} + {{- if .Values.opencost.exporter.aws.secret_access_key }} + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + name: {{ include "prometheus-opencost-exporter.prometheus.secretname" . }} + key: AWS_SECRET_ACCESS_KEY + {{- end }} + # If username, password or bearer_token are defined, pull from secrets + {{- if or .Values.opencost.prometheus.username (and .Values.opencost.prometheus.secret_name .Values.opencost.prometheus.username_key) }} + - name: DB_BASIC_AUTH_USERNAME + valueFrom: + secretKeyRef: + name: {{ include "prometheus-opencost-exporter.prometheus.secretname" . }} + key: {{ .Values.opencost.prometheus.username_key }} + {{- end }} + {{- if or .Values.opencost.prometheus.password (and .Values.opencost.prometheus.secret_name .Values.opencost.prometheus.password_key) }} + - name: DB_BASIC_AUTH_PW + valueFrom: + secretKeyRef: + name: {{ include "prometheus-opencost-exporter.prometheus.secretname" . }} + key: {{ .Values.opencost.prometheus.password_key }} + {{- else if or .Values.opencost.prometheus.bearer_token (and .Values.opencost.prometheus.secret_name .Values.opencost.prometheus.bearer_token_key) }} + - name: DB_BEARER_TOKEN + valueFrom: + secretKeyRef: + name: {{ include "prometheus-opencost-exporter.prometheus.secretname" . }} + key: {{ .Values.opencost.prometheus.bearer_token_key }} + {{- end }} + {{- with .Values.opencost.exporter.env }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if .Values.opencost.customPricing.enabled }} + - name: CONFIG_PATH + value: {{ .Values.opencost.customPricing.configPath | quote }} + {{- end }} + # Add any additional provided variables + {{- range $key, $value := .Values.opencost.exporter.extraEnv }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- if or .Values.opencost.exporter.persistence.enabled .Values.opencost.exporter.extraVolumeMounts .Values.opencost.customPricing.enabled}} + volumeMounts: + {{- if .Values.opencost.exporter.persistence.enabled }} + - mountPath: /mnt/export + name: opencost-export + readOnly: false + {{- end }} + {{- if .Values.opencost.customPricing.enabled }} + - mountPath: {{ .Values.opencost.customPricing.configPath }} + name: custom-configs + readOnly: true + {{- end }} + {{- with .Values.opencost.exporter.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} + {{- if or .Values.opencost.exporter.persistence.enabled .Values.extraVolumes .Values.opencost.customPricing.enabled}} + volumes: + {{- if .Values.opencost.customPricing.enabled }} + - name: custom-configs + configMap: + name: {{ .Values.opencost.customPricing.configmapName }} + {{- end }} + {{- if .Values.opencost.exporter.persistence.enabled }} + - name: opencost-export + persistentVolumeClaim: + claimName: {{ include "prometheus-opencost-exporter.fullname" . }}-pvc + {{- end }} + {{- with .Values.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} diff --git a/charts/prometheus-opencost-exporter/templates/service.yaml b/charts/prometheus-opencost-exporter/templates/service.yaml new file mode 100644 index 000000000000..ecf7723dd718 --- /dev/null +++ b/charts/prometheus-opencost-exporter/templates/service.yaml @@ -0,0 +1,21 @@ +{{- if .Values.service.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "prometheus-opencost-exporter.fullname" . }} + labels: + {{- include "prometheus-opencost-exporter.labels" . | nindent 4 }} + {{- with .Values.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.service.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: {{- include "prometheus-opencost-exporter.selectorLabels" . | nindent 4 }} + type: {{ .Values.service.type }} + ports: + - name: http + port: 9003 + targetPort: 9003 +{{- end }} diff --git a/charts/prometheus-opencost-exporter/templates/serviceaccount.yaml b/charts/prometheus-opencost-exporter/templates/serviceaccount.yaml new file mode 100644 index 000000000000..c427aeba5c5e --- /dev/null +++ b/charts/prometheus-opencost-exporter/templates/serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "prometheus-opencost-exporter.serviceAccountName" . }} + labels: {{- include "prometheus-opencost-exporter.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/prometheus-opencost-exporter/values.yaml b/charts/prometheus-opencost-exporter/values.yaml new file mode 100644 index 000000000000..fb5a9bf7ff31 --- /dev/null +++ b/charts/prometheus-opencost-exporter/values.yaml @@ -0,0 +1,177 @@ +# -- Overwrite the default name of the chart +nameOverride: "" +# -- Overwrite all resources name created by the chart +fullnameOverride: "" + +# -- List of secret names to use for pulling the images +imagePullSecrets: [] + +serviceAccount: + # -- Specifies whether a service account should be created + create: true + # -- Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + # -- Whether pods running as this service account should have an API token automatically mounted + automountServiceAccountToken: true + +# -- Annotations to add to the all the resources +annotations: {} +# -- Annotations to add to the OpenCost Pod +podAnnotations: {} +# -- Annotations to add to the Secret +secretAnnotations: {} +# -- Labels to add to the OpenCost Pod +podLabels: {} +# -- Pod priority +priorityClassName: ~ + +# -- Holds pod-level security attributes and common container settings +podSecurityContext: {} + # fsGroup: 2000 + +service: + enabled: true + # -- Annotations to add to the service + annotations: {} + # -- Labels to add to the service account + labels: {} + # -- Kubernetes Service type + type: ClusterIP + +# Create cluster role policies +rbac: + enabled: true + +opencost: + exporter: + # -- 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 + # -- Exporter container image tag + # @default -- `""` (use appVersion in Chart.yaml) + tag: "" + # -- Exporter container image pull policy + pullPolicy: IfNotPresent + # -- Number of OpenCost replicas to run + replicas: 1 + resources: + # -- CPU/Memory resource requests + requests: + cpu: '10m' + memory: '55Mi' + # -- CPU/Memory resource limits + limits: + cpu: '999m' + memory: '1Gi' + # Liveness probe configuration + livenessProbe: + # -- Whether probe is enabled + enabled: true + # -- Number of seconds before probe is initiated + initialDelaySeconds: 120 + # -- Probe frequency in seconds + periodSeconds: 10 + # -- Number of failures for probe to be considered failed + failureThreshold: 3 + # Readiness probe configuration + readinessProbe: + # -- Whether probe is enabled + enabled: true + # -- Number of seconds before probe is initiated + initialDelaySeconds: 120 + # -- Probe frequency in seconds + periodSeconds: 10 + # -- Number of failures for probe to be considered failed + failureThreshold: 3 + # -- The security options the container should be run with + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + # Persistent volume claim for storing the data. eg: csv file + persistence: + enabled: false + # -- Annotations for persistent volume + annotations: {} + # -- Access mode for persistent volume + accessMode: "" + # -- Storage class for persistent volume + storageClass: "" + # -- Size for persistent volume + size: "" + + aws: + # -- AWS secret access key + secret_access_key: "" + # -- AWS secret key id + access_key_id: "" + # -- A list of volume mounts to be added to the pod + extraVolumeMounts: [] + # -- List of additional environment variables to set in the container + env: [] + # -- Any extra environment variables you would like to pass on to the pod + extraEnv: {} + # FOO: BAR + customPricing: + # -- Enables custom pricing for on-premise setup. + enabled: false + configmapName: custom-pricing-model + # -- Path for the pricing configuration. + configPath: /tmp/custom-config + # -- Configures the pricing model provided in the values file. + createConfigmap: true + # -- More information about these values here: https://www.opencost.io/docs/configuration/on-prem#custom-pricing-using-the-opencost-helm-chart + costModel: + description: Modified prices based on your internal pricing + CPU: 1.25 + spotCPU: 0.006655 + RAM: 0.50 + spotRAM: 0.000892 + GPU: 0.95 + storage: 0.25 + zoneNetworkEgress: 0.01 + regionNetworkEgress: 0.01 + internetNetworkEgress: 0.12 + + # OpenCost uses Prometheus for persistent storage + prometheus: + # -- Secret name that contains credentials for Prometheus + secret_name: ~ + # -- Prometheus Basic auth username + username: "" + # -- Key in the secret that references the username + username_key: DB_BASIC_AUTH_USERNAME + # -- Prometheus Basic auth password + password: "" + # -- Key in the secret that references the password + password_key: DB_BASIC_AUTH_PW + # -- Prometheus Bearer token + bearer_token: "" + bearer_token_key: DB_BEARER_TOKEN + external: + # -- Use external Prometheus (eg. Grafana Cloud) + enabled: false + # -- External Prometheus url + url: "https://prometheus.example.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