crd

package
v0.9.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: 7 Imported by: 0

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

func NewScanner() scanner.Scanner

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.

Jump to

Keyboard shortcuts

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