TIS0901 - Telemetry with Empty Providers Not Valid Without Default Providers
A Telemetry
configuration with empty providers is not valid when the default providers in MeshConfig
are also empty.
Telemetry
Configuration References Valid ProvidersTo prevent undefined behavior in telemetry, always reference a valid provider in Telemetry
configurations or ensure default providers are set in MeshConfig
.
Examples
-
Telemetry
Object Without Specified ProvidersapiVersion: telemetry.istio.io/v1alpha1
kind: Telemetry
metadata:
name: telemetry-without-providers
namespace: example-namespace
spec:
accessLogging: []
metrics: []Explanation: The
Telemetry
object does not specify any access logging or metrics providers, and the default providers in theMeshConfig
are also empty. This leads to undefined behavior since Istio cannot determine which provider to use for telemetry.
Recommendation
Correct the reference to a valid provider or set up default providers.
-
Add a Valid Provider to the
Telemetry
ConfigurationUpdate the
Telemetry
configuration to reference valid logging and metrics providers.apiVersion: telemetry.istio.io/v1alpha1
kind: Telemetry
metadata:
name: telemetry-with-providers
namespace: example-namespace
spec:
accessLogging:
- provider: "default"
metrics:
- provider: "default"Explanation: Adding a valid provider to the
Telemetry
object ensures that Istio knows which provider to use for collecting telemetry data, preventing issues related to undefined behavior. -
Set Up Default Providers in
MeshConfig
Alternatively, update the
MeshConfig
to define default providers for telemetry.apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
name: istio-control-plane
namespace: istio-system
spec:
meshConfig:
defaultProviders:
accessLogging: ["default"]
metrics: ["default"]Explanation: Setting up default providers in
MeshConfig
ensures that, even if specificTelemetry
configurations do not specify providers, Istio will still use the default providers for telemetry collection.