v1alpha1

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=core.kuberik.io

Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=core.kuberik.io

Index

Constants

This section is empty.

Variables

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

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

	// SchemeBuilder AddTo Scheme
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func SetDefaults_MovieSpec

func SetDefaults_MovieSpec(obj *MovieSpec)

Types

type Condition

type Condition []map[string]string

Condition describes a logical filter which controls execution of the pipeline

func (Condition) DeepCopy

func (in Condition) DeepCopy() Condition

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

func (Condition) DeepCopyInto

func (in Condition) DeepCopyInto(out *Condition)

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

func (Condition) Evaluate

func (c Condition) Evaluate(vars Vars) bool

Evaluate returns the result of condition filter

type Credits

type Credits struct {
	// Opening credits are played before anything else in the scene.
	Opening []Frame `json:"opening,omitempty"`

	// Closing credits are played after screenplay is finished.
	// Finished in this case means started and ended with any result.
	// This provides a way to run some tasks even if some frames failed.
	Closing []Frame `json:"closing,omitempty"`
}

Credits describe actions that need to be run at the start or at the end of a screenplay. Actions are ran in parallel

func (*Credits) DeepCopy

func (in *Credits) DeepCopy() *Credits

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

func (*Credits) DeepCopyInto

func (in *Credits) DeepCopyInto(out *Credits)

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

type Event

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

	Spec   EventSpec   `json:"spec,omitempty"`
	Status EventStatus `json:"status,omitempty"`
}

Event is the Schema for the events API +kubebuilder:subresource:status +genclient +kubebuilder:resource:path=events,scope=Namespaced

func (*Event) DeepCopy

func (in *Event) DeepCopy() *Event

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

func (*Event) DeepCopyInto

func (in *Event) DeepCopyInto(out *Event)

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

func (*Event) DeepCopyObject

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

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

func (*Event) Vars

func (e *Event) Vars() Vars

type EventList

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

EventList contains a list of Event

func (*EventList) DeepCopy

func (in *EventList) DeepCopy() *EventList

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

func (*EventList) DeepCopyInto

func (in *EventList) DeepCopyInto(out *EventList)

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

func (*EventList) DeepCopyObject

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

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

type EventSpec

type EventSpec struct {
	MovieName string            `json:"movieName,omitempty"`
	Info      map[string]string `json:"info,omitempty"`
}

EventSpec defines the desired state of Event

func (*EventSpec) DeepCopy

func (in *EventSpec) DeepCopy() *EventSpec

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

func (*EventSpec) DeepCopyInto

func (in *EventSpec) DeepCopyInto(out *EventSpec)

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

type EventStatus

type EventStatus struct {
}

EventStatus defines the observed state of Event

func (*EventStatus) DeepCopy

func (in *EventStatus) DeepCopy() *EventStatus

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

func (*EventStatus) DeepCopyInto

func (in *EventStatus) DeepCopyInto(out *EventStatus)

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

type Exec

type Exec = batchv1.JobSpec

Exec Represents a running container

type Frame

type Frame struct {
	ID            string    `json:"id,omitempty"`
	Name          string    `json:"name,omitempty"`
	IgnoreErrors  bool      `json:"ignoreErrors,omitempty"`
	Copies        int       `json:"copies,omitempty"`
	SkipCondition Condition `json:"skipCondition,omitempty"`
	Action        *Exec     `json:"action,omitempty"`
	Story         *string   `json:"story,omitempty"`
}

Frame describes either an action or story that needs to be executed

func (*Frame) Copy

func (f *Frame) Copy() Frame

Copy makes a copy of the frame

func (*Frame) DeepCopy

func (in *Frame) DeepCopy() *Frame

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

func (*Frame) DeepCopyInto

func (in *Frame) DeepCopyInto(out *Frame)

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

type FrameResult

type FrameResult int

FrameResult represents end result of a frame

const (
	// FrameResultSuccessful indicates that frame ended sucessfully
	FrameResultSuccessful FrameResult = iota
	// FrameResultFailed indicates that frame finished with an error
	FrameResultFailed
)

func (FrameResult) String

func (fr FrameResult) String() string

type Movie

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

	Spec   MovieSpec   `json:"spec,omitempty"`
	Status MovieStatus `json:"status,omitempty"`
}

Movie is the Schema for the movies API +k8s:openapi-gen=true +genclient +kubebuilder:subresource:status

func (*Movie) DeepCopy

func (in *Movie) DeepCopy() *Movie

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

func (*Movie) DeepCopyInto

