upgradescope

module
v0.2.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: Apache-2.0

README

upgradescope

CI Release Docs OpenSSF Scorecard License

upgradescope tells you what blocks a Kubernetes cluster, or a directory of rendered manifests, from moving to the next minor: APIs that are removed or deprecated at the target (found by who still writes them, and by what the apiserver is still asked for), add-ons past end of life, version skew outside the upstream policy, and Helm charts that exclude the target. The answer is a verdict (ready, blocked or unknown when a required check could not run), a 0–100 score and cited findings, as a table, JSON, SARIF, Markdown, JUnit or GitLab Code Quality, an exit code for CI, and a ClusterReadiness object an in-cluster agent keeps current. A self-hosted server adds history, a fleet view, team rollups, auditor exports and Slack or optionally signed webhook notifications when readiness changes. One Apache-2.0 binary. scan only reads; the agent writes nothing but its own ClusterReadiness object and that CRD's schema.

Documentation: https://abd-ulbasit.github.io/upgradescope/ · every public claim, with the test that proves it: claims ledger

upgradescope scanning rendered manifests

Install

Homebrew (from v0.2.0) brew install abd-ulbasit/tap/upgradescope
Go go install github.com/abd-ulbasit/upgradescope/cmd/upgradescope@latest
Release archives Releases: linux, darwin (and windows from v0.2.0) on amd64/arm64, with checksums.txt, signed with cosign from v0.2.0
Container image (from v0.2.0) ghcr.io/abd-ulbasit/upgradescope:<version>, signed
Helm chart (from v0.2.0) oci://ghcr.io/abd-ulbasit/charts/upgradescope, signed; before that, deploy/chart from a clone

Verifying a download:

sha256sum --ignore-missing -c checksums.txt   # macOS: shasum -a 256 -c --ignore-missing checksums.txt
cosign verify-blob checksums.txt --bundle checksums.txt.sigstore.json \
  --certificate-identity "https://github.com/abd-ulbasit/upgradescope/.github/workflows/release.yml@refs/tags/$VERSION" \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Install has every channel, image and chart verification, and what v0.1.x lacks.

Quickstart

Scan rendered manifests, or the cluster your kubeconfig points at:

upgradescope scan --files rendered/ --target 1.37
upgradescope scan --target 1.37

