Skip to content

fix(#1284): add K8s workload compute cost estimation to CI - #1411

Merged
phertyameen merged 2 commits into
BlockHaven-Labs:mainfrom
Princeadim:fix/issue-1284-k8s-workload-cost-estimate
Nov 19, 2026
Merged

phertyameen merged 2 commits into
BlockHaven-Labs:mainfrom
Princeadim:fix/issue-1284-k8s-workload-cost-estimate

Conversation

@Princeadim

Copy link
Copy Markdown
Contributor

Summary

Closes #1284.

Infracost estimated AWS Terraform-provisioned resources (VPC, S3, KMS, ACM, CloudFront, ECR, Route53) but had no visibility into the compute cost of workloads running inside the cluster across the three environments.

Changes

scripts/k8s-cost-estimate.sh (new)

Reads resource requests/limits from infra/k8s/base/deployment.yaml and replica counts from each kustomize overlay to produce a Markdown cost table:

Environment Replicas Lower bound (requests) Upper bound (limits)
mainnet 3 ~$11.16/mo ~$54.43/mo
staging 2 ~$7.44/mo ~$36.29/mo
testnet 1 ~$3.72/mo ~$18.14/mo
Total — ~$22.32/mo ~$108.86/mo

Pricing reference: AWS EKS Fargate on-demand us-east-1. Overridable via CPU_PRICE_PER_VCPU_HOUR / MEM_PRICE_PER_GB_HOUR env vars.

.github/workflows/infracost.yml

docs/audit-notes/issue-1284.md (new)

Documents the finding, methodology, and operational guidance.

Tested

  • Script runs locally and produces correct output (mainnet=3, staging=2, testnet=1)
  • Workflow YAML is valid GitHub Actions syntax

…o CI

- Add scripts/k8s-cost-estimate.sh: reads resource requests/limits from
  infra/k8s/base/deployment.yaml and replica counts from each kustomize
  overlay (mainnet=3, staging=2, testnet=1) to produce a Markdown cost
  table with lower (requests) and upper (limits) monthly bounds.
  Pricing reference: AWS EKS Fargate on-demand us-east-1.

- Extend .github/workflows/infracost.yml: now triggers on infra/k8s/**
  and scripts/k8s-cost-estimate.sh changes in addition to infra/terraform.
  New k8s-workload-cost job runs the script, writes output to
  GITHUB_STEP_SUMMARY, and upserts a PR comment (idempotent via HTML
  marker). Advisory-only — not a required status check, consistent
  with BlockHaven-Labs#1258.

- Add docs/audit-notes/issue-1284.md documenting the finding and resolution.

Closes BlockHaven-Labs#1284
@vercel

vercel Bot commented Oct 26, 2026

Copy link
Copy Markdown

@Princeadim is attempting to deploy a commit to the aminubabafatima8-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@phertyameen
phertyameen merged commit cd8bc10 into BlockHaven-Labs:main Nov 19, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cost visibility (infracost.yml) exists for Terraform but nothing estimates the cost of running the full Kubernetes stack across three environments

2 participants