informer

package
v0.0.0-...-ce43100 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusCompleted string = "Satisfied"
	StatusTimeout   string = "Timeout"
)

Variables

This section is empty.

Functions

func CheckMatchBasicConfigurationCondition

func CheckMatchBasicConfigurationCondition(obj *v1beta1.BasicConfigurationCondition, labelsFound map[string]string, conditions []v1beta1.BasicConfigurationCondition, matchCondition chan Condition)

func CheckMatchConditionDeployment

func CheckMatchConditionDeployment(obj *appsv1.Deployment, labelsFound map[string]string, conditions []v1beta1.DeploymentCondition, matchCondition chan Condition)

func CheckMatchConditionJob

func CheckMatchConditionJob(obj *batchv1.Job, labelsFound map[string]string, conditions []v1beta1.JobCondition, matchCondition chan Condition)

func CheckMatchConditionPod

func CheckMatchConditionPod(obj *corev1.Pod, labelsFound map[string]string, conditions []v1beta1.PodCondition, matchCondition chan Condition)

func CheckMatchConditionStatefulSet

func CheckMatchConditionStatefulSet(obj *appsv1.StatefulSet, labelsFound map[string]string, conditions []v1beta1.StatefulSetCondition, matchCondition chan Condition)

func ExtractBasicConfigurationMap

func ExtractBasicConfigurationMap(obj *v1beta1.BasicConfigurationCondition) map[string]string

ExtractBasicConfigurationMap - converts BasicConfigurationCondition to Map

func ExtractDeploymentConditionMap

func ExtractDeploymentConditionMap(obj *v1beta1.DeploymentCondition) map[string]string

ExtractPodConditionMap - Convert PodCondition to Map

func ExtractDeploymentMap

func ExtractDeploymentMap(obj *appsv1.Deployment) map[string]string

ExtractPodMap - Convert Pod to Map

func ExtractJobConditionMap

func ExtractJobConditionMap(obj *v1beta1.JobCondition) map[string]string

ExtractJobConditionMap - Converts JobCondition to Map

func ExtractJobMap

func ExtractJobMap(obj *batchv1.Job) map[string]string

ExtractJobMap - Convert Job to Map

func ExtractPodConditionMap

func ExtractPodConditionMap(obj *v1beta1.PodCondition) map[string]string

ExtractPodConditionMap - Convert PodCondition to Map

func ExtractPodMap

func ExtractPodMap(obj *corev1.Pod) map[string]string

ExtractPodMap - Convert Pod to Map

func ExtractStatefulSetConditionMap

func ExtractStatefulSetConditionMap(obj *v1beta1.StatefulSetCondition) map[string]string

ExtractPodConditionMap - Convert PodCondition to Map

func ExtractStatefulSetMap

func ExtractStatefulSetMap(obj *appsv1.StatefulSet) map[string]string

ExtractPodMap - Convert Pod to Map

func IsMapPresent

func IsMapPresent(sourceMap *map[string]string, subsetMap *map[string]string) (bool, error)

func MatchesGeneric

func MatchesGeneric(propertyFound *map[string]string, labelsFound *map[string]string, propertyExpected *map[string]string, labelsExpected *map[string]string) bool

MatchesGeneric Verify if object found matches expected conditions Isolated to help on re-use of the logic

func StartCRDWatcher

func StartCRDWatcher(clientSet *kubernetes.Clientset, clientCrd *crd.CRDClient, loggerIn *zap.Logger) error

func WatchBasic

func WatchBasic(conditions []v1beta1.BasicConfigurationCondition, matchConditions chan Condition, stopper chan struct{}, informer cache.SharedIndexInformer)

func WatchDeployments

func WatchDeployments(conditions []v1beta1.DeploymentCondition, matchConditions chan Condition, stopper chan struct{}, informer cache.SharedIndexInformer)

func WatchJobs

func WatchJobs(conditions []v1beta1.JobCondition, matchConditions chan Condition, stopper chan struct{}, informer cache.SharedIndexInformer)

func WatchPods

func WatchPods(conditions []v1beta1.PodCondition, matchConditions chan Condition, stopper chan struct{}, informer cache.SharedIndexInformer)

func WatchStatefulSets

func WatchStatefulSets(conditions []v1beta1.StatefulSetCondition, matchConditions chan Condition, stopper chan struct{}, informer cache.SharedIndexInformer)

Types

type BasicK8s

type BasicK8s interface {
	GetNamespace() string
	GetName() string
}

type Condition

type Condition struct {
	Selector    string `yaml:"selector"`
	ID          int    `yaml:"id"`
	Met         bool   `yaml:"met"`
	Description string `yaml:"description"`
}

type ExitScenarioState

type ExitScenarioState struct {
	Exit       int32       `yaml:"exit"`
	Timeout    int32       `yaml:"timeout"`
	Conditions []Condition `yaml:"conditions"`
}

type WatcherConfig

type WatcherConfig struct {
	CrdName      string `yaml:"crdname,omitempty"`
	CrdNamespace string `yaml:"crdnamespace,omitempty"`
	Kind         string `yaml:"kind,omitempty"`
	APIVersion   string `yaml:"apiversion,omitempty"`
	Group        string `yaml:"group,omitempty"`
}

Jump to

Keyboard shortcuts

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