sustainable-computing-io / susql-operator

a Kubernetes operator that aggregates energy and CO2 emission data for tagged resources
http://susql.org
Apache License 2.0
6 stars 1 forks source link

Carbon Calculation #113

Open trent-s opened 2 months ago

trent-s commented 2 months ago

Carbon footprint is a useful metric to output. Tools such as the following coupled with location data associated with nodes could be useful: https://github.com/Green-Software-Foundation/carbon-aware-sdk

High Level Plan:

trent-s commented 3 weeks ago

Slightly separate point. The SusQL operator does need a better operator level configuration mechanism.

Implemented a prototype version that uses a configmap called susql-config if it is in the current namespace. (Sample file at doc/susql-config.yaml) Otherwise default values built into main.go for OperatorHub deployment, and deploy.sh & values.yaml for Helm deployment. Can improve documentation. Also, would be nice to update the Helm chart to reference the ConfigMap...

trent-s commented 2 weeks ago

Phase 1 works! suqltop shows totalCarbon data from labelgroup. Likewise when operator is deployed from operatorhub.io data can be graphed in the Observe->metric tab by searching for susql_total_carbon_dioxide_grams.

trent-s commented 2 weeks ago

Phase 2 is looking good! susqltop and the Observe->Metric tab provide CO2 information, and the carbon intensity is updated periodically according to the ConfigMap parameters! Program logic seems solid...