diff --git a/.golangci.yaml b/.golangci.yaml index bd1c2930d..ee41d5b14 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -10,7 +10,6 @@ issues: - tenv - exhaustive - nilerr - - loggercheck - forbidigo - interfacebloat - predeclared diff --git a/cmd/cainjector/app/controller.go b/cmd/cainjector/app/controller.go index 9842032cc..c2b891db2 100644 --- a/cmd/cainjector/app/controller.go +++ b/cmd/cainjector/app/controller.go @@ -173,7 +173,7 @@ func Run(opts *config.CAInjectorConfiguration, ctx context.Context) error { err = cainjector.RegisterAllInjectors(ctx, mgr, setupOptions) if err != nil { - log.Error(err, "failed to register controllers", err) + log.Error(err, "failed to register controllers") return err } diff --git a/pkg/controller/acmeorders/sync.go b/pkg/controller/acmeorders/sync.go index 2f323b88a..46dd2f031 100644 --- a/pkg/controller/acmeorders/sync.go +++ b/pkg/controller/acmeorders/sync.go @@ -724,7 +724,9 @@ func getPreferredCertChain( if cert.Issuer.CommonName == preferredChain { // if the issuer's CN matched the preferred chain it means this bundle is // signed by the requested chain - log.V(logf.DebugLevel).WithValues("Issuer CN", cert.Issuer.CommonName).Info("Selecting preferred ACME bundle with a matching Common Name from %s", name) + log.V(logf.DebugLevel). + WithValues("Issuer CN", cert.Issuer.CommonName). + Info("Selecting preferred ACME bundle with a matching Common Name from chain", "chainName", name) return true, nil } diff --git a/pkg/issuer/acme/dns/azuredns/azuredns.go b/pkg/issuer/acme/dns/azuredns/azuredns.go index dce4caec6..eecee07a8 100644 --- a/pkg/issuer/acme/dns/azuredns/azuredns.go +++ b/pkg/issuer/acme/dns/azuredns/azuredns.go @@ -145,7 +145,7 @@ func (c *DNSProvider) Present(domain, fqdn, value string) error { func (c *DNSProvider) CleanUp(domain, fqdn, value string) error { z, err := c.getHostedZoneName(fqdn) if err != nil { - c.log.Error(err, "Error getting hosted zone name for:", fqdn) + c.log.Error(err, "Error getting hosted zone name for fqdn", "fqdn", fqdn) return err } diff --git a/pkg/issuer/acme/dns/clouddns/clouddns.go b/pkg/issuer/acme/dns/clouddns/clouddns.go index b124c4e06..9f5d24c04 100644 --- a/pkg/issuer/acme/dns/clouddns/clouddns.go +++ b/pkg/issuer/acme/dns/clouddns/clouddns.go @@ -265,7 +265,7 @@ func (c *DNSProvider) getHostedZone(domain string) (string, error) { } } - c.log.V(logf.DebugLevel).Info("No matching public GoogleCloud managed-zone for domain, falling back to a private managed-zone", authZone) + c.log.V(logf.DebugLevel).Info("No matching public GoogleCloud managed-zone for domain, falling back to a private managed-zone", "authZone", authZone) // fall back to first available zone, if none public return zones.ManagedZones[0].Name, nil }