Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

[release-1.4] update telemetryv2 templates #591

Merged
merged 5 commits into from Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions global.yaml
Expand Up @@ -28,6 +28,7 @@ global:

policyNamespace: istio-system

configRootNamespace: istio-system

## End new settings
## After this line we have the old Istio settings.
Expand Down
24 changes: 0 additions & 24 deletions istio-control/istio-discovery/metadata-exchange-v2.yaml

This file was deleted.

84 changes: 0 additions & 84 deletions istio-control/istio-discovery/stats-filter-v2.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions istio-control/istio-discovery/templates/telemetryv2.yaml

This file was deleted.

235 changes: 235 additions & 0 deletions istio-control/istio-discovery/templates/telemetryv2_1.4.yaml
@@ -0,0 +1,235 @@
# these EnvoyFilter templates work for release 1.4 only
{{- if and .Values.telemetry.enabled .Values.telemetry.v2.enabled }}
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: metadata-exchange-1.4
{{- if .Values.global.configRootNamespace }}
namespace: {{ .Values.global.configRootNamespace }}
{{- else }}
namespace: {{ .Release.Namespace }}
{{- end }}
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: ANY # inbound, outbound, and gateway
proxy:
proxyVersion: '1\.4.*'
listener:
filterChain:
filter:
name: "envoy.http_connection_manager"
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
config:
config:
configuration: envoy.wasm.metadata_exchange
vm_config:
runtime: envoy.wasm.runtime.null
code:
inline_string: envoy.wasm.metadata_exchange
---
{{- if .Values.telemetry.v2.prometheus.enabled }}
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: stats-filter-1.4
{{- if .Values.global.configRootNamespace }}
namespace: {{ .Values.global.configRootNamespace }}
{{- else }}
namespace: {{ .Release.Namespace }}
{{- end }}
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_OUTBOUND
proxy:
proxyVersion: '1\.4.*'
listener:
filterChain:
filter:
name: "envoy.http_connection_manager"
subFilter:
name: "envoy.router"
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
config:
config:
root_id: stats_outbound
configuration: |
{
"debug": "false",
"stat_prefix": "istio",
}
vm_config:
vm_id: stats_outbound
runtime: envoy.wasm.runtime.null
code:
inline_string: envoy.wasm.stats
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
proxy:
proxyVersion: '1\.4.*'
listener:
filterChain:
filter:
name: "envoy.http_connection_manager"
subFilter:
name: "envoy.router"
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
config:
config:
root_id: stats_inbound
configuration: |
{
"debug": "false",
"stat_prefix": "istio",
}
vm_config:
vm_id: stats_inbound
runtime: envoy.wasm.runtime.null
code:
inline_string: envoy.wasm.stats
- applyTo: HTTP_FILTER
match:
context: GATEWAY
proxy:
proxyVersion: '1\.4.*'
listener:
filterChain:
filter:
name: "envoy.http_connection_manager"
subFilter:
name: "envoy.router"
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
config:
config:
root_id: stats_outbound
configuration: |
{
"debug": "false",
"stat_prefix": "istio",
}
vm_config:
vm_id: stats_outbound
runtime: envoy.wasm.runtime.null
code:
inline_string: envoy.wasm.stats
---
{{- end }}

