You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HPA is unable to get the CPU requested/usage/limit for the application pods.
Why
The HPA references the nextcloud deployment. This deployment does not define a component label. Therefore, if you also deploy the nextcloud-metrics deployment, one of the following will happen:
Metrics are returned for both the metrics pod and application pod, and are averaged together (if resource requests/limits defined on metrics pod)
If no resource requests/limits are defined on the metrics pod, the metrics are returned, but the HPA throws an error, because while the application pod may have resources defined, the metrics pod does not, and the HPA is unable to compute and average requests/limits as a result
What happens
The metrics server logs do not return an error, but their debug output is helpful in highlighting the issue further. In the above, the HPAs I have deployed for nginx ingress controllers specifically call out the component label in their request. These HPAs are working without issue.
Suggested Fix
Add app.kubernetes.io/component: app to the nextcloud application deployment, and update the spec accordingly:
Issue
Nextcloud App pod HPA does not work
Cause
The HPA is unable to get the CPU requested/usage/limit for the application pods.
Why
The HPA references the
nextcloud
deployment. This deployment does not define a component label. Therefore, if you also deploy thenextcloud-metrics
deployment, one of the following will happen:What happens
The metrics server logs do not return an error, but their debug output is helpful in highlighting the issue further. In the above, the HPAs I have deployed for nginx ingress controllers specifically call out the component label in their request. These HPAs are working without issue.
Suggested Fix
Add
app.kubernetes.io/component: app
to the nextcloud application deployment, and update the spec accordingly:I am happy to open a PR for this issue if this seems like the correct approach.
The text was updated successfully, but these errors were encountered: