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/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:114
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:311
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:227

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

@tomkerkhove tomkerkhove moved this to Proposed in Roadmap - KEDA Core Jun 12, 2022
raravena80 added a commit to raravena80/keda that referenced this issue Jun 12, 2022
Fixes kedacore#3159 

Signed-off-by: Ricardo Aravena <raravena80@gmail.com>
@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 moved this from Proposed to To Do in Roadmap - KEDA Core Jun 13, 2022
@JorTurFer JorTurFer moved this from To Do to In Progress in Roadmap - KEDA Core Jun 13, 2022
@JorTurFer JorTurFer assigned raravena80 and unassigned raravena80 Jun 13, 2022
raravena80 added a commit to raravena80/keda that referenced this issue Jun 15, 2022
Signed-off-by: Ricardo Aravena <raravena80@gmail.com>
Repository owner moved this from In Progress to Ready To Ship in Roadmap - KEDA Core Jun 29, 2022
@tomkerkhove tomkerkhove moved this from Ready To Ship to Done in Roadmap - KEDA Core Aug 10, 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