v1alpha1

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 12 Imported by: 14

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=argoproj.io +k8s:deepcopy-gen=package,register +k8s:openapi-gen=true

Index

Constants

View Source
const ArgoEventsSensorVersion = "v0.10"

Variables

View Source
var (
	// SchemeBuilder is the builder for this scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds this
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemaGroupVersionKind = schema.GroupVersionKind{Group: sensor.Group, Version: "v1alpha1", Kind: sensor.Kind}

SchemaGroupVersionKind is a group version kind used to attach owner references to sensor executor job

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: sensor.Group, Version: "v1alpha1"}

SchemeGroupVersion is a group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes unqualified resource and returns Group qualified GroupResource

Types

type ArtifactLocation

type ArtifactLocation struct {
	// S3 compliant artifact
	S3 *apicommon.S3Artifact `json:"s3,omitempty" protobuf:"bytes,1,opt,name=s3"`

	// Inline artifact is embedded in sensor spec as a string
	Inline *string `json:"inline,omitempty" protobuf:"bytes,2,opt,name=inline"`

	// File artifact is artifact stored in a file
	File *FileArtifact `json:"file,omitempty" protobuf:"bytes,3,opt,name=file"`

	// URL to fetch the artifact from
	URL *URLArtifact `json:"url,omitempty" protobuf:"bytes,4,opt,name=url"`

	// Configmap that stores the artifact
	Configmap *ConfigmapArtifact `json:"configmap,omitempty" protobuf:"bytes,5,opt,name=configmap"`

	// Git repository hosting the artifact
	Git *GitArtifact `json:"git,omitempty" protobuf:"bytes,6,opt,name=git"`

	// Resource is generic template for K8s resource
	Resource *unstructured.Unstructured `json:"resource,omitempty" protobuf:"bytes,7,opt,name=resource"`
}

ArtifactLocation describes the source location for an external artifact

func (*ArtifactLocation) DeepCopy

func (in *ArtifactLocation) DeepCopy() *ArtifactLocation

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

func (*ArtifactLocation) DeepCopyInto

func (in *ArtifactLocation) DeepCopyInto(out *ArtifactLocation)

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

func (*ArtifactLocation) HasLocation

func (a *ArtifactLocation) HasLocation() bool

HasLocation whether or not an artifact has a location defined

type Backoff added in v0.9.1

type Backoff struct {
	// Duration is the duration in nanoseconds
	Duration time.Duration `json:"duration" protobuf:"bytes,1,opt,name=duration"`

	// Duration is multiplied by factor each iteration
	Factor float64 `json:"factor" protobuf:"bytes,2,opt,name=factor"`

	// The amount of jitter applied each iteration
	Jitter float64 `json:"jitter" protobuf:"bytes,3,opt,name=jitter"`

	// Exit with error after this many steps
	Steps int `json:"steps" protobuf:"bytes,4,opt,name=steps"`
}

Backoff for an operation

func (*Backoff) DeepCopy added in v0.9.1

func (in *Backoff) DeepCopy() *Backoff

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

func (*Backoff) DeepCopyInto added in v0.9.1

func (in *Backoff) DeepCopyInto(out *Backoff)

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

type ConfigmapArtifact

type ConfigmapArtifact struct {
	// Name of the configmap
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// Namespace where configmap is deployed
	Namespace string `json:"namespace" protobuf:"bytes,2,name=namespace"`

	// Key within configmap data which contains trigger resource definition
	Key string `json:"key" protobuf:"bytes,3,name=key"`
}

ConfigmapArtifact contains information about artifact in k8 configmap

func (*ConfigmapArtifact) DeepCopy

func (in *ConfigmapArtifact) DeepCopy() *ConfigmapArtifact

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

func (*ConfigmapArtifact) DeepCopyInto

func (in *ConfigmapArtifact) DeepCopyInto(out *ConfigmapArtifact)

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

type DataFilter

type DataFilter struct {
	// Path is the JSONPath of the event's (JSON decoded) data key
	// Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'.
	// To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'.
	// See https://github.com/tidwall/gjson#path-syntax for more information on how to use this.
	Path string `json:"path" protobuf:"bytes,1,opt,name=path"`

	// Type contains the JSON type of the data
	Type JSONType `json:"type" protobuf:"bytes,2,opt,name=type"`

	// Value is the allowed string values for this key
	// Booleans are passed using strconv.ParseBool()
	// Numbers are parsed using as float64 using strconv.ParseFloat()
	// Strings are taken as is
	// Nils this value is ignored
	Value []string `json:"value" protobuf:"bytes,3,rep,name=value"`
}

