diff --git a/infra/opencost.yaml b/infra/opencost.yaml new file mode 100644 index 0000000..5beeda5 --- /dev/null +++ b/infra/opencost.yaml @@ -0,0 +1,42 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: opencost + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "1" + labels: + app.kubernetes.io/name: opencost + app.kubernetes.io/part-of: monitoring + app.kubernetes.io/managed-by: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + + sources: + - repoURL: https://opencost.github.io/opencost-helm-chart + chart: opencost + targetRevision: "1.42.0" + helm: + releaseName: opencost + valueFiles: + - $values/infra/values/opencost-values.yaml + + - repoURL: git@github.com:fortedigital/sturdy-adventure.git + targetRevision: HEAD + ref: values + + destination: + server: https://kubernetes.default.svc + namespace: monitoring + + syncPolicy: + automated: + prune: true + selfHeal: true + allowEmpty: false + syncOptions: + - CreateNamespace=true + - Validate=true + - ServerSideApply=true diff --git a/infra/values/grafana-values.yaml b/infra/values/grafana-values.yaml index 7a91c60..839de03 100644 --- a/infra/values/grafana-values.yaml +++ b/infra/values/grafana-values.yaml @@ -2260,3 +2260,7 @@ dashboards: "title": "dot-ai Logs", "uid": "dot-ai-logs" } + opencost: + gnetId: 15714 + revision: 1 + datasource: Prometheus diff --git a/infra/values/opencost-values.yaml b/infra/values/opencost-values.yaml new file mode 100644 index 0000000..b427777 --- /dev/null +++ b/infra/values/opencost-values.yaml @@ -0,0 +1,16 @@ +opencost: + exporter: + defaultClusterId: launchpad + extraEnv: + EMIT_KSM_V1_METRICS: "false" + EMIT_KSM_V1_METRICS_ONLY: "true" + prometheus: + internal: + enabled: true + serviceName: prometheus-server + namespaceName: monitoring + port: 80 + customPricing: + enabled: true + ui: + enabled: true