How do you configure a Kubernetes horizontal pod autoscaler (HPA) to scale based on custom metrics rather than just CPU or memory utilization?