Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Brouwer <[email protected]>
  • Loading branch information
rickbrouwer committed Feb 6, 2025
1 parent c7eb211 commit f6563ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/scaling/resolver/scale_resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,8 @@ func GetCurrentReplicas(ctx context.Context, client client.Client, scaleClient s
"resource", fmt.Sprintf("%s/%s", targetGVKR.Group, targetGVKR.Kind),
"name", targetName)

// Get the current replica count. As a special case, Deployments and StatefulSets fetch directly from the object so they can use the informer cache to reduce API calls.
// Everything else uses the scale subresource.
switch {
case targetGVKR.Group == appsGroup && targetGVKR.Kind == deploymentKind:
deployment := &appsv1.Deployment{}
Expand Down

0 comments on commit f6563ad

Please sign in to comment.