Skip to content

How to reconcile a global application based on all crd instances (similar to a ingress controller) #2971

@0xxFF

Description

@0xxFF

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions