utils

package
v0.3.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SelectorPrefix = "discovered_by"

Variables

This section is empty.

Functions

func BasicMeshInfo

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

func FilerPodsByNamePrefix

func FilerPodsByNamePrefix(pods v1.PodList, namePrefix string) v1.PodList

func GetInstalls

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

func GetMeshes

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

func GetVersionFromPodWithMatchers

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

func ImageVersion

func ImageVersion(image string) (string, error)

func MeshWriteNamespace

func MeshWriteNamespace() string

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.GetIstioMesh(); 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.GetLinkerdMesh(); 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.GetLinkerdMesh(); linkerdMesh != nil {
		return true
	}
	return false
}

Jump to

Keyboard shortcuts

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