{{- if .Values.telemetry.v2.stackdriver.enabled }}
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: stackdriver-filter-1.4
{{- if .Values.global.configRootNamespace }}
namespace: {{ .Values.global.configRootNamespace }}
{{- else }}
namespace: {{ .Release.Namespace }}
{{- end }}
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_OUTBOUND
proxy:
proxyVersion: '1\.4.*'
listener:
filterChain:
filter:
name: "envoy.http_connection_manager"
subFilter:
name: "envoy.router"
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
config:
config:
root_id: stackdriver_outbound
configuration: |
{{- if not .Values.telemetry.v2.stackdriver.configOverride }}
{"enable_mesh_edges_reporting": {{ .Values.telemetry.v2.stackdriver.topology }}, "disable_server_access_logging": {{ not .Values.telemetry.v2.stackdriver.logging }}, "meshEdgesReportingDuration": "600s"}
{{- else }}
{{ toJson .Values.telemetry.v2.stackdriver.configOverride | indent 8 }}
{{- end }}
vm_config:
vm_id: stackdriver_outbound
runtime: envoy.wasm.runtime.null
code:
inline_string: envoy.wasm.null.stackdriver
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
proxy:
proxyVersion: '1\.4.*'
listener:
filterChain:
filter:
name: "envoy.http_connection_manager"
subFilter:
name: "envoy.router"
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
config:
config:
root_id: stackdriver_inbound
configuration: |
{{- if not .Values.telemetry.v2.stackdriver.configOverride }}
{"enable_mesh_edges_reporting": {{ .Values.telemetry.v2.stackdriver.topology }}, "disable_server_access_logging": {{ not .Values.telemetry.v2.stackdriver.logging }}, "meshEdgesReportingDuration": "600s"}
{{- else }}
{{ toJson .Values.telemetry.v2.stackdriver.configOverride | indent 16 }}
{{- end }}
vm_config:
vm_id: stackdriver_inbound
runtime: envoy.wasm.runtime.null
code:
inline_string: envoy.wasm.null.stackdriver
- applyTo: HTTP_FILTER
match:
context: GATEWAY
proxy:
proxyVersion: '1\.4.*'
listener:
filterChain:
filter:
name: "envoy.http_connection_manager"
subFilter:
name: "envoy.router"
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
config:
config:
root_id: stackdriver_outbound
configuration: |
{{- if not .Values.telemetry.v2.stackdriver.configOverride }}
{"enable_mesh_edges_reporting": {{ .Values.telemetry.v2.stackdriver.topology }}, "disable_server_access_logging": {{ not .Values.telemetry.v2.stackdriver.logging }}, "meshEdgesReportingDuration": "600s", "disable_host_header_fallback": true}
{{- else }}
{{ toJson .Values.telemetry.v2.stackdriver.configOverride | indent 16 }}
{{- end }}
vm_config:
vm_id: stackdriver_outbound
runtime: envoy.wasm.runtime.null
code:
inline_string: envoy.wasm.null.stackdriver
---
{{- end}}
{{- end}}
19 changes: 18 additions & 1 deletion istio-control/istio-discovery/values.yaml
Expand Up @@ -124,4 +124,21 @@ telemetry:
v2:
# For Null VM case now. If enabled, will set disableMixerHttpReports to true and not define mixerReportServer
# also enable metadata exchange and stats filter.
enabled: false
enabled: true
richardwxn marked this conversation as resolved.
Show resolved Hide resolved
# Indicate if prometheus stats filter is enabled or not
prometheus:
enabled: false
# stackdriver filter settings.
stackdriver:
enabled: true
bianpengyuan marked this conversation as resolved.
Show resolved Hide resolved
logging: true
monitoring: true
topology: true
# configOverride parts give you the ability to override the low level configuration params passed to envoy filter.

configOverride: {}
# e.g.
# enable_mesh_edges_reporting: true
# disable_server_access_logging: false
# meshEdgesReportingDuration: 500s
# disable_host_header_fallback: true
2 changes: 1 addition & 1 deletion test/noauth.mk
Expand Up @@ -64,7 +64,7 @@ run-test-knative: run-build-cluster run-build-minimal run-build-ingress
# Install pilot, ingress - using a kustomization that installs them in istio-micro instead of istio-system
# The kustomization installs a modified istio-ingress+istio-pilot, using separate namespace
kubectl apply -k test/knative
kubectl wait deployments istio-ingressgateway istio-pilot -n istio-micro --for=condition=available --timeout=${WAIT_TIMEOUT}
kubectl wait deployments istio-ingressgateway istio-pilot -n istio-micro --for=condition=available --timeout=360s

# Set host port 30090, for the ingressateway in istio-micro
kubectl apply -f test/kind/ingress-service-micro.yaml
Expand Down