jthomperoo/predictive-horizontal-pod-autoscaler

ERROR Reconciler error

Closed this issue · 1 comments

Describe the bug
A clear and concise description of what the bug is.
I have this error in the phpa operator pod:
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.2/pkg/internal/controller/controller.go:234
1.6817378505120962e+09 ERROR Reconciler error
{"controller": "predictivehorizontalpodautoscaler", "controllerGroup": "jamiethompson.me", "controllerKind": "PredictiveHorizontalPodAutoscaler", "predictiveHorizontalPodAutoscaler": {"name":"simple-linear","namespace":"default"}, "namespace": "default", "name": "simple-linear", "reconcileID": "9b4b2166-a51d-465e-aa4c-78d9f480f2d1", "error": "failed to update status of resource: PredictiveHorizontalPodAutoscaler.jamiethompson.me "simple-linear" is invalid: [status.scaleDownReplicaHistory: Invalid value: "null": status.scaleDownReplicaHistory in body must be of type array: "null", status.scaleUpReplicaHistory: Invalid value: "null": status.scaleUpReplicaHistory in body must be of type array: "null", status.scaleUpEventHistory: Invalid value: "null": status.scaleUpEventHistory in body must be of type array: "null", status.currentMetrics: Invalid value: "null": status.currentMetrics in body must be of type array: "null", status.scaleDownEventHistory: Invalid value: "null": status.scaleDownEventHistory in body must be of type array: "null"]"}

Predictive Horizontal Pod Autoscaler Version
The version of the Predictive Horizontal Pod Autoscaler the bug has been found on.
0.13.0

To Reproduce
Steps to reproduce the behavior:

  1. Deploy 'phpa.yaml' and 'deployment.yaml'
  2. Run 'kubectl logs -l name=predictive-horizontal-pod-autoscaler -f'
  3. See error

Kubernetes Details (kubectl version):
Kubernetes version, kubectl version etc.
kubernetes 1.19.2

Additional context
Add any other context about the problem here.

Hi @Eillot29, sorry for the slow response, unfortunately the Predictive Autoscaler is only supported on Kubernetes versions 1.23 and above. This is because it needs the autoscaling/v2 API to be available, which was only added in 1.23.

https://kubernetes.io/blog/2021/12/07/kubernetes-1-23-release-announcement/#horizontalpodautoscaler-v2-graduates-to-ga

I've updated the README to clarify around supported Kubernetes versions.

Thanks for raising this.