6 Commits

Author SHA1 Message Date
John Howard
b440fb4d5e
Controller: refactor dead code and weird packages (#1375)
Lots of cruft cleanup from the old kgw integration.

fixes https://github.com/agentgateway/agentgateway/issues/1288
2026-03-27 13:16:29 -07:00
Jordan Moore
9dc73c0267
garbage collection for unneeded pdb/hpa/vpa (#1183)
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.
2026-03-12 20:48:48 +00:00
David L. Chandler
b2f5ab6d52
Revert "fix: Overlays can delete map elements with 'null'" (#1079)
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.
2026-02-27 11:20:43 -08:00
David L. Chandler
dabab1f08c
fix: Overlays can delete map elements with 'null' (#1065)
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>
2026-02-26 13:32:27 -08:00
John Howard
c2ea90ed08 Various repo cleanups and re-organization 2026-02-10 10:22:51 -08:00
John Howard
085f54292b Move controller to controller/ 2026-02-09 16:20:45 -08:00