deprecatedapis

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package deprecatedapis identifies in-use API versions that Kubernetes has deprecated or removed. It walks the discovery API for every server-known group/version and cross-references against an embedded removal table. The table covers the most operationally impactful deprecations through 1.33. Operators rarely upgrade with confidence; this scanner answers "what will break in the next release?" in one place.

Index

Constants

View Source
const Name = "deprecated-apis"

Name is the registry key for this scanner.

Variables

This section is empty.

Functions

func NewScanner

func NewScanner() scanner.Scanner

NewScanner returns a scanner that identifies deprecated API usage in the cluster. Each removal candidate is checked by listing instances at the deprecated version; only versions still served by the apiserver and with at least one instance are reported.

Types

type Data

type Data struct {
	// ServerVersion is the cluster's reported minor version, when known.
	ServerVersion string `json:"server_version,omitempty"`
	// Deprecated lists deprecated APIs that are still being served and used.
	Deprecated []Deprecated `json:"deprecated"`
	// TotalInstances is the sum of InstanceCount across all entries.
	TotalInstances int `json:"total_instances"`
}

Data holds deprecated API findings for one cluster.

type Deprecated

type Deprecated struct {
	// APIVersion is the deprecated apiVersion.
	APIVersion string `json:"api_version"`
	// Kind is the resource Kind.
	Kind string `json:"kind"`
	// Replacement is the suggested replacement.
	Replacement string `json:"replacement"`
	// RemovedIn is the Kubernetes minor version that removed the API.
	RemovedIn string `json:"removed_in"`
	// InstanceCount is the number of objects observed at this apiVersion.
	InstanceCount int `json:"instance_count"`
	// Forbidden is true when the API server returned 403 for the list call
	// (meaning we cannot count instances even though the resource is served).
	Forbidden bool `json:"forbidden,omitempty"`
}

Deprecated describes one in-use deprecated API instance with location.

Jump to

Keyboard shortcuts

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