Kubernetes 部門成本分攤報表(OpenCost chargeback by cost-center,amd64/arm64)
154
把 OpenCost 的原始數字,轉成各部門該分攤多少、依據是什麼的唯讀報表, 跑在 Kubernetes 叢集裡。
瀏覽器 ──▶ cost-report(快取 60 秒)──▶ OpenCost API ──▶ Prometheus
cost-snapshotter 要宣告量補值並標示來源沒有登入機制——誰連得到就看得到全部部門的成本,跟 OpenCost 本身一樣。 要限制存取,認證必須放在它前面。
linux/amd64、linux/arm64。基底 registry.suse.com/bci/python:3.12,非 root(UID 1000)執行。
只用 Python 標準函式庫,沒有任何相依套件。
完整的部署檔、設定說明與實機量測筆記都在 GitHub:
https://github.com/yansheng133/opencost-dept-report
kubectl apply -f https://raw.githubusercontent.com/yansheng133/opencost-dept-report/main/k8s/cost-report.yaml
(上面那個 manifest 預設會去掛一個名為 cost-report-ratecard 的 ConfigMap 當價目表,
並且需要一個 PVC 存放封存的帳期。建議照 repo 裡的 deploy.sh 部署,它會處理 StorageClass 的挑選。)
授權:Apache-2.0
Content type
Image
Digest
sha256:e734ea2ef…
Size
87.6 MB
Last updated
3 days ago
docker pull yansheng133/cost-report