Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Pipelines Scaled Object cannot reconcile due to wrong PAT config #3159

Closed
raravena80 opened this issue Jun 12, 2022 · 3 comments · Fixed by #3160
Closed

Azure Pipelines Scaled Object cannot reconcile due to wrong PAT config #3159

raravena80 opened this issue Jun 12, 2022 · 3 comments · Fixed by #3160

Comments

@raravena80
Copy link
Contributor

I've run into this:

1.6549081369500506e+09	INFO	controller.scaledobject	Creating a new HPA	{"reconciler group": "keda.sh", "reconcilerkind": "ScaledObject", "name": "azure-pipelines-scaledobject", "namespace": "azdevops", "HPA.Namespace": "azdevops", "HPA.Name": "keda-hpa-azure-pipelines-scaledobject"}
1.6549081373579395e+09	ERROR	scalehandler	error resolving auth params	{"scalerIndex": 0, "object": {"apiVersion": "keda.sh/v1alpha1", "kind": "ScaledObject", "namespace": "azdevops", "name": "azure-pipelines-scaledobject"}, "error": "error parsing azure Pipelines metadata: the Azure DevOps REST API returned error. url: https://dev.azure.com/xxxxxx/_apis/distributedtask/pools?poolName=AWS-K8s status: 401 response: "}
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).GetScalersCache
	/workspace/pkg/scaling/scale_handler.go:194
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).getScaledObjectMetricSpecs
	/workspace/controllers/keda/hpa.go:181
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).newHPAForScaledObject
	/workspace/controllers/keda/hpa.go:64
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).createAndDeployNewHPA
	/workspace/controllers/keda/hpa.go:47
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).ensureHPAForScaledObjectExists
	/workspace/controllers/keda/scaledobject_controller.go:369
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).reconcileScaledObject
	/workspace/controllers/keda/scaledobject_controller.go:231
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).Reconcile
	/workspace/controllers/keda/scaledobject_controller.go:182
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:114
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:311
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227

To test that my PAT was working I used this script from the Azure Docs. (Works good)

raravena80 added a commit to raravena80/keda that referenced this issue Jun 12, 2022
@raravena80
Copy link
Contributor Author

Note: This is issue might be present in other scalers that use an Azure PAT.

@tomkerkhove
Copy link
Member

Thanks for reporting and fixing it @raravena80!

@JorTurFer JorTurFer assigned raravena80 and unassigned raravena80 Jun 13, 2022
raravena80 added a commit to raravena80/keda that referenced this issue Jun 15, 2022
@vazkarvishal
Copy link

vazkarvishal commented Aug 11, 2022

same as the issue I raised a while ago: #2600 (comment)

Glad it is fixed! Can it be referenced in the fixes/related release notes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants