When a Gateway or GatewayParameters is updated or deleted such that a
previously-created PodDisruptionBudget, HorizontalPodAutoscaler, or
VerticalPodAutoscaler is no longer required, the controller does not
currently remove those resources. This is a resource leak.
ownerReferences-based garbage collection is insufficient here because it
only fires when the owner is deleted — if the owner (e.g. the Gateway)
still exists but has been updated to no longer require a PDB/HPA/VPA,
Kubernetes will not clean up the now-orphaned resource.
The `PruneRemovedResources` method on the `Deployer` collects
pdb/hpa/vpa resources owned by the reconciling gateway and checks them
against the list of desired objects and prunes those which are
undesired.
Reverts agentgateway/agentgateway#1065 because the unittests didn't use
a real k8s API server. A real k8s rejects any CRD that attempts to use a
null map value, and you cannot easily change the CRD because
controller-tools is opinionated about that. I don't want to add new
'remove' APIs for this edge case or kustomize a CRD.
Fixes a TODO:
```
metadata:
labels:
# You'd think this would remove the app.kubernetes.io/instance label,
# but it just sets the label to the empty string. TODO(chandler):
# Figure out the incantation to cause removal of the label.
app.kubernetes.io/instance: null
```
---------
Signed-off-by: David L. Chandler <david.chandler@solo.io>