Skip to content

Reconcile Loop Fails to re-reconcile the group in case the group was deleted from Backend #320

Description

@vinamra28

Actual Behaviour

Once a group CR is applied on the cluster, it onboards the same across backends specified. If an admin of that respective SaaS backend goes and drops that Group or User from a backend, Usernaut isn't able to re-reconcile that and goes into error state. This happens because of the cache layer that acts as an intermediate representation layer of all the backends and this cache stores the IDs provided by each backend.

Expected Behaviour

In such scenarios, Usernaut should be able to self-heal the system and recreate the respective user and team on the backend.

Steps to Reproduce

  1. Create a group CR on the cluster

    apiVersion: operator.dataverse.redhat.com/v1alpha1
    kind: Group
    metadata:
      labels:
        app.kubernetes.io/name: usernaut
        app.kubernetes.io/managed-by: kustomize
      name: dataverse-platform-usernauttest
      namespace: usernaut
    spec:
      group_name: dataverse-platform-usernauttest
      members:
        users:
          - user1
          - user2
      backends
        - name: fivetran
          type: "fivetran"
  2. Go to fivetran and drop the team

  3. Make changes in the user list of the applied CR and re-apply the same on the cluster

    apiVersion: operator.dataverse.redhat.com/v1alpha1
    kind: Group
    metadata:
      labels:
        app.kubernetes.io/name: usernaut
        app.kubernetes.io/managed-by: kustomize
      name: dataverse-platform-usernauttest
      namespace: usernaut
    spec:
      group_name: dataverse-platform-usernauttest
      members:
        users:
          - user1
          - user2
          - user3
      backends
        - name: fivetran
          type: "fivetran"
  4. Notice the behaviour.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingprioritisedHelps contributors figure out which issues can be picked

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions