Skip to content

Commit

Permalink
fix unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
toniiiik committed Jan 9, 2024
1 parent ccc35c6 commit 71a1b87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scalers/azure_pipelines_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func validatePoolID(ctx context.Context, logger logr.Logger, poolID string, meta
return result.ID, nil
}

func getToken(ctx context.Context, logger logr.Logger, metadata *azurePipelinesMetadata, podIdentity kedav1alpha1.AuthPodIdentity, scope string) (string, error) {
func getToken(ctx context.Context, metadata *azurePipelinesMetadata, podIdentity kedav1alpha1.AuthPodIdentity, scope string) (string, error) {
token, err := metadata.authContext.cred.GetToken(ctx, policy.TokenRequestOptions{
Scopes: []string{
scope,
Expand All @@ -375,7 +375,7 @@ func getAzurePipelineRequest(ctx context.Context, logger logr.Logger, urlString
case kedav1alpha1.PodIdentityProviderAzureWorkload:
//ADO Resource token
logger.V(1).Info("making request to ADO REST API using managed identity")
aadToken, err := getToken(ctx, logger, metadata, podIdentity, devopsResource)
aadToken, err := getToken(ctx, metadata, podIdentity, devopsResource)
if err != nil {
return []byte{}, fmt.Errorf("cannot create workload identity credentials: %w", err)
}
Expand Down

0 comments on commit 71a1b87

Please sign in to comment.