v1alpha1

package
v0.0.0-...-897bf7f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 defines the v1alpha1 API under the eventsrunner.io group. +k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +groupName=eventsrunner.io

Index

Constants

View Source
const GroupName = "eventsrunner.io"

GroupName identifies the group name for the API

View Source
const GroupVersion = "v1alpha1"

GroupVersion identifies the API version under the said group

Variables

View Source
var (
	// SchemeBuilder is used to add custom schemes to the schema
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme adds the types of this group into the given scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}

SchemeGroupVersion uniquely identifies the eventsrunner.io API group and v1alpha1 API version

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Event

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

	Spec EventSpec `json:"spec"`
	// +optional
	Status EventStatus `json:"status"`
}

Event depicts an event that is processed/to be processed by the events runner. EREvents will be requests recieved by the eventsrunner-api, which will be stored as CRDs for persistance. Stored EREvents will be processed by the eventsrunner-controller +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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.

type EventList

type EventList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Event `json:"items"`
}

EventList is a list of EREvents +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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 {

	// EventOriginID will be used to uniquely identify the event origin.
	// If empty " " will be used. Combination of EventOriginID and ResourceID should be unique
	// for each resource and will be used in the following combination to create the event
	// <EventOriginID>-<ResourceID>-<Genrated Random>
	// +optional
	EventOriginID string    `json:"eventOriginID"`
	ResourceID    string    `json:"resourceID"`
	RuleID        string    `json:"ruleID"`
	EventType     EventType `json:"eventType"`
	// +optional
	EventData []string `json:"eventData"`
}

EventSpec will be used to store the exact request recieved by the eventsrunner-api

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 EventState

type EventState string

EventState Depicts the current state of the event

const (
	// PENDING is the state of the event when is is ready to be processed
	PENDING EventState = "pending"
	// PROCESSING is the state of the event when it is being processed
	PROCESSING EventState = "processing"
	// PROCESSED is the state of the event when it is processed
	PROCESSED EventState = "processed"
)

type EventStatus

type EventStatus struct {
	State EventState `json:"status" default:"pending"`
	// +optional
	Retries int `json:"retries" default:"0"`
}

EventStatus will be used to store the current status of the 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 EventType

type EventType string

EventType define the type of the event

const (
	// ADDED is the type of the event when a new resource is added
	ADDED EventType = "added"
	// UPDATED is the type of the event when a resource is updated
	UPDATED EventType = "updated"
	// DELETED is the type of the event when a resource is deleted
	DELETED EventType = "deleted"
)

type Runner

type Runner struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              v1.PodSpec `json:"spec"`
}

Runner defines the spec to create a new task runner (K8s Job) which will be used run tasks on events. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Runner) DeepCopy

func (in *Runner) DeepCopy() *Runner

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

func (*Runner) DeepCopyInto

func (in *Runner) DeepCopyInto(out *Runner)

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

func (*Runner) DeepCopyObject

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

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

type RunnerBinding

type RunnerBinding struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Runner            string `json:"runner"`
	// +optional
	Overides v1.PodSpec `json:"overides"`
	Rules    []string   `json:"rules"`
}

RunnerBinding binds a runner to one or more rules stating this runner should picked for this rule or rules. Runner level configuration can be overidden here, but it is recommended to keep it to minimal. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*RunnerBinding) DeepCopy

func (in *RunnerBinding) DeepCopy() *RunnerBinding

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

func (*RunnerBinding) DeepCopyInto

func (in *RunnerBinding) DeepCopyInto(out *RunnerBinding)

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

func (*RunnerBinding) DeepCopyObject

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

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

type RunnerBindingList

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

RunnerBindingList is a list of RunnerBindings +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*RunnerBindingList) DeepCopy

func (in *RunnerBindingList) DeepCopy() *RunnerBindingList

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

func (*RunnerBindingList) DeepCopyInto

func (in *RunnerBindingList) DeepCopyInto(out *RunnerBindingList)

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

func (*RunnerBindingList) DeepCopyObject

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

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

type RunnerList

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

RunnerList is a list of task runners +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*RunnerList) DeepCopy

func (in *RunnerList) DeepCopy() *RunnerList

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

func (*RunnerList) DeepCopyInto

func (in *RunnerList) DeepCopyInto(out *RunnerList)

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

func (*RunnerList) DeepCopyObject

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

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

Jump to

Keyboard shortcuts

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