From ca42c6dca900fb86f3ecc4f208987582ebddda9e Mon Sep 17 00:00:00 2001 From: tanujd11 Date: Tue, 10 Jan 2023 12:17:33 +0530 Subject: [PATCH] Removed go-logr Signed-off-by: tanujd11 --- controllers/helmrelease_controller.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/controllers/helmrelease_controller.go b/controllers/helmrelease_controller.go index 2df70de31..04c3d8739 100644 --- a/controllers/helmrelease_controller.go +++ b/controllers/helmrelease_controller.go @@ -23,7 +23,6 @@ import ( "strings" "time" - "github.com/go-logr/logr" "github.com/hashicorp/go-retryablehttp" "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/chartutil" @@ -544,7 +543,7 @@ func (r *HelmReleaseReconciler) composeValues(ctx context.Context, hr v2.HelmRel } if data, ok := resource.Data[v.GetValuesKey()]; !ok { if v.Optional { - (logr.FromContext(ctx)).Info(fmt.Sprintf("could not find optional key %s in %s '%s'", v.GetValuesKey(), v.Kind, namespacedName)) + (ctrl.LoggerFrom(ctx)).Info(fmt.Sprintf("could not find optional key %s in %s '%s'", v.GetValuesKey(), v.Kind, namespacedName)) continue } return nil, fmt.Errorf("missing key '%s' in %s '%s'", v.GetValuesKey(), v.Kind, namespacedName) @@ -581,7 +580,7 @@ func (r *HelmReleaseReconciler) composeValues(ctx context.Context, hr v2.HelmRel } if data, ok := resource.Data[v.GetValuesKey()]; !ok { if v.Optional { - (logr.FromContext(ctx)).Info(fmt.Sprintf("could not find optional key %s in %s '%s'", v.GetValuesKey(), v.Kind, namespacedName)) + (ctrl.LoggerFrom(ctx)).Info(fmt.Sprintf("could not find optional key %s in %s '%s'", v.GetValuesKey(), v.Kind, namespacedName)) continue } return nil, fmt.Errorf("missing key '%s' in %s '%s'", v.GetValuesKey(), v.Kind, namespacedName)