Exit code 0 means the gate passed, 2 that it failed (a blocker, or a verdict of unknown), 1 an error. --fail-on warning|never moves the threshold; --allow-incomplete (the Action's allow-incomplete: true) gates on findings alone when a required check could not run, for example a target newer than the knowledge base knows. CLI in two minutes.

Gate pull requests with the GitHub Action (pin it to a release tag or its SHA; the floating v0 tag moves with every release):

      - run: helm template my-release ./chart --output-dir rendered
      - uses: abd-ulbasit/upgradescope@v0.2.0
        id: gate
        with: {path: rendered, target: "1.37", version: v0.2.0}
      - uses: github/codeql-action/upload-sarif@v4
        if: ${{ !cancelled() && steps.gate.outputs.sarif-file != '' }}
        with: {sarif_file: "${{ steps.gate.outputs.sarif-file }}"}

CI gate also covers the server's gate endpoint. GitLab CI, Jenkins and Azure Pipelines have templates in ci/ that publish JUnit and GitLab Code Quality reports (--output junit|gitlab-codequality): see Other CI systems.

Run it in the cluster:

helm install upgradescope deploy/chart -n upgradescope --create-namespace
kubectl get ucr        # NAME  TARGET  SCORE  READY  LASTEVALUATED  AGE

The agent re-evaluates every 10 minutes and writes a ClusterReadiness object with a standard Ready condition, for kubectl wait, alerts and GitOps health checks. A chart from a clone defaults to the image of the release it was cut for; to run unreleased changes, build an image from the clone and set image.repository and image.tag. In-cluster agent · Fleet server.

What it checks, and where it stops

  • Removed and deprecated APIs, in manifests and in live objects. Live objects count when someone still writes them through the deprecated version (from managedFields, then the last-applied annotation), not merely because the apiserver still serves that version, which would flag every cluster. Objects with neither record are missed. How.
  • Deprecated API requests, from the apiserver's apiserver_requested_deprecated_apis metric: that a client asked, not which client, and only for the replica that answered. Managed control planes often forbid it; the report then says so.
  • Add-ons past end of life and their Kubernetes compatibility, from a registry of 20 add-ons in which every claim carries a citation (Ingress NGINX, retired in March 2026, is a blocker). An add-on is found by its container images, its Helm release, its helm.sh/chart or app.kubernetes.io/* pod labels, or an Ingress NGINX IngressClass; in rendered manifests, by the images and labels of workload pod templates. Add-ons outside the registry are not judged; the report lists the images no matcher recognised. Registry.
  • Version skew of kubelets, kube-proxy, controller-manager, scheduler and HA apiservers; not kubectl clients, which only audit logs reveal.
  • Helm charts whose kubeVersion excludes the target, and stored release manifests that use removed APIs.

The verdict is blocked on any blocker, unknown when a required check (API usage, the knowledge base covering the target, and for a live cluster its versions and add-ons) was not assessed, and ready otherwise. For a given inventory, knowledge base, target and date the result is the same; end-of-life dates move verdicts on their own. Verdict and score.

The knowledge base is compiled into the binary and changes only with a release; upgradescope version prints the newest Kubernetes minor it covers. A target past that is unknown, by design. Knowledge base.

Tested against Kubernetes 1.24 to the newest minor: 1.29 and up as whole kind clusters, 1.24 to 1.28 as real kube-apiservers through envtest (the collector and engine only). Tested Kubernetes range.

Managed clusters

EKS, GKE, AKS, k3s, RKE2 and OpenShift need no configuration. On managed control planes, /metrics is usually forbidden (deprecated-API requests are then not assessed) and control-plane pods are hidden (controller-manager and scheduler skew are then not checked; kubelets and kube-proxy still are). Managed clusters.

What the agent can touch

It reads with get and list, never watch, and writes only its own ClusterReadiness object, its status and (by default) that object's CRD. To read Helm releases it needs get/list on Secrets and ConfigMaps cluster-wide, which RBAC cannot narrow; rbac.helmSecrets=false removes that at the cost of Helm findings. Security model and RBAC.

Measured

What Measured How
scan against a live kind cluster (Kubernetes 1.37) median 0.49 s, p90 0.52 s 30 runs on a ThinkPad (Linux, amd64), October 2026 audit at main 8a951dd (#130)
scan --files on the demo's four rendered objects (hack/demo/rendered) median 0.022 s, p90 0.022 s 30 runs, Apple M1 Pro, main 9d0b161, 2026-10-02
Binary and archive, linux/amd64 (stripped binary, .tar.gz download) 57.5 MiB binary, 17.4 MiB archive GoReleaser v2.17.1 snapshot (make release-check) on an Apple M1 Pro, Go 1.26.8, main 2e497c1, 2026-10-02; cross-compiled with CGO_ENABLED=0, so the build host does not change the size; the release check fails beyond 2%

More, with sizes per platform: Install.

How it compares

pluto, kubent and kubepug find deprecated APIs in manifests, Helm releases and live objects, as one-shot CLIs; Nova finds outdated charts; EKS, GKE and AKS check their own clusters. upgradescope adds authorship-based live detection, cited add-on end of life, skew, a verdict that admits what it could not see, and a continuous agent and fleet server you host. The comparison says, with sources, what each does that upgradescope does not.

Project

Contributing · Architecture · REST API (OpenAPI) · Changelog · Security · Compatibility policy

The author interned at chkk.io, which sells in this category. upgradescope is clean-room: no proprietary code, data, schemas or documents were used, and every knowledge-base entry is generated from upstream source or carries a public citation, checked in CI. Most of the code was written by coding agents from specs and plans the author wrote and reviewed.

Apache-2.0.

Directories

Path Synopsis
cmd
upgradescope command
internal
agent
Package agent runs the in-cluster continuous loop: collect → evaluate per target → ClusterReadiness CRD status (always) → push snapshot to the server on content change.
Package agent runs the in-cluster continuous loop: collect → evaluate per target → ClusterReadiness CRD status (always) → push snapshot to the server on content change.
cli
codequality
Package codequality renders engine reports as GitLab Code Quality reports (artifacts:reports:codequality), which GitLab shows in the merge request widget and the pipeline's Code Quality tab.
Package codequality renders engine reports as GitLab Code Quality reports (artifacts:reports:codequality), which GitLab shows in the merge request widget and the pipeline's Code Quality tab.
codequality/codequalitytest
Package codequalitytest checks GitLab Code Quality reports against what GitLab accepts, for every package that emits one (the CLI's --output gitlab-codequality and the server's /api/v1/gate?format=gitlab-codequality).
Package codequalitytest checks GitLab Code Quality reports against what GitLab accepts, for every package that emits one (the CLI's --output gitlab-codequality and the server's /api/v1/gate?format=gitlab-codequality).
collect
Package collect builds an inventory.Inventory from a live cluster (or, in files mode, from rendered manifests).
Package collect builds an inventory.Inventory from a live cluster (or, in files mode, from rendered manifests).
crd
Package crd owns the ClusterReadiness custom resource: its embedded CRD manifest, plain JSON-tagged Go types (no codegen), and apply/status logic via the dynamic client.
Package crd owns the ClusterReadiness custom resource: its embedded CRD manifest, plain JSON-tagged Go types (no codegen), and apply/status logic via the dynamic client.
junit
Package junit renders engine reports as JUnit XML, the test-report format Jenkins (the junit step), GitLab (artifacts:reports:junit) and Azure Pipelines (PublishTestResults) display.
Package junit renders engine reports as JUnit XML, the test-report format Jenkins (the junit step), GitLab (artifacts:reports:junit) and Azure Pipelines (PublishTestResults) display.
junit/junittest
Package junittest reads JUnit XML as CI systems do and validates it against the Jenkins JUnit schema (the xUnit plugin's junit-10.xsd, vendored under testdata), for every package that emits JUnit (the CLI's --output junit and the server's /api/v1/gate?format=junit).
Package junittest reads JUnit XML as CI systems do and validates it against the Jenkins JUnit schema (the xUnit plugin's junit-10.xsd, vendored under testdata), for every package that emits JUnit (the CLI's --output junit and the server's /api/v1/gate?format=junit).
kb
Package kb loads and indexes the three upgrade-readiness datasets: generated API lifecycle data, the add-on EOL registry, and the hardcoded Kubernetes version-skew policy.
Package kb loads and indexes the three upgrade-readiness datasets: generated API lifecycle data, the add-on EOL registry, and the hardcoded Kubernetes version-skew policy.
sarif
Package sarif renders engine reports as SARIF 2.1.0 for GitHub code scanning.
Package sarif renders engine reports as SARIF 2.1.0 for GitHub code scanning.
sarif/sariftest
Package sariftest checks SARIF documents against what GitHub code scanning accepts, for every package that emits SARIF (the CLI's --output sarif and the server's /api/v1/gate?format=sarif).
Package sariftest checks SARIF documents against what GitHub code scanning accepts, for every package that emits SARIF (the CLI's --output sarif and the server's /api/v1/gate?format=sarif).
server
Package server is the upgradescope continuous-mode server: snapshot ingest, persisted evaluations, a read API, and on-demand what-if re-evaluation.
Package server is the upgradescope continuous-mode server: snapshot ingest, persisted evaluations, a read API, and on-demand what-if re-evaluation.
server/notify
Package notify defines the notification seam fired on finding deltas (new blocker, became-ready, add-on entering the EOL window) — never on every snapshot.
Package notify defines the notification seam fired on finding deltas (new blocker, became-ready, add-on entering the EOL window) — never on every snapshot.
server/store
Package store persists clusters, snapshots and evaluations for the upgradescope server.
Package store persists clusters, snapshots and evaluations for the upgradescope server.
server/store/storetest
Package storetest pins the behavioral contract of store.Store.
Package storetest pins the behavioral contract of store.Store.
suppress
Package suppress applies accepted findings to an engine report: ignore rules (from .upgradescope.yaml or ClusterReadiness spec.ignore) and the upgradescope.dev/ignore object annotation move findings, or single objects of a finding, into Report.Suppressed with the reason given, so they stop counting toward score and verdict but stay visible.
Package suppress applies accepted findings to an engine report: ignore rules (from .upgradescope.yaml or ClusterReadiness spec.ignore) and the upgradescope.dev/ignore object annotation move findings, or single objects of a finding, into Report.Suppressed with the reason given, so they stop counting toward score and verdict but stay visible.
registry/load.go
registry/load.go
tools
gen-docs command
Command gen-docs writes upgradescope's shell completions and man pages, rendered from the same cobra command tree the binary runs, so they cannot drift from its flags.
Command gen-docs writes upgradescope's shell completions and man pages, rendered from the same cobra command tree the binary runs, so they cannot drift from its flags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL