resources

package
v0.0.0-...-d5b48cf Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvVarOperation is the Env variable that gets set to requested Operation
	EnvVarOperation EnvVar = "FEED_OPERATION"
	// EnvVarTrigger is the Env variable that gets set to serialized trigger configuration
	EnvVarTrigger = "FEED_TRIGGER"
	// EnvVarTarget is the Env variable that gets set to target of the feed operation
	EnvVarTarget = "FEED_TARGET"
	// EnvVarContext is the Env variable that gets set to serialized FeedContext if stopping
	EnvVarContext = "FEED_CONTEXT"
	// EnvVarEventSourceParameters is the Env variable that gets set to serialized EventSourceSpec
	EnvVarEventSourceParameters = "EVENT_SOURCE_PARAMETERS"
	// EnvVarNamespace is the Env variable that gets set to namespace of the container doing
	// the Feed (aka, namespace of the feed). Uses downward api
	EnvVarNamespace = "FEED_NAMESPACE"
	// EnvVarServiceAccount is the Env variable that gets set to serviceaccount of the
	// container doing the feed. Uses downward api
	//TODO is this useful? Wouldn't this already be the implicit service Account
	// for the container?
	EnvVarServiceAccount = "FEED_SERVICE_ACCOUNT"
)

Variables

View Source
var (
	// DefaultBackoffLimit is the default BackoffLimit value for feedlet jobs.
	// No more than this number of retry pods will be created before the job is
	// considered failed. The total number of tries is this number + 1.
	DefaultBackoffLimit int32 = 2
	// DefaultActiveDeadlineSeconds is the default ActiveDeadlineSeconds value for
	// feedlet jobs. The job cannot be active for more than this number of
	// seconds before it is considered failed.
	DefaultActiveDeadlineSeconds int64 = 30
)

Functions

func GetFirstTerminationMessage

func GetFirstTerminationMessage(pod *corev1.Pod) string

GetFirstTerminationMessage returns the termination message of the first terminated container in the given Pod.

func IsJobComplete

func IsJobComplete(job *batchv1.Job) bool

IsJobComplete returns true if the Job has completed successfully, or false if the Job is in progress or failed.

func IsJobFailed

func IsJobFailed(job *batchv1.Job) bool

IsJobFailed returns true if the Job has failed, or false if the Job is in progress or completed successfully.

func JobFailedMessage

func JobFailedMessage(job *batchv1.Job) string

JobFailedMessage returns a string containing the job's failure reason and message for use in a Condition.

func JobName

func JobName(feed *feedsv1alpha1.Feed) string

JobName returns the name of the job for the feed, taking into account whether it's been deleted.

func MakeJob

func MakeJob(feed *feedsv1alpha1.Feed, source *feedsv1alpha1.EventSource, trigger sources.EventTrigger, target string) (*batchv1.Job, error)

MakeJob creates a Job to start or stop a Feed.

func StartJobName

func StartJobName(feed *feedsv1alpha1.Feed) string

StartJobName returns the name of the job for the start operation.

func StopJobName

func StopJobName(feed *feedsv1alpha1.Feed) string

StopJobName returns the name of the job for the stop operation.

Types

type EnvVar

type EnvVar string

EnvVar specifies the names of the environment variables passed to the feed container.

type Operation

type Operation string

Operation specifies the operation for the feed container to perform.

const (
	// OperationStartFeed specifies a feed should be started
	OperationStartFeed Operation = "START"
	// OperationStopFeed specifies a feed should be stopped
	OperationStopFeed = "STOP"
)

Jump to

Keyboard shortcuts

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