DataFilter describes constraints and filters for event data Regular Expressions are purposefully not a feature as they are overkill for our uses here See Rob Pike's Post: https://commandcenter.blogspot.com/2011/08/regular-expressions-in-lexing-and.html

func (*DataFilter) DeepCopy

func (in *DataFilter) DeepCopy() *DataFilter

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

func (*DataFilter) DeepCopyInto

func (in *DataFilter) DeepCopyInto(out *DataFilter)

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

type DependencyGroup

type DependencyGroup struct {
	// Name of the group
	Name string `json:"name" protobuf:"bytes,1,name=name"`
	// Dependencies of events
	Dependencies []string `json:"dependencies" protobuf:"bytes,2,name=dependencies"`
}

DependencyGroup is the group of dependencies

func (*DependencyGroup) DeepCopy

func (in *DependencyGroup) DeepCopy() *DependencyGroup

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

func (*DependencyGroup) DeepCopyInto

func (in *DependencyGroup) DeepCopyInto(out *DependencyGroup)

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

type EventDependency

type EventDependency struct {
	// Name is a unique name of this dependency
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// Filters and rules governing tolerations of success and constraints on the context and data of an event
	Filters EventDependencyFilter `json:"filters,omitempty" protobuf:"bytes,2,opt,name=filters"`

	// Connected tells if subscription is already setup in case of nats protocol.
	Connected bool `json:"connected,omitempty" protobuf:"bytes,3,opt,name=connected"`
}

EventDependency describes a dependency

func (*EventDependency) DeepCopy

func (in *EventDependency) DeepCopy() *EventDependency

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

func (*EventDependency) DeepCopyInto

func (in *EventDependency) DeepCopyInto(out *EventDependency)

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

type EventDependencyFilter

type EventDependencyFilter struct {
	// Name is the name of event filter
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// Time filter on the event with escalation
	Time *TimeFilter `json:"time,omitempty" protobuf:"bytes,2,opt,name=time"`

	// Context filter constraints with escalation
	Context *common.EventContext `json:"context,omitempty" protobuf:"bytes,3,opt,name=context"`

	// Data filter constraints with escalation
	Data []DataFilter `json:"data,omitempty" protobuf:"bytes,4,opt,name=data"`
}

EventDependencyFilter defines filters and constraints for a event.

func (*EventDependencyFilter) DeepCopy

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

func (*EventDependencyFilter) DeepCopyInto

func (in *EventDependencyFilter) DeepCopyInto(out *EventDependencyFilter)

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

type FileArtifact

type FileArtifact struct {
	Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
}

FileArtifact contains information about an artifact in a filesystem

func (*FileArtifact) DeepCopy

func (in *FileArtifact) DeepCopy() *FileArtifact

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

func (*FileArtifact) DeepCopyInto

func (in *FileArtifact) DeepCopyInto(out *FileArtifact)

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

type GitArtifact

