v1alpha1

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the yaks v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=yaks.citrusframework.org

Package v1alpha1 contains API Schema definitions for the yaks v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=yaks.citrusframework.org

Index

Constants

View Source
const (
	TestLabel              = "yaks.citrusframework.org/test"
	TestIDLabel            = "yaks.citrusframework.org/test-id"
	TestConfigurationLabel = "yaks.citrusframework.org/test.configuration"

	// InstanceKind --.
	InstanceKind string = "Instance"
	// TestKind --.
	TestKind string = "Test"

	// TestPhaseNone --.
	TestPhaseNone TestPhase = ""
	// TestPhaseNew --.
	TestPhaseNew TestPhase = "New"
	// TestPhasePending --.
	TestPhasePending TestPhase = "Pending"
	// TestPhaseRunning --.
	TestPhaseRunning TestPhase = "Running"
	// TestPhasePassed --.
	TestPhasePassed TestPhase = "Passed"
	// TestPhaseFailed --.
	TestPhaseFailed TestPhase = "Failed"
	// TestPhaseError --.
	TestPhaseError TestPhase = "Error"
	// TestPhaseDeleting --.
	TestPhaseDeleting TestPhase = "Deleting"
	// TestPhaseUpdating is a phase where the operator is not supposed to interact with the resource.
	TestPhaseUpdating TestPhase = "Updating"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: "yaks.citrusframework.org", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme is a shortcut to SchemeBuilder.AddToScheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func IsGlobal added in v0.3.0

func IsGlobal(instance *Instance) bool

IsGlobal returns true if the given instance is configured to watch all namespaces.

func Resource added in v0.1.0

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type ClusterType added in v0.1.0

type ClusterType string

ClusterType is the kind of orchestration cluster the framework is installed into.

const (
	// ClusterTypeLocal is used when running tests locally.
	ClusterTypeLocal ClusterType = "Local"
	// ClusterTypeOpenShift is used when targeting a OpenShift cluster.
	ClusterTypeOpenShift ClusterType = "OpenShift"
	// ClusterTypeKubernetes is used when targeting a Kubernetes cluster.
	ClusterTypeKubernetes ClusterType = "Kubernetes"
)

type Instance added in v0.3.0

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

	Spec   InstanceSpec   `json:"spec,omitempty"`
	Status InstanceStatus `json:"status,omitempty"`
}

Instance is the Schema for the yaks instance.

func FindGlobalInstance added in v0.11.0

func FindGlobalInstance(ctx context.Context, c ctrl.Client) (*Instance, error)

FindGlobalInstance list instances on the cluster and get the first global match.

func GetInstance added in v0.4.0

func GetInstance(ctx context.Context, client ctrl.Client, namespace string) (*Instance, error)

GetInstance return the YAKS operator instance in given namespace.

func GetOrFindInstance added in v0.11.0

func GetOrFindInstance(ctx context.Context, client ctrl.Client, namespace string) (*Instance, error)

GetOrFindInstance return the YAKS operator instance in given namespace or the operator namespace.

func NewInstance added in v0.11.0

func NewInstance(namespace string, name string) Instance

NewInstance --.

func (*Instance) DeepCopy added in v0.3.0

func (in *Instance) DeepCopy() *Instance

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

func (*Instance) DeepCopyInto added in v0.3.0

func (in *Instance) DeepCopyInto(out *Instance)

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

func (*Instance) DeepCopyObject added in v0.3.0

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

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

type InstanceList added in v0.3.0

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

InstanceList contains a list of yaks instances.

func ListInstances added in v0.11.0

func ListInstances(ctx context.Context, c ctrl.Client) (InstanceList, error)

ListInstances lists all instances on the cluster.

func NewInstanceList added in v0.11.0

func NewInstanceList() InstanceList

NewInstanceList --.

func (*InstanceList) DeepCopy added in v0.3.0

func (in *InstanceList) DeepCopy() *InstanceList

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

func (*InstanceList) DeepCopyInto added in v0.3.0

func (in *InstanceList) DeepCopyInto(out *InstanceList)

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

