reflectors

package
v0.3.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Blacklist = map[apimgmt.ApiType]blackListType{
	apimgmt.EndpointSlices: {
		"default/kubernetes": struct{}{},
	},
	apimgmt.Pods: {},
	apimgmt.Services: {
		"default/kubernetes": struct{}{},
	},
}

the blacklist is a map containing the objects that should not be managed by the reflectors. the blacklist is generally checked in the `isAllowed` method of the reflectors TODO: in a future version we could/should move to a dynamic blaklisting package with contexts.

Functions

This section is empty.

Types

type GenericAPIReflector

type GenericAPIReflector struct {
	Api                   apimgmt.ApiType
	PreProcessingHandlers ri.PreProcessingHandlers
	OutputChan            chan apimgmt.ApiEvent

	ForeignClient kubernetes.Interface
	HomeClient    kubernetes.Interface

	CacheManager reflectionCache.CacheManagerReaderAdder

	NamespaceNatting namespacesmapping.NamespaceNatter
	// contains filtered or unexported fields
}

func (*GenericAPIReflector) GetCacheManager

func (*GenericAPIReflector) GetForeignClient

func (r *GenericAPIReflector) GetForeignClient() kubernetes.Interface

func (*GenericAPIReflector) GetHomeClient

func (r *GenericAPIReflector) GetHomeClient() kubernetes.Interface

func (*GenericAPIReflector) Inform

func (r *GenericAPIReflector) Inform(obj apimgmt.ApiEvent)

func (*GenericAPIReflector) Keyer

func (r *GenericAPIReflector) Keyer(namespace, name string) string

func (*GenericAPIReflector) NattingTable

NattingTable returns a namespaceNatter object to handle namespace translations.

func (*GenericAPIReflector) PreProcessAdd

func (r *GenericAPIReflector) PreProcessAdd(obj interface{}) (interface{}, watch.EventType)

func (*GenericAPIReflector) PreProcessDelete

func (r *GenericAPIReflector) PreProcessDelete(obj interface{}) (interface{}, watch.EventType)

func (*GenericAPIReflector) PreProcessIsAllowed

func (r *GenericAPIReflector) PreProcessIsAllowed(ctx context.Context, obj interface{}) bool

func (*GenericAPIReflector) PreProcessUpdate

func (r *GenericAPIReflector) PreProcessUpdate(newObj, oldObj interface{}) (interface{}, watch.EventType)

func (*GenericAPIReflector) PushToInforming

func (r *GenericAPIReflector) PushToInforming(pod *corev1.Pod)

PushToInforming pushes a pod to the informing function.

func (*GenericAPIReflector) SetInforming

func (r *GenericAPIReflector) SetInforming(handler func(*corev1.Pod))

SetInforming configures the handlers triggered for a certain API type by incoming reflection events.

func (*GenericAPIReflector) SetPreProcessingHandlers

func (r *GenericAPIReflector) SetPreProcessingHandlers(handlers ri.PreProcessingHandlers)

func (*GenericAPIReflector) SetupHandlers

func (r *GenericAPIReflector) SetupHandlers(api apimgmt.ApiType, reflectionType ri.ReflectionType, namespace, nattedNs string)

Directories

Path Synopsis
Package incoming contains the logic to configure the reflection of target objects from a foreign cluster to the home cluster
Package incoming contains the logic to configure the reflection of target objects from a foreign cluster to the home cluster
Package outgoing contains the logic to configure the reflection of target objects from the home cluster to a foreign cluster
Package outgoing contains the logic to configure the reflection of target objects from the home cluster to a foreign cluster

Jump to

Keyboard shortcuts

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