From c5870dd6f8a432e0302a2f142ad5524166fa78a2 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Wed, 8 Feb 2023 11:10:37 +0600 Subject: [PATCH 01/10] feat: defined loglevel in the helm values (#724) Signed-off-by: Sudipto Baral --- helm/chart/values.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/helm/chart/values.yaml b/helm/chart/values.yaml index c25a3e3412..537a8f98f7 100644 --- a/helm/chart/values.yaml +++ b/helm/chart/values.yaml @@ -6,3 +6,24 @@ otelCollector: deployment: ## @param deployment.imagePullPolicy Sets the image pull policy for kubernetes deployment imagePullPolicy: Always + +## @section Controller Log level +operator: + commonController: + logLevel: 10 + keptnappController: + logLevel: 10 + keptnappversionController: + logLevel: 10 + keptnevaluationController: + logLevel: 10 + keptntaskController: + logLevel: 10 + keptntaskdefinitionController: + logLevel: 10 + keptnworkloadController: + logLevel: 10 + metricsController: + logLevel: 10 + optionsController: + logLevel: 10 From 91396e4c0cc47e871d5d97ca107161126129c354 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Wed, 15 Feb 2023 08:45:14 +0600 Subject: [PATCH 02/10] feat: set default loglevel in the helm values to -1(#724) Signed-off-by: Sudipto Baral --- helm/chart/values.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/helm/chart/values.yaml b/helm/chart/values.yaml index 537a8f98f7..f089c9e8f4 100644 --- a/helm/chart/values.yaml +++ b/helm/chart/values.yaml @@ -10,20 +10,20 @@ deployment: ## @section Controller Log level operator: commonController: - logLevel: 10 + logLevel: -1 keptnappController: - logLevel: 10 + logLevel: -1 keptnappversionController: - logLevel: 10 + logLevel: -1 keptnevaluationController: - logLevel: 10 + logLevel: -1 keptntaskController: - logLevel: 10 + logLevel: -1 keptntaskdefinitionController: - logLevel: 10 + logLevel: -1 keptnworkloadController: - logLevel: 10 + logLevel: -1 metricsController: - logLevel: 10 + logLevel: -1 optionsController: - logLevel: 10 + logLevel: -1 From 641d2fa8ace374574d7b1745837904058404a574 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Wed, 15 Feb 2023 08:55:23 +0600 Subject: [PATCH 03/10] feat: added log level env vars in the helm overlay (#724) Signed-off-by: Sudipto Baral --- helm/overlay/patches/patch_deployment.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/helm/overlay/patches/patch_deployment.yaml b/helm/overlay/patches/patch_deployment.yaml index adab1ab431..e082d00244 100644 --- a/helm/overlay/patches/patch_deployment.yaml +++ b/helm/overlay/patches/patch_deployment.yaml @@ -12,6 +12,24 @@ spec: env: - name: OTEL_COLLECTOR_URL value: "{{ .Values.otelCollector.url }}" + - name: COMMON_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.commonController.logLevel }}" + - name: KEPTNAPP_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.keptnappController.logLevel }}" + - name: KEPTNAPPVERSION_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.keptnappversionController.logLevel }}" + - name: KEPTNEVALUATION_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.keptnevaluationController.logLevel }}" + - name: KEPTNTASK_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.keptntaskController.logLevel }}" + - name: KEPTNTASKDEFINITION_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.keptntaskdefinitionController.logLevel }}" + - name: KEPTNWORKLOAD_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.keptnworkloadController.logLevel }}" + - name: METRICS_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.metricsController.logLevel }}" + - name: OPTIONS_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.optionsController.logLevel }}" From 912f26fbe100ed6a7dd71f843f83d684c72fe862 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Wed, 15 Feb 2023 16:44:59 +0600 Subject: [PATCH 04/10] feat: set default loglevel in the helm values to 0, added workloadinstance controller log level(#724) Signed-off-by: Sudipto Baral --- helm/chart/values.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/helm/chart/values.yaml b/helm/chart/values.yaml index f089c9e8f4..507275919b 100644 --- a/helm/chart/values.yaml +++ b/helm/chart/values.yaml @@ -9,21 +9,21 @@ deployment: ## @section Controller Log level operator: - commonController: - logLevel: -1 keptnappController: - logLevel: -1 + logLevel: 0 keptnappversionController: - logLevel: -1 + logLevel: 0 keptnevaluationController: - logLevel: -1 + logLevel: 0 keptntaskController: - logLevel: -1 + logLevel: 0 keptntaskdefinitionController: - logLevel: -1 + logLevel: 0 keptnworkloadController: - logLevel: -1 + logLevel: 0 + keptnworkloadinstanceController: + logLevel: 0 metricsController: - logLevel: -1 + logLevel: 0 optionsController: - logLevel: -1 + logLevel: 0 From 9aaf2372b8aea6253fa8e2b166a8acaa626a7ee8 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Wed, 15 Feb 2023 16:53:13 +0600 Subject: [PATCH 05/10] feat: log level variables added in the helm overlay(#724) Signed-off-by: Sudipto Baral --- helm/overlay/patches/patch_deployment.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/helm/overlay/patches/patch_deployment.yaml b/helm/overlay/patches/patch_deployment.yaml index e082d00244..fb7140d5fd 100644 --- a/helm/overlay/patches/patch_deployment.yaml +++ b/helm/overlay/patches/patch_deployment.yaml @@ -12,20 +12,20 @@ spec: env: - name: OTEL_COLLECTOR_URL value: "{{ .Values.otelCollector.url }}" - - name: COMMON_CONTROLLER_LOG_LEVEL - value: "{{ .Values.operator.commonController.logLevel }}" - - name: KEPTNAPP_CONTROLLER_LOG_LEVEL + - name: KEPTN_APP_CONTROLLER_LOG_LEVEL value: "{{ .Values.operator.keptnappController.logLevel }}" - - name: KEPTNAPPVERSION_CONTROLLER_LOG_LEVEL + - name: KEPTN_APP_VERSION_CONTROLLER_LOG_LEVEL value: "{{ .Values.operator.keptnappversionController.logLevel }}" - - name: KEPTNEVALUATION_CONTROLLER_LOG_LEVEL + - name: KEPTN_EVALUATION_CONTROLLER_LOG_LEVEL value: "{{ .Values.operator.keptnevaluationController.logLevel }}" - - name: KEPTNTASK_CONTROLLER_LOG_LEVEL + - name: KEPTN_TASK_CONTROLLER_LOG_LEVEL value: "{{ .Values.operator.keptntaskController.logLevel }}" - - name: KEPTNTASKDEFINITION_CONTROLLER_LOG_LEVEL + - name: KEPTN_TASK_DEFINITION_CONTROLLER_LOG_LEVEL value: "{{ .Values.operator.keptntaskdefinitionController.logLevel }}" - - name: KEPTNWORKLOAD_CONTROLLER_LOG_LEVEL + - name: KEPTN_WORKLOAD_CONTROLLER_LOG_LEVEL value: "{{ .Values.operator.keptnworkloadController.logLevel }}" + - name: KEPTN_WORKLOAD_INSTANCE_CONTROLLER_LOG_LEVEL + value: "{{ .Values.operator.keptnworkloadinstanceController.logLevel }}" - name: METRICS_CONTROLLER_LOG_LEVEL value: "{{ .Values.operator.metricsController.logLevel }}" - name: OPTIONS_CONTROLLER_LOG_LEVEL From 2b37155d440a81ba0db18c2aa1d2d8d140fe964d Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Thu, 16 Feb 2023 00:05:58 +0600 Subject: [PATCH 06/10] feat(operator): patch loglevel of each controller (#724) Signed-off-by: Sudipto Baral --- operator/main.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/operator/main.go b/operator/main.go index 67e94abc14..54a06fd54c 100644 --- a/operator/main.go +++ b/operator/main.go @@ -80,6 +80,16 @@ type envConfig struct { PodNamespace string `envconfig:"POD_NAMESPACE" default:""` PodName string `envconfig:"POD_NAME" default:""` ExposeKeptnMetrics bool `envconfig:"EXPOSE_KEPTN_METRICS" default:"true"` + + KeptnAppControllerLogLevel int `envconfig:"KEPTN_APP_CONTROLLER_LOG_LEVEL" default:"0"` + KeptnAppVersionControllerLogLevel int `envconfig:"KEPTN_APP_VERSION_CONTROLLER_LOG_LEVEL" default:"0"` + KeptnEvaluationControllerLogLevel int `envconfig:"KEPTN_EVALUATION_CONTROLLER_LOG_LEVEL" default:"0"` + KeptnTaskControllerLogLevel int `envconfig:"KEPTN_TASK_CONTROLLER_LOG_LEVEL" default:"0"` + KeptnTaskDefinitionControllerLogLevel int `envconfig:"KEPTN_TASK_DEFINITION_CONTROLLER_LOG_LEVEL" default:"0"` + KeptnWorkloadControllerLogLevel int `envconfig:"KEPTN_WORKLOAD_CONTROLLER_LOG_LEVEL" default:"0"` + KeptnWorkloadInstanceControllerLogLevel int `envconfig:"KEPTN_WORKLOAD_INSTANCE_CONTROLLER_LOG_LEVEL" default:"0"` + KeptnMetricControllerLogLevel int `envconfig:"METRICS_CONTROLLER_LOG_LEVEL" default:"0"` + KptnOptionsControllerLogLevel int `envconfig:"OPTIONS_CONTROLLER_LOG_LEVEL" default:"0"` } //nolint:funlen,gocognit,gocyclo @@ -126,7 +136,6 @@ func main() { opts.BindFlags(flag.CommandLine) ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) - disableCacheFor := []ctrlclient.Object{&corev1.Secret{}} mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ @@ -175,6 +184,7 @@ func main() { Meters: keptnMeters, TracerFactory: controllercommon.GetOtelInstance(), } + taskReconciler.Log.V(env.KeptnTaskControllerLogLevel) if err = (taskReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnTask") os.Exit(1) @@ -186,6 +196,7 @@ func main() { Log: ctrl.Log.WithName("KeptnTaskDefinition Controller"), Recorder: mgr.GetEventRecorderFor("keptntaskdefinition-controller"), } + taskDefinitionReconciler.Log.V(env.KeptnTaskDefinitionControllerLogLevel) if err = (taskDefinitionReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnTaskDefinition") os.Exit(1) @@ -198,6 +209,7 @@ func main() { Recorder: mgr.GetEventRecorderFor("keptnapp-controller"), TracerFactory: controllercommon.GetOtelInstance(), } + appReconciler.Log.V(env.KeptnAppControllerLogLevel) if err = (appReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnApp") os.Exit(1) @@ -210,6 +222,7 @@ func main() { Recorder: mgr.GetEventRecorderFor("keptnworkload-controller"), TracerFactory: controllercommon.GetOtelInstance(), } + workloadReconciler.Log.V(env.KeptnWorkloadControllerLogLevel) if err = (workloadReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnWorkload") os.Exit(1) @@ -224,6 +237,7 @@ func main() { TracerFactory: controllercommon.GetOtelInstance(), SpanHandler: spanHandler, } + workloadInstanceReconciler.Log.V(env.KeptnWorkloadInstanceControllerLogLevel) if err = (workloadInstanceReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnWorkloadInstance") os.Exit(1) @@ -238,6 +252,7 @@ func main() { Meters: keptnMeters, SpanHandler: spanHandler, } + appVersionReconciler.Log.V(env.KeptnAppVersionControllerLogLevel) if err = (appVersionReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnAppVersion") os.Exit(1) @@ -252,6 +267,7 @@ func main() { Meters: keptnMeters, Namespace: env.PodNamespace, } + evaluationReconciler.Log.V(env.KeptnEvaluationControllerLogLevel) if err = (evaluationReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnEvaluation") os.Exit(1) @@ -262,6 +278,7 @@ func main() { Scheme: mgr.GetScheme(), Log: ctrl.Log.WithName("KeptnMetric Controller"), } + metricsReconciler.Log.V(env.KeptnMetricControllerLogLevel) if err = (metricsReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnMetric") os.Exit(1) @@ -272,6 +289,7 @@ func main() { Scheme: mgr.GetScheme(), Log: ctrl.Log.WithName("KeptnConfig Controller"), } + configReconciler.Log.V(env.KptnOptionsControllerLogLevel) if err = (configReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnConfig") os.Exit(1) From 48f9430a417bc539baaba8f25b0c99ba01e0af8b Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Thu, 16 Feb 2023 00:24:24 +0600 Subject: [PATCH 07/10] feat(operator): added annotation for helm docs (#724) Signed-off-by: Sudipto Baral --- helm/chart/values.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helm/chart/values.yaml b/helm/chart/values.yaml index 507275919b..f868b3e197 100644 --- a/helm/chart/values.yaml +++ b/helm/chart/values.yaml @@ -10,20 +10,29 @@ deployment: ## @section Controller Log level operator: keptnappController: + ## @param operator.keptnappController.logLevel Sets the log level of Keptn App Controller logLevel: 0 keptnappversionController: + ## @param operator.keptnappversionController.logLevel Sets the log level of Keptn Version Controller logLevel: 0 keptnevaluationController: + ## @param operator.keptnevaluationController.logLevel Sets the log level of Keptn Evaluation Controller logLevel: 0 keptntaskController: + ## @param operator.keptntaskController.logLevel Sets the log level of Keptn Task Controller logLevel: 0 keptntaskdefinitionController: + ## @param operator.keptntaskdefinitionController.logLevel Sets the log level of Keptn Task Defintion Controller logLevel: 0 keptnworkloadController: + ## @param operator.keptnworkloadController.logLevel Sets the log level of Keptn Workload Controller logLevel: 0 keptnworkloadinstanceController: + ## @param operator.keptnworkloadinstanceController.logLevel Sets the log level of Keptn Workload Instance Controller logLevel: 0 metricsController: + ## @param operator.metricsController.logLevel Sets the log level of Keptn Metrics Controller logLevel: 0 optionsController: + ## @param operator.optionsController.logLevel Sets the log level of Keptn Options Controller logLevel: 0 From dbcdcb805b38ffd8a74c7c623893deb0a3d6713c Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Thu, 16 Feb 2023 00:24:48 +0600 Subject: [PATCH 08/10] feat(operator): generated helm docs (#724) Signed-off-by: Sudipto Baral --- helm/chart/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/helm/chart/README.md b/helm/chart/README.md index fe5c23dabf..e770765734 100644 --- a/helm/chart/README.md +++ b/helm/chart/README.md @@ -14,4 +14,19 @@ checks | `deployment.imagePullPolicy` | Sets the image pull policy for kubernetes deployment | `Always` | +### Controller Log level + +| Name | Description | Value | +| --------------------------------------------------- | -------------------------------------------------------- | ----- | +| `operator.keptnappController.logLevel` | Sets the log level of Keptn App Controller | `0` | +| `operator.keptnappversionController.logLevel` | Sets the log level of Keptn Version Controller | `0` | +| `operator.keptnevaluationController.logLevel` | Sets the log level of Keptn Evaluation Controller | `0` | +| `operator.keptntaskController.logLevel` | Sets the log level of Keptn Task Controller | `0` | +| `operator.keptntaskdefinitionController.logLevel` | Sets the log level of Keptn Task Defintion Controller | `0` | +| `operator.keptnworkloadController.logLevel` | Sets the log level of Keptn Workload Controller | `0` | +| `operator.keptnworkloadinstanceController.logLevel` | Sets the log level of Keptn Workload Instance Controller | `0` | +| `operator.metricsController.logLevel` | Sets the log level of Keptn Metrics Controller | `0` | +| `operator.optionsController.logLevel` | Sets the log level of Keptn Options Controller | `0` | + + From a494d867266521ea1f35a2fea7c2c8f0d15b658d Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Thu, 16 Feb 2023 16:36:04 +0600 Subject: [PATCH 09/10] feat(operator): updated log level for each controller (#724) Signed-off-by: Sudipto Baral --- operator/main.go | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/operator/main.go b/operator/main.go index 54a06fd54c..2eb62ebe2c 100644 --- a/operator/main.go +++ b/operator/main.go @@ -136,6 +136,7 @@ func main() { opts.BindFlags(flag.CommandLine) ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) + disableCacheFor := []ctrlclient.Object{&corev1.Secret{}} mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ @@ -176,120 +177,120 @@ func main() { spanHandler := &controllercommon.SpanHandler{} + taskLogger := ctrl.Log.WithName("KeptnTask Controller") taskReconciler := &keptntask.KeptnTaskReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnTask Controller"), + Log: taskLogger.V(env.KeptnTaskControllerLogLevel), Recorder: mgr.GetEventRecorderFor("keptntask-controller"), Meters: keptnMeters, TracerFactory: controllercommon.GetOtelInstance(), } - taskReconciler.Log.V(env.KeptnTaskControllerLogLevel) if err = (taskReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnTask") os.Exit(1) } + taskDefinitionLogger := ctrl.Log.WithName("KeptnTaskDefinition Controller") taskDefinitionReconciler := &keptntaskdefinition.KeptnTaskDefinitionReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnTaskDefinition Controller"), + Log: taskDefinitionLogger.V(env.KeptnTaskDefinitionControllerLogLevel), Recorder: mgr.GetEventRecorderFor("keptntaskdefinition-controller"), } - taskDefinitionReconciler.Log.V(env.KeptnTaskDefinitionControllerLogLevel) if err = (taskDefinitionReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnTaskDefinition") os.Exit(1) } + appLogger := ctrl.Log.WithName("KeptnApp Controller") appReconciler := &keptnapp.KeptnAppReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnApp Controller"), + Log: appLogger.V(env.KeptnAppControllerLogLevel), Recorder: mgr.GetEventRecorderFor("keptnapp-controller"), TracerFactory: controllercommon.GetOtelInstance(), } - appReconciler.Log.V(env.KeptnAppControllerLogLevel) if err = (appReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnApp") os.Exit(1) } + workloadLogger := ctrl.Log.WithName("KeptnWorkload Controller") workloadReconciler := &keptnworkload.KeptnWorkloadReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnWorkload Controller"), + Log: workloadLogger.V(env.KeptnWorkloadControllerLogLevel), Recorder: mgr.GetEventRecorderFor("keptnworkload-controller"), TracerFactory: controllercommon.GetOtelInstance(), } - workloadReconciler.Log.V(env.KeptnWorkloadControllerLogLevel) if err = (workloadReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnWorkload") os.Exit(1) } + workloadInstanceLogger := ctrl.Log.WithName("KeptnWorkloadInstance Controller") workloadInstanceReconciler := &keptnworkloadinstance.KeptnWorkloadInstanceReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnWorkloadInstance Controller"), + Log: workloadInstanceLogger.V(env.KeptnWorkloadInstanceControllerLogLevel), Recorder: mgr.GetEventRecorderFor("keptnworkloadinstance-controller"), Meters: keptnMeters, TracerFactory: controllercommon.GetOtelInstance(), SpanHandler: spanHandler, } - workloadInstanceReconciler.Log.V(env.KeptnWorkloadInstanceControllerLogLevel) if err = (workloadInstanceReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnWorkloadInstance") os.Exit(1) } + appVersionLogger := ctrl.Log.WithName("KeptnAppVersion Controller") appVersionReconciler := &keptnappversion.KeptnAppVersionReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnAppVersion Controller"), + Log: appVersionLogger.V(env.KeptnAppVersionControllerLogLevel), Recorder: mgr.GetEventRecorderFor("keptnappversion-controller"), TracerFactory: controllercommon.GetOtelInstance(), Meters: keptnMeters, SpanHandler: spanHandler, } - appVersionReconciler.Log.V(env.KeptnAppVersionControllerLogLevel) if err = (appVersionReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnAppVersion") os.Exit(1) } + evaluationLogger := ctrl.Log.WithName("KeptnEvaluation Controller") evaluationReconciler := &keptnevaluation.KeptnEvaluationReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnEvaluation Controller"), + Log: evaluationLogger.V(env.KeptnEvaluationControllerLogLevel), Recorder: mgr.GetEventRecorderFor("keptnevaluation-controller"), TracerFactory: controllercommon.GetOtelInstance(), Meters: keptnMeters, Namespace: env.PodNamespace, } - evaluationReconciler.Log.V(env.KeptnEvaluationControllerLogLevel) if err = (evaluationReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnEvaluation") os.Exit(1) } + metricsLogger := ctrl.Log.WithName("KeptnMetric Controller") metricsReconciler := &keptnmetric.KeptnMetricReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnMetric Controller"), + Log: metricsLogger.V(env.KeptnMetricControllerLogLevel), } - metricsReconciler.Log.V(env.KeptnMetricControllerLogLevel) if err = (metricsReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnMetric") os.Exit(1) } + configLogger := ctrl.Log.WithName("KeptnConfig Controller") configReconciler := &controlleroptions.KeptnConfigReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnConfig Controller"), + Log: configLogger.V(env.KptnOptionsControllerLogLevel), } - configReconciler.Log.V(env.KptnOptionsControllerLogLevel) if err = (configReconciler).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "KeptnConfig") os.Exit(1) From 1c4108015aece687d97af8a8dbee42fe0c9bd57f Mon Sep 17 00:00:00 2001 From: Giovanni Liva Date: Wed, 22 Feb 2023 10:40:28 +0100 Subject: [PATCH 10/10] fix helm docs Signed-off-by: Giovanni Liva --- helm/chart/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/helm/chart/README.md b/helm/chart/README.md index eeb2094cae..924471c533 100644 --- a/helm/chart/README.md +++ b/helm/chart/README.md @@ -6,18 +6,6 @@ checks ## Parameters -### OpenTelemetry - -| Name | Description | Value | -| ------------------- | --------------------------------------------- | --------------------- | -| `otelCollector.url` | Sets the URL for the open telemetry collector | `otel-collector:4317` | - -### General - -| Name | Description | Value | -| ---------------------------- | ---------------------------------------------------- | -------- | -| `deployment.imagePullPolicy` | Sets the image pull policy for kubernetes deployment | `Always` | - ### Controller Log level | Name | Description | Value | @@ -32,6 +20,18 @@ checks | `operator.metricsController.logLevel` | Sets the log level of Keptn Metrics Controller | `0` | | `operator.optionsController.logLevel` | Sets the log level of Keptn Options Controller | `0` | +### OpenTelemetry + +| Name | Description | Value | +| ------------------- | --------------------------------------------- | --------------------- | +| `otelCollector.url` | Sets the URL for the open telemetry collector | `otel-collector:4317` | + +### General + +| Name | Description | Value | +| ---------------------------- | ---------------------------------------------------- | -------- | +| `deployment.imagePullPolicy` | Sets the image pull policy for kubernetes deployment | `Always` | + ## Other info