func (in *Movie) DeepCopyInto(out *Movie)

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

func (*Movie) DeepCopyObject

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

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

func (*Movie) GeneratePlay

func (m *Movie) GeneratePlay(vars ...Var) (*Play, error)

type MovieList

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

MovieList contains a list of Movie

func (*MovieList) DeepCopy

func (in *MovieList) DeepCopy() *MovieList

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

func (*MovieList) DeepCopyInto

func (in *MovieList) DeepCopyInto(out *MovieList)

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

func (*MovieList) DeepCopyObject

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

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

type MovieSpec

type MovieSpec struct {
	// TODO remove this
	Template PlayTemplate `json:"template"`
	// +optional
	FailedJobsHistoryLimit int `json:"failedJobsHistoryLimit"`
	// +optional
	SuccessfulJobsHistoryLimit int `json:"successfulJobsHistoryLimit"`
}

MovieSpec defines the desired state of Movie +k8s:openapi-gen=true

func (*MovieSpec) DeepCopy

func (in *MovieSpec) DeepCopy() *MovieSpec

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

func (*MovieSpec) DeepCopyInto

func (in *MovieSpec) DeepCopyInto(out *MovieSpec)

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

type MovieStatus

type MovieStatus struct {
}

MovieStatus defines the observed state of Movie +k8s:openapi-gen=true

func (*MovieStatus) DeepCopy

func (in *MovieStatus) DeepCopy() *MovieStatus

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

func (*MovieStatus) DeepCopyInto

func (in *MovieStatus) DeepCopyInto(out *MovieStatus)

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

type Play

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

	Spec   PlaySpec   `json:"spec,omitempty"`
	Status PlayStatus `json:"status,omitempty"`
}

Play is the Schema for the plays API +k8s:openapi-gen=true +genclient +kubebuilder:subresource:status

func (*Play) AllFrames

func (p *Play) AllFrames() (frames []*Frame)

AllFrames returns references to all Frames in the Play

func (*Play) DeepCopy

func (in *Play) DeepCopy() *Play

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

func (*Play) DeepCopyInto

func (in *Play) DeepCopyInto(out *Play)

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

func (*Play) DeepCopyObject

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

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

func (*Play) Frame

func (p *Play) Frame(frameID string) *Frame

Frame gets a frame with specified identifier

func (*Play) Screenplay

func (p *Play) Screenplay(name string) *Screenplay

Screenplay gets a Screenplay with specified name

type PlayList

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

PlayList contains a list of Play

func (*PlayList) DeepCopy

func (in *PlayList) DeepCopy() *PlayList

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

func (*PlayList) DeepCopyInto

func (in *PlayList) DeepCopyInto(out *PlayList)

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

func (*PlayList) DeepCopyObject

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

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

type PlayPhaseType

type PlayPhaseType string

PlayPhaseType defines the phase of a Play

const (
	// PlayPhaseComplete means the play has completed its execution.
	PlayPhaseComplete PlayPhaseType = "Complete"
	// PlayPhaseInit means the play is in initializing phase
	PlayPhaseInit PlayPhaseType = "Init"
	// PlayPhaseFailed means the play has failed its execution.
	PlayPhaseFailed PlayPhaseType = "Failed"
	// PlayPhaseRunning means the play is executing.
	PlayPhaseRunning PlayPhaseType = "Running"
	// PlayPhaseRunning means the play has been created.
	PlayPhaseCreated PlayPhaseType = "Created"
	// PlayPhaseError means the play ended because of an error.
	PlayPhaseError PlayPhaseType = "Error"
)

These are valid phases of a play.

type PlaySpec

type PlaySpec struct {
	Screenplays          []Screenplay                   `json:"screenplays"`
	VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
	Vars                 Vars                           `json:"vars,omitempty"`
}

PlaySpec defines the desired state of Play +k8s:openapi-gen=true

func (*PlaySpec) DeepCopy

func (in *PlaySpec) DeepCopy() *PlaySpec

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

func (*PlaySpec) DeepCopyInto

func (in *PlaySpec) DeepCopyInto(out *PlaySpec)

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

type PlayStatus

type PlayStatus struct {
	Frames             map[string]FrameResult `json:"frames,omitempty"`
	Phase              PlayPhaseType          `json:"phase,omitempty"`
	ProvisionedVolumes map[string]string      `json:"provisionedVolumes,omitempty"`
	VarsConfigMap      string                 `json:"varsConfigMap,omitempty"`
}

PlayStatus defines the observed state of Play +k8s:openapi-gen=true

func (*PlayStatus) DeepCopy

