Skip to content

InitialCooldownPeriod should be *int32 not int32 #6423

@zroubalik

Description

@zroubalik

Report

InitialCooldownPeriod introduced in #5478 should be pointer, to be aligned with the cooldownPeriod paramter. Also this field is marked as optional thus another point for pointers.

Another problem with #5478 is that zz_generated.deepcopy.go been regerenerated with this PR, so InitialCooldownPeriod is completely missing there:

func (in *ScaledObjectSpec) DeepCopyInto(out *ScaledObjectSpec) {
*out = *in
if in.ScaleTargetRef != nil {
in, out := &in.ScaleTargetRef, &out.ScaleTargetRef
*out = new(ScaleTarget)
**out = **in
}
if in.PollingInterval != nil {
in, out := &in.PollingInterval, &out.PollingInterval
*out = new(int32)
**out = **in
}
if in.CooldownPeriod != nil {
in, out := &in.CooldownPeriod, &out.CooldownPeriod
*out = new(int32)
**out = **in
}
if in.IdleReplicaCount != nil {
in, out := &in.IdleReplicaCount, &out.IdleReplicaCount
*out = new(int32)
**out = **in
}
if in.MinReplicaCount != nil {
in, out := &in.MinReplicaCount, &out.MinReplicaCount
*out = new(int32)
**out = **in
}
if in.MaxReplicaCount != nil {
in, out := &in.MaxReplicaCount, &out.MaxReplicaCount
*out = new(int32)
**out = **in
}
if in.Advanced != nil {
in, out := &in.Advanced, &out.Advanced
*out = new(AdvancedConfig)
(*in).DeepCopyInto(*out)
}
if in.Triggers != nil {
in, out := &in.Triggers, &out.Triggers
*out = make([]ScaleTriggers, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Fallback != nil {
in, out := &in.Fallback, &out.Fallback
*out = new(Fallback)
**out = **in
}
}
hasn't

Expected Behavior

InitialCooldownPeriod should be *int32

Actual Behavior

InitialCooldownPeriodis int32

Steps to Reproduce the Problem

  1. consume API

Logs from KEDA operator

No response

KEDA Version

2.14.0

Kubernetes Version

None

Platform

None

Scaler Details

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Ready To Ship

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions