pod

package
v0.9.3-beta Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GCPodUpdated

func GCPodUpdated(client clientset.Interface, pod *corev1.Pod)

GCPodUpdated handles GC pod update. If GC pod is terminated, it will be deleted.

func IsGCPod

func IsGCPod(pod *corev1.Pod) bool

IsGCPod judges whether a pod is a GC pod by check whether it has annotation "cyclone.io/gc".

Types

type Handler

type Handler struct {
	Client clientset.Interface
}

Handler ...

func (*Handler) ObjectCreated

func (h *Handler) ObjectCreated(obj interface{})

ObjectCreated ...

func (*Handler) ObjectDeleted

func (h *Handler) ObjectDeleted(obj interface{})

ObjectDeleted ...

func (*Handler) ObjectUpdated

func (h *Handler) ObjectUpdated(obj interface{})

ObjectUpdated ...

type Operator

type Operator struct {
	// contains filtered or unexported fields
}

Operator ...

func NewOperator

func NewOperator(client clientset.Interface, pod *corev1.Pod) (*Operator, error)

NewOperator ...

func (*Operator) DetermineStatus

func (p *Operator) DetermineStatus(wfrOperator workflowrun.Operator)

DetermineStatus determines status of a stage and update WorkflowRun status accordingly. Because coordinator container is the last container running in the pod (it performs collect logs, artifacts, notify resource resolver to push resource), when the coordinator container have been finished (no matter Succeed or Failed), we need to update stage status, and take necessary actions to stop the pod.

func (*Operator) OnDelete

func (p *Operator) OnDelete() error

OnDelete handles the situation when a stage pod gotten delete. It updates corresponding WorkflowRun's status.

func (*Operator) OnUpdated

func (p *Operator) OnUpdated() error

OnUpdated ...

Jump to

Keyboard shortcuts

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