Documentation
¶
Overview ¶
Package cncf renders CNCF AI Conformance evidence markdown from CTRF reports.
Index ¶
Constants ¶
const SkippedNoClusterStatus = "skipped - no-cluster mode (test mode)"
SkippedNoClusterStatus is the section status emitted when the collector runs in --no-cluster mode (test mode). Mirrors the validator idiom for consistency across CNCF submission tooling.
Variables ¶
var FeatureDescriptions = map[string]string{ // contains filtered or unexported fields }
FeatureDescriptions maps feature names to human-readable descriptions.
var ValidFeatures = []string{
featureDRASupport,
featureGangScheduling,
featureSecureAccess,
featureAcceleratorMetrics,
featureAIServiceMetrics,
featureInferenceGateway,
featureRobustOperator,
featurePodAutoscaling,
featureClusterAutoscaling,
}
ValidFeatures lists all supported evidence collection features. These are the user-facing names shown in help text and used with --feature.
Functions ¶
func GetRequirement ¶
func GetRequirement(validatorName string) *requirementMeta
GetRequirement returns the requirement metadata for a validator name. Returns nil if the validator is not a submission-required conformance check.
func IsValidFeature ¶
IsValidFeature returns true if the name is a valid feature or alias.
func ResolveFeature ¶
ResolveFeature returns the canonical feature name, resolving aliases.
func ScriptSection ¶
ScriptSection returns the script section name for a feature.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector orchestrates behavioral evidence collection by invoking the embedded collect-evidence.sh script against a live Kubernetes cluster.
func NewCollector ¶
func NewCollector(outputDir string, opts ...CollectorOption) *Collector
NewCollector creates a new evidence Collector.
func (*Collector) Run ¶
Run executes evidence collection for the configured features.
In --no-cluster mode the call short-circuits, logging a skip per section using the validator idiom and returning nil.
On a real run, Run probes for required binaries (bash, kubectl) once, then iterates configured sections under a per-section timeout. Errors from individual sections are aggregated; Run returns a single wrapped error containing the failing section names.
type CollectorOption ¶
type CollectorOption func(*Collector)
CollectorOption configures the Collector.
func WithFeatures ¶
func WithFeatures(features []string) CollectorOption
WithFeatures sets which features to collect evidence for. If empty, all features are collected.
func WithKubeconfig ¶
func WithKubeconfig(kubeconfig string) CollectorOption
WithKubeconfig sets the kubeconfig path for kubectl commands in the evidence script.
func WithNoCleanup ¶
func WithNoCleanup(noCleanup bool) CollectorOption
WithNoCleanup skips test namespace cleanup after collection.
func WithNoCluster ¶
func WithNoCluster(noCluster bool) CollectorOption
WithNoCluster enables test mode: Run short-circuits without invoking any subprocess. Used by unit tests and `aicr --no-cluster` flows.
type Option ¶
type Option func(*Renderer)
Option configures a Renderer.
func WithOutputDir ¶
WithOutputDir sets the output directory for evidence files.