Documentation ¶
Index ¶
- Constants
- Variables
- func GetFirstTerminationMessage(pod *corev1.Pod) string
- func IsJobComplete(job *batchv1.Job) bool
- func IsJobFailed(job *batchv1.Job) bool
- func JobFailedMessage(job *batchv1.Job) string
- func JobName(feed *feedsv1alpha1.Feed) string
- func MakeJob(feed *feedsv1alpha1.Feed, source *feedsv1alpha1.EventSource, ...) (*batchv1.Job, error)
- func StartJobName(feed *feedsv1alpha1.Feed) string
- func StopJobName(feed *feedsv1alpha1.Feed) string
- type EnvVar
- type Operation
Constants ¶
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 ¶
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 ¶
GetFirstTerminationMessage returns the termination message of the first terminated container in the given Pod.
func IsJobComplete ¶
IsJobComplete returns true if the Job has completed successfully, or false if the Job is in progress or failed.
func IsJobFailed ¶
IsJobFailed returns true if the Job has failed, or false if the Job is in progress or completed successfully.
func JobFailedMessage ¶
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.