params

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ParamDescs = []check.ParameterDesc{
		schemaLocationsParamDesc,
		cacheParamDesc,
		skipKindsParamDesc,
		rejectKindsParamDesc,
		kubernetesVersionParamDesc,
		strictParamDesc,
		ignoreMissingSchemasParamDesc,
	}
)

Functions

func ParseAndValidate

func ParseAndValidate(m map[string]interface{}) (interface{}, error)

ParseAndValidate instantiates a Params object out of the passed map[string]interface{}, validates it, and returns it. The return type is interface{} to satisfy the type in the Template struct.

func WrapInstantiateFunc

func WrapInstantiateFunc(f func(p Params) (check.Func, error)) func(interface{}) (check.Func, error)

WrapInstantiateFunc is a convenience wrapper that wraps an untyped instantiate function into a typed one.

Types

type Params

type Params struct {
	// SchemaLocations contains locations of schemas to use. See: https://github.com/yannh/kubeconform/tree/master?tab=readme-ov-file#overriding-schemas-location
	// +noregex
	SchemaLocations []string
	// Cache specifies the folder to cache schemas downloaded via HTTP.
	// +noregex
	Cache string
	// SkipKinds lists resource kinds to ignore during validation.
	// +noregex
	SkipKinds []string
	// RejectKinds lists resource kinds to reject during validation.
	// +noregex
	RejectKinds []string
	// KubernetesVersion specifies the Kubernetes version - must match one in https://github.com/instrumenta/kubernetes-json-schema
	// +noregex
	KubernetesVersion string
	// Strict enables strict validation that will error if resources contain undocumented fields.
	Strict bool
	// IgnoreMissingSchemas will skip validation for resources if no schema can be found.
	IgnoreMissingSchemas bool
}

Params defines the configuration parameters for this template.

func (*Params) Validate

func (p *Params) Validate() error

Jump to

Keyboard shortcuts

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