Skip to content

Commit

Permalink
log enhancement for enabling RGT API (kubernetes-sigs#3564)
Browse files Browse the repository at this point in the history
* log enhancement

* change to debug level
  • Loading branch information
oliviassss authored Feb 8, 2024
1 parent 32a3339 commit e5fdc89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/deploy/elbv2/listener_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (m *defaultListenerManager) updateSDKListenerWithExtraCertificates(ctx cont
sdkLS ListenerWithTags, isNewSDKListener bool) error {
// if TLS is not supported, we shouldn't update
if resLS.Spec.SSLPolicy == nil && sdkLS.Listener.SslPolicy == nil {
m.logger.V(1).Info("Res and Sdk Listener don't have SSL Policy set, we skip updating extra certs for non-TLS listener.")
m.logger.V(2).Info("Res and Sdk Listener don't have SSL Policy set, we skip updating extra certs for non-TLS listener.")
return nil
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/deploy/elbv2/tagging_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,15 @@ func (m *defaultTaggingManager) ListListenerRules(ctx context.Context, lsARN str
// TODO: we can refactor this by store provisioned LB's ARN as annotations on Ingress/Service, thus avoid this heavy lookup calls when RGT is not available.
func (m *defaultTaggingManager) ListLoadBalancers(ctx context.Context, tagFilters ...tracking.TagFilter) ([]LoadBalancerWithTags, error) {
if m.featureGates.Enabled(config.EnableRGTAPI) {
m.logger.V(2).Info("ResourceGroupTagging enabled, list the load balancers via RGT API")
return m.listLoadBalancersRGT(ctx, tagFilters)
}
return m.listLoadBalancersNative(ctx, tagFilters)
}

func (m *defaultTaggingManager) ListTargetGroups(ctx context.Context, tagFilters ...tracking.TagFilter) ([]TargetGroupWithTags, error) {
if m.featureGates.Enabled(config.EnableRGTAPI) {
m.logger.V(2).Info("ResourceGroupTagging enabled, list the target groups via RGT API")
return m.listTargetGroupsRGT(ctx, tagFilters)
}
return m.listTargetGroupsNative(ctx, tagFilters)
Expand Down

0 comments on commit e5fdc89

Please sign in to comment.