type GitArtifact struct {
	// Git URL
	URL string `json:"url" protobuf:"bytes,1,name=url"`

	// Directory to clone the repository. We clone complete directory because GitArtifact is not limited to any specific Git service providers.
	// Hence we don't use any specific git provider client.
	CloneDirectory string `json:"cloneDirectory" protobuf:"bytes,2,name=cloneDirectory"`

	// Creds contain reference to git username and password
	// +optional
	Creds *GitCreds `json:"creds,omitempty" protobuf:"bytes,3,opt,name=creds"`

	// Namespace where creds are stored.
	// +optional
	Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`

	// SSHKeyPath is path to your ssh key path. Use this if you don't want to provide username and password.
	// ssh key path must be mounted in sensor pod.
	// +optional
	SSHKeyPath string `json:"sshKeyPath,omitempty" protobuf:"bytes,5,opt,name=sshKeyPath"`

	// Path to file that contains trigger resource definition
	FilePath string `json:"filePath" protobuf:"bytes,6,name=filePath"`

	// Branch to use to pull trigger resource
	// +optional
	Branch string `json:"branch,omitempty" protobuf:"bytes,7,opt,name=branch"`

	// Tag to use to pull trigger resource
	// +optional
	Tag string `json:"tag,omitempty" protobuf:"bytes,8,opt,name=tag"`

	// Remote to manage set of tracked repositories. Defaults to "origin".
	// Refer https://git-scm.com/docs/git-remote
	// +optional
	Remote *GitRemoteConfig `json:"remote" protobuf:"bytes,9,opt,name=remote"`
}

GitArtifact contains information about an artifact stored in git

func (*GitArtifact) DeepCopy

func (in *GitArtifact) DeepCopy() *GitArtifact

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

func (*GitArtifact) DeepCopyInto

func (in *GitArtifact) DeepCopyInto(out *GitArtifact)

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

type GitCreds

type GitCreds struct {
	Username *corev1.SecretKeySelector `json:"username" protobuf:"bytes,1,opt,name=username"`
	Password *corev1.SecretKeySelector `json:"password" protobuf:"bytes,2,opt,name=password"`
}

GitCreds contain reference to git username and password

func (*GitCreds) DeepCopy

func (in *GitCreds) DeepCopy() *GitCreds

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

func (*GitCreds) DeepCopyInto

func (in *GitCreds) DeepCopyInto(out *GitCreds)

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

type GitRemoteConfig

type GitRemoteConfig struct {
	// Name of the remote to fetch from.
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// URLs the URLs of a remote repository. It must be non-empty. Fetch will
	// always use the first URL, while push will use all of them.
	URLS []string `json:"urls" protobuf:"bytes,2,rep,name=urls"`
}

GitRemoteConfig contains the configuration of a Git remote

func (*GitRemoteConfig) DeepCopy

func (in *GitRemoteConfig) DeepCopy() *GitRemoteConfig

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

func (*GitRemoteConfig) DeepCopyInto

func (in *GitRemoteConfig) DeepCopyInto(out *GitRemoteConfig)

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

type JSONType

type JSONType string

JSONType contains the supported JSON types for data filtering

const (
	JSONTypeBool   JSONType = "bool"
	JSONTypeNumber JSONType = "number"
	JSONTypeString JSONType = "string"
)

the various supported JSONTypes

type NodePhase

type NodePhase string

NodePhase is the label for the condition of a node

const (
	NodePhaseComplete NodePhase = "Complete" // the node has finished successfully
	NodePhaseActive   NodePhase = "Active"   // the node is active and waiting on dependencies to resolve
	NodePhaseError    NodePhase = "Error"    // the node has encountered an error in processing
	NodePhaseNew      NodePhase = ""         // the node is new
)

possible types of node phases

type NodeStatus

type NodeStatus struct {
	// ID is a unique identifier of a node within a sensor
	// It is a hash of the node name
	ID string `json:"id" protobuf:"bytes,1,opt,name=id"`

	// Name is a unique name in the node tree used to generate the node ID
	Name string `json:"name" protobuf:"bytes,2,opt,name=name"`

	// DisplayName is the human readable representation of the node
	DisplayName string `json:"displayName" protobuf:"bytes,3,opt,name=displayName"`

	// Type is the type of the node
	Type NodeType `json:"type" protobuf:"bytes,4,opt,name=type"`

	// Phase of the node
	Phase NodePhase `json:"phase" protobuf:"bytes,5,opt,name=phase"`

	// StartedAt is the time at which this node started
	StartedAt metav1.MicroTime `json:"startedAt,omitempty" protobuf:"bytes,6,opt,name=startedAt"`

	// CompletedAt is the time at which this node completed
	CompletedAt metav1.MicroTime `json:"completedAt,omitempty" protobuf:"bytes,7,opt,name=completedAt"`

	// store data or something to save for event notifications or trigger events
	Message string `json:"message,omitempty" protobuf:"bytes,8,opt,name=message"`

	// Event stores the last seen event for this node
	Event *apicommon.Event `json:"event,omitempty" protobuf:"bytes,9,opt,name=event"`
}

NodeStatus describes the status for an individual node in the sensor's FSM. A single node can represent the status for event or a trigger.

func (*NodeStatus) DeepCopy

func (in *NodeStatus) DeepCopy() *NodeStatus

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

func (*NodeStatus) DeepCopyInto

func (in *NodeStatus) DeepCopyInto(out *NodeStatus)

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

func (NodeStatus) IsComplete

func (node NodeStatus) IsComplete() bool

IsComplete determines if the node has reached an end state

type NodeType

type NodeType string

NodeType is the type of a node

const (
	// NodeTypeEventDependency is a node that represents a single event dependency
	NodeTypeEventDependency NodeType = "EventDependency"
	// NodeTypeTrigger is a node that represents a single trigger
	NodeTypeTrigger NodeType = "Trigger"
	// NodeTypeDependencyGroup is a node that represents a group of event dependencies
	NodeTypeDependencyGroup NodeType = "DependencyGroup"
)

type NotificationType

type NotificationType string

NotificationType represent a type of notifications that are handled by a sensor

const (
	// EventNotification is a notification for an event dependency (from a Gateway)
	EventNotification NotificationType = "Event"
	// ResourceUpdateNotification is a notification that an associated resource was updated
	ResourceUpdateNotification NotificationType = "ResourceUpdate"
)

type Sensor

type Sensor struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
	Spec              SensorSpec   `json:"spec" protobuf:"bytes,2,opt,name=spec"`
	Status            SensorStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
}

Sensor is the definition of a sensor resource +genclient +genclient:noStatus +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true

func (*Sensor) AreAllNodesSuccess

func (s *Sensor) AreAllNodesSuccess(nodeType NodeType) bool

AreAllNodesSuccess determines if all nodes of the given type have completed successfully

func (*Sensor) DeepCopy

func (in *Sensor) DeepCopy() *Sensor

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

func (*Sensor) DeepCopyInto

func (in *Sensor) DeepCopyInto(out *Sensor)

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

func (*Sensor) DeepCopyObject

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

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

func (*Sensor) IsComplete

func (s *Sensor) IsComplete() bool

IsComplete determines if the sensor has reached an end state

func (*Sensor) NodeID

func (s *Sensor) NodeID(name string) string

NodeID creates a deterministic node ID based on a node name we support 3 kinds of "nodes" - sensors, events, triggers each should pass it's name field

type SensorList

type SensorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
	Items           []Sensor `json:"items" protobuf:"bytes,2,rep,name=items"`
}

SensorList is the list of Sensor resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SensorList) DeepCopy

func (in *SensorList) DeepCopy() *SensorList

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

func (*SensorList) DeepCopyInto

func (in *SensorList) DeepCopyInto(out *SensorList)

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

func (*SensorList) DeepCopyObject

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

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

type SensorSpec

type SensorSpec struct {
	// Dependencies is a list of the events that this sensor is dependent on.
	Dependencies []EventDependency `json:"dependencies" protobuf:"bytes,1,rep,name=dependencies"`

	// Triggers is a list of the things that this sensor evokes. These are the outputs from this sensor.
	Triggers []Trigger `json:"triggers" protobuf:"bytes,2,rep,name=triggers"`

	// Template contains sensor pod specification. For more information, read https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core
	Template *corev1.PodTemplateSpec `json:"template" protobuf:"bytes,3,name=template"`

	// EventProtocol is the protocol through which sensor receives events from gateway
	EventProtocol *apicommon.EventProtocol `json:"eventProtocol" protobuf:"bytes,4,name=eventProtocol"`

	// Circuit is a boolean expression of dependency groups
	Circuit string `json:"circuit,omitempty" protobuf:"bytes,5,rep,name=circuit"`

	// DependencyGroups is a list of the groups of events.
	DependencyGroups []DependencyGroup `json:"dependencyGroups,omitempty" protobuf:"bytes,6,rep,name=dependencyGroups"`

	// ErrorOnFailedRound if set to true, marks sensor state as `error` if the previous trigger round fails.
	// Once sensor state is set to `error`, no further triggers will be processed.
	ErrorOnFailedRound bool `json:"errorOnFailedRound,omitempty" protobuf:"bytes,7,opt,name=errorOnFailedRound"`
}

SensorSpec represents desired sensor state

func (*SensorSpec) DeepCopy

func (in *SensorSpec) DeepCopy() *SensorSpec

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

func (*SensorSpec) DeepCopyInto

func (in *SensorSpec) DeepCopyInto(out *SensorSpec)

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

type SensorStatus

type SensorStatus struct {
	// Phase is the high-level summary of the sensor
	Phase NodePhase `json:"phase" protobuf:"bytes,1,opt,name=phase"`

	// StartedAt is the time at which this sensor was initiated
	StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,2,opt,name=startedAt"`

	// CompletedAt is the time at which this sensor was completed
	CompletedAt metav1.Time `json:"completedAt,omitempty" protobuf:"bytes,3,opt,name=completedAt"`

	// Message is a human readable string indicating details about a sensor in its phase
	Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`

	// Nodes is a mapping between a node ID and the node's status
	// it records the states for the FSM of this sensor.
	Nodes map[string]NodeStatus `json:"nodes,omitempty" protobuf:"bytes,5,rep,name=nodes"`

	// TriggerCycleCount is the count of sensor's trigger cycle runs.
	TriggerCycleCount int32 `json:"triggerCycleCount,omitempty" protobuf:"varint,6,opt,name=triggerCycleCount"`

	// TriggerCycleState is the status from last cycle of triggers execution.
	TriggerCycleStatus TriggerCycleState `json:"triggerCycleStatus" protobuf:"bytes,7,opt,name=triggerCycleStatus"`

	// LastCycleTime is the time when last trigger cycle completed
	LastCycleTime metav1.Time `json:"lastCycleTime" protobuf:"bytes,8,opt,name=lastCycleTime"`
}

SensorStatus contains information about the status of a sensor.

func (*SensorStatus) DeepCopy

func (in *SensorStatus) DeepCopy() *SensorStatus

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

func (*SensorStatus) DeepCopyInto

func (in *SensorStatus) DeepCopyInto(out *SensorStatus)

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

type TimeFilter

type TimeFilter struct {
	// Start is the beginning of a time window.
	// Before this time, events for this event are ignored and
	// format is hh:mm:ss
	Start string `json:"start,omitempty" protobuf:"bytes,1,opt,name=start"`

	// StopPattern is the end of a time window.
	// After this time, events for this event are ignored and
	// format is hh:mm:ss
	Stop string `json:"stop,omitempty" protobuf:"bytes,2,opt,name=stop"`
}

TimeFilter describes a window in time. DataFilters out event events that occur outside the time limits. In other words, only events that occur after Start and before Stop will pass this filter.

func (*TimeFilter) DeepCopy

func (in *TimeFilter) DeepCopy() *TimeFilter

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

func (*TimeFilter) DeepCopyInto

func (in *TimeFilter) DeepCopyInto(out *TimeFilter)

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

type Trigger

type Trigger struct {
	// Template describes the trigger specification.
	Template *TriggerTemplate `json:"template" protobuf:"bytes,1,name=template"`

	// TemplateParameters is the list of resource parameters to pass to the template object
	TemplateParameters []TriggerParameter `json:"templateParameters,omitempty" protobuf:"bytes,2,rep,name=templateParameters"`

	// ResourceParameters is the list of resource parameters to pass to resolved resource object in template object
	ResourceParameters []TriggerParameter `json:"resourceParameters,omitempty" protobuf:"bytes,3,rep,name=resourceParameters"`

	// Policy to configure backoff and execution criteria for the trigger
	Policy *TriggerPolicy `json:"policy" protobuf:"bytes,4,opt,name=policy"`
}

Trigger is an action taken, output produced, an event created, a message sent

func (*Trigger) DeepCopy

func (in *Trigger) DeepCopy() *Trigger

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

func (*Trigger) DeepCopyInto

func (in *Trigger) DeepCopyInto(out *Trigger)

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

type TriggerCondition

type TriggerCondition struct {
	// Any acts as a OR operator between dependencies
	Any []string `json:"any,omitempty" protobuf:"bytes,1,rep,name=any"`

	// All acts as a AND operator between dependencies
	All []string `json:"all,omitempty" protobuf:"bytes,2,rep,name=all"`
}

TriggerCondition describes condition which must be satisfied in order to execute a trigger. Depending upon condition type, status of dependency groups is used to evaluate the result.

func (*TriggerCondition) DeepCopy

func (in *TriggerCondition) DeepCopy() *TriggerCondition

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

func (*TriggerCondition) DeepCopyInto

func (in *TriggerCondition) DeepCopyInto(out *TriggerCondition)

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

type TriggerCycleState added in v0.9.1

type TriggerCycleState string

TriggerCycleState is the label for the state of the trigger cycle

const (
	TriggerCycleSuccess TriggerCycleState = "Success" // all triggers are successfully executed
	TriggerCycleFailure TriggerCycleState = "Failure" // one or more triggers failed
)

possible values of trigger cycle states

type TriggerParameter added in v0.8.3

type TriggerParameter struct {
	// Src contains a source reference to the value of the parameter from a event event
	Src *TriggerParameterSource `json:"src" protobuf:"bytes,1,name=src"`

	// Dest is the JSONPath of a resource key.
	// A path is a series of keys separated by a dot. The colon character can be escaped with '.'
	// The -1 key can be used to append a value to an existing array.
	// See https://github.com/tidwall/sjson#path-syntax for more information about how this is used.
	Dest string `json:"dest" protobuf:"bytes,2,name=dest"`
}

TriggerParameter indicates a passed parameter to a service template

func (*TriggerParameter) DeepCopy added in v0.8.3

func (in *TriggerParameter) DeepCopy() *TriggerParameter

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

func (*TriggerParameter) DeepCopyInto added in v0.8.3

func (in *TriggerParameter) DeepCopyInto(out *TriggerParameter)

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

type TriggerParameterSource added in v0.8.3

type TriggerParameterSource struct {
	// Event is the name of the event for which to retrieve this event
	Event string `json:"event" protobuf:"bytes,1,opt,name=event"`

	// Path is the JSONPath of the event's (JSON decoded) data key
	// Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'.
	// To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'.
	// See https://github.com/tidwall/gjson#path-syntax for more information on how to use this.
	Path string `json:"path" protobuf:"bytes,2,opt,name=path"`

	// Value is the default literal value to use for this parameter source
	// This is only used if the path is invalid.
	// If the path is invalid and this is not defined, this param source will produce an error.
	Value *string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"`
}

