util

package
v1.57.16 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddQueryScope added in v1.48.0

func AddQueryScope(query string) string

AddQueryScope returns the prom query unchanged if there is no configured queryScope, otherwise it returns the query with the queryScope injected after each occurrence of a leading '{'.

func HandleClusters added in v1.29.0

func HandleClusters(lSourceCluster model.LabelValue, sourceClusterOk bool, lDestCluster model.LabelValue, destClusterOk bool) (sourceCluster, destCluster string)

HandleClusters just sets source an dest cluster to unknown if it is not supplied on the telemetry TODO: Starting in Istio 1.9 source_cluster and destination_cluster are always reported. So, this function can be removed when the Kiali version can assume Istio 1.9 or later.

func HandleDestination added in v1.18.3

func HandleDestination(sourceCluster, sourceWlNs, sourceWl, destCluster, destSvcNs, destSvc, destSvcName, destWlNs, destWl, destApp, destVer string) (string, string, string, string, string, string, string, bool)

HandleDestination modifies the destination information, when necessary, for various corner cases. It should be called after source validation and before destination processing. Returns destSvcNs, destSvcName, destWlNs, destWl, destApp, destVersion, isupdated

func HandleResponseCode added in v1.12.1

func HandleResponseCode(protocol, responseCode string, grpcResponseStatusOk bool, grpcResponseStatus string) string

HandleResponseCode determines the proper response code based on how istio has set the response_code and grpc_response_status attributes. grpc_response_status was added upstream in Istio 1.5 and downstream in OSSM 1.1. We support it here in a backward compatible way. return "-" for requests that did not receive a response, regardless of protocol return HTTP response code when:

  • protocol is not GRPC
  • the version running does not supply the GRPC status
  • the protocol is GRPC but the HTTP transport fails (i.e. an HTTP error is reported, rare).

return the GRPC status, otherwise.

func IsBadDestTelemetry added in v1.15.2

func IsBadDestTelemetry(cluster string, clusterOK bool, svcNs, svc, svcName, wl string) bool

IsBadDestTelemetry tests for known issues in generated telemetry given indicative label values.

  1. During pod lifecycle changes incomplete telemetry may be generated that results in destSvc == destSvcName and no dest workload, where destSvc[Name] is in the form of an IP address.
  2. destSvcNs is ok and destCluster is provided but not ok
  3. no more conditions known

func IsBadSourceTelemetry added in v1.15.2

func IsBadSourceTelemetry(cluster string, clusterOK bool, ns, wl, app string) bool

IsBadSourceTelemetry tests for known issues in generated telemetry given indicative label values. 1) source namespace is ok but neither workload nor app are set 2) source namespace is ok and source_cluster is provided but not ok. 3) no more conditions known

Types

This section is empty.

Jump to

Keyboard shortcuts

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