Skip to content

CISM controller isn't interruptible and tries to mirror images even after CR deletion #624

Description

@jpetazzo

What I do:

  1. Create a CISM telling kuik to mirror all my images to a private registry.
  2. After a few seconds, change my mind, and delete that CISM.

What I expect to see:

kuik starts to mirror images, but as soon as I delete the CISM, it should stop.

What I see instead:

kuik tries to mirror all my images at least once. It continues to mirror images even after the CISM is deleted. And then, after it has mirrored (or tried to mirror) all the images, it deletes them all (since the CISM was deleted).

Suggestions:

I didn't look at the code, but I suppose that the controller's reconciliation loop tries to mirror all images each time it's invoked. Instead, it could mirror one image, then requeue the CISM. So at each invocation (each time the CISM gets passed to the reconciliation loop) it will process one more image from the CISM, and if the CISM is deleted, it will stop immediately after the image that it's currently processing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv2Issues related to v2.x.x

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions