Configuration
GreenKube is configured through Helm values; most map to an environment variable read by the API and the controller. This page lists the values most often changed. The complete reference, with every key and its environment variable, is docs/configuration.md in the repository.
helm upgrade greenkube greenkube/greenkube -n greenkube -f my-values.yamlThe chart ships a values.schema.json, so invalid types and ranges are rejected before anything is applied. Data sources (Prometheus, OpenCost, carbon intensity providers) are configuration as code: they are set in values, not changed at runtime from the UI.
General
Section titled “General”| Key | Default | Description |
|---|---|---|
config.clusterName | "" | Cluster name used as a label in Prometheus metrics and as the key of GitOps bindings and the savings ledger. |
config.cloudProvider | unknown | aws, gcp, azure, ovh, scaleway, on-prem, unknown. |
config.defaultZone | "" | Fallback Electricity Maps zone code for nodes whose zone cannot be mapped (FR, DE, US-CAL-CISO). |
config.defaultIntensity | 500.0 | Global fallback grid intensity in gCO₂e/kWh. |
config.electricityProvider | electricity_maps | Grid intensity provider: electricity_maps or wattnet (EU only, see Wattnet). |
config.externalUrl | "" | Public URL of the UI, used for deep links in pull requests and commit statuses. |
config.apiAuthMode | session | session (accounts and scoped API keys), api_key, proxy or oidc. |
config.trustedProxyIps | "" | Reverse proxies whose forwarded headers are trusted (needed for Secure cookies behind a TLS-terminating Ingress). |
config.logFormat | json | json or console. |
On-premises clusters
Section titled “On-premises clusters”Cloud providers expose zone labels on nodes. On-premises, label nodes with their Electricity Maps zone and set the provider:
kubectl label nodes --all topology.kubernetes.io/zone=FRconfig: cloudProvider: on-prem defaultZone: FRimpact: pricing: cpuCoreHour: 0.03 # your own rates, used for projections ramGiBHour: 0.004Configured rates price projections but are never trusted for measurement: install OpenCost to verify cost savings on-premises.
Collection and evidence
Section titled “Collection and evidence”| Key | Default | Description |
|---|---|---|
config.prometheus.url, config.opencost.url | "" | Empty attempts in-cluster discovery. |
config.prometheus.queryRangeStep | 5m | One sample per step. |
config.prometheus.scrapeInterval | — | Set it to your real scrape interval: below 2 scrapes in the rate window every window is a hole. |
config.collection.maxBackfill | 24h | How far back a fresh install, or a controller back from an outage, catches up. |
config.collection.allowClusterUidChange | false | Allow one start on a database recorded for another cluster (restore into a new cluster). Set it back to false afterwards. |
config.metricsRawRetentionDays | 7 | Raw samples, then compressed into hourly rows. |
config.metricsAggregatedRetentionDays | -1 | Hourly aggregates; -1 keeps them indefinitely. The ledger and measurements are never pruned. |
Recommendations
Section titled “Recommendations”| Key | Default | Description |
|---|---|---|
config.recommendations.minSamples | 36 | Evidence required by every sample gate: recommendation confidence, plan policy, verification. |
config.recommendations.minDecreaseCoverageDays | 7 | Observed days required before a request decrease is recommended. Increases need no minimum. |
config.recommendations.lookbackDays | 14 | Lookback of recommendation scans (two weekly cycles). |
config.recommendations.scanInterval | 1h | Interval between scheduled scans (1m to 24h). |
config.recommendations.rightsizingHeadroom | 1.2 | Multiplier applied to the sizing percentile (p95 for decreases, p99 for increases). |
config.recommendations.rightsizingIncreaseThreshold | 0.9 | Recommend a request increase when p99 usage exceeds this share of the request. |
config.recommendations.limitsPolicy | keep | Limits advice: keep, remove_cpu or memory_equals_request. |
config.recommendations.rankingProfile | balanced | balanced, cost_first, carbon_first, low_risk or quick_wins. |
config.recommendations.deletionMinUnusedDays | 7 | Days a LoadBalancer or PersistentVolume must look unused before a deletion is recommended. |
config.recommendations.ttlDays | 14 | Recommendation expiry. |
Measurement and ledger
Section titled “Measurement and ledger”| Key | Default | Description |
|---|---|---|
config.recommendations.changeMeasurement.enabled | true | Record applied changes with a baseline snapshot and measure them against a counterfactual. |
config.recommendations.changeMeasurement.preWindowDays | 7 | Baseline window, ending at the merge. At least 7 days so every hour of the week is matched; 14 days enables hour-of-week slots. |
config.recommendations.changeMeasurement.postWindowDays | 7 | Post-change window. A verdict needs 5 complete days of aligned hours. |
config.recommendations.changeMeasurement.warmupHours | 1 | Hours after rollout completion excluded from the post-window. |
config.recommendations.changeMeasurement.minCoverage | 0.8 | Minimum share of post-window hours matched with a baseline hour. |
config.recommendations.changeMeasurement.epsilonRatio | 0.02 | Noise floor: realized only when the interval’s lower bound is above 2% of the counterfactual. |
config.recommendations.changeMeasurement.priorWeekCv | 0.05 | Week-to-week variation assumed when the baseline holds fewer than two weeks. |
config.recommendations.changeMeasurement.driftThreshold / driftSustainedDays | 0.5 / 3 | Drift monitor: a realized change that loses half its saving for 3 days becomes regressed. |
config.recommendations.changeMeasurement.accelerated | false | Demo and quickstart only. Measurements are labelled representative: false and never accrue. |
config.recommendations.verification.windowHours | 72 | Health-gate window after the rollout. |
config.recommendations.applyTolerance | 0.25 | Relative deviation still counted as applied by apply detection. |
config.ledger.chainVerifyInterval | 1h | Interval of the ledger catch-up and hash-chain verification (1m to 24h). |
secrets.ledgerChainKey | generated once | Key of the ledger hash chain (LEDGER_CHAIN_KEY): new entries are chained with HMAC-SHA256. When omitted, the credentials bootstrap hook generates one once into the Secret <release>; with secrets.existingSecret, add a LEDGER_CHAIN_KEY key to it. Never lose it (Ledger chain key). |
secrets.ledgerChainPreviousKeys | "" | Verify-only previous chain keys, comma-separated, for a deliberate rotation with greenkube db ledger-rotate-key. |
See Savings measurement for what these windows mean statistically.
Impact Model
Section titled “Impact Model”| Key | Default | Description |
|---|---|---|
impact.pricing.cpuCoreHour / ramGiBHour | unset (OpenCost default rates) | Prices for nodes without observed costs or a catalog price. Set both on-premises. |
impact.pricing.currency | USD | ISO 4217 code of projected costs; set it to OpenCost’s currency. |
impact.carbonPricePerTonne | 100 | Shadow carbon price used in the ranking value. 0 ranks on cost alone. |
impact.autoscalerHint | "" | none, cluster_autoscaler or karpenter, when detection cannot see the autoscaler. |
impact.realizationFactor | unset | Override of the share of released capacity expected to become removed node-hours. |
Sources
Section titled “Sources”GreenKube’s measured value decides every size; VPA, Goldilocks, KRR and pushed signals move the confidence. There is no consensus policy to choose.
sources: pluginsEnabled: true settings: greenkube.orphaned_lb: { enabled: false } # turn one native analyzer off (its active advice goes stale) vpa: { enabled: auto } # auto: run when the VPA CRD exists push: { max_age_hours: 72 } toolFloors: # a proposal on a tool's own minimum is not a vote krr: { cpu: 10m, memory: 100Mi } vpa: { cpu: 15m, memory: 100Mi } minChange: # smaller external proposals vote "keep the current request" percent: 5 cpuMillicores: 10 memoryBytes: 16777216 vpa: minSampleHours: 24 # hours of samples before a VPA votes; 0 disables the checkThe chart runs no KRR job: run KRR yourself and push its report (Robusta KRR). Each source page lists its settings: Sources overview.
GitOps delivery
Section titled “GitOps delivery”| Key | Default | Description |
|---|---|---|
automation.credentialsSecret | greenkube-git-credentials | Secret read for inferred providers: key token, or appId + privateKey for a GitHub App. |
automation.repositoryAllowlist | ["@discovered"] | Repositories PRs may target. |
automation.policy.pauseDelivery | false | The one off switch: no PR is opened, while discovery, previews and measurement keep running. |
automation.delivery.mode | direct | direct (GreenKube opens the PR), patch (you apply a downloaded patch) or ci (your CI opens it). |
automation.autoApprove.enabled | false | Approve eligible previews without the extra click (still a reviewed pull request). |
automation.providers | [] | Explicit Git providers (GitHub, GitLab, Gitea). |
automation.webhooks.enabled | false | Signed provider webhooks; polling otherwise. |
automation.syncTimeoutSeconds | 1800 | Time before a merged but unsynced plan becomes sync_failed. |
automation.helm.remoteCharts.enabled | true | Pre-fetch, digest-verify and render remote Helm charts (HTTP or OCI). |
automation: policy: maxRiskLevel: medium minConfidence: 0.6 minCoverage: 0.5 maxOpenPullRequestsPerWorkload: 1 cooldownMinutes: 60 changeFreezeLabels: [] changeFreezeWindows: [] missingEvidence: fail # fail closed when live gate evidence is missing pullRequests: draft: false labels: [] reviewers: [] teamReviewers: []Monitoring
Section titled “Monitoring”monitoring: serviceMonitor: enabled: true prometheusRule: enabled: true operations: enabled: true kubeStateMetrics: true backupMaxAgeHours: 36See Alerts and SLOs.
Backups
Section titled “Backups”postgres: backup: enabled: true schedule: '17 3 * * *' keep: 7See Backup and restore.