From fe2c34c4512c0f87a314f989f9ce5439d55491ce Mon Sep 17 00:00:00 2001 From: daboucha Date: Thu, 13 Jun 2024 13:47:07 +0200 Subject: [PATCH 1/2] feat(logLevel): add option to the chart to set the log level --- deployments/kubernetes/chart/reloader/Chart.yaml | 4 ++-- .../chart/reloader/templates/deployment.yaml | 11 +++++++---- deployments/kubernetes/chart/reloader/values.yaml | 9 ++++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/deployments/kubernetes/chart/reloader/Chart.yaml b/deployments/kubernetes/chart/reloader/Chart.yaml index 53429f3f3..92eeae0d3 100644 --- a/deployments/kubernetes/chart/reloader/Chart.yaml +++ b/deployments/kubernetes/chart/reloader/Chart.yaml @@ -3,8 +3,8 @@ apiVersion: v1 name: reloader description: Reloader chart that runs on kubernetes -version: 1.0.107 -appVersion: v1.0.107 +version: 1.0.108 +appVersion: v1.0.108 keywords: - Reloader - kubernetes diff --git a/deployments/kubernetes/chart/reloader/templates/deployment.yaml b/deployments/kubernetes/chart/reloader/templates/deployment.yaml index 6d38fd355..057e3fc45 100644 --- a/deployments/kubernetes/chart/reloader/templates/deployment.yaml +++ b/deployments/kubernetes/chart/reloader/templates/deployment.yaml @@ -171,11 +171,14 @@ spec: {{- . | toYaml | nindent 10 }} {{- end }} {{- end }} - {{- if or (.Values.reloader.logFormat) (.Values.reloader.ignoreSecrets) (.Values.reloader.ignoreNamespaces) (.Values.reloader.namespaceSelector) (.Values.reloader.resourceLabelSelector) (.Values.reloader.ignoreConfigMaps) (.Values.reloader.custom_annotations) (eq .Values.reloader.isArgoRollouts true) (eq .Values.reloader.reloadOnCreate true) (ne .Values.reloader.reloadStrategy "default") (.Values.reloader.enableHA) (.Values.reloader.autoReloadAll)}} + {{- if or (.Values.reloader.logFormat) (.Values.reloader.LogLevel) (.Values.reloader.ignoreSecrets) (.Values.reloader.ignoreNamespaces) (.Values.reloader.namespaceSelector) (.Values.reloader.resourceLabelSelector) (.Values.reloader.ignoreConfigMaps) (.Values.reloader.custom_annotations) (eq .Values.reloader.isArgoRollouts true) (eq .Values.reloader.reloadOnCreate true) (ne .Values.reloader.reloadStrategy "default") (.Values.reloader.enableHA) (.Values.reloader.autoReloadAll)}} args: {{- if .Values.reloader.logFormat }} - "--log-format={{ .Values.reloader.logFormat }}" {{- end }} + {{- if .Values.reloader.LogLevel }} + - "--log-format={{ .Values.reloader.LogLevel }}" + {{- end }} {{- if .Values.reloader.ignoreSecrets }} - "--resources-to-ignore=secrets" {{- end }} @@ -187,10 +190,10 @@ spec: {{- end }} {{- if .Values.reloader.namespaceSelector }} - "--namespace-selector={{ .Values.reloader.namespaceSelector }}" - {{- end }} + {{- end }} {{- if .Values.reloader.resourceLabelSelector }} - "--resource-label-selector={{ .Values.reloader.resourceLabelSelector }}" - {{- end }} + {{- end }} {{- if .Values.reloader.custom_annotations }} {{- if .Values.reloader.custom_annotations.configmap }} - "--configmap-annotation" @@ -211,7 +214,7 @@ spec: {{- if .Values.reloader.custom_annotations.configmap_auto }} - "--configmap-auto-annotation" - "{{ .Values.reloader.custom_annotations.configmap_auto }}" - {{- end }} + {{- end }} {{- if .Values.reloader.custom_annotations.search }} - "--auto-search-annotation" - "{{ .Values.reloader.custom_annotations.search }}" diff --git a/deployments/kubernetes/chart/reloader/values.yaml b/deployments/kubernetes/chart/reloader/values.yaml index eed307c40..157a8179a 100644 --- a/deployments/kubernetes/chart/reloader/values.yaml +++ b/deployments/kubernetes/chart/reloader/values.yaml @@ -23,7 +23,8 @@ reloader: ignoreNamespaces: "" # Comma separated list of namespaces to ignore namespaceSelector: "" # Comma separated list of k8s label selectors for namespaces selection resourceLabelSelector: "" # Comma separated list of k8s label selectors for configmap/secret selection - logFormat: "" #json + logFormat: "" # json + logLevel: info # Log level to use (trace, debug, info, warning, error, fatal and panic) watchGlobally: true # Set to true to enable leadership election allowing you to run multiple replicas enableHA: false @@ -58,7 +59,8 @@ reloader: seccompProfile: type: RuntimeDefault - containerSecurityContext: {} + containerSecurityContext: + {} # capabilities: # drop: # - ALL @@ -144,7 +146,8 @@ reloader: # imagePullSecrets: # - name: myregistrykey - service: {} + service: + {} # labels: {} # annotations: {} # port: 9090 From 9b21bf36b669f5d12a31dcf25e7ad2d681bd5fa7 Mon Sep 17 00:00:00 2001 From: daboucha Date: Thu, 13 Jun 2024 13:50:37 +0200 Subject: [PATCH 2/2] fix(logLevel): typo --- .../kubernetes/chart/reloader/templates/deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployments/kubernetes/chart/reloader/templates/deployment.yaml b/deployments/kubernetes/chart/reloader/templates/deployment.yaml index 057e3fc45..bb13ccbcb 100644 --- a/deployments/kubernetes/chart/reloader/templates/deployment.yaml +++ b/deployments/kubernetes/chart/reloader/templates/deployment.yaml @@ -171,13 +171,13 @@ spec: {{- . | toYaml | nindent 10 }} {{- end }} {{- end }} - {{- if or (.Values.reloader.logFormat) (.Values.reloader.LogLevel) (.Values.reloader.ignoreSecrets) (.Values.reloader.ignoreNamespaces) (.Values.reloader.namespaceSelector) (.Values.reloader.resourceLabelSelector) (.Values.reloader.ignoreConfigMaps) (.Values.reloader.custom_annotations) (eq .Values.reloader.isArgoRollouts true) (eq .Values.reloader.reloadOnCreate true) (ne .Values.reloader.reloadStrategy "default") (.Values.reloader.enableHA) (.Values.reloader.autoReloadAll)}} + {{- if or (.Values.reloader.logFormat) (.Values.reloader.logLevel) (.Values.reloader.ignoreSecrets) (.Values.reloader.ignoreNamespaces) (.Values.reloader.namespaceSelector) (.Values.reloader.resourceLabelSelector) (.Values.reloader.ignoreConfigMaps) (.Values.reloader.custom_annotations) (eq .Values.reloader.isArgoRollouts true) (eq .Values.reloader.reloadOnCreate true) (ne .Values.reloader.reloadStrategy "default") (.Values.reloader.enableHA) (.Values.reloader.autoReloadAll)}} args: {{- if .Values.reloader.logFormat }} - "--log-format={{ .Values.reloader.logFormat }}" {{- end }} - {{- if .Values.reloader.LogLevel }} - - "--log-format={{ .Values.reloader.LogLevel }}" + {{- if .Values.reloader.logLevel }} + - "--log-level={{ .Values.reloader.logLevel }}" {{- end }} {{- if .Values.reloader.ignoreSecrets }} - "--resources-to-ignore=secrets"