TriggerParameterSource defines the source for a parameter from a event event

func (*TriggerParameterSource) DeepCopy added in v0.8.3

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

func (*TriggerParameterSource) DeepCopyInto added in v0.8.3

func (in *TriggerParameterSource) DeepCopyInto(out *TriggerParameterSource)

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

type TriggerPolicy added in v0.9.1

type TriggerPolicy struct {
	// Backoff before checking resource state
	Backoff Backoff `json:"backoff" protobuf:"bytes,1,opt,name=backoff"`

	// State refers to labels used to check the resource state
	State *TriggerStateLabels `json:"state" protobuf:"bytes,2,opt,name=state"`

	// ErrorOnBackoffTimeout determines whether sensor should transition to error state if the backoff times out and yet the resource neither transitioned into success or failure.
	ErrorOnBackoffTimeout bool `json:"errorOnBackoffTimeout" protobuf:"bytes,3,opt,name=errorOnBackoffTimeout"`
}

TriggerPolicy dictates the policy for the trigger retries

func (*TriggerPolicy) DeepCopy added in v0.9.1

func (in *TriggerPolicy) DeepCopy() *TriggerPolicy

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

func (*TriggerPolicy) DeepCopyInto added in v0.9.1

func (in *TriggerPolicy) DeepCopyInto(out *TriggerPolicy)

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

