litmus icon indicating copy to clipboard operation
litmus copied to clipboard

pod-autoscaler experiment does not work with multiple labels

Open serape opened this issue 2 years ago • 3 comments

When we try to run pod-autoscaler experiment, if we give app label "app.kubernetes.io/name=xxx" it works fine but when we give multiple labels like "app=xxx,app.kubernetes.io/instance=yyy,app.kubernetes.io/managed-by=Helm,app.kubernetes.io/name=xxx,app.kubernetes.io/version=1.1.1" it fails with chaos result "failStep: "[chaos]: Failed inside the chaoslib, err: fail to get the name & initial replica count of the deployment, err: fail to get the deployments with matching labels, err: ""

I am sure that given labels are correct and it works with different experiments except for pod-autoscaler. (ex: pod-delete works )

serape avatar Mar 16 '22 15:03 serape

Hi @serape, .spec.appinfo.applabel accepts one and only one label of the application resource. This is the intended behavior since multiple resources can always be labeled with a single label.

neelanjan00 avatar Apr 06 '22 06:04 neelanjan00

Can we close this issue? CC: @uditgaurav

neelanjan00 avatar Apr 06 '22 06:04 neelanjan00

Hi, Multiple resources can be labeled with multiple labels as well. I think it would be more flexible to identify a resource with multiple labels in order to use them in different ways. it is a little confusing that it works differently for pod autoscaler than other experiments.

serape avatar May 02 '22 06:05 serape