Commit cb791c6
committed
fix(opencost): use Hetzner pricing API values and ECB FX rate
> 🤖 Generated by the Daily AI Assistant
Replaced hand-edited assumptions with values pulled directly from the
Hetzner Cloud Pricing API (`GET /v1/pricing`, location fsn1) and the
ECB EUR→USD reference rate for 2026-05-27.
API-verified (net of VAT):
CX33 cap = €6.49 / server / month (hourly €0.0104)
Volumes = €0.0572 / GB / month
Egress = €1.00 / TB overage (€0.001 / GB; 20 TiB incl. per server)
FX (ECB reference, 2026-05-27): 1.1637 EUR/USD. The previous 1.08
assumption was 8% low.
Re-derived (50/50 CPU-RAM split, unchanged convention):
€6.49 × 1.1637 = $7.5524 / server / month
CPU = $7.5524 × 0.5 / 4 vCPU ≈ $0.9441 / vCPU-month (was 0.876)
RAM = $7.5524 × 0.5 / 8 GB ≈ $0.4720 / GB-month (was 0.438)
Vol = €0.0572 × 1.1637 ≈ $0.0666 / GB-month (was 0.0618)
Egress = €0.001 × 1.1637 ≈ $0.001164 / GB (was 0.001 flat)
End-to-end check (1 vCPU for 1 hour):
ConfigMap CPU = 0.9441 → OpenCost / 730 = $0.001293 / vCPU-hour
Real cost = (€6.49 × 0.5 / 4 vCPU / 730 hr) × 1.1637
= €0.001112 × 1.1637 = $0.001294 / vCPU-hour ✓
Using net (excl. VAT) because VAT is location-dependent (DK = 25%) and
typically reclaimable for businesses; tracking it would conflate
compute cost with tax overhead. Gross is +25% on every figure.
Validated with `ksail workload validate` on both clusters/local and
clusters/prod (256 files each).1 parent 8830296 commit cb791c6
1 file changed
Lines changed: 27 additions & 18 deletions
Lines changed: 27 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | | - | |
62 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
63 | 72 | | |
64 | 73 | | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
69 | | - | |
70 | | - | |
| 78 | + | |
| 79 | + | |
71 | 80 | | |
72 | | - | |
| 81 | + | |
73 | 82 | | |
74 | 83 | | |
75 | | - | |
| 84 | + | |
76 | 85 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
| |||
0 commit comments