Skip to content
GreenKube

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.

Terminal window
helm upgrade greenkube greenkube/greenkube -n greenkube -f my-values.yaml

The 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.

KeyDefaultDescription
config.clusterName""Cluster name used as a label in Prometheus metrics and as the key of GitOps bindings and the savings ledger.
config.cloudProviderunknownaws, 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.defaultIntensity500.0Global fallback grid intensity in gCO₂e/kWh.
config.electricityProviderelectricity_mapsGrid 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.apiAuthModesessionsession (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.logFormatjsonjson or console.

Cloud providers expose zone labels on nodes. On-premises, label nodes with their Electricity Maps zone and set the provider:

Terminal window
kubectl label nodes --all topology.kubernetes.io/zone=FR
config:
cloudProvider: on-prem
defaultZone: FR
impact:
pricing:
cpuCoreHour: 0.03 # your own rates, used for projections
ramGiBHour: 0.004

Configured rates price projections but are never trusted for measurement: install OpenCost to verify cost savings on-premises.

KeyDefaultDescription
config.prometheus.url, config.opencost.url""Empty attempts in-cluster discovery.
config.prometheus.queryRangeStep5mOne 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.maxBackfill24hHow far back a fresh install, or a controller back from an outage, catches up.
config.collection.allowClusterUidChangefalseAllow one start on a database recorded for another cluster (restore into a new cluster). Set it back to false afterwards.
config.metricsRawRetentionDays7Raw samples, then compressed into hourly rows.
config.metricsAggregatedRetentionDays-1Hourly aggregates; -1 keeps them indefinitely. The ledger and measurements are never pruned.
KeyDefaultDescription
config.recommendations.minSamples36Evidence required by every sample gate: recommendation confidence, plan policy, verification.
config.recommendations.minDecreaseCoverageDays7Observed days required before a request decrease is recommended. Increases need no minimum.
config.recommendations.lookbackDays14Lookback of recommendation scans (two weekly cycles).
config.recommendations.scanInterval1hInterval between scheduled scans (1m to 24h).
config.recommendations.rightsizingHeadroom1.2Multiplier applied to the sizing percentile (p95 for decreases, p99 for increases).
config.recommendations.rightsizingIncreaseThreshold0.9Recommend a request increase when p99 usage exceeds this share of the request.
config.recommendations.limitsPolicykeepLimits advice: keep, remove_cpu or memory_equals_request.
config.recommendations.rankingProfilebalancedbalanced, cost_first, carbon_first, low_risk or quick_wins.
config.recommendations.deletionMinUnusedDays7Days a LoadBalancer or PersistentVolume must look unused before a deletion is recommended.
config.recommendations.ttlDays14Recommendation expiry.
KeyDefaultDescription
config.recommendations.changeMeasurement.enabledtrueRecord applied changes with a baseline snapshot and measure them against a counterfactual.
config.recommendations.changeMeasurement.preWindowDays7Baseline 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.postWindowDays7Post-change window. A verdict needs 5 complete days of aligned hours.
config.recommendations.changeMeasurement.warmupHours1Hours after rollout completion excluded from the post-window.
config.recommendations.changeMeasurement.minCoverage0.8Minimum share of post-window hours matched with a baseline hour.
config.recommendations.changeMeasurement.epsilonRatio0.02Noise floor: realized only when the interval’s lower bound is above 2% of the counterfactual.
config.recommendations.changeMeasurement.priorWeekCv0.05Week-to-week variation assumed when the baseline holds fewer than two weeks.
config.recommendations.changeMeasurement.driftThreshold / driftSustainedDays0.5 / 3Drift monitor: a realized change that loses half its saving for 3 days becomes regressed.
config.recommendations.changeMeasurement.acceleratedfalseDemo and quickstart only. Measurements are labelled representative: false and never accrue.
config.recommendations.verification.windowHours72Health-gate window after the rollout.
config.recommendations.applyTolerance0.25Relative deviation still counted as applied by apply detection.
config.ledger.chainVerifyInterval1hInterval of the ledger catch-up and hash-chain verification (1m to 24h).
secrets.ledgerChainKeygenerated onceKey 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.

KeyDefaultDescription
impact.pricing.cpuCoreHour / ramGiBHourunset (OpenCost default rates)Prices for nodes without observed costs or a catalog price. Set both on-premises.
impact.pricing.currencyUSDISO 4217 code of projected costs; set it to OpenCost’s currency.
impact.carbonPricePerTonne100Shadow 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.realizationFactorunsetOverride of the share of released capacity expected to become removed node-hours.

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 check

The chart runs no KRR job: run KRR yourself and push its report (Robusta KRR). Each source page lists its settings: Sources overview.

KeyDefaultDescription
automation.credentialsSecretgreenkube-git-credentialsSecret read for inferred providers: key token, or appId + privateKey for a GitHub App.
automation.repositoryAllowlist["@discovered"]Repositories PRs may target.
automation.policy.pauseDeliveryfalseThe one off switch: no PR is opened, while discovery, previews and measurement keep running.
automation.delivery.modedirectdirect (GreenKube opens the PR), patch (you apply a downloaded patch) or ci (your CI opens it).
automation.autoApprove.enabledfalseApprove eligible previews without the extra click (still a reviewed pull request).
automation.providers[]Explicit Git providers (GitHub, GitLab, Gitea).
automation.webhooks.enabledfalseSigned provider webhooks; polling otherwise.
automation.syncTimeoutSeconds1800Time before a merged but unsynced plan becomes sync_failed.
automation.helm.remoteCharts.enabledtruePre-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:
serviceMonitor:
enabled: true
prometheusRule:
enabled: true
operations:
enabled: true
kubeStateMetrics: true
backupMaxAgeHours: 36

See Alerts and SLOs.

postgres:
backup:
enabled: true
schedule: '17 3 * * *'
keep: 7

See Backup and restore.