Skip to content

Commit

Permalink
Configure logging level in proxy and control plane (istio#12639)
Browse files Browse the repository at this point in the history
* configure proxy log level via helm values for sidecar and gateways

* configure istio control plane log level via helm
  • Loading branch information
GregHanson authored and istio-testing committed Mar 25, 2019
1 parent f5b0bdf commit 5daebaf
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
- --validation-webhook-config-file
- /etc/config/validatingwebhookconfiguration.yaml
- --monitoringPort={{ .Values.global.monitoringPort }}
{{- if $.Values.global.logging.level }}
- --log_output_level={{ $.Values.global.logging.level }}
{{- end}}
volumeMounts:
- name: certs
mountPath: /etc/certs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ spec:
- router
- --domain
- $(POD_NAMESPACE).svc.{{ $.Values.global.proxy.clusterDomain }}
- --log_output_level
- 'info'
{{- if $.Values.global.proxy.logLevel }}
- --proxyLogLevel={{ $.Values.global.proxy.logLevel }}
{{- end}}
{{- if $.Values.global.logging.level }}
- --log_output_level={{ $.Values.global.logging.level }}
{{- end}}
- --drainDuration
- '45s' #drainDuration
- --parentShutdownDuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
- --monitoringPort={{ .Values.global.monitoringPort }}
- --address
- unix:///sock/mixer.socket
{{- if $.Values.global.logging.level }}
- --log_output_level={{ $.Values.global.logging.level }}
{{- end}}
{{- if $.Values.global.useMCP }}
{{- if $.Values.global.controlPlaneSecurityEnabled}}
- --configStoreURL=mcps://istio-galley.{{ $.Release.Namespace }}.svc:9901
Expand Down Expand Up @@ -176,6 +179,9 @@
- --monitoringPort={{ .Values.global.monitoringPort }}
- --address
- unix:///sock/mixer.socket
{{- if $.Values.global.logging.level }}
- --log_output_level={{ $.Values.global.logging.level }}
{{- end}}
{{- if $.Values.global.useMCP }}
{{- if $.Values.global.controlPlaneSecurityEnabled}}
- --configStoreURL=mcps://istio-galley.{{ $.Release.Namespace }}.svc:9901
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ spec:
args:
- "discovery"
- --monitoringAddr=:{{ .Values.global.monitoringPort }}
{{- if $.Values.global.logging.level }}
- --log_output_level={{ $.Values.global.logging.level }}
{{- end}}
- --domain
- {{ .Values.global.proxy.clusterDomain }}
{{- if .Values.global.oneNamespace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ data:
- --zipkinAddress
- {{ "[[ .ProxyConfig.GetTracing.GetZipkin.GetAddress ]]" }}
{{- end }}
{{- if $.Values.global.proxy.logLevel }}
- --proxyLogLevel={{ .Values.global.proxy.logLevel }}
{{- end}}
- --connectTimeout
- {{ "[[ formatDuration .ProxyConfig.ConnectTimeout ]]" }}
{{- if .Values.global.proxy.envoyStatsd.enabled }}
Expand Down
10 changes: 10 additions & 0 deletions install/kubernetes/helm/istio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ global:
# Default tag for Istio images.
tag: master-latest-daily

# Comma-separated minimum per-scope logging level of messages to output, in the form of <scope>:<level>,<scope>:<level>
# The control plane has different scopes depending on component, but can configure default log level across all components
# If empty, default scope and level will be used as configured in code
logging:
level: "default:info"

# monitoring port used by mixer, pilot, galley
monitoringPort: 15014

Expand Down Expand Up @@ -161,6 +167,10 @@ global:
# Configure the access log for sidecar to JSON or TEXT.
accessLogEncoding: TEXT

# Log level for proxy, applies to gateways and sidecars. If left empty, "warning" is used.
# Expected values are: trace|debug|info|warning|error|critical|off
logLevel: ""

# Configure the DNS refresh rate for Envoy cluster of type STRICT_DNS
# 5 seconds is the default refresh rate used by Envoy
dnsRefreshRate: 5s
Expand Down

0 comments on commit 5daebaf

Please sign in to comment.