Documentation
¶
Overview ¶
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.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APILifecycleEntry ¶
type APILifecycleEntry struct {
Group string `json:"group"` // "" for core
Version string `json:"version"`
Kind string `json:"kind"`
Introduced inventory.Version `json:"introduced"`
Deprecated *inventory.Version `json:"deprecated,omitempty"`
Removed *inventory.Version `json:"removed,omitempty"`
Replacement *GVK `json:"replacement,omitempty"`
}
APILifecycleEntry describes one versioned API kind's lifecycle, as extracted from k8s.io/api generated APILifecycle* methods by tools/gen-kb.
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is an O(1) lookup over lifecycle entries by group/version/kind.
func NewIndex ¶
func NewIndex(entries []APILifecycleEntry) Index
type KB ¶
type KB struct {
Version string // dataset version, e.g. "k8s-1.36+registry-2026-06-10"
APILifecycle []APILifecycleEntry
AddOns []registry.AddOn
Skew SkewPolicy
MaxKnownK8s inventory.Version // newest minor the lifecycle data covers
}
type SkewPolicy ¶
type SkewPolicy struct {
KubeletMaxBehind int // kubelet ≤ apiserver and ≥ apiserver−3
KubectlMaxSkew int // kubectl within ±1 of apiserver
APIServerHASpread int // HA apiservers within 1 minor of each other
KubeProxyMaxBehind int // kube-proxy ≤ apiserver and ≥ apiserver−3
CtrlMgrMaxBehind int // controller-manager/scheduler ≤ apiserver, ≥ apiserver−1
}
SkewPolicy encodes the upstream Kubernetes version-skew policy (https://kubernetes.io/releases/version-skew-policy/). All values are minor-version distances relative to kube-apiserver.
Extends the shared type contract with KubeProxyMaxBehind and CtrlMgrMaxBehind — both are upstream policy rules the engine evaluates.
func DefaultSkewPolicy ¶
func DefaultSkewPolicy() SkewPolicy
DefaultSkewPolicy returns the upstream policy as of Kubernetes 1.28+ (when kubelet skew widened from n−2 to n−3).