utils

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SelectorDiscoveredByPrefix = "discovered_by"
	SelectorCreatedByPrefix    = "created_by"
	SelectorCreatedByValue     = "mesh-discovery"
)

Variables

This section is empty.

Functions

func BasicMeshInfo

func BasicMeshInfo(mainPod *kubernetes.Pod, discoverySelector map[string]string, meshType string) *v1.Mesh

func GetActiveInstalls

func GetActiveInstalls(installs v1.InstallList, filterFunc InstallFilterFunc) v1.InstallList

func GetMeshes

func GetMeshes(meshes v1.MeshList, filterFunc MeshFilterFunc) v1.MeshList

func GetUpstreamsForInjectedPods

func GetUpstreamsForInjectedPods(pods kubernetes.PodList, upstreams gloov1.UpstreamList) gloov1.UpstreamList

func GetVersionFromPodWithMatchers

func GetVersionFromPodWithMatchers(pod *kubernetes.Pod, podStringMatchers []string) (string, error)

func ImageVersion

func ImageVersion(image string) (string, error)

func InjectedPodsByNamespace

func InjectedPodsByNamespace(pods kubernetes.PodList, proxyContainerName string) kubernetes.PodsByNamespace

func MeshWriteNamespace

func MeshWriteNamespace() string

func SelectRunningPods

func SelectRunningPods(pods kubernetes.PodList) kubernetes.PodList

Types

type InstallFilterFunc

type InstallFilterFunc func(install *v1.Install) bool
var IstioInstallFilterFunc InstallFilterFunc = func(install *v1.Install) bool {
	meshInstall := install.GetMesh()
	if meshInstall == nil {
		return false
	}
	if istioMeshInstall := meshInstall.GetIstio(); istioMeshInstall != nil {
		return true
	}
	return false
}
var LinkerdInstallFilterFunc InstallFilterFunc = func(install *v1.Install) bool {
	meshInstall := install.GetMesh()
	if meshInstall == nil {
		return false
	}
	if linkerdMeshInstall := meshInstall.GetLinkerd(); linkerdMeshInstall != nil {
		return true
	}
	return false
}

type MeshFilterFunc

type MeshFilterFunc func(mesh *v1.Mesh) bool
var IstioMeshFilterFunc MeshFilterFunc = func(mesh *v1.Mesh) bool {
	if istioMesh := mesh.GetIstio(); istioMesh != nil {
		return true
	}
	return false
}
var LinkerdMeshFilterFunc MeshFilterFunc = func(mesh *v1.Mesh) bool {
	if linkerdMesh := mesh.GetLinkerd(); linkerdMesh != nil {
		return true
	}
	return false
}

Jump to

Keyboard shortcuts

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