kubefinder

package
v0.0.0-...-52ab07d Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IstioCanonicalNameLabelKey = "service.istio.io/canonical-name"
)

Variables

View Source
var (
	ErrNoPodFound              = errors.NewSentinelError("no pod found")
	ErrFoundMoreThanOnePod     = errors.NewSentinelError("ip belongs to more than one pod")
	ErrFoundMoreThanOneService = errors.NewSentinelError("ip belongs to more than one service")
	ErrServiceNotFound         = errors.NewSentinelError("service not found")
)

Functions

func PodLabelsToOtterizeLabels

func PodLabelsToOtterizeLabels(pod *corev1.Pod) []model.PodLabel

func ServiceIsAPIServer

func ServiceIsAPIServer(name string, namespace string) bool

Types

type KubeFinder

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

func NewKubeFinder

func NewKubeFinder(ctx context.Context, mgr manager.Manager) (*KubeFinder, error)

func (*KubeFinder) IsIpHostNetworkIp

func (k *KubeFinder) IsIpHostNetworkIp(ctx context.Context, ip string) (bool, error)

func (*KubeFinder) IsNodeIP

func (k *KubeFinder) IsNodeIP(ctx context.Context, ip string) (bool, error)

func (*KubeFinder) IsPodIp

func (k *KubeFinder) IsPodIp(ctx context.Context, ip string) (bool, error)

func (*KubeFinder) IsSrcIpClusterInternal

func (k *KubeFinder) IsSrcIpClusterInternal(ctx context.Context, ip string) (bool, error)

func (*KubeFinder) ResolveIPToControlPlane

func (k *KubeFinder) ResolveIPToControlPlane(ctx context.Context, ip string) (*corev1.Service, bool, error)

func (*KubeFinder) ResolveIPToExternalAccessService

func (k *KubeFinder) ResolveIPToExternalAccessService(ctx context.Context, ip string, port int) (*corev1.Service, bool, error)

func (*KubeFinder) ResolveIPToPod

func (k *KubeFinder) ResolveIPToPod(ctx context.Context, ip string) (*corev1.Pod, error)

func (*KubeFinder) ResolveIPToService

func (k *KubeFinder) ResolveIPToService(ctx context.Context, ip string) (*corev1.Service, bool, error)

func (*KubeFinder) ResolveIstioWorkloadToPod

func (k *KubeFinder) ResolveIstioWorkloadToPod(ctx context.Context, workload string, namespace string) (*corev1.Pod, error)

func (*KubeFinder) ResolveOtterizeIdentityForService

func (k *KubeFinder) ResolveOtterizeIdentityForService(ctx context.Context, svc *corev1.Service, lastSeen time.Time) (model.OtterizeServiceIdentity, bool, error)

func (*KubeFinder) ResolvePodByName

func (k *KubeFinder) ResolvePodByName(ctx context.Context, name string, namespace string) (*corev1.Pod, error)

func (*KubeFinder) ResolveServiceAddressToPods

func (k *KubeFinder) ResolveServiceAddressToPods(ctx context.Context, fqdn string) ([]corev1.Pod, types.NamespacedName, error)

func (*KubeFinder) ResolveServiceToPods

func (k *KubeFinder) ResolveServiceToPods(ctx context.Context, svc *corev1.Service) ([]corev1.Pod, error)

func (*KubeFinder) WasPodIP

func (k *KubeFinder) WasPodIP(ip string) bool

Jump to

Keyboard shortcuts

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