Why is MinReplicas a pointer type in the resource definition of HorizontalPodAutoscaler, while MaxReplicas is an int32 type

Because min can be 0 (it’s not common but allowed), but that is Go’s default value which means we can’t tell if it was set to 0 but the user or just left unspecified (in which case the default is documented as 1).

TLDR - implementation detail leaking through

1 Like