kedacore/keda

Replace `k8s.io/client-go/scale` with controller-runtime client

Open

#4,013 opened on Dec 14, 2022

 (4 comments) (0 reactions) (1 assignee)Go (1,457 forks)auto 404
feature-requesthelp wantedstale-bot-ignore

Repository metrics

Stars
 (10,372 stars)
PR merge metrics
 (PR metrics pending)

Description

Proposal

controller-runtime client will soon support accessing /scale subresource: https://github.com/kubernetes-sigs/controller-runtime/pull/2094 https://github.com/kubernetes-sigs/controller-runtime/issues/172

Once a version of controller-runtime with this change is released we should use it and consolidate our codebase -> replace k8s.io/client-go/scale with controller-runtime client.

It is in the ScaledObject controller and scale executor: https://github.com/kedacore/keda/blob/f4bee67f5a444338b7c2b93c7b762a27c348867b/controllers/keda/scaledobject_controller.go#L67 https://github.com/kedacore/keda/blob/f4bee67f5a444338b7c2b93c7b762a27c348867b/pkg/scaling/executor/scale_executor.go#L47

Contributor guide