kedacore / keda

KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes
https://keda.sh
Apache License 2.0
8.44k stars 1.07k forks source link

`kubectl get scaledobject` does not show external triggers #6187

Open asobti opened 3 weeks ago

asobti commented 3 weeks ago

Report

External triggers defined in a ScaledObject do not show up in the output of kubectl get scaledobject.

ScaledObject triggers:

$ k get so skynet-test-app-exp -o json | jq .spec.triggers
[
  {
    "metadata": {
      "value": "59"
    },
    "metricType": "Utilization",
    "type": "cpu"
  },
  {
    "metadata": {
      "peakPods": "1",
      "scalerAddress": "app.pod-prescaler-prod.svc.cluster.local:8081",
      "unsafeSsl": "true"
    },
    "type": "external"
  }
]

Output of kubectl get scaledobject only lists the CPU trigger under the Triggers column

$ k get so skynet-test-app-exp
NAME                  SCALETARGETKIND                SCALETARGETNAME       MIN   MAX   TRIGGERS   AUTHENTICATION   READY   ACTIVE   FALLBACK   PAUSED    AGE
skynet-test-app-exp   argoproj.io/v1alpha1.Rollout   skynet-test-app-exp   1     3     cpu                         True    True     False      Unknown   5d17h

Expected Behavior

Output of kubectl get scaledobject should list all triggers defined on the ScaledObject

Actual Behavior

kubectl get scaledobject only lists the CPU trigger

Steps to Reproduce the Problem

  1. Create a ScaledObject with 2 triggers - CPU utilization and external trigger
  2. Run kubectl get scaledobject on the ScaledObject created in step 1
  3. See that not all triggers are listed in the output of step 2

Logs from KEDA operator

NA

KEDA Version

2.13.1

Kubernetes Version

1.28

Platform

Google Cloud

Scaler Details

External

Anything else?

No response

SpiritZhou commented 3 weeks ago

Nowadays only the first trigger will be shown. https://github.com/kedacore/keda/issues/1943

Maybe we can convert all triggers to one string in status to show all? @JorTurFer @zroubalik @wozniakjan

JorTurFer commented 3 weeks ago

It makes sense to me. Currently there are tools like OpenLens which already join the items with ',', but it's true that we could store the string already prepared in the status to fix all the tools

zroubalik commented 3 weeks ago

Nowadays only the first trigger will be shown. #1943

Maybe we can convert all triggers to one string in status to show all? @JorTurFer @zroubalik @wozniakjan

agree!