Documentation
¶
Overview ¶
Package crd enumerates the CustomResourceDefinitions installed on a cluster and surfaces per-cluster CRD divergence as a scanner result.
Index ¶
Constants ¶
View Source
const Name = "crds"
Name is the registry key for this scanner.
Variables ¶
This section is empty.
Functions ¶
func NewScanner ¶
NewScanner returns a scanner that lists CRDs in a cluster.
Types ¶
type CRDInfo ¶
type CRDInfo struct {
// Name is the CRD name (e.g. certificates.cert-manager.io).
Name string `json:"name"`
// Group is the API group.
Group string `json:"group"`
// Versions lists the served version names.
Versions []string `json:"versions"`
// Scope is Namespaced or Cluster.
Scope string `json:"scope"`
}
CRDInfo describes a single CustomResourceDefinition.
type Data ¶
type Data struct {
// Count is the total number of CRDs.
Count int `json:"count"`
// CRDs lists all CustomResourceDefinitions.
CRDs []CRDInfo `json:"crds"`
}
Data holds CRD information for one cluster.
type DynamicLister ¶
type DynamicLister interface {
Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface
}
DynamicLister is satisfied by dynamic.Interface for testing.
Click to show internal directories.
Click to hide internal directories.