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 ¶
const GroupName = "eventsrunner.io"
GroupName identifies the group name for the API
const GroupVersion = "v1alpha1"
GroupVersion identifies the API version under the said group
Variables ¶
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 )
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event.
func (*Event) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Event) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList.
func (*EventList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EventList) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSpec.
func (*EventSpec) DeepCopyInto ¶
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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Runner.
func (*Runner) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Runner) DeepCopyObject ¶
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.