From 3f7906679766400a7c26c2e428e42203120cddd8 Mon Sep 17 00:00:00 2001 From: Chris Wedgwood Date: Fri, 14 Dec 2018 19:06:44 +0000 Subject: [PATCH] [Calico] Logging fixes/updates Expose the early logging level for calico-node. Use conf.node.FELIX_LOGSEVERITYSCREEN to set logging level in BGPConfiguration and FelixConfiguration (whilst this is an odd name/location it backwards compatible and will in most cases set things as expected). Change-Id: I70c3028423eddb4721456f645c4475da4af7ced5 --- calico/templates/bin/_calico-settings.sh.tpl | 6 +++--- calico/values.yaml | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/calico/templates/bin/_calico-settings.sh.tpl b/calico/templates/bin/_calico-settings.sh.tpl index f2c0f9221..4a058984b 100644 --- a/calico/templates/bin/_calico-settings.sh.tpl +++ b/calico/templates/bin/_calico-settings.sh.tpl @@ -24,9 +24,9 @@ kind: BGPConfiguration metadata: name: default spec: - logSeverityScreen: Info - nodeToNodeMeshEnabled: {{ .Values.networking.settings.mesh }} asNumber: {{ .Values.networking.bgp.asnumber }} + logSeverityScreen: {{ .Values.conf.node.FELIX_LOGSEVERITYSCREEN }} + nodeToNodeMeshEnabled: {{ .Values.networking.settings.mesh }} EOF # FelixConfiguration: ipipEnabled @@ -37,7 +37,7 @@ metadata: name: default spec: ipipEnabled: {{ .Values.networking.settings.ippool.ipip.enabled }} - logSeverityScreen: Info + logSeverityScreen: {{ .Values.conf.node.FELIX_LOGSEVERITYSCREEN }} EOF # ipPool - https://docs.projectcalico.org/v3.2/reference/calicoctl/resources/ippool diff --git a/calico/values.yaml b/calico/values.yaml index 6737e3236..d5324aa71 100644 --- a/calico/values.yaml +++ b/calico/values.yaml @@ -464,6 +464,9 @@ conf: # Disable file logging so `kubectl logs` works. CALICO_DISABLE_FILE_LOGGING: "true" # Set Felix endpoint to host default action to ACCEPT. + # early/startup log level for calico-node on startup. Titlecase + # not lowercase. + CALICO_STARTUP_LOGLEVEL: "Info" FELIX_DEFAULTENDPOINTTOHOSTACTION: "ACCEPT" # Configure the IP Pool from which Pod IPs will be chosen. CALICO_IPV4POOL_CIDR: null @@ -474,8 +477,8 @@ conf: FELIX_IPV6SUPPORT: "false" # Set MTU for tunnel device used if ipip is enabled FELIX_IPINIPMTU: null - # Set Felix logging to "info" - FELIX_LOGSEVERITYSCREEN: "info" + # Set Felix logging, Titlecase not lowercase. + FELIX_LOGSEVERITYSCREEN: "Info" FELIX_HEALTHENABLED: "true" # Set Felix experimental Prometheus metrics server FELIX_PROMETHEUSMETRICSENABLED: "true"