upgradescope

module
v0.3.0 Latest Latest
Warning

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

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

README

upgradescope

CI Release Docs OpenSSF Scorecard Artifact Hub License

upgradescope tells you, before you upgrade Kubernetes, what will break in one cluster, a fleet, or the manifests in a pull request:

  1. Add-on end of life and compatibility, from cited data for 34 add-ons: the end-of-life date and, where upstream publishes one, the Kubernetes range (Ingress NGINX, retired in March 2026, is a blocker).
  2. Custom resources at CRD versions no longer served, and status.storedVersions entries that block the CRD update dropping one.
  3. Stored Helm release manifests and chart kubeVersion: what the installed revision would replay at the target, and charts that exclude it.
  4. Pull-request and CI gating: scan --files on rendered manifests, with SARIF, JUnit and GitLab Code Quality output.

Removed and deprecated APIs, version skew and removed in-tree volume plugins are checked too. The answer is a verdict (ready, blocked, or unknown when a required check could not run), cited findings and an exit code.

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

upgradescope scanning rendered manifests

Install

brew install abd-ulbasit/tap/upgradescope
go install github.com/abd-ulbasit/upgradescope/cmd/upgradescope@latest
helm install upgradescope oci://ghcr.io/abd-ulbasit/charts/upgradescope --version 0.3.0 -n upgradescope --create-namespace

In CI: uses: abd-ulbasit/upgradescope@v0.2.2 (Marketplace, action/README.md). Every channel and its verification: Install.

Verifying a download:

VERSION=v0.2.2   # the release you downloaded
base=https://github.com/abd-ulbasit/upgradescope/releases/download/$VERSION
curl -fsSLO "$base/upgradescope_linux_amd64.tar.gz"
curl -fsSLO "$base/checksums.txt"
curl -fsSLO "$base/checksums.txt.sigstore.json"
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
sha256sum --ignore-missing -c checksums.txt   # macOS: shasum -a 256 -c --ignore-missing checksums.txt

Quickstart

Scan rendered manifests, or your kubeconfig's cluster:

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

Exit code 0: the gate passed; 2: it failed (a blocker, or unknown); 1: an error. --fail-on moves the threshold; --allow-incomplete gates on findings alone. CLI in two minutes.

