Skip to content

Commit

Permalink
[logs] Added ability to set module logging level (#8)
Browse files Browse the repository at this point in the history
Signed-off-by: v.oleynikov <[email protected]>
  • Loading branch information
duckhawk authored Jan 11, 2024
1 parent 7724917 commit 323a512
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
10 changes: 10 additions & 0 deletions openapi/config-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ properties:
type: boolean
default: false
description: Disable sds-node-configurator daemonset
logLevel:
type: string
enum:
- ERROR
- WARN
- INFO
- DEBUG
- TRACE
description: Module log level
default: INFO
2 changes: 2 additions & 0 deletions openapi/doc-ru-config-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ type: object
properties:
disableDs:
description: Выключить sds-node-configurator daemonset
logLevel:
description: Уровень логирования для приложений модуля
12 changes: 11 additions & 1 deletion templates/agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@ spec:
fieldRef:
fieldPath: spec.nodeName
- name: LOG_LEVEL
value: "2" # 2-INFO, 3-DEBUG, 4-TRACE
{{- if eq .Values.sdsNodeConfigurator.logLevel "ERROR" }}
value: "0"
{{- else if eq .Values.sdsNodeConfigurator.logLevel "WARN" }}
value: "1"
{{- else if eq .Values.sdsNodeConfigurator.logLevel "INFO" }}
value: "2"
{{- else if eq .Values.sdsNodeConfigurator.logLevel "DEBUG" }}
value: "3"
{{- else if eq .Values.sdsNodeConfigurator.logLevel "TRACE" }}
value: "4"
{{- end }}
volumeMounts:
- mountPath: /dev/
name: host-device-dir
Expand Down

0 comments on commit 323a512

Please sign in to comment.