opencost / opencost-website

OpenCost website, blog, documentation.
https://opencost.io
Apache License 2.0
14 stars 50 forks source link

Webpage documentation Cloud Costs enabled in Helm values.yaml #202

Closed OliverChmelicky closed 8 months ago

OliverChmelicky commented 8 months ago

Describe the bug The documentation web page about Cloud costs is missing a part about setting up the helm variable cloudCost.enabled.

To Reproduce Create service account. Create cloud-integration.json file according to the documentation. kubectl create secret generic opencost-cloud-integration --from-file=cloud-integration.json -n opencost . Specify kubernetes secret name in values.cloudIntegrationSecret for Helm values.yaml. Do NOT set cloudCosts.enabled to "true" . helm install opencost opencost-charts/opencost --namespace opencost --create-namespace -f values.yml . In Opencost UI there is written that Cloud cost is not enabled.

Expected behavior Documentation about this environment variable will be appended or core/pkg/env/env.go envMap.Has() function will be used for checking if cloudIntegrationSecret is present.

Which version of OpenCost are you using? v1.108.0

Additional context My WORKING configuration file is as follows:

opencost:
  cloudIntegrationSecret: "opencost-cloud-integration"
  exporter:
    cloudProviderApiKey: "xxxxx"
  cloudCost:
    enabled: "true"

To reproduce the bug remove cloudCost.enabled.

mattray commented 8 months ago

Thanks for raising this. I'm rewriting the installation docs to focus on each cloud provider and this will be included. I'm moving this over to opencost-website and assigning it to myself.

mattray commented 8 months ago

Each cloud provider now has a templated Cloud Costs section that covers creating the cloud-integration.json, the cloudIntegrationSecret, enabling cloudCosts, and in the case of GCP using the API key.

https://www.opencost.io/docs/configuration/gcp#add-the-gcp-api-key-to-opencost https://www.opencost.io/docs/configuration/gcp#gcp-cloud-costs