Documentation ¶
Overview ¶
Package has auto-generated kube type wrappers for raw types. +k8s:openapi-gen=true +k8s:deepcopy-gen=package +groupName=telemetry.istio.io
Index ¶
Constants ¶
const (
// Package-wide consts from generator "register".
GroupName = "telemetry.istio.io"
)
Variables ¶
var ( // Package-wide variables from generator "register". SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = localSchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Types ¶
type Telemetry ¶
type Telemetry struct { v1.TypeMeta `json:",inline"` // +optional v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the implementation of this definition. // +optional Spec telemetryv1alpha1.Telemetry `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` Status metav1alpha1.IstioStatus `json:"status"` }
Telemetry defines how the telemetry is generated for workloads within a mesh.
For mesh level configuration, put the resource in root configuration namespace for your Istio installation *without* a workload selector.
For any namespace, including the root configuration namespace, it is only valid to have a single workload selector-less Telemetry resource.
For resources with a workload selector, it is only valid to have one resource selecting any given workload.
The hierarchy of Telemetry configuration is as follows: 1. Workload-specific configuration 1. Namespace-specific configuration 1. Root namespace configuration
Examples:
Policy to enable random sampling for 10% of traffic: ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: mesh-default namespace: istio-system
spec:
# no selector specified, applies to all workloads tracing: - randomSamplingPercentage: 10.00
```
Policy to disable trace reporting for the "foo" workload (note: tracing context will still be propagated): ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: foo-tracing namespace: bar
spec:
selector: labels: service.istio.io/canonical-name: foo tracing: - disableSpanReporting: true
```
Policy to select the alternate zipkin provider for trace reporting: ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: foo-tracing-alternate namespace: baz
spec:
selector: labels: service.istio.io/canonical-name: foo tracing: - providers: - name: "zipkin-alternate" randomSamplingPercentage: 10.00
```
Policy to add a custom tag from a literal value: ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: mesh-default namespace: istio-system
spec:
# no selector specified, applies to all workloads tracing: - randomSamplingPercentage: 10.00 customTags: my_new_foo_tag: literal: value: "foo"
```
Policy to disable server-side metrics for Stackdriver for an entire mesh: ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: mesh-default namespace: istio-system
spec:
# no selector specified, applies to all workloads metrics: - providers: - name: stackdriver overrides: - match: metric: ALL_METRICS mode: SERVER disabled: true
```
Policy to add dimensions to all Prometheus metrics for the `foo` namespace: ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: namespace-metrics namespace: foo
spec:
# no selector specified, applies to all workloads in the namespace metrics: - providers: - name: prometheus overrides: # match clause left off matches all istio metrics, client and server - tagOverrides: request_method: value: "request.method" request_host: value: "request.host"
```
Policy to remove the response_code dimension on some Prometheus metrics for the `bar.foo` workload: ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: remove-response-code namespace: foo
spec:
selector: labels: service.istio.io/canonical-name: bar metrics: - providers: - name: prometheus overrides: - match: metric: REQUEST_COUNT tagOverrides: response_code: operation: REMOVE - match: metric: REQUEST_DURATION tagOverrides: response_code: operation: REMOVE - match: metric: REQUEST_BYTES tagOverrides: response_code: operation: REMOVE - match: metric: RESPONSE_BYTES tagOverrides: response_code: operation: REMOVE
```
Policy to enable access logging for the entire mesh: ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: mesh-default namespace: istio-system
spec:
# no selector specified, applies to all workloads accessLogging: - providers: - name: envoyFileAccessLogger # By default, this turns on access logging (no need to set `disabled: false`). # Unspecified `disabled` will be treated as `disabled: false`, except in # cases where a parent configuration has marked as `disabled: true`. In # those cases, `disabled: false` must be set explicitly to override.
```
Policy to disable access logging for the `foo` namespace: ```yaml apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata:
name: namespace-no-log namespace: foo
spec:
# no selector specified, applies to all workloads in the namespace accessLogging: - disabled: true
```
<!-- crd generation tags +cue-gen:Telemetry:groupName:telemetry.istio.io +cue-gen:Telemetry:version:v1alpha1 +cue-gen:Telemetry:storageVersion +cue-gen:Telemetry:annotations:helm.sh/resource-policy=keep +cue-gen:Telemetry:labels:app=istio-pilot,chart=istio,istio=telemetry,heritage=Tiller,release=istio +cue-gen:Telemetry:subresource:status +cue-gen:Telemetry:scope:Namespaced +cue-gen:Telemetry:resource:categories=istio-io,telemetry-istio-io,shortNames=telemetry,plural=telemetries +cue-gen:Telemetry:preserveUnknownFields:false +cue-gen:Telemetry:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata" -->
<!-- go code generation tags +kubetype-gen +kubetype-gen:groupVersion=telemetry.istio.io/v1alpha1 +genclient +k8s:deepcopy-gen=true -->
func (*Telemetry) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Telemetry.
func (*Telemetry) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Telemetry) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TelemetryList ¶
type TelemetryList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Items []Telemetry `json:"items" protobuf:"bytes,2,rep,name=items"` }
TelemetryList is a collection of Telemetries.
func (*TelemetryList) DeepCopy ¶
func (in *TelemetryList) DeepCopy() *TelemetryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TelemetryList.
func (*TelemetryList) DeepCopyInto ¶
func (in *TelemetryList) DeepCopyInto(out *TelemetryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TelemetryList) DeepCopyObject ¶
func (in *TelemetryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.