utils

package
v0.3.19 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 12 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(meshNamespace string, discoverySelector map[string]string, meshType string) *v1.Mesh

func GetActiveInstalls

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

func GetMeshes

func GetMeshes(meshes v1.MeshList, filterFuncs ...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.PodList

func MeshWriteNamespace

func MeshWriteNamespace() string

func SelectRunningPods

func SelectRunningPods(pods kubernetes.PodList) kubernetes.PodList

func StringContainsAll added in v0.3.16

func StringContainsAll(podStringMatchers []string, matchString string) bool

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 AppmeshFilterFunc MeshFilterFunc = func(mesh *v1.Mesh) bool {
	if appmeshMesh := mesh.GetAwsAppMesh(); appmeshMesh != nil {
		return true
	}
	return false
}
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
}

func FilterByLabels added in v0.3.16

func FilterByLabels(meshLabels map[string]string) MeshFilterFunc

Jump to

Keyboard shortcuts

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