svccontrol

package
v4.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxUpdateRetry = 400
	RetryInterval  = 25
)
View Source
const (
	PodSelector        = "danm.k8s.io/selector"
	DanmNetSelector    = "danm.k8s.io/network"
	TenantNetSelector  = "danm.k8s.io/tenantNetwork"
	ClusterNetSelector = "danm.k8s.io/clusterNetwork"
	TolerateUnreadyEps = "service.alpha.kubernetes.io/tolerate-unready-endpoints"
)

Variables

This section is empty.

Functions

func FindEpsForSvc

func FindEpsForSvc(eps []*corev1.Endpoints, svcName, svcNs string) bool

func GetDanmSvcAnnotations

func GetDanmSvcAnnotations(annotations map[string]string) (map[string]string, map[string]string, error)

func IsContain

func IsContain(ep, svc map[string]string) bool

func MatchExistingSvc

func MatchExistingSvc(de *danmv1.DanmEp, servicesList []*corev1.Service) []*corev1.Service

func PodLabelChanged

func PodLabelChanged(oldPod, newPod *corev1.Pod) bool

func PodReady

func PodReady(pod *corev1.Pod) bool

func SelectDesMatchLabels

func SelectDesMatchLabels(des []*danmv1.DanmEp, selectorMap map[string]string, svcNets map[string]string, svcNs string) []*danmv1.DanmEp

func SvcChanged

func SvcChanged(oldSvc, newSvc *corev1.Service) bool

Types

type Controller

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

func NewController

func NewController(
	kubeclient kubernetes.Interface,
	danmclient danmclientset.Interface,
	podInformer coreinformers.PodInformer,
	serviceInformer coreinformers.ServiceInformer,
	epsInformer coreinformers.EndpointsInformer,
	danmepInformer danminformers.DanmEpInformer) *Controller

func (*Controller) CreateModifyEndpoints

func (c *Controller) CreateModifyEndpoints(svc *corev1.Service, doesEpAlreadyExist bool, des []*danmv1.DanmEp) error

func (*Controller) EpCheckUpdate

func (c *Controller) EpCheckUpdate(ipAddr, ip6Addr string, eps *corev1.Endpoints, pod *corev1.Pod, early bool) error

////////////////////////

                    //
Instance functions  //
                    //

////////////////////////

func (*Controller) MakeNewEps

func (c *Controller) MakeNewEps(svc *corev1.Service, des []*danmv1.DanmEp) corev1.Endpoints

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

func (*Controller) UpdateEndpoints

func (c *Controller) UpdateEndpoints(eps *corev1.Endpoints) error

func (*Controller) UpdateEndpointsList

func (c *Controller) UpdateEndpointsList(epList []*corev1.Endpoints) error

func (*Controller) UpdatePodRvInEps

func (c *Controller) UpdatePodRvInEps(epsList []*corev1.Endpoints, pod *corev1.Pod) []*corev1.Endpoints

func (*Controller) UpdatePodStatusInEps

func (c *Controller) UpdatePodStatusInEps(epsList []*corev1.Endpoints, pod *corev1.Pod, oldReady, newReady bool) []*corev1.Endpoints

Jump to

Keyboard shortcuts

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