Failed to get vpa

After installing or upgrading DataPower Operator, you may see an error on DataPowerService instances stating Failed to get vpa.

Symptoms

An error in the DataPower Operator pod logs may be seen, similar to:

{
    "level": "error",
    "ts": "2024-09-18T15:53:11.684059124Z",
    "logger": "controllers.DataPowerService",
    "msg": "Failed to get vpa",
    "Updater.id": "8a5c1b37-d176-4d1e-85ca-f2976080000b",
    "Request.Namespace": "datapower-operator-system",
    "Request.Name": "example",
    "Request.Stage": "disableVPA",
    "VerticalPodAutoscaler.Name": "example-vpa",
    "error": "no kind is registered for the type v1.VerticalPodAutoscaler in scheme \"pkg/runtime/scheme.go:100\"",
    "stacktrace": "..."
}

or

{
    "level": "error",
    "ts": "2024-09-18T15:53:11.684135836Z",
    "logger": "controllers.DataPowerService",
    "msg": "Error while enabling pod autoscaling",
    "Updater.id": "8a5c1b37-d176-4d1e-85ca-f2976080000b",
    "Request.Namespace": "datapower-operator-system",
    "Request.Name": "example",
    "Request.Stage": "enablePodAutoScaling",
    "error": "no kind is registered for the type v1.VerticalPodAutoscaler in scheme \"pkg/runtime/scheme.go:100\"",
    "stacktrace": "..."
}

Error conditions may be present on any DataPowerService instances, similar to:

status:
  conditions:
    - lastTransitionTime: '2024-09-19T17:48:33Z'
      message: 'There is 1 error: VerticalPodAutoscalerError (ErrorGettingVerticalPodAutoscaler)'
      reason: ErrorsPresent
      status: 'True'
      type: Error
    - lastTransitionTime: '2024-09-19T17:48:33Z'
      message: 'no kind is registered for the type v1.VerticalPodAutoscaler in scheme "pkg/runtime/scheme.go:100"'
      reason: ErrorGettingVerticalPodAutoscaler
      status: 'True'
      type: VerticalPodAutoscalerError

Workaround

Uninstall VPA, including the removal of the VerticalPodAutoscaler CRD.

Note, as this has cluster-wide impact it is not recommended unless you understand how it will affect other applications running on the cluster. Consult your cluster admins for guidance.

Resolution

Fixed in 1.11.3