type TriggerStateLabels added in v0.9.1

type TriggerStateLabels struct {
	// Success defines labels required to identify a resource in success state
	Success map[string]string `json:"success" protobuf:"bytes,1,opt,name=success"`

	// Failure defines labels required to identify a resource in failed state
	Failure map[string]string `json:"failure" protobuf:"bytes,2,opt,name=failure"`
}

TriggerStateLabels defines the labels used to decide if a resource is in success or failure state.

func (*TriggerStateLabels) DeepCopy added in v0.9.1

func (in *TriggerStateLabels) DeepCopy() *TriggerStateLabels

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

func (*TriggerStateLabels) DeepCopyInto added in v0.9.1

func (in *TriggerStateLabels) DeepCopyInto(out *TriggerStateLabels)

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

type TriggerTemplate added in v0.8.3

type TriggerTemplate struct {
	// Name is a unique name of the action to take
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// When is the condition to execute the trigger
	When *TriggerCondition `json:"when,omitempty" protobuf:"bytes,2,opt,name=when"`

	// The unambiguous kind of this object - used in order to retrieve the appropriate kubernetes api client for this resource
	*metav1.GroupVersionKind `json:",inline" protobuf:"bytes,3,opt,name=groupVersionKind"`

	// Source of the K8 resource file(s)
	Source *ArtifactLocation `json:"source" protobuf:"bytes,4,opt,name=source"`
}

TriggerTemplate is the template that describes trigger specification.

func (*TriggerTemplate) DeepCopy added in v0.8.3

func (in *TriggerTemplate) DeepCopy() *TriggerTemplate

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

func (*TriggerTemplate) DeepCopyInto added in v0.8.3

func (in *TriggerTemplate) DeepCopyInto(out *TriggerTemplate)

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

type URLArtifact

type URLArtifact struct {
	// Path is the complete URL
	Path string `json:"path" protobuf:"bytes,1,name=path"`

	// VerifyCert decides whether the connection is secure or not
	VerifyCert bool `json:"verifyCert,omitempty" protobuf:"bytes,2,opt,name=verifyCert"`
}

URLArtifact contains information about an artifact at an http endpoint.

func (*URLArtifact) DeepCopy

func (in *URLArtifact) DeepCopy() *URLArtifact

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

func (*URLArtifact) DeepCopyInto

func (in *URLArtifact) DeepCopyInto(out *URLArtifact)

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