Documentation ¶
Index ¶
- Constants
- func ParsePath(path string) (namespace string, deployment, pod string, container string, err error)
- func PodKey(namespace, pod string) string
- type ResourceType
- type Resources
- func (r *Resources) ContainerRestarts(namespace, pod, container string) int
- func (r *Resources) IsDiscoveryContainer(clusterVersion, namespace, pod, container string) bool
- func (r *Resources) IsGlooMeshAgentContainer(container string) bool
- func (r *Resources) IsGlooMeshDashboardContainer(container string) bool
- func (r *Resources) IsGlooMeshDiscoveryContainer(container string) bool
- func (r *Resources) IsGlooMeshEnterpriseNetworkingContainer(container string) bool
- func (r *Resources) IsGlooMeshNetworkingContainer(container string) bool
- func (r *Resources) PodIstioVersion(namespace, pod string) string
- func (r *Resources) String() string
Constants ¶
const ( Namespace ResourceType = iota Deployment Pod Label Annotation Container GlooMeshEnterpriseAgentContainerName = "enterprise-agent" GlooMeshEnterpriseNetworkingContainerName = "enterprise-networking" GlooMeshDashboardContainerName = "apiserver" GlooMeshDiscoveryContainerName = "discovery" GlooMeshNetworkingContainerName = "networking" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResourceType ¶
type ResourceType int
type Resources ¶
type Resources struct { // Root is the first level in the cluster resource hierarchy. // Each level in the hierarchy is a map[string]interface{} to the next level. // The levels are: namespaces/deployments/pods/containers. Root map[string]interface{} // Labels maps a pod name to a map of labels key-values. Labels map[string]map[string]string // Annotations maps a pod name to a map of annotation key-values. Annotations map[string]map[string]string // Pod maps a pod name to its Pod info. The key is namespace/pod-name. Pod map[string]*corev1.Pod }
Resources defines a tree of cluster resource names.
func GetClusterResources ¶
GetClusterResources returns cluster resources for the given REST config and k8s AppsClientset.
func (*Resources) ContainerRestarts ¶
ContainerRestarts returns the number of container restarts for the given container.
func (*Resources) IsDiscoveryContainer ¶
IsDiscoveryContainer reports whether the given container is the Istio discovery container.
func (*Resources) IsGlooMeshAgentContainer ¶
IsGlooMeshAgentContainer reports whether the given container is the Gloo mesh agent.
func (*Resources) IsGlooMeshDashboardContainer ¶
IsGlooMeshDashboardContainer reports whether the given container is the Gloo mesh dashboard.
func (*Resources) IsGlooMeshDiscoveryContainer ¶
IsGlooMeshDiscoveryContainer reports whether the given container is the Gloo mesh networking.
func (*Resources) IsGlooMeshEnterpriseNetworkingContainer ¶
IsGlooMeshEnterpriseNetworkingContainer reports whether the given container is the Gloo mesh networking.
func (*Resources) IsGlooMeshNetworkingContainer ¶
IsGlooMeshNetworkingContainer reports whether the given container is the Gloo mesh networking.
func (*Resources) PodIstioVersion ¶
PodIstioVersion returns the Istio version for the given pod, if either the proxy or discovery are one of its containers and the tag is in a parseable format.