func (*InstanceList) DeepCopyObject added in v0.3.0

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

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

type InstanceSpec added in v0.3.0

type InstanceSpec struct {
	Operator OperatorSpec `json:"operator,omitempty"`
}

InstanceSpec provides the state of a yaks instance +k8s:openapi-gen=true

func (*InstanceSpec) DeepCopy added in v0.3.0

func (in *InstanceSpec) DeepCopy() *InstanceSpec

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

func (*InstanceSpec) DeepCopyInto added in v0.3.0

func (in *InstanceSpec) DeepCopyInto(out *InstanceSpec)

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

type InstanceStatus added in v0.3.0

type InstanceStatus struct {
	Version string `json:"version,omitempty"`
}

InstanceStatus defines the observed state of a yaks instance +k8s:openapi-gen=true

func (*InstanceStatus) DeepCopy added in v0.3.0

func (in *InstanceStatus) DeepCopy() *InstanceStatus

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

func (*InstanceStatus) DeepCopyInto added in v0.3.0

func (in *InstanceStatus) DeepCopyInto(out *InstanceStatus)

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

type KubeDockSpec added in v0.6.0

type KubeDockSpec struct {
	Image     string `json:"image,omitempty"`
	RunAsUser int    `json:"runAsUser,omitempty"`
}

KubeDockSpec --.

func (*KubeDockSpec) DeepCopy added in v0.6.0

func (in *KubeDockSpec) DeepCopy() *KubeDockSpec

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

func (*KubeDockSpec) DeepCopyInto added in v0.6.0

func (in *KubeDockSpec) DeepCopyInto(out *KubeDockSpec)

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

type OperatorSpec added in v0.3.0

type OperatorSpec struct {
	Global    bool   `json:"global"`
	Pod       string `json:"pod,omitempty"`
	Namespace string `json:"namespace,omitempty"`
}

OperatorSpec--.

func (*OperatorSpec) DeepCopy added in v0.3.0

func (in *OperatorSpec) DeepCopy() *OperatorSpec

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

func (*OperatorSpec) DeepCopyInto added in v0.3.0

func (in *OperatorSpec) DeepCopyInto(out *OperatorSpec)

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

type ResourceSpec added in v0.1.0

type ResourceSpec struct {
	Name    string `json:"name,omitempty"`
	Content string `json:"content,omitempty"`
}

ResourceSpec --.

func (*ResourceSpec) DeepCopy added in v0.2.0

func (in *ResourceSpec) DeepCopy() *ResourceSpec

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

func (*ResourceSpec) DeepCopyInto added in v0.2.0

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

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

type RuntimeSpec added in v0.11.0

type RuntimeSpec struct {
	Logger  []string `json:"logger,omitempty"`
	Verbose bool     `json:"verbose,omitempty"`
}

RuntimeSpec --.

func (*RuntimeSpec) DeepCopy added in v0.11.0

func (in *RuntimeSpec) DeepCopy() *RuntimeSpec

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

func (*RuntimeSpec) DeepCopyInto added in v0.11.0

func (in *RuntimeSpec) DeepCopyInto(out *RuntimeSpec)

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

type SeleniumSpec added in v0.3.0

type SeleniumSpec struct {
	Image     string   `json:"image,omitempty"`
	NoVNC     bool     `json:"noVNC,omitempty"`
	RunAsUser int      `json:"runAsUser,omitempty"`
	Env       []string `json:"env,omitempty"`
}

SeleniumSpec --.

func (*SeleniumSpec) DeepCopy added in v0.3.0

func (in *SeleniumSpec) DeepCopy() *SeleniumSpec

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

func (*SeleniumSpec) DeepCopyInto added in v0.3.0

func (in *SeleniumSpec) DeepCopyInto(out *SeleniumSpec)

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

type SettingsSpec

type SettingsSpec struct {
	Name    string `json:"name,omitempty"`
	Content string `json:"content,omitempty"`
}

SettingsSpec --.

func (*SettingsSpec) DeepCopy

