v1alpha1

package
v0.0.0-...-19412b7 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the scorecard v1alpha1 API group +kubebuilder:object:generate=true +groupName=scorecard.operatorframework.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "scorecard.operatorframework.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type State

type State string

State is a type used to indicate the result state of a Test.

const (
	// PassState occurs when a test passes.
	PassState State = "pass"
	// FailState occurs when a test fails.
	FailState State = "fail"
	// ErrorState occurs when a test encounters a fatal error.
	ErrorState State = "error"
)

type Test

type Test struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TestSpec   `json:"spec,omitempty"`
	Status TestStatus `json:"status,omitempty"`
}

Test defines a test specification. If the test has completed, Status contains the results from running the test.

func (*Test) DeepCopy

func (in *Test) DeepCopy() *Test

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

func (*Test) DeepCopyInto

func (in *Test) DeepCopyInto(out *Test)

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

func (*Test) DeepCopyObject

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

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

type TestList

type TestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Test `json:"items"`
}

TestList contains a list of Test

func (*TestList) DeepCopy

func (in *TestList) DeepCopy() *TestList

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

func (*TestList) DeepCopyInto

func (in *TestList) DeepCopyInto(out *TestList)

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

func (*TestList) DeepCopyObject

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

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

type TestResult

type TestResult struct {
	// Name is the name of the test.
	Name string `json:"name"`

	// Description describes what the test does.
	Description string `json:"description,omitempty"`

	// State is the final state of the test.
	State State `json:"state"`

	// Errors is a list of the errors that occurred during the test (this can include both fatal and non-fatal errors).
	Errors []string `json:"errors,omitempty"`

	// Details holds any further details from the test run (if applicable).
	Details string `json:"details,omitempty"`
}

TestResult is the result of running a scorecard test.

func (*TestResult) DeepCopy

func (in *TestResult) DeepCopy() *TestResult

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

func (*TestResult) DeepCopyInto

func (in *TestResult) DeepCopyInto(out *TestResult)

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

type TestSpec

type TestSpec struct {
	// Image is the container image for the test.
	Image string `json:"image"`

	// Entrypoint is the command to run in the image
	// to execute the test.
	Entrypoint []string `json:"entrypoint"`

	// Labels are key/value pairs that can be used to
	// group and select tests.
	Labels map[string]string `json:"labels,omitempty"`

	// BundleConfigMap is the name of a configmap containing
	// the contents of an operator bundle as a tgz file. It must
	// be in the same namespace as the Test.
	// +optional
	BundleConfigMap string `json:"bundleConfigMap,omitempty"`

	// ServiceAccount is the service account name to use to run
	// the test.
	// +optional
	ServiceAccount string `json:"serviceAccount,omitempty"`
}

TestSpec is the definition for running a test.

func (*TestSpec) DeepCopy

func (in *TestSpec) DeepCopy() *TestSpec

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

func (*TestSpec) DeepCopyInto

func (in *TestSpec) DeepCopyInto(out *TestSpec)

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

type TestStatus

type TestStatus struct {
	// Phase is the phase of the pod that is running the test.
	Phase v1.PodPhase `json:"phase,omitempty"`

	// Results is the results from running the test defined by Spec.
	Results []TestResult `json:"results,omitempty"`
}

TestStatus defines the observed state of Test

func (*TestStatus) DeepCopy

func (in *TestStatus) DeepCopy() *TestStatus

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

func (*TestStatus) DeepCopyInto

func (in *TestStatus) DeepCopyInto(out *TestStatus)

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