1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! Classification of Kubernetes API groups as built-in vs. CRD.
//!
//! Single source of truth — used by the CRD catalog provider to skip
//! resources whose schemas live in `kubernetes-json-schema` rather than
//! in a CRD mirror, and available to other code that needs the same
//! distinction.
/// Explicit allowlist of built-in Kubernetes API groups (group names as
/// they appear in `apiVersion`, NOT in URLs). Maintained against the
/// current K8s API reference. Anything not on this list — including
/// CRD groups that happen to use a `.k8s.io` suffix — is treated as a
/// CRD that lives in a CRD catalog.
///
/// CRD groups currently in the wild that use `.k8s.io` and would be
/// misclassified by a naive `.ends_with(".k8s.io")` rule:
/// - `autoscaling.k8s.io` — VPA (`VerticalPodAutoscaler`, …)
/// - `gateway.networking.k8s.io` — Gateway API
/// (`Gateway`, `HTTPRoute`, `GatewayClass`, `ReferenceGrant`, …)
/// - `snapshot.storage.k8s.io` — CSI snapshotter
/// (`VolumeSnapshot`, `VolumeSnapshotClass`,
/// `VolumeSnapshotContent`)
/// - `metrics.k8s.io` — aggregated metrics-server APIs
/// (`PodMetrics`, `NodeMetrics`)
const BUILTIN_K8S_GROUPS: & = &;
/// True if `api_group` belongs to the built-in Kubernetes API surface
/// — schemas for these resources live in `kubernetes-json-schema`, not
/// in a CRDs catalog.
///
/// Empty string (the implicit core group — `Pod`, `Service`, …) is
/// considered built-in. Everything else must be on the explicit
/// allowlist.