-
Notifications
You must be signed in to change notification settings - Fork 231
Description
I’m working on a controller that needs to reconcile a single global service based on all instances of a custom resource, not just one at a time. The design is conceptually similar to an Ingress controller:
- An Ingress controller looks at all Ingress resources in the cluster.
- It then computes a desired global state (e.g., a load balancer config, a reverse proxy config, etc.).
- Finally, it applies changes based on the aggregate of all CRD instances, not a single one.
Even though I’m not writing an actual ingress controller, the reconciliation pattern is very close to that.
Would JOSDK be suitable for implementing a controller that works in this global/aggregated reconciliation style?
Or is JOSDK more focused on one-resource-at-a-time reconciliation (typical operator pattern), meaning I’d have to build a lot of aggregation logic outside of it?
For example, it always expects a primary resource, but if I make the Ingress that primary resource, it will reconcile every Ingress individually.
Ideally, my controller would also manage the Ingress deployment itself, so users just have to install my controller and are ready to go.
One issue that comes to mind is, for example, if my Ingress deployment consists of 1 Deployment and 2 Services. Now, if I update my operator and it only requires 1 Deployment and 1 Service, is there a way to automatically "garbage collect" the extra Service?