From bb5fe0517874865007cf9f8435398aee2ef50639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bryan=E2=84=A2=EF=B8=8F?= Date: Wed, 9 Dec 2020 17:18:32 -0600 Subject: [PATCH] add log-level helm param --- config/helm/aws-node-termination-handler/README.md | 1 + .../templates/daemonset.linux.yaml | 2 ++ .../templates/daemonset.windows.yaml | 2 ++ .../aws-node-termination-handler/templates/deployment.yaml | 2 ++ config/helm/aws-node-termination-handler/values.yaml | 3 +++ 5 files changed, 10 insertions(+) diff --git a/config/helm/aws-node-termination-handler/README.md b/config/helm/aws-node-termination-handler/README.md index c37fef6a..e5ce0822 100644 --- a/config/helm/aws-node-termination-handler/README.md +++ b/config/helm/aws-node-termination-handler/README.md @@ -71,6 +71,7 @@ Parameter | Description | Default `cordonOnly` | If true, nodes will be cordoned but not drained when an interruption event occurs. | `false` `taintNode` | If true, nodes will be tainted when an interruption event occurs. Currently used taint keys are `aws-node-termination-handler/scheduled-maintenance`, `aws-node-termination-handler/spot-itn`, and `aws-node-termination-handler/asg-lifecycle-termination` | `false` `jsonLogging` | If true, use JSON-formatted logs instead of human readable logs. | `false` +`logLevel` | Sets the log level (INFO, DEBUG, or ERROR) | `INFO` `enablePrometheusServer` | If true, start an http server exposing `/metrics` endpoint for prometheus. | `false` `prometheusServerPort` | Replaces the default HTTP port for exposing prometheus metrics. | `9092` `podMonitor.create` | if `true`, create a PodMonitor | `false` diff --git a/config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml b/config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml index 6c2de471..1b3b08f3 100644 --- a/config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml +++ b/config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml @@ -156,6 +156,8 @@ spec: value: {{ .Values.taintNode | quote }} - name: JSON_LOGGING value: {{ .Values.jsonLogging | quote }} + - name: LOG_LEVEL + value: {{ .Values.logLevel | quote }} - name: WEBHOOK_PROXY value: {{ .Values.webhookProxy | quote }} - name: UPTIME_FROM_FILE diff --git a/config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml b/config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml index 20dd4175..5f3d71dd 100644 --- a/config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml +++ b/config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml @@ -130,6 +130,8 @@ spec: value: {{ .Values.taintNode | quote }} - name: JSON_LOGGING value: {{ .Values.jsonLogging | quote }} + - name: LOG_LEVEL + value: {{ .Values.logLevel | quote }} - name: WEBHOOK_PROXY value: {{ .Values.webhookProxy | quote }} - name: UPTIME_FROM_FILE diff --git a/config/helm/aws-node-termination-handler/templates/deployment.yaml b/config/helm/aws-node-termination-handler/templates/deployment.yaml index e1f94f91..d6b3e854 100644 --- a/config/helm/aws-node-termination-handler/templates/deployment.yaml +++ b/config/helm/aws-node-termination-handler/templates/deployment.yaml @@ -112,6 +112,8 @@ spec: value: {{ .Values.taintNode | quote }} - name: JSON_LOGGING value: {{ .Values.jsonLogging | quote }} + - name: LOG_LEVEL + value: {{ .Values.logLevel | quote }} - name: WEBHOOK_PROXY value: {{ .Values.webhookProxy | quote }} - name: ENABLE_PROMETHEUS_SERVER diff --git a/config/helm/aws-node-termination-handler/values.yaml b/config/helm/aws-node-termination-handler/values.yaml index fc6313e8..8dad5342 100644 --- a/config/helm/aws-node-termination-handler/values.yaml +++ b/config/helm/aws-node-termination-handler/values.yaml @@ -76,6 +76,9 @@ taintNode: false # Log messages in JSON format. jsonLogging: false +# Sets the log level +logLevel: "info" + # dryRun tells node-termination-handler to only log calls to kubernetes control plane dryRun: false