Gate pull requests with the Action:

      - run: helm template my-release ./chart --output-dir rendered
      - uses: abd-ulbasit/upgradescope@v0.2.2
        id: gate
        with: {path: rendered, target: "1.37", version: v0.2.2}
      - uses: github/codeql-action/upload-sarif@v4
        # also after a failed gate; not on fork PRs (read-only token)
        if: ${{ !cancelled() && steps.gate.outputs.sarif-file != '' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
        with: {sarif_file: "${{ steps.gate.outputs.sarif-file }}"}

CI gate covers fork and Dependabot pull requests; ci/ has GitLab CI, Jenkins and Azure Pipelines templates (Other CI systems).

In the cluster, the chart's agent keeps a ClusterReadiness object current (kubectl get ucr).

What the agent can touch. It reads with get and list, never watch, and writes only ClusterReadiness objects, their status and that CRD (create on clusterreadinesses cannot be limited by name; it never deletes). Helm releases need Secrets and ConfigMaps read cluster-wide, per namespace with rbac.helmSecretsNamespaces, or not at all with rbac.helmSecrets=false; the volume checks list persistentvolumes and storageclasses. Security model and RBAC.

What it checks

Check A blocker when Read from
Add-ons past end of life, or the installed line excludes the target images, Helm releases, chart labels, IngressClass
CRD versions objects at a version their CRD no longer serves CRDs and their objects
Helm charts kubeVersion excludes the target, or a stored release uses a removed API Helm releases; Argo CD and Flux (opt-in)
Removed APIs an object is written through a removed API managedFields, last-applied annotation, manifests
Deprecated API requests the apiserver was asked for a removed API apiserver_requested_deprecated_apis
Version skew kubelets or kube-proxy outside the policy node and control-plane versions
In-tree volume plugins a removed plugin (glusterfs, gitRepo) is named pods, PersistentVolumes, StorageClasses
Managed-provider support the EKS, GKE or AKS minor is past standard support the provider's calendar

Where it stops:

  • Field-level removals other than in-tree volume plugins (Service.spec.externalIPs) are not checked; the table and Markdown reports say so.
  • The deprecated-API metric shows that a client asked, not which, and only on the replica that answered.
  • Add-ons outside the registry are not judged (their images are listed); Helm's sql driver is not read; kubectl client skew is not checked (only audit logs reveal clients).
  • The knowledge base is compiled in: upgradescope version prints its newest minor; a later target is unknown.

Tested against Kubernetes 1.24 to the newest minor (range); EKS, GKE, AKS, k3s, RKE2 and OpenShift need no configuration (managed clusters). Verdict and score has every rule.

Also included

  • In-cluster agent: re-evaluates every 10 minutes and keeps a Ready condition for kubectl wait and GitOps health checks. In-cluster agent · examples.
  • Fleet server: upgradescope serve for history, team rollups, a server-side gate, auditor exports and a dashboard, on SQLite or Postgres. Fleet server · dashboard.
  • Notifications to Slack or an optionally signed webhook. Notifications.
  • MCP: upgradescope mcp gives AI assistants read-only tools over the reports. MCP.
  • Outputs: table, JSON, SARIF, Markdown, JUnit, GitLab Code Quality, and a 0–100 score.

Measured

What Measured How
scan, a live kind cluster (Kubernetes 1.37) median 0.49 s, p90 0.52 s 30 runs, ThinkPad (linux/amd64), main 8a951dd (#130), October 2026
scan --files, the demo's four objects (hack/demo/rendered) median 0.022 s, p90 0.022 s 30 runs, Apple M1 Pro, main 9d0b161, 2026-10-02
A steady agent tick: 2,001 KWOK nodes, about 14,000 pods, 1,000 Helm releases 20 API requests, 27.8 MiB read, 2.4 s; 31 requests when it lists every pod medians, make bench-agent at 0b6fec28, lab A, 2026-10-10; #362 added two lists since (22 and 33, computed)
Binary and archive, linux/amd64 (stripped binary, .tar.gz) 61.5 MiB binary, 18.7 MiB archive the published v0.2.0 assets (62603159), 2026-10-11; the release check fails beyond 2%

Scale and cost has each row in full and how to reproduce it; Install has every platform's size.

How it compares

pluto, kubent and kubepug find deprecated APIs; Nova, outdated charts; EKS, GKE and AKS check their own clusters. kube-upgrade-check covers similar live-cluster ground, also from managedFields and the deprecated-API metric. The comparison has the detail and the sources.

Use something else when you need upgrade preflight (drain-blocking PodDisruptionBudgets, webhooks with a Fail policy; not checked until #397), or control-plane flag, kubelet config and release-note checks on a self-managed cluster: kube-upgrade-check does those today.

Project

Contributing · Governance · Maintainers · Adopters · Roadmap · Security · Claims ledger · Code of Conduct · Changelog · REST API (OpenAPI) · 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 (see the Co-Authored-By trailers in the git history), working from specs and plans drafted with them and approved by the author; the planning notes are not published, and the design decisions are in the architecture guide.

Apache-2.0.

Directories

Path Synopsis
Package api embeds the published machine-readable contracts so the binary can hand the report schema to MCP clients as a tool output schema.
Package api embeds the published machine-readable contracts so the binary can hand the report schema to MCP clients as a tool output schema.
cmd
upgradescope command
hack
bench/seed command
Command seed fills a lab apiserver for the agent scale benchmark (hack/bench/agent.sh, #71): KWOK fake nodes that report Ready with a kubelet version, pods placed on them, ConfigMaps, zero-replica Deployments, and Helm release Secrets with real helm.sh/release.v1 payloads (base64 of gzip of JSON) of realistic sizes.
Command seed fills a lab apiserver for the agent scale benchmark (hack/bench/agent.sh, #71): KWOK fake nodes that report Ready with a kubelet version, pods placed on them, ConfigMaps, zero-replica Deployments, and Helm release Secrets with real helm.sh/release.v1 payloads (base64 of gzip of JSON) of realistic sizes.
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.
crd/apigroup
Package apigroup is the one place the project's Kubernetes API group is spelled: the ClusterReadiness CRD's group and the prefix of every annotation upgradescope reads or writes.
Package apigroup is the one place the project's Kubernetes API group is spelled: the ClusterReadiness CRD's group and the prefix of every annotation upgradescope reads or writes.
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.
mcp
Package mcp is upgradescope's Model Context Protocol server: read-only tools that let an AI assistant ask for a cluster's upgrade readiness, its findings, the add-on registry and, against a fleet server, the fleet.
Package mcp is upgradescope's Model Context Protocol server: read-only tools that let an AI assistant ask for a cluster's upgrade readiness, its findings, the add-on registry and, against a fleet server, the fleet.
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).
secretfile
Package secretfile reads a secret from a file and picks up a new value when the file changes: how serve and the agent rotate a token or a webhook URL mounted from a Kubernetes Secret without a restart.
Package secretfile reads a secret from a file and picks up a new value when the file changes: how serve and the agent rotate a token or a webhook URL mounted from a Kubernetes Secret without a restart.
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 ignore object annotation (apigroup.IgnoreAnnotation) 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 ignore object annotation (apigroup.IgnoreAnnotation) 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.
textsafe
Package textsafe makes text that a scanned manifest or cluster controls safe to print to a terminal or a CI log.
Package textsafe makes text that a scanned manifest or cluster controls safe to print to a terminal or a CI log.
registry/extra.go
registry/extra.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