func (in *PlayStatus) DeepCopy() *PlayStatus

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

func (*PlayStatus) DeepCopyInto

func (in *PlayStatus) DeepCopyInto(out *PlayStatus)

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

func (*PlayStatus) Failed

func (ps *PlayStatus) Failed() bool

Failed checks if a play failed

func (*PlayStatus) SetFrameStatus

func (ps *PlayStatus) SetFrameStatus(frameID string, result FrameResult)

SetFrameStatus sets result of a frame

type PlayTemplate

type PlayTemplate struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              PlaySpec `json:"spec,omitempty"`
}

PlayTemplate defines a template of Play to be created from a Movie

func (*PlayTemplate) DeepCopy

func (in *PlayTemplate) DeepCopy() *PlayTemplate

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

func (*PlayTemplate) DeepCopyInto

func (in *PlayTemplate) DeepCopyInto(out *PlayTemplate)

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

type Scene

type Scene struct {
	Name         string    `json:"name"`
	Frames       []Frame   `json:"frames"`
	Pass         Condition `json:"pass,omitempty"`
	IgnoreErrors bool      `json:"ignore_errors,omitempty" yaml:"ignore_errors"`
}

Scene describes a collection of frames that need to be executed in parallel

func (*Scene) DeepCopy

func (in *Scene) DeepCopy() *Scene

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

func (*Scene) DeepCopyInto

func (in *Scene) DeepCopyInto(out *Scene)

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

type Screener

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

	Spec   ScreenerSpec   `json:"spec,omitempty"`
	Status ScreenerStatus `json:"status,omitempty"`
}

Screener is the Schema for the screeners API +kubebuilder:subresource:status +genclient +kubebuilder:resource:path=screeners,scope=Namespaced

func (*Screener) DeepCopy

func (in *Screener) DeepCopy() *Screener

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

func (*Screener) DeepCopyInto

func (in *Screener) DeepCopyInto(out *Screener)

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

func (*Screener) DeepCopyObject

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

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

type ScreenerList

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

ScreenerList contains a list of Screener

func (*ScreenerList) DeepCopy

func (in *ScreenerList) DeepCopy() *ScreenerList

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

func (*ScreenerList) DeepCopyInto

func (in *ScreenerList) DeepCopyInto(out *ScreenerList)

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

func (*ScreenerList) DeepCopyObject

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

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

type ScreenerSpec

type ScreenerSpec struct {
}

ScreenerSpec defines the desired state of Screener

func (*ScreenerSpec) DeepCopy

func (in *ScreenerSpec) DeepCopy() *ScreenerSpec

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

func (*ScreenerSpec) DeepCopyInto

func (in *ScreenerSpec) DeepCopyInto(out *ScreenerSpec)

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

type ScreenerStatus

type ScreenerStatus struct {
}

ScreenerStatus defines the observed state of Screener

func (*ScreenerStatus) DeepCopy

func (in *ScreenerStatus) DeepCopy() *ScreenerStatus

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

func (*ScreenerStatus) DeepCopyInto

func (in *ScreenerStatus) DeepCopyInto(out *ScreenerStatus)

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

type Screenplay

type Screenplay struct {
	Name    string   `json:"name,omitempty"`
	Scenes  []Scene  `json:"scenes,omitempty"`
	Credits *Credits `json:"credits,omitempty"`
}

Screenplay describes how pipeline execution will look like.

func (*Screenplay) DeepCopy

func (in *Screenplay) DeepCopy() *Screenplay

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

func (*Screenplay) DeepCopyInto

func (in *Screenplay) DeepCopyInto(out *Screenplay)

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

func (*Screenplay) Scene

func (s *Screenplay) Scene(name string) (*Scene, error)

Scene finds a scene by name

type Var

type Var struct {
	Name  string  `json:"name"`
	Value *string `json:"value,omitempty"`
}

Var is a parametrizable variable for the screenplay shared between all jobs. +k8s:openapi-gen=true

func (*Var) DeepCopy

func (in *Var) DeepCopy() *Var

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

func (*Var) DeepCopyInto

func (in *Var) DeepCopyInto(out *Var)

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

type Vars

type Vars []Var

func (Vars) DeepCopy

func (in Vars) DeepCopy() Vars

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

func (Vars) DeepCopyInto

func (in Vars) DeepCopyInto(out *Vars)

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

func (Vars) Get

func (vars Vars) Get(name string) (string, error)

func (Vars) Set

func (vars Vars) Set(name, value string) error

Jump to

Keyboard shortcuts

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