v1alpha2

package
v0.2.11-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the v1alpha2 API group. +k8s:deepcopy-gen=package +kubebuilder:object:generate=true +groupName=chainsaw.kyverno.io

Index

Constants

View Source
const GroupName = "chainsaw.kyverno.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha2"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CleanupOptions added in v0.2.4

type CleanupOptions struct {
	// If set, do not delete the resources after running a test.
	// +optional
	SkipDelete bool `json:"skipDelete,omitempty"`

	// DelayBeforeCleanup adds a delay between the time a test ends and the time cleanup starts.
	// +optional
	DelayBeforeCleanup *metav1.Duration `json:"delayBeforeCleanup,omitempty"`
}

CleanupOptions contains the configuration used for cleaning up resources.

func (*CleanupOptions) DeepCopy added in v0.2.4

func (in *CleanupOptions) DeepCopy() *CleanupOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CleanupOptions.

func (*CleanupOptions) DeepCopyInto added in v0.2.4

func (in *CleanupOptions) DeepCopyInto(out *CleanupOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Clusters added in v0.2.4

type Clusters = v1alpha1.Clusters

type Compiler added in v0.2.11

type Compiler = v1alpha1.Compiler

type Configuration

type Configuration struct {
	metav1.TypeMeta `json:",inline"`

	// Standard object's metadata.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Configuration spec.
	Spec ConfigurationSpec `json:"spec"`
}

Configuration is the resource that contains the configuration used to run tests.

func (*Configuration) DeepCopy

func (in *Configuration) DeepCopy() *Configuration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.

func (*Configuration) DeepCopyInto

func (in *Configuration) DeepCopyInto(out *Configuration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Configuration) DeepCopyObject

func (in *Configuration) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConfigurationSpec

type ConfigurationSpec struct {
	// Cleanup contains cleanup configuration.
	// +optional
	// +kubebuilder:default:={}
	Cleanup CleanupOptions `json:"cleanup"`

	// Clusters holds a registry to clusters to support multi-cluster tests.
	// +optional
	Clusters Clusters `json:"clusters"`

	// Deletion contains the global deletion configuration.
	// +optional
	// +kubebuilder:default:={}
	Deletion DeletionOptions `json:"deletion"`

	// Discovery contains tests discovery configuration.
	// +optional
	// +kubebuilder:default:={}
	Discovery DiscoveryOptions `json:"discovery"`

	// Error contains the global error configuration.
	// +optional
	// +kubebuilder:default:={}
	Error ErrorOptions `json:"error,omitempty"`

	// Execution contains tests execution configuration.
	// +optional
	// +kubebuilder:default:={}
	Execution ExecutionOptions `json:"execution"`

	// Namespace contains properties for the namespace to use for tests.
	// +optional
	// +kubebuilder:default:={}
	Namespace NamespaceOptions `json:"namespace"`

	// Report contains properties for the report.
	// +optional
	Report *ReportOptions `json:"report,omitempty"`

	// Templating contains the templating config.
	// +optional
	// +kubebuilder:default:={}
	Templating TemplatingOptions `json:"templating"`

	// Global timeouts configuration. Applies to all tests/test steps if not overridden.
	// +optional
	// +kubebuilder:default:={}
	Timeouts DefaultTimeouts `json:"timeouts"`
}

ConfigurationSpec contains the configuration used to run tests. +k8s:conversion-gen=false

func (*ConfigurationSpec) DeepCopy

func (in *ConfigurationSpec) DeepCopy() *ConfigurationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationSpec.

func (*ConfigurationSpec) DeepCopyInto

func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DefaultTimeouts added in v0.2.8

type DefaultTimeouts = v1alpha1.DefaultTimeouts

type DeletionOptions added in v0.2.3

type DeletionOptions struct {
	// Propagation decides if a deletion will propagate to the dependents of
	// the object, and how the garbage collector will handle the propagation.
	// +optional
	// +kubebuilder:validation:Enum:=Orphan;Background;Foreground
	// +kubebuilder:default:=Background
	Propagation metav1.DeletionPropagation `json:"propagation,omitempty"`
}

DeletionOptions contains the configuration used for deleting resources.

func (*DeletionOptions) DeepCopy added in v0.2.3

func (in *DeletionOptions) DeepCopy() *DeletionOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeletionOptions.

func (*DeletionOptions) DeepCopyInto added in v0.2.3

func (in *DeletionOptions) DeepCopyInto(out *DeletionOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiscoveryOptions added in v0.2.4

type DiscoveryOptions struct {
	// ExcludeTestRegex is used to exclude tests based on a regular expression.
	// +optional
	ExcludeTestRegex string `json:"excludeTestRegex,omitempty"`

	// IncludeTestRegex is used to include tests based on a regular expression.
	// +optional
	IncludeTestRegex string `json:"includeTestRegex,omitempty"`

	// TestFile is the name of the file containing the test to run.
	// If no extension is provided, chainsaw will try with .yaml first and .yml if needed.
	// +optional
	// +kubebuilder:default:="chainsaw-test"
	TestFile string `json:"testFile,omitempty"`

	// FullName makes use of the full test case folder path instead of the folder name.
	// +optional
	FullName bool `json:"fullName,omitempty"`
}

DiscoveryOptions contains the discovery configuration used when discovering tests in folders.

func (*DiscoveryOptions) DeepCopy added in v0.2.4

func (in *DiscoveryOptions) DeepCopy() *DiscoveryOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryOptions.

func (*DiscoveryOptions) DeepCopyInto added in v0.2.4

func (in *DiscoveryOptions) DeepCopyInto(out *DiscoveryOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ErrorOptions added in v0.2.3

type ErrorOptions struct {
	// Catch defines what the tests steps will execute when an error happens.
	// This will be combined with catch handlers defined at the test and step levels.
	// +optional
	Catch []v1alpha1.CatchFinally `json:"catch,omitempty"`
}

ErrorOptions contains the global error configuration.

func (*ErrorOptions) DeepCopy added in v0.2.3

func (in *ErrorOptions) DeepCopy() *ErrorOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ErrorOptions.

func (*ErrorOptions) DeepCopyInto added in v0.2.3

func (in *ErrorOptions) DeepCopyInto(out *ErrorOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecutionOptions added in v0.2.4

type ExecutionOptions struct {
	// FailFast determines whether the test should stop upon encountering the first failure.
	// +optional
	FailFast bool `json:"failFast,omitempty"`

	// The maximum number of tests to run at once.
	// +kubebuilder:validation:Format:=int
	// +kubebuilder:validation:Minimum:=1
	// +optional
	Parallel *int `json:"parallel,omitempty"`

	// RepeatCount indicates how many times the tests should be executed.
	// +kubebuilder:validation:Format:=int
	// +kubebuilder:validation:Minimum:=1
	// +optional
	RepeatCount *int `json:"repeatCount,omitempty"`

	// ForceTerminationGracePeriod forces the termination grace period on pods, statefulsets, daemonsets and deployments.
	// +optional
	ForceTerminationGracePeriod *metav1.Duration `json:"forceTerminationGracePeriod,omitempty"`
}

ExecutionOptions determines how tests are run.

func (*ExecutionOptions) DeepCopy added in v0.2.4

func (in *ExecutionOptions) DeepCopy() *ExecutionOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionOptions.

func (*ExecutionOptions) DeepCopyInto added in v0.2.4

func (in *ExecutionOptions) DeepCopyInto(out *ExecutionOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamespaceOptions added in v0.2.4

type NamespaceOptions struct {
	// Name defines the namespace to use for tests.
	// If not specified, every test will execute in a random ephemeral namespace
	// unless the namespace is overridden in a the test spec.
	// +optional
	Name string `json:"name,omitempty"`

	// Compiler defines the default compiler to use when evaluating expressions.
	// +optional
	Compiler *Compiler `json:"compiler,omitempty"`

	// Template defines a template to create the test namespace.
	// +optional
	Template *Projection `json:"template,omitempty"`
}

NamespaceOptions contains the configuration used to allocate a namespace for each test.

func (*NamespaceOptions) DeepCopy added in v0.2.4

func (in *NamespaceOptions) DeepCopy() *NamespaceOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceOptions.

func (*NamespaceOptions) DeepCopyInto added in v0.2.4

func (in *NamespaceOptions) DeepCopyInto(out *NamespaceOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Projection added in v0.2.11

type Projection = v1alpha1.Projection

type ReportFormatType

type ReportFormatType string
const (
	JSONFormat           ReportFormatType = "JSON"
	XMLFormat            ReportFormatType = "XML"
	JUnitTestFormat      ReportFormatType = "JUNIT-TEST"
	JUnitStepFormat      ReportFormatType = "JUNIT-STEP"
	JUnitOperationFormat ReportFormatType = "JUNIT-OPERATION"
)

type ReportOptions added in v0.2.4

type ReportOptions struct {
	// ReportFormat determines test report format (JSON|XML|JUNIT-TEST|JUNIT-STEP|JUNIT-OPERATION).
	// +optional
	// +kubebuilder:validation:Enum:=JSON;XML;JUNIT-TEST;JUNIT-STEP;JUNIT-OPERATION
	// +kubebuilder:default:="JSON"
	Format ReportFormatType `json:"format,omitempty"`

	// ReportPath defines the path.
	// +optional
	Path string `json:"path,omitempty"`

	// ReportName defines the name of report to create. It defaults to "chainsaw-report".
	// +optional
	// +kubebuilder:default:="chainsaw-report"
	Name string `json:"name,omitempty"`
}

ReportOptions contains the configuration used for reporting.

func (*ReportOptions) DeepCopy added in v0.2.4

func (in *ReportOptions) DeepCopy() *ReportOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReportOptions.

func (*ReportOptions) DeepCopyInto added in v0.2.4

func (in *ReportOptions) DeepCopyInto(out *ReportOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplatingOptions added in v0.2.4

type TemplatingOptions struct {
	// Enabled determines whether resources should be considered for templating.
	// +optional
	// +kubebuilder:default:=true
	Enabled bool `json:"enabled"`

	// Compiler defines the default compiler to use when evaluating expressions.
	// +optional
	Compiler *Compiler `json:"compiler,omitempty"`
}

TemplatingOptions contains the templating configuration.

func (*TemplatingOptions) DeepCopy added in v0.2.4

func (in *TemplatingOptions) DeepCopy() *TemplatingOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplatingOptions.

func (*TemplatingOptions) DeepCopyInto added in v0.2.4

func (in *TemplatingOptions) DeepCopyInto(out *TemplatingOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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