http-add-on icon indicating copy to clipboard operation
http-add-on copied to clipboard

Cannot modify HTTPScaledObjects after moving from 0.7.0 to 0.8.0

Open jocelynthode opened this issue 2 months ago • 7 comments

Report

After upgrading to 0.8.0. The CRD seems to have changed and the enum for status.conditions[].type now only supports Ready as a value.

Before this update to the CRD we supported the following values:

- Created
- Error
- Pending
- Unknown
- Terminating
- Terminated
- Ready

I was able to workaround it by editing the CRD and readding these statuses and then edit them so that the status conditions could be cleaned up.

Expected Behavior

I expect to be able to edit old HTTPScaledObjects

Actual Behavior

Old HTTPScaledObjects fail to be edited with the following messages:

* status.conditions[414].type: Unsupported value: "Pending": supported values: "Ready"
* status.conditions[415].type: Unsupported value: "Created": supported values: "Ready"
* status.conditions[417].type: Unsupported value: "Pending": supported values: "Ready"
* status.conditions[418].type: Unsupported value: "Created": supported values: "Ready"
* status.conditions[420].type: Unsupported value: "Pending": supported values: "Ready"
* status.conditions[421].type: Unsupported value: "Created": supported values: "Ready"
* status.conditions[423].type: Unsupported value: "Pending": supported values: "Ready"
* status.conditions[424].type: Unsupported value: "Error": supported values: "Ready"

Steps to Reproduce the Problem

  1. Have an old HTTPScaledObject with some status conditions other than Ready
  2. Update to 0.8.0
  3. Try to edit the HTTPScaledObjects

Logs from KEDA HTTP operator

No response

HTTP Add-on Version

0.8.0

Kubernetes Version

1.27

Platform

Other

Anything else?

No response

jocelynthode avatar May 07 '24 07:05 jocelynthode

Same issue here on Kubernetes 1.29.

Thanks @jocelynthode , your work around worked just fine.

massimeddu-sj avatar May 07 '24 09:05 massimeddu-sj

f**k I didn't notice that changing the status fields I can break the CRD :/ The HTTP Add-on shouldn't use them anymore either but probably it doesn't remove them if they are already there. Does it fail after the rollout of the new version is completed?

JorTurFer avatar May 10 '24 09:05 JorTurFer

I'm asking because we have to include a check for removing those states from the HTTPScaledObject if they are available

JorTurFer avatar May 10 '24 09:05 JorTurFer

f**k I didn't notice that changing the status fields I can break the CRD :/ The HTTP Add-on shouldn't use them anymore either but probably it doesn't remove them if they are already there. Does it fail after the rollout of the new version is completed?

Yes The upgrade to 0.8.0 was successful and everything seemed to be working. Then when I wanted to edit HTTPScaledObjects created before the upgrade I was met with the error. The problem is indeed that it does not remove old statuses and thus after the upgrades prevents objects with old statuses to be updated.

jocelynthode avatar May 11 '24 08:05 jocelynthode

Yes The upgrade to 0.8.0 was successful and everything seemed to be working. Then when I wanted to edit HTTPScaledObjects created before the upgrade I was met with the error. The problem is indeed that it does not remove old statuses and thus after the upgrades prevents objects with old statuses to be updated.

Thanks for the feedback, I'm going to try to fix this during the week and cut a fix release. I thought that old values were dropped automatically but apparently not (every day you learn things xD). The operator will drop them during the upgrade for future releases. Sorry for the inconvenience

JorTurFer avatar May 13 '24 07:05 JorTurFer

No worries, thanks for the work :slightly_smiling_face:

jocelynthode avatar May 13 '24 07:05 jocelynthode