rule

package
v2.8.2-0...-dd449ac Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteRule

func ExecuteRule(
	rule *stork_api.Rule,
	rType Type,
	owner runtime.Object,
	podNamespace string,
) (chan bool, error)

ExecuteRule executes rules for the given owner. PVCs are used to figure out the pods on which the rule actions will be run on

func Init

func Init() error

Init initializes the rule executor

func PerformRuleRecovery

func PerformRuleRecovery(
	owner runtime.Object,
) error

PerformRuleRecovery terminates potential background commands running pods for the given owner

func ToImagePullSecret

func ToImagePullSecret(name string) []v1.LocalObjectReference

ToImagePullSecret converts a secret name to the ImagePullSecret struct.

func ValidateRule

func ValidateRule(rule *stork_api.Rule, ruleType Type) error

ValidateRule validates a rule

Types

type Pod

type Pod struct {
	UID       string `json:"uid"`
	Namespace string `json:"namespace"`
}

Pod is a simple type to encapsulate a Pod's uid and namespace

type Type

type Type string

Type The type of rule to be executed

const (
	// PreExecRule This type of rule is to be run before an operation
	PreExecRule Type = "preExecRule"
	// PostExecRule This type of rule is to be run after an operation
	PostExecRule Type = "postExecRule"
)

Jump to

Keyboard shortcuts

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