Skip to content
GreenKube

Configuration Reference

GreenKube follows the 12-Factor App methodology — all configuration is driven by environment variables. When deployed via Helm, these are set through values.yaml.

ParameterDescriptionDefault
image.repositoryDocker image repositorygreenkube/greenkube
image.tagImage tag0.2.0
image.pullPolicyImage pull policyIfNotPresent
ParameterDescriptionDefault
config.db.typeStorage backend: postgres, sqlite, elasticsearchpostgres
config.db.pathSQLite file path (if type is sqlite)/data/greenkube_data.db
config.db.schemaPostgreSQL schemapublic
ParameterDescriptionDefault
config.cloudProviderCloud provider: aws, gcp, azure, ovh, scalewayaws
config.defaultZoneFallback carbon zone (ISO country code)FR
config.defaultIntensityDefault grid intensity (gCO₂e/kWh) when API unavailable500.0
config.normalizationGranularityIntensity lookup granularity: hour, day, nonehour
config.defaults.puePower Usage Effectiveness factor1.3
config.defaults.instance.vcoresDefault vCPU count for unknown instances1
config.defaults.instance.minWattsDefault min watts per vCPU1.0
config.defaults.instance.maxWattsDefault max watts per vCPU10.0
ParameterDescriptionDefault
config.prometheus.urlPrometheus URL (empty = auto-discovery)""
config.prometheus.verifyCertsVerify TLS certificatestrue
config.prometheus.queryRangeStepRange query step interval5m
config.prometheus.queryRangeMaxSamplesMax data points per range query10000
config.prometheus.nodeInstanceLabelNode label for instance typelabel_node_kubernetes_io_instance_type
ParameterDescriptionDefault
config.opencost.urlOpenCost URL (empty = auto-discovery)""
config.opencost.verifyCertsVerify TLS certificatestrue
ParameterDescriptionDefault
config.nodeAnalysisIntervalInterval for node analysis5m
config.nodeDataMaxAgeDaysMax age for historical node data30
ParameterDescriptionDefault
config.api.enabledEnable the API servertrue
config.api.hostAPI listen address0.0.0.0
config.api.portAPI listen port8000
ParameterDescriptionDefault
config.recommendations.lookbackDaysDays of data for analysis7
config.recommendations.rightsizingCpuThresholdCPU usage ratio triggering rightsizing0.3
config.recommendations.rightsizingMemoryThresholdMemory usage ratio triggering rightsizing0.3
config.recommendations.rightsizingHeadroomSafety headroom multiplier1.2
config.recommendations.zombieCostThresholdCost threshold for zombie detection ($)0.01
config.recommendations.zombieEnergyThresholdEnergy threshold for zombie detection (J)1000
config.recommendations.autoscalingCvThresholdCV threshold for autoscaling suggestion0.7
config.recommendations.autoscalingSpikeRatioMax/avg ratio for spike detection3.0
config.recommendations.carbonAwareThresholdIntensity ratio for carbon-aware scheduling1.5
config.recommendations.nodeUtilizationThresholdNode utilization threshold0.2
config.recommendSystemNamespacesInclude system namespaces in recommendationsfalse
ParameterDescriptionDefault
secrets.electricityMapsTokenElectricity Maps API tokendummy_token
secrets.boaviztaTokenBoavizta API token""
secrets.dbConnectionStringPostgreSQL connection string""
secrets.prometheus.usernamePrometheus basic auth username""
secrets.prometheus.passwordPrometheus basic auth password""
secrets.prometheus.bearerTokenPrometheus bearer token""
ParameterDescriptionDefault
postgres.enabledDeploy bundled PostgreSQLtrue
postgres.image.repositoryPostgreSQL imagepostgres
postgres.image.tagPostgreSQL version17-alpine
postgres.auth.usernameDatabase usernamegreenkube
postgres.auth.passwordDatabase passwordgreenkube_password
postgres.auth.databaseDatabase namegreenkube
postgres.persistence.enabledEnable persistent storagetrue
postgres.persistence.sizeStorage size1Gi
ParameterDescriptionDefault
resources.requests.cpuCPU request100m
resources.requests.memoryMemory request128Mi
resources.limits.cpuCPU limit500m
resources.limits.memoryMemory limit512Mi

When running outside Helm (Docker, source), use these environment variables:

VariableDescriptionDefault
DB_TYPEpostgres, sqlite, elasticsearchpostgres
DB_CONNECTION_STRINGPostgreSQL connection URL
DB_PATHSQLite file path/data/greenkube_data.db
ELASTICSEARCH_HOSTSElasticsearch endpoint(s)
PROMETHEUS_URLPrometheus server URLAuto-discovery
OPENCOST_URLOpenCost server URLAuto-discovery
ELECTRICITY_MAPS_TOKENElectricity Maps API token
BOAVIZTA_TOKENBoavizta API token
CLOUD_PROVIDERaws, gcp, azure, ovh, scalewayaws
DEFAULT_ZONEFallback carbon zoneFR
DEFAULT_INTENSITYFallback grid intensity (gCO₂e/kWh)500.0
LOG_LEVELLogging levelINFO
NORMALIZATION_GRANULARITYhour, day, nonehour
PROMETHEUS_QUERY_RANGE_STEPRange query step5m
NODE_ANALYSIS_INTERVALNode analysis interval5m
NODE_DATA_MAX_AGE_DAYSMax node data age30
API_HOSTAPI listen address0.0.0.0
API_PORTAPI listen port8000
RECOMMENDATION_LOOKBACK_DAYSRecommendation lookback7
RIGHTSIZING_CPU_THRESHOLDCPU rightsizing threshold0.3
ZOMBIE_COST_THRESHOLDZombie detection cost ($)0.01