func (in *SettingsSpec) DeepCopy() *SettingsSpec

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

func (*SettingsSpec) DeepCopyInto

func (in *SettingsSpec) DeepCopyInto(out *SettingsSpec)

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

type SourceSpec

type SourceSpec struct {
	Name     string `json:"name,omitempty"`
	Content  string `json:"content,omitempty"`
	Language string `json:"language,omitempty"`
}

SourceSpec --.

func (*SourceSpec) DeepCopy

func (in *SourceSpec) DeepCopy() *SourceSpec

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

func (*SourceSpec) DeepCopyInto

func (in *SourceSpec) DeepCopyInto(out *SourceSpec)

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

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 is the Schema for the tests API.

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 TestPhase

type TestPhase string

TestPhase --.

func (TestPhase) AsError

func (phase TestPhase) AsError(name string) error

type TestResult added in v0.0.22

type TestResult struct {
	Name         string `json:"name,omitempty"`
	ClassName    string `json:"classname,omitempty"`
	ErrorType    string `json:"errorType,omitempty"`
	ErrorMessage string `json:"errorMessage,omitempty"`
}

func (*TestResult) DeepCopy added in v0.0.22

func (in *TestResult) DeepCopy() *TestResult

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

func (*TestResult) DeepCopyInto added in v0.0.22

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

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

type TestResults added in v0.0.22

type TestResults struct {
	Summary TestSummary `json:"summary,omitempty"`
	Suites  []TestSuite `json:"suites,omitempty"`
}

func (*TestResults) DeepCopy added in v0.0.22

func (in *TestResults) DeepCopy() *TestResults

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

func (*TestResults) DeepCopyInto added in v0.0.22

func (in *TestResults) DeepCopyInto(out *TestResults)

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

type TestSpec

type TestSpec struct {
	Runtime   RuntimeSpec    `json:"runtime,omitempty"`
	Source    SourceSpec     `json:"source,omitempty"`
	Resources []ResourceSpec `json:"resources,omitempty"`
	Settings  SettingsSpec   `json:"config,omitempty"`
	Selenium  SeleniumSpec   `json:"selenium,omitempty"`
	KubeDock  KubeDockSpec   `json:"kubedock,omitempty"`
	Env       []string       `json:"env,omitempty"`
	Secret    string         `json:"secret,omitempty"`
}

TestSpec defines the desired state of Test +k8s:openapi-gen=true

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   TestPhase `json:"phase,omitempty"`
	Results TestSuite `json:"results,omitempty"`
	Errors  string    `json:"errors,omitempty"`
	TestID  string    `json:"testID,omitempty"`
	Digest  string    `json:"digest,omitempty"`
	Version string    `json:"version,omitempty"`
}

TestStatus defines the observed state of Test +k8s:openapi-gen=true

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.

type TestSuite added in v0.3.0

type TestSuite struct {
	Name    string       `json:"suiteName,omitempty"`
	Summary TestSummary  `json:"summary,omitempty"`
	Tests   []TestResult `json:"tests,omitempty"`
	Errors  []string     `json:"errors,omitempty"`
}

func (*TestSuite) DeepCopy added in v0.3.0

func (in *TestSuite) DeepCopy() *TestSuite

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

func (*TestSuite) DeepCopyInto added in v0.3.0

func (in *TestSuite) DeepCopyInto(out *TestSuite)

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

type TestSummary added in v0.0.22

type TestSummary struct {
	Total     int `json:"total,omitempty"`
	Errors    int `json:"errors,omitempty"`
	Passed    int `json:"passed,omitempty"`
	Failed    int `json:"failed,omitempty"`
	Skipped   int `json:"skipped,omitempty"`
	Pending   int `json:"pending,omitempty"`
	Undefined int `json:"undefined,omitempty"`
}

func (*TestSummary) DeepCopy added in v0.0.22

func (in *TestSummary) DeepCopy() *TestSummary

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

func (*TestSummary) DeepCopyInto added in v0.0.22

func (in *TestSummary) DeepCopyInto(out *TestSummary)

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