Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group. +k8s:deepcopy-gen=package +kubebuilder:object:generate=true +groupName=chainsaw.kyverno.io
Index ¶
Constants ¶
const GroupName = "chainsaw.kyverno.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
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 Apply ¶
type Apply struct { // FileRef provides a reference to the file containing the FileRef `json:",inline"` // ContinueOnError determines whether a test should continue or not in case the operation was not successful. // Even if the test continues executing, it will still be reported as failed. // +optional ContinueOnError *bool `json:"continueOnError,omitempty"` }
Apply represents a set of configurations or resources that should be applied during testing.
func (*Apply) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Apply.
func (*Apply) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Assert ¶
type Assert struct { // FileRef provides a reference to the file containing the assertion. FileRef `json:",inline"` // ContinueOnError determines whether a test should continue or not in case the operation was not successful. // Even if the test continues executing, it will still be reported as failed. // +optional ContinueOnError *bool `json:"continueOnError,omitempty"` }
Assert represents a test condition that is expected to hold true during the testing process.
func (*Assert) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Assert.
func (*Assert) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 { // Global timeout configuration. Applies to all tests/test steps if not overridden. // +optional // +kubebuilder:default:="30s" Timeout *metav1.Duration `json:"timeout,omitempty"` // Directories containing test cases to run. // +optional TestDirs []string `json:"testDirs,omitempty"` // If set, do not delete the resources after running the tests (implies SkipClusterDelete). // +optional SkipDelete bool `json:"skipDelete,omitempty"` // 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:default:=8 // +kubebuilder:validation:Format:=int Parallel int `json:"parallel,omitempty"` // ReportFormat determines test report format (JSON|XML|nil) nil == no report. // maps to report.Type, however we don't want generated.deepcopy to have reference to it. // +optional // +kubebuilder:validation:Enum=JSON;XML; ReportFormat ReportFormatType `json:"reportFormat,omitempty"` // ReportName defines the name of report to create. It defaults to "chainsaw-report". // +optional // +kubebuilder:default:="chainsaw-report" ReportName string `json:"reportName,omitempty"` // Namespace defines the namespace to use for tests. // +optional Namespace string `json:"namespace,omitempty"` // FullName makes use of the full test case folder path instead of the folder name. // +optional FullName bool `json:"fullName,omitempty"` // 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"` // RepeatCount indicates how many times the tests should be executed. // +kubebuilder:validation:Format:=int // +kubebuilder:validation:Minimum:=1 // +optional RepeatCount *int `json:"repeatCount,omitempty"` }
ConfigurationSpec contains the configuration used to run tests.
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 Delete ¶
type Delete struct { // API version of the referent. APIVersion string `json:"apiVersion"` // Kind of the referent. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind"` // Namespace of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ // +optional Namespace string `json:"namespace,omitempty"` // Name of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +optional Name string `json:"name,omitempty"` // Label selector to match objects to delete // +optional Labels map[string]string `json:"labels,omitempty"` // ContinueOnError determines whether a test should continue or not in case the operation was not successful. // Even if the test continues executing, it will still be reported as failed. // +optional ContinueOnError *bool `json:"continueOnError,omitempty"` }
Delete is a reference to an object that should be deleted
func (*Delete) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Delete.
func (*Delete) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Error ¶
type Error struct { // FileRef provides a reference to the file containing the expected error. FileRef `json:",inline"` // ContinueOnError determines whether a test should continue or not in case the operation was not successful. // Even if the test continues executing, it will still be reported as failed. // +optional ContinueOnError *bool `json:"continueOnError,omitempty"` }
Error represents an anticipated error condition that may arise during testing. Instead of treating such an error as a test failure, it acknowledges it as expected.
func (*Error) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Error.
func (*Error) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileRef ¶
type FileRef struct { // File is the path to the referenced file. File string `json:"file"` }
FileRef represents a file reference.
func (*FileRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileRef.
func (*FileRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReportFormatType ¶
type ReportFormatType string
const ( JSONFormat ReportFormatType = "JSON" XMLFormat ReportFormatType = "XML" NoReport ReportFormatType = "" )
type Test ¶
type Test struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Test spec. Spec TestSpec `json:"spec"` }
Test is the resource that contains aa test definition.
func (*Test) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.
func (*Test) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Test) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestSpec ¶
type TestSpec struct { // Timeout for the test. Overrides the global timeout set in the Configuration. // +optional Timeout *metav1.Duration `json:"timeout,omitempty"` // Skip determines whether the test should skipped. // +optional Skip *bool `json:"skip,omitempty"` // Concurrent determines whether the test should run concurrently with other tests. // +optional Concurrent *bool `json:"concurrent,omitempty"` // SkipDelete determines whether the resources created by the test should be deleted after the test is executed. // +optional SkipDelete *bool `json:"skipDelete,omitempty"` // Steps defining the test. Steps []TestSpecStep `json:"steps"` }
TestSpec contains the test spec.
func (*TestSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSpec.
func (*TestSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestSpecStep ¶
type TestSpecStep struct { // Name of the step. // +optional Name string `json:"name,omitempty"` // Spec of the step. Spec TestStepSpec `json:"spec"` }
TestSpecStep contains the test step definition used in a test spec.
func (*TestSpecStep) DeepCopy ¶
func (in *TestSpecStep) DeepCopy() *TestSpecStep
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSpecStep.
func (*TestSpecStep) DeepCopyInto ¶
func (in *TestSpecStep) DeepCopyInto(out *TestSpecStep)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestStep ¶
type TestStep struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // TestStep spec. Spec TestStepSpec `json:"spec"` }
TestStep is the resource that contains the testStep used to run tests.
func (*TestStep) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStep.
func (*TestStep) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestStep) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestStepSpec ¶
type TestStepSpec struct { // Timeout for the test step. Overrides the global timeout set in the Configuration and the timeout eventually set in the Test. // +optional Timeout *metav1.Duration `json:"timeout,omitempty"` // SkipDelete determines whether the resources created by the step should be deleted after the test step is executed. // +optional SkipDelete *bool `json:"skipDelete,omitempty"` // Assert represents the assertions to be made for this test step. It checks whether the conditions // specified in each assertion hold true. // +optional Assert []Assert `json:"assert,omitempty"` // Apply lists the resources that should be applied for this test step. This can include things // like configuration settings or any other resources that need to be available during the test. // +optional Apply []Apply `json:"apply,omitempty"` // Error lists the expected errors for this test step. If any of these errors occur, the test // will consider them as expected; otherwise, they will be treated as test failures. // +optional Error []Error `json:"error,omitempty"` // Delete provides a list of objects that should be deleted before this test step is executed. // This helps in ensuring that the environment is set up correctly before the test step runs. // +optional Delete []Delete `json:"delete,omitempty"` }
TestStepSpec defines the desired state and behavior for each test step.
func (*TestStepSpec) DeepCopy ¶
func (in *TestStepSpec) DeepCopy() *TestStepSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStepSpec.
func (*TestStepSpec) DeepCopyInto ¶
func (in *TestStepSpec) DeepCopyInto(out *TestStepSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.