Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Patcher replaces entire status object instead of merging fields #9

Description

@lukacsi

Bug

When multiple controllers use Patcher to write different fields to the same object's status, each Patcher overwrites the entire status object instead of merging. Fields written by one controller are wiped when another controller patches the same object.

Reproduction

Two controllers patching the same View's status:

Controller A (watches Deployments):

- "@project":
    kind: MyView
    status:
      replicas: "$.status.replicas"
      readyReplicas: "$.status.readyReplicas"

Controller B (watches StatefulSets):

- "@project":
    kind: MyView
    status:
      redis:
        ready: true

Expected: Both status.replicas and status.redis.ready coexist after both controllers run.

Actual: Whichever controller runs last overwrites the other's fields. If B runs after A, status.replicas is wiped. If A runs after B, status.redis is wiped.

Expected Behavior

Patcher should do a JSON merge patch (RFC 7386) — fields not present in the patch are preserved. This matches how kubectl patch --type=merge works and how every Kubernetes controller behaves with the status subresource.

Impact

This makes it impossible to decompose status aggregation into multiple controllers — a core pattern for operators. The workaround is a single controller joining all sources, which creates complex multi-source joins and defeats the purpose of the split-view architecture.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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