diff --git a/CHANGELOG.md b/CHANGELOG.md index c7abc0e903..d0e6b24a5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -218,6 +218,7 @@ Nothing yet. [#5038](https://github.com/Kong/kubernetes-ingress-controller/pull/5038) [#5049](https://github.com/Kong/kubernetes-ingress-controller/pull/5049) [#5050](https://github.com/Kong/kubernetes-ingress-controller/pull/5050) + [#5065](https://github.com/Kong/kubernetes-ingress-controller/pull/5065) ### Added diff --git a/internal/dataplane/kong_client.go b/internal/dataplane/kong_client.go index 00c9d0524e..9c9732ed5f 100644 --- a/internal/dataplane/kong_client.go +++ b/internal/dataplane/kong_client.go @@ -182,7 +182,7 @@ func NewKongClient( func (c *KongClient) initializeControllerPodReference() { podNN, err := util.GetPodNN() if err != nil { - c.logger.Error(err, "failed to resolve controller's pod to attach the apply configuration events to") + c.logger.Error(err, "Failed to resolve controller's pod to attach the apply configuration events to") return } c.controllerPodReference = mo.Some(podNN) @@ -395,17 +395,17 @@ func (c *KongClient) Update(ctx context.Context) error { } } - c.logger.V(util.DebugLevel).Info("parsing kubernetes objects into data-plane configuration") + c.logger.V(util.DebugLevel).Info("Parsing kubernetes objects into data-plane configuration") parsingResult := c.kongConfigBuilder.BuildKongConfig() if failuresCount := len(parsingResult.TranslationFailures); failuresCount > 0 { c.prometheusMetrics.RecordTranslationFailure() c.prometheusMetrics.RecordTranslationBrokenResources(failuresCount) c.recordResourceFailureEvents(parsingResult.TranslationFailures, KongConfigurationTranslationFailedEventReason) - c.logger.V(util.DebugLevel).Info("translation failures occurred when building data-plane configuration", "count", failuresCount) + c.logger.V(util.DebugLevel).Info("Translation failures occurred when building data-plane configuration", "count", failuresCount) } else { c.prometheusMetrics.RecordTranslationSuccess() c.prometheusMetrics.RecordTranslationBrokenResources(0) - c.logger.V(util.DebugLevel).Info("successfully built data-plane configuration") + c.logger.V(util.DebugLevel).Info("Successfully built data-plane configuration") } shas, gatewaysSyncErr := c.sendOutToGatewayClients(ctx, parsingResult.KongState, c.kongConfig) @@ -428,7 +428,7 @@ func (c *KongClient) Update(ctx context.Context) error { if fallbackSyncErr != nil { return errors.Join(gatewaysSyncErr, fallbackSyncErr) } - c.logger.V(util.DebugLevel).Info("due to errors in the current config, the last valid config has been pushed to Gateways") + c.logger.V(util.DebugLevel).Info("Due to errors in the current config, the last valid config has been pushed to Gateways") } return gatewaysSyncErr } @@ -438,11 +438,11 @@ func (c *KongClient) Update(ctx context.Context) error { // if the configuration SHAs that have just been pushed are different than // what's been previously pushed. if !slices.Equal(shas, c.SHAs) { - c.logger.V(util.DebugLevel).Info("triggering report for configured Kubernetes objects", "count", + c.logger.V(util.DebugLevel).Info("Triggering report for configured Kubernetes objects", "count", len(parsingResult.ConfiguredKubernetesObjects)) c.triggerKubernetesObjectReport(parsingResult.ConfiguredKubernetesObjects, parsingResult.TranslationFailures) } else { - c.logger.V(util.DebugLevel).Info("no configuration change; resource status update not necessary, skipping") + c.logger.V(util.DebugLevel).Info("No configuration change; resource status update not necessary, skipping") } } return nil @@ -558,7 +558,7 @@ func (c *KongClient) sendToClient( if err != nil { if expired, ok := timedCtx.Deadline(); ok && time.Now().After(expired) { - logger.Error(nil, "exceeded Kong API timeout, consider increasing --proxy-timeout-seconds") + logger.Error(nil, "Exceeded Kong API timeout, consider increasing --proxy-timeout-seconds") } return "", fmt.Errorf("performing update for %s failed: %w", client.AdminAPIClient().BaseRootURL(), err) } @@ -620,9 +620,9 @@ func prepareSendDiagnosticFn( // later on but we're OK with this limitation of said API. select { case diagnosticConfig.Configs <- util.ConfigDump{Failed: failed, Config: *config}: - logger.V(util.DebugLevel).Info("shipping config to diagnostic server") + logger.V(util.DebugLevel).Info("Shipping config to diagnostic server") default: - logger.Error(nil, "config diagnostic buffer full, dropping diagnostic config") + logger.Error(nil, "Config diagnostic buffer full, dropping diagnostic config") } } } @@ -720,11 +720,11 @@ func (c *KongClient) recordApplyConfigurationEvents(err error, rootURL string) { func (c *KongClient) updateConfigStatus(ctx context.Context, configStatus clients.ConfigStatus) { if c.currentConfigStatus == configStatus { // No change in config status, nothing to do. - c.logger.V(util.DebugLevel).Info("no change in config status, not notifying") + c.logger.V(util.DebugLevel).Info("No change in config status, not notifying") return } - c.logger.V(util.DebugLevel).Info("config status changed, notifying", "configStatus", configStatus) + c.logger.V(util.DebugLevel).Info("Config status changed, notifying", "configStatus", configStatus) c.currentConfigStatus = configStatus c.configStatusNotifier.NotifyConfigStatus(ctx, configStatus) } diff --git a/internal/dataplane/kongstate/kongstate.go b/internal/dataplane/kongstate/kongstate.go index b59e1eb8b4..2e96b96db7 100644 --- a/internal/dataplane/kongstate/kongstate.go +++ b/internal/dataplane/kongstate/kongstate.go @@ -414,12 +414,12 @@ func globalKongClusterPlugins(logger logr.Logger, s store.Storer) ([]Plugin, err pluginName := k8sPlugin.PluginName // empty pluginName skip it if pluginName == "" { - logger.Error(nil, "invalid KongClusterPlugin: empty plugin property", + logger.Error(nil, "Invalid KongClusterPlugin: empty plugin property", "kongclusterplugin_name", k8sPlugin.Name) continue } if _, ok := res[pluginName]; ok { - logger.Error(nil, "multiple KongPlugin with 'global' label found, cannot apply", + logger.Error(nil, "Multiple KongPlugin with 'global' label found, cannot apply", "kongplugin_name", pluginName) duplicates = append(duplicates, pluginName) continue @@ -427,7 +427,7 @@ func globalKongClusterPlugins(logger logr.Logger, s store.Storer) ([]Plugin, err if plugin, err := kongPluginFromK8SClusterPlugin(s, k8sPlugin); err == nil { res[pluginName] = plugin } else { - logger.Error(err, "failed to generate configuration from KongClusterPlugin", + logger.Error(err, "Failed to generate configuration from KongClusterPlugin", "kongclusterplugin_name", k8sPlugin.Name) } } @@ -456,14 +456,14 @@ func (ks *KongState) FillPlugins( func (ks *KongState) FillIDs(logger logr.Logger) { for svcIndex, svc := range ks.Services { if err := svc.FillID(); err != nil { - logger.Error(err, "failed to fill ID for service", "service_name", *svc.Name) + logger.Error(err, "Failed to fill ID for service", "service_name", *svc.Name) } else { ks.Services[svcIndex] = svc } for routeIndex, route := range svc.Routes { if err := route.FillID(); err != nil { - logger.Error(err, "failed to fill ID for route", "route_name", *route.Name) + logger.Error(err, "Failed to fill ID for route", "route_name", *route.Name) } else { ks.Services[svcIndex].Routes[routeIndex] = route } @@ -472,7 +472,7 @@ func (ks *KongState) FillIDs(logger logr.Logger) { for consumerIndex, consumer := range ks.Consumers { if err := consumer.FillID(); err != nil { - logger.Error(err, "failed to fill ID for consumer", "consumer_name", consumer.FriendlyName()) + logger.Error(err, "Failed to fill ID for consumer", "consumer_name", consumer.FriendlyName()) } else { ks.Consumers[consumerIndex] = consumer } @@ -480,7 +480,7 @@ func (ks *KongState) FillIDs(logger logr.Logger) { for consumerGroupIndex, consumerGroup := range ks.ConsumerGroups { if err := consumerGroup.FillID(); err != nil { - logger.Error(err, "failed to fill ID for consumer group", "consumer_group_name", *consumerGroup.Name) + logger.Error(err, "Failed to fill ID for consumer group", "consumer_group_name", *consumerGroup.Name) } else { ks.ConsumerGroups[consumerGroupIndex] = consumerGroup } diff --git a/internal/dataplane/kongstate/route.go b/internal/dataplane/kongstate/route.go index 9bb1589c57..7ba2711ef6 100644 --- a/internal/dataplane/kongstate/route.go +++ b/internal/dataplane/kongstate/route.go @@ -195,7 +195,7 @@ func (r *Route) overrideMethods(logger logr.Logger, anns map[string]string) { } else { // if any method is invalid (not an uppercase alpha string), // discard everything - logger.Error(nil, "invalid method", "route_name", r.Name, "method", method) + logger.Error(nil, "Invalid method", "route_name", r.Name, "method", method) return } } @@ -219,7 +219,7 @@ func (r *Route) overrideSNIs(logger logr.Logger, anns map[string]string) { snis = append(snis, kong.String(sanitizedSNI)) } else { // SNI is not a valid hostname - logger.Error(nil, "invalid SNI", "route_name", r.Name, "sni", sni) + logger.Error(nil, "Invalid SNI", "route_name", r.Name, "sni", sni) return } } @@ -268,7 +268,7 @@ func (r *Route) overrideRequestBuffering(logger logr.Logger, anns map[string]str isEnabled, err := strconv.ParseBool(strings.ToLower(annotationValue)) if err != nil { // the value provided is not a parseable boolean, quit - logger.Error(err, "invalid request_buffering value", "kongroute", r.Name) + logger.Error(err, "Invalid request_buffering value", "kongroute", r.Name) return } @@ -286,7 +286,7 @@ func (r *Route) overrideResponseBuffering(logger logr.Logger, anns map[string]st isEnabled, err := strconv.ParseBool(strings.ToLower(annotationValue)) if err != nil { // the value provided is not a parseable boolean, quit - logger.Error(err, "invalid response_buffering values", "kongroute", r.Name) + logger.Error(err, "Invalid response_buffering values", "kongroute", r.Name) return } @@ -322,7 +322,7 @@ func (r *Route) overrideHosts(logger logr.Logger, anns map[string]string) { hosts = appendIfMissing(hosts, sanitizedHost) } else { // Host Alias is not a valid hostname - logger.Error(nil, "invalid host alias", "value", hostAlias, "kongroute", r.Name) + logger.Error(nil, "Invalid host alias", "value", hostAlias, "kongroute", r.Name) return } } @@ -345,7 +345,7 @@ func (r *Route) overridePathHandling(logger logr.Logger, anns map[string]string) } if !validPathHandling.MatchString(val) { - logger.Error(nil, "invalid path_handling", "value", val, "kongroute", r.Name) + logger.Error(nil, "Invalid path_handling", "value", val, "kongroute", r.Name) return } diff --git a/internal/dataplane/parser/backendref.go b/internal/dataplane/parser/backendref.go index 0d921f665b..ea2c19740e 100644 --- a/internal/dataplane/parser/backendref.go +++ b/internal/dataplane/parser/backendref.go @@ -60,7 +60,7 @@ func backendRefsToKongStateBackends( route.GetObjectKind().GroupVersionKind().String(), route.GetNamespace(), route.GetName()) - logger.Error(nil, "object requested backendRef to target, but no ReferenceGrant permits it, skipping...", + logger.Error(nil, "Object requested backendRef to target, but no ReferenceGrant permits it, skipping...", "object_name", objName, "target_kind", kind, "target_namespace", namespace, diff --git a/internal/dataplane/parser/ingressrules.go b/internal/dataplane/parser/ingressrules.go index 07e304b606..0e6e3c22fe 100644 --- a/internal/dataplane/parser/ingressrules.go +++ b/internal/dataplane/parser/ingressrules.go @@ -100,7 +100,7 @@ func (ir *ingressRules) populateServices(logger logr.Logger, s store.Storer, fai if parent, ok := ir.ServiceNameToParent[*service.Name]; ok { service.Tags = util.GenerateTagsForObject(parent) } else { - logger.Error(nil, "multi-service backend lacks parent info, cannot generate tags", + logger.Error(nil, "Multi-service backend lacks parent info, cannot generate tags", "service", *service.Name) } } else if len(k8sServices) > 0 { @@ -110,7 +110,7 @@ func (ir *ingressRules) populateServices(logger logr.Logger, s store.Storer, fai // Service doesn't actually exist. attempting to generate tags for that Service would trigger a panic. // the parser should discard this invalid route later, but this adds a placeholder value in case it doesn't. // if you encounter an actual config where a service has these tags, something strange has happened. - logger.V(util.DebugLevel).Info("service has zero k8sServices backends, cannot generate tags for it properly", + logger.V(util.DebugLevel).Info("Service has zero k8sServices backends, cannot generate tags for it properly", "service", *service.Name) service.Tags = kong.StringSlice( util.K8sNameTagPrefix+"UNKNOWN", diff --git a/internal/dataplane/parser/parser.go b/internal/dataplane/parser/parser.go index 3a592f63d1..e9cc1ccbd7 100644 --- a/internal/dataplane/parser/parser.go +++ b/internal/dataplane/parser/parser.go @@ -86,7 +86,7 @@ func shouldEnableParserExpressionRoutes( logger.V(util.InfoLevel).Info("Gateway is running with non-expression router flavor", "flavor", routerFlavor) return false } - logger.V(util.InfoLevel).Info("expression routes mode enabled") + logger.V(util.InfoLevel).Info("The expression routes mode enabled") return true } @@ -377,7 +377,7 @@ func (p *Parser) getUpstreams(serviceMap map[string]kongstate.Service) ([]kongst newTargets := getServiceEndpoints(p.logger, p.storer, k8sService, port) if len(newTargets) == 0 { - p.logger.V(util.InfoLevel).Info("no targets could be found for kubernetes service", + p.logger.V(util.InfoLevel).Info("No targets could be found for kubernetes service", "namespace", k8sService.Namespace, "name", k8sService.Name, "kong_service", *service.Name) } @@ -413,7 +413,7 @@ func (p *Parser) getUpstreams(serviceMap map[string]kongstate.Service) ([]kongst // warn if an upstream was created with 0 targets if len(targets) == 0 { - p.logger.V(util.InfoLevel).Info("no targets found to create upstream", "service_name", *service.Name) + p.logger.V(util.InfoLevel).Info("No targets found to create upstream", "service_name", *service.Name) } // define the upstream including all the newly populated targets @@ -478,7 +478,7 @@ func (p *Parser) getGatewayCerts() []certWrapper { for _, listener := range gateway.Spec.Listeners { status, ok := statuses[listener.Name] if !ok { - logger.V(util.DebugLevel).Info("listener missing status information", + logger.V(util.DebugLevel).Info("Listener missing status information", "gateway", gateway.Name, "listener", listener.Name, "listener_protocol", listener.Protocol, @@ -655,7 +655,7 @@ func mergeCerts(logger logr.Logger, certLists ...[]certWrapper) []kongstate.Cert // what binds the SNI to a given Secret. Knowing the Secret ID isn't of great use beyond knowing // what cert will be served. however, the secretToSNIs input to getCerts does not provide this info // https://github.com/Kong/kubernetes-ingress-controller/issues/2605 - logger.Error(nil, "same SNI requested for multiple certs, can only serve one cert", + logger.Error(nil, "Same SNI requested for multiple certs, can only serve one cert", "served_secret_cert", seen, "requested_secret_cert", *current.cert.ID, "sni", sni) @@ -695,7 +695,7 @@ func getServiceEndpoints( var isSvcUpstream bool ingressClassParameters, err := getIngressClassParametersOrDefault(s) if err != nil { - logger.V(util.DebugLevel).Info("unable to retrieve IngressClassParameters", "error", err) + logger.V(util.DebugLevel).Info("Unable to retrieve IngressClassParameters", "error", err) } else { isSvcUpstream = ingressClassParameters.ServiceUpstream } @@ -707,7 +707,7 @@ func getServiceEndpoints( endpoints = append(endpoints, newEndpoints...) } if len(endpoints) == 0 { - logger.V(util.DebugLevel).Info("no active endpoints") + logger.V(util.DebugLevel).Info("No active endpoints") } return targetsForEndpoints(endpoints) @@ -765,7 +765,7 @@ func getEndpoints( // ExternalName services if service.Spec.Type == corev1.ServiceTypeExternalName { - logger.V(util.DebugLevel).Info("found service of type=ExternalName") + logger.V(util.DebugLevel).Info("Found service of type=ExternalName") return []util.Endpoint{ { Address: service.Spec.ExternalName, @@ -774,13 +774,13 @@ func getEndpoints( } } - logger.V(util.DebugLevel).Info("fetching EndpointSlices") + logger.V(util.DebugLevel).Info("Fetching EndpointSlices") endpointSlices, err := getEndpointSlices(service.Namespace, service.Name) if err != nil { - logger.Error(err, "error fetching EndpointSlices") + logger.Error(err, "Error fetching EndpointSlices") return []util.Endpoint{} } - logger.V(util.DebugLevel).Info("fetched EndpointSlices", "count", len(endpointSlices)) + logger.V(util.DebugLevel).Info("Fetched EndpointSlices", "count", len(endpointSlices)) // Avoid duplicated upstream servers when the service contains // multiple port definitions sharing the same target port. @@ -815,7 +815,7 @@ func getEndpoints( } } } - logger.V(util.DebugLevel).Info("found endpoints", "endpoints", upstreamServers) + logger.V(util.DebugLevel).Info("Found endpoints", "endpoints", upstreamServers) return upstreamServers } diff --git a/internal/dataplane/parser/parser_test.go b/internal/dataplane/parser/parser_test.go index 798a2d8bb2..9b8656fbca 100644 --- a/internal/dataplane/parser/parser_test.go +++ b/internal/dataplane/parser/parser_test.go @@ -4526,7 +4526,7 @@ func TestNewFeatureFlags(t *testing.T) { expectedFeatureFlags: FeatureFlags{ ExpressionRoutes: true, }, - expectInfoLog: "expression routes mode enabled", + expectInfoLog: "The expression routes mode enabled", }, } diff --git a/internal/dataplane/parser/translate_grpcroute.go b/internal/dataplane/parser/translate_grpcroute.go index 0db4acd30e..c1890c970f 100644 --- a/internal/dataplane/parser/translate_grpcroute.go +++ b/internal/dataplane/parser/translate_grpcroute.go @@ -42,7 +42,7 @@ func (p *Parser) ingressRulesFromGRPCRoutes() ingressRules { if len(errs) > 0 { for _, err := range errs { - p.logger.Error(err, "could not generate route from GRPCRoute") + p.logger.Error(err, "Could not generate route from GRPCRoute") } } @@ -124,7 +124,7 @@ func (p *Parser) ingressRulesFromGRPCRouteWithPriority( grpcRoute := splitGRPCRouteMatchWithPriority.Match.Source // (very unlikely that) the rule index split from the source GRPCRoute is larger then length of original rules. if len(grpcRoute.Spec.Rules) <= match.RuleIndex { - p.logger.Error(nil, "split rule index is greater than the length of rules in source GRPCRoute", + p.logger.Error(nil, "Split rule index is greater than the length of rules in source GRPCRoute", "rule_index", match.RuleIndex, "rule_count", len(grpcRoute.Spec.Rules)) return diff --git a/internal/dataplane/parser/translate_httproute.go b/internal/dataplane/parser/translate_httproute.go index 7294722c46..3f02aa3e3c 100644 --- a/internal/dataplane/parser/translate_httproute.go +++ b/internal/dataplane/parser/translate_httproute.go @@ -411,7 +411,7 @@ func (p *Parser) ingressRulesFromSplitHTTPRouteMatchWithPriority( match := httpRouteMatchWithPriority.Match httpRoute := httpRouteMatchWithPriority.Match.Source if match.RuleIndex >= len(httpRoute.Spec.Rules) { - p.logger.Error(nil, "split match has rule out of bound of rules in source HTTPRoute", + p.logger.Error(nil, "Split match has rule out of bound of rules in source HTTPRoute", "rule_index", match.RuleIndex, "rule_count", len(httpRoute.Spec.Rules)) return nil } diff --git a/internal/dataplane/parser/translate_tlsroute.go b/internal/dataplane/parser/translate_tlsroute.go index b1f52b24c6..a42a1a6117 100644 --- a/internal/dataplane/parser/translate_tlsroute.go +++ b/internal/dataplane/parser/translate_tlsroute.go @@ -44,7 +44,7 @@ func (p *Parser) ingressRulesFromTLSRoutes() ingressRules { } for _, err := range errs { - p.logger.Error(err, "could not generate route from TLSRoute") + p.logger.Error(err, "Could not generate route from TLSRoute") } return result diff --git a/internal/dataplane/parser/translate_udproute.go b/internal/dataplane/parser/translate_udproute.go index 756c02b54c..3c8bdbaaae 100644 --- a/internal/dataplane/parser/translate_udproute.go +++ b/internal/dataplane/parser/translate_udproute.go @@ -46,7 +46,7 @@ func (p *Parser) ingressRulesFromUDPRoutes() ingressRules { } for _, err := range errs { - p.logger.Error(err, "could not generate route from UDPRoute") + p.logger.Error(err, "Could not generate route from UDPRoute") } return result diff --git a/internal/dataplane/sendconfig/inmemory_error_handling.go b/internal/dataplane/sendconfig/inmemory_error_handling.go index 5f285c133d..73febc46ec 100644 --- a/internal/dataplane/sendconfig/inmemory_error_handling.go +++ b/internal/dataplane/sendconfig/inmemory_error_handling.go @@ -101,7 +101,7 @@ func parseFlatEntityErrors(body []byte, logger logr.Logger) ([]ResourceError, er } for _, p := range ee.Errors { if len(p.Message) > 0 && len(p.Messages) > 0 { - logger.Error(nil, "entity has both single and array errors for field", + logger.Error(nil, "Entity has both single and array errors for field", "name", ee.Name, "field", p.Field) continue } @@ -125,7 +125,7 @@ func parseFlatEntityErrors(body []byte, logger logr.Logger) ([]ResourceError, er } parsed, err := parseRawResourceError(raw) if err != nil { - logger.Error(err, "entity tags missing fields", "name", ee.Name) + logger.Error(err, "Entity tags missing fields", "name", ee.Name) continue } resourceErrors = append(resourceErrors, parsed) diff --git a/internal/dataplane/sendconfig/kong.go b/internal/dataplane/sendconfig/kong.go index 97b76738b5..e8de3b4c6a 100644 --- a/internal/dataplane/sendconfig/kong.go +++ b/internal/dataplane/sendconfig/kong.go @@ -46,10 +46,10 @@ func (c *Config) Init( kongClients []*adminapi.Client, ) { if err := tagsFilteringEnabled(ctx, kongClients); err != nil { - logger.Error(err, "tag filtering disabled") + logger.Error(err, "Tag filtering disabled") c.FilterTags = nil } else { - logger.Info("tag filtering enabled", "tags", c.FilterTags) + logger.Info("Tag filtering enabled", "tags", c.FilterTags) } } diff --git a/internal/dataplane/sendconfig/sendconfig.go b/internal/dataplane/sendconfig/sendconfig.go index 81f3b285d5..63aa64ac3a 100644 --- a/internal/dataplane/sendconfig/sendconfig.go +++ b/internal/dataplane/sendconfig/sendconfig.go @@ -110,7 +110,7 @@ func PerformUpdate( // In case of parseErr being not nil, it just returns a nil slice. func resourceErrorsToResourceFailures(resourceErrors []ResourceError, parseErr error, logger logr.Logger) []failures.ResourceFailure { if parseErr != nil { - logger.Error(parseErr, "failed parsing resource errors") + logger.Error(parseErr, "Failed parsing resource errors") return nil } diff --git a/internal/dataplane/synchronizer.go b/internal/dataplane/synchronizer.go index ab01eec545..ad3fd7cb93 100644 --- a/internal/dataplane/synchronizer.go +++ b/internal/dataplane/synchronizer.go @@ -166,9 +166,9 @@ func (p *Synchronizer) startUpdateServer(ctx context.Context) { for { select { case <-ctx.Done(): - p.logger.Info("context done: shutting down the proxy update server") + p.logger.Info("Context done: shutting down the proxy update server") if err := ctx.Err(); err != nil && !errors.Is(err, context.Canceled) { - p.logger.Error(err, "context completed with error") + p.logger.Error(err, "Context completed with error") } p.syncTicker.Stop() @@ -181,7 +181,7 @@ func (p *Synchronizer) startUpdateServer(ctx context.Context) { case <-p.syncTicker.C: if err := p.dataplaneClient.Update(ctx); err != nil { - p.logger.Error(err, "could not update kong admin") + p.logger.Error(err, "Could not update kong admin") continue } initialConfig.Do(p.markConfigApplied) diff --git a/internal/diagnostics/server.go b/internal/diagnostics/server.go index 85f3abdc08..70789b2d3b 100644 --- a/internal/diagnostics/server.go +++ b/internal/diagnostics/server.go @@ -56,7 +56,7 @@ func (s *Server) Listen(ctx context.Context, port int) error { err := httpServer.ListenAndServe() if err != nil { if !errors.Is(err, http.ErrServerClosed) { - s.Logger.Error(err, "could not start diagnostics server") + s.Logger.Error(err, "Could not start diagnostics server") errChan <- err } } diff --git a/internal/license/agent.go b/internal/license/agent.go index 22c5fe87c7..4ea9e02a5b 100644 --- a/internal/license/agent.go +++ b/internal/license/agent.go @@ -113,7 +113,7 @@ func (a *Agent) NeedLeaderElection() bool { // Start starts the Agent. It attempts to pull an initial license from upstream, and then polls for updates on a // regular period, either the agent's initialPollingPeriod if it has not yet obtained a license or regularPollingPeriod if it has. func (a *Agent) Start(ctx context.Context) error { - a.logger.V(util.DebugLevel).Info("starting license agent") + a.logger.V(util.DebugLevel).Info("Starting license agent") err := a.reconcileLicenseWithKonnect(ctx) if err != nil { @@ -165,7 +165,7 @@ func (a *Agent) runPollingLoop(ctx context.Context) error { // Reset the ticker to run with the expected period which may change after we receive the license. a.ticker.Reset(a.resolvePollingPeriod()) case <-ctx.Done(): - a.logger.Info("context done, shutting down license agent") + a.logger.Info("Context done, shutting down license agent") return ctx.Err() } } diff --git a/internal/manager/health_check.go b/internal/manager/health_check.go index 98426d1bb3..6cfae12974 100644 --- a/internal/manager/health_check.go +++ b/internal/manager/health_check.go @@ -96,9 +96,9 @@ func (s *healthCheckServer) Start(ctx context.Context, addr string, logger logr. err := server.ListenAndServe() if err != nil { if err == http.ErrServerClosed { - logger.Info("healthz server closed") + logger.Info("Healthz server closed") } else { - logger.Error(err, "healthz server failed") + logger.Error(err, "Healthz server failed") } } }() @@ -112,7 +112,7 @@ func (s *healthCheckServer) Start(ctx context.Context, addr string, logger logr. //nolint:contextcheck err := server.Shutdown(shutdownCtx) if err != nil { - logger.Error(err, "healthz server shutdown failed") + logger.Error(err, "Healthz server shutdown failed") } }() }