evidence

package
v0.10.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package evidence renders CNCF AI Conformance evidence markdown from CTRF reports.

Index

Constants

This section is empty.

Variables

View Source
var FeatureDescriptions = map[string]string{
	"dra-support":         "DRA GPU allocation test",
	"gang-scheduling":     "Gang scheduling co-scheduling test",
	"secure-access":       "Secure accelerator access verification",
	"accelerator-metrics": "Accelerator & AI service metrics",
	"inference-gateway":   "Inference API gateway conditions",
	"robust-operator":     "Robust AI operator + webhook test",
	"pod-autoscaling":     "HPA pod autoscaling (scale-up + scale-down)",
	"cluster-autoscaling": "Cluster autoscaling (ASG configuration)",
}

FeatureDescriptions maps feature names to human-readable descriptions.

View Source
var ValidFeatures = []string{
	"dra-support",
	"gang-scheduling",
	"secure-access",
	"accelerator-metrics",
	"inference-gateway",
	"robust-operator",
	"pod-autoscaling",
	"cluster-autoscaling",
}

ValidFeatures lists all supported evidence collection features. These are the user-facing names shown in help text and used with --feature.

Functions

func GetRequirement added in v0.9.0

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 added in v0.7.10

func IsValidFeature(name string) bool

IsValidFeature returns true if the name is a valid feature or alias.

func ResolveFeature added in v0.7.10

func ResolveFeature(name string) string

ResolveFeature returns the canonical feature name, resolving aliases.

func ScriptSection added in v0.7.10

func ScriptSection(feature string) string

ScriptSection returns the script section name for a feature.

Types

type Collector added in v0.7.10

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 added in v0.7.10

func NewCollector(outputDir string, opts ...CollectorOption) *Collector

NewCollector creates a new evidence Collector.

func (*Collector) Run added in v0.7.10

func (c *Collector) Run(ctx context.Context) error

Run executes evidence collection for the configured features.

type CollectorOption added in v0.7.10

type CollectorOption func(*Collector)

CollectorOption configures the Collector.

func WithFeatures added in v0.7.10

func WithFeatures(features []string) CollectorOption

WithFeatures sets which features to collect evidence for. If empty, all features are collected.

func WithKubeconfig added in v0.10.1

func WithKubeconfig(kubeconfig string) CollectorOption

WithKubeconfig sets the kubeconfig path for kubectl commands in the evidence script.

func WithNoCleanup added in v0.7.10

func WithNoCleanup(noCleanup bool) CollectorOption

WithNoCleanup skips test namespace cleanup after collection.

type Option

type Option func(*Renderer)

Option configures a Renderer.

func WithOutputDir

func WithOutputDir(dir string) Option

WithOutputDir sets the output directory for evidence files.

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer generates CNCF conformance evidence documents from CTRF reports.

func New

func New(opts ...Option) *Renderer

New creates a new evidence Renderer with the given options.

func (*Renderer) Render

func (r *Renderer) Render(ctx context.Context, report *ctrf.Report) error

Render generates evidence markdown files from a CTRF report. Groups test results by CNCF requirement. Only submission-required checks produce evidence. Skipped tests are excluded.

Jump to

Keyboard shortcuts

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