serviceimport

package
v0.0.0-...-c7431a4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIndexer

func AddIndexer(siInformer amkoInformers.ServiceImportInformer)

func AddUpdateAllServiceImportsForCluster

func AddUpdateAllServiceImportsForCluster(cname string)

func BuildPortListForService

func BuildPortListForService(cname, ns, svcName string, svc *corev1.Service) ([]siapi.BackendPort, error)

func BuildServiceImportFromService

func BuildServiceImportFromService(cname, ns, name string, svcPorts []siapi.BackendPort) *siapi.ServiceImport

func GenerateSIInformerCacheKey

func GenerateSIInformerCacheKey(cname, ns, name string) string

func GetNameForServiceImport

func GetNameForServiceImport(cname, ns, name string) string

func GetServiceImportChecksum

func GetServiceImportChecksum(si *siapi.ServiceImport) uint32

func HandleClusterObject

func HandleClusterObject(cname string)

func HandleMCIObject

func HandleMCIObject(ns, name string)

func HandleNodeObject

func HandleNodeObject(cname, nodeName string, args ...string)

func HandleServiceObject

func HandleServiceObject(cname, ns, name string, args ...*v1.Service)

func InitServiceImportHandler

func InitServiceImportHandler(amkoClientset *amkov1.Clientset, clusterList []string,
	siCtrl *ServiceImportController)

func ProcessIngestionKey

func ProcessIngestionKey(key string) error

func ServiceImportEventHandlers

func ServiceImportEventHandlers(numWorkers uint32) cache.ResourceEventHandler

func SyncFromIngestionLayer

func SyncFromIngestionLayer(key interface{}, wg *sync.WaitGroup) error

Types

type ClusterServiceImportCache

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

func InitClusterServiceImportCache

func InitClusterServiceImportCache(clusterList []string) *ClusterServiceImportCache

func (*ClusterServiceImportCache) AddCluster

func (csic *ClusterServiceImportCache) AddCluster(cname string)

func (*ClusterServiceImportCache) AddUpdateServiceImport

func (csic *ClusterServiceImportCache) AddUpdateServiceImport(si *siapi.ServiceImport)

func (*ClusterServiceImportCache) DeleteServiceImport

func (csic *ClusterServiceImportCache) DeleteServiceImport(cname, ns, name string)

func (*ClusterServiceImportCache) GetServiceImport

func (csic *ClusterServiceImportCache) GetServiceImport(cname, ns, name string) *siapi.ServiceImport

func (*ClusterServiceImportCache) GetServiceImportCache

func (csic *ClusterServiceImportCache) GetServiceImportCache(cname string) *ServiceImportCache

type NamespacedName

type NamespacedName struct {
	Namespace string
	Name      string
}

type ServiceImportCache

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

func (*ServiceImportCache) AddUpdateCache

func (sic *ServiceImportCache) AddUpdateCache(si *siapi.ServiceImport)

func (*ServiceImportCache) DeleteServiceImport

func (sic *ServiceImportCache) DeleteServiceImport(ns, name string)

func (*ServiceImportCache) LookupServiceImport

func (sic *ServiceImportCache) LookupServiceImport(ns, name string) *siapi.ServiceImport

type ServiceImportController

type ServiceImportController struct {
	Informer cache.SharedIndexInformer
	// contains filtered or unexported fields
}

func InitializeServiceImportController

func InitializeServiceImportController(kubeClient *kubernetes.Clientset, siClient *sics.Clientset,
	siInformerFactory siinformers.SharedInformerFactory) *ServiceImportController

func (*ServiceImportController) CreateServiceImportObj

func (siController *ServiceImportController) CreateServiceImportObj(obj *siapi.ServiceImport) error

func (*ServiceImportController) DeleteServiceImportObject

func (siController *ServiceImportController) DeleteServiceImportObject(ns, name string) error

func (*ServiceImportController) GetServiceImportObjectFromInformerCache

func (siController *ServiceImportController) GetServiceImportObjectFromInformerCache(cname, ns,
	name string) (*siapi.ServiceImport, error)

func (*ServiceImportController) GetServiceImportsFromClusterIndexer

func (siController *ServiceImportController) GetServiceImportsFromClusterIndexer(cname string) ([]*siapi.ServiceImport, error)

func (*ServiceImportController) Run

func (siController *ServiceImportController) Run(stopCh <-chan struct{}) error

func (*ServiceImportController) UpdateServiceImportObj

func (siController *ServiceImportController) UpdateServiceImportObj(obj *siapi.ServiceImport) error

type ServiceImportHandler

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

func GetServiceImportHandler

func GetServiceImportHandler() *ServiceImportHandler

func (*ServiceImportHandler) AddUpdateService

func (sih *ServiceImportHandler) AddUpdateService(obj *siapi.ServiceImport) error

If we encounter a new service from a cluster, we need to check the corresponding service import object at a couple of places: the service import cache and the informer cache.

If the service import object exists in the service import cache but not in the informer cache, we need to first update the service import cache and then create a new service import object in the cluster. If the service import object doesn't exist in the service import cache, but exists in the informer cache, we need to add this object to the service import cache and check if an update is required for the corresponding object in the informer cache. If the service import object exists at both places, we need to check if an endpoint update is required in the service import cache. If yes, update the endpoints in the service import cache and then in the cluster's service import object. If the service import doesn't exist in either place, create a new one in both places.

func (*ServiceImportHandler) DeleteService

func (sih *ServiceImportHandler) DeleteService(cname, ns, name string) error

func (*ServiceImportHandler) GetAllServiceImportsForCluster

func (sih *ServiceImportHandler) GetAllServiceImportsForCluster(cname string) ([]*siapi.ServiceImport, error)

func (*ServiceImportHandler) GetService

func (sih *ServiceImportHandler) GetService(cname, ns, name string) (*siapi.ServiceImport, error)

func (*ServiceImportHandler) GetServiceFromCache

func (sih *ServiceImportHandler) GetServiceFromCache(cname, ns, name string) *siapi.ServiceImport

Jump to

Keyboard shortcuts

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