Skip to content

Multi-binding causes infinite reconciliation loop #411

@sandrotaje

Description

@sandrotaje

Hi, I'm testing the controller using the multi-binding feature.

It works perfectly but if I check the logs of the controller it seems like it is continuously reconciling, and printing logs.

Can someone check if this is the correct behavior?
I had a similar problem with the service binding operator of redhat but that one wasn't supposed to support multi binding.
It seems like the controller is in an infinite loop.

As an addition: if I remove completely the label multi-binding it behaves the same

This is the service binding I created:

---
apiVersion: servicebinding.io/v1
kind: ServiceBinding
metadata:
  name: multi-binding-1
  namespace: customer1-workload
  labels:
    multi-binding: "true"
spec:
  # direct Secret reference is used for compatibility, but not recommended for dynamically provisioned services
  service:
    apiVersion: v1
    kind: Secret
    name: multi-binding-1
  workload:
    apiVersion: apps/v1
    kind: Deployment
    name: podinfo
  env:
  - name: MULTI_BINDING_1
    key: number

---
apiVersion: servicebinding.io/v1
kind: ServiceBinding
metadata:
  name: multi-binding-2
  namespace: customer1-workload
  labels:
    multi-binding: "true"
spec:
  # direct Secret reference is used for compatibility, but not recommended for dynamically provisioned services
  service:
    apiVersion: v1
    kind: Secret
    name: multi-binding-2
  workload:
    apiVersion: apps/v1
    kind: Deployment
    name: podinfo
  env:
  - name: MULTI_BINDING_2
    key: number
manager 2024-04-19T13:55:12Z    INFO    admission    mutating resource    {"object": {"name":"podinfo","namespace":"customer1-workload"}, "namespace": "customer1-workload", "name": "podinfo", "resource": {"group":"apps","version":"v1","resource":"deployments"}, "user": "system:serviceaccount:servicebinding-system:servicebinding-controller-manager", "requestID": "7d157ced-9eec-40cd-a86e-79623651c8ca", "UID": "7d157ced-9eec-40cd-a86e-79623651c8ca", "kind": "apps/v1, Kind=Deployment", "resource": {"group":"apps","version":"v1","resource":"deployments"}, "operation": "UPDATE", "patch": [{"op":"remove","path":"/spec/template/spec/volumes/1/projected/defaultMode"},{"op":"remove","path":"/spec/template/spec/volumes/2/projected/defaultMode"}]}
manager 2024-04-19T13:55:12Z    INFO    ServiceBindingResourceReconciler.WithFinalizer.3.PatchWorkloads    updated resource    {"controller": "servicebinding", "controllerGroup": "servicebinding.io", "controllerKind": "ServiceBinding", "ServiceBinding": {"name":"multi-binding-1","namespace":"customer1-workload"}, "namespace": "customer1-workload", "name": "multi-binding-1", "reconcileID": "f1c3a403-fb3e-4272-bacb-6014c8b8c94c", "resourceType": "servicebinding.io/v1, Kind=ServiceBinding"}
manager 2024-04-19T13:55:12Z    DEBUG    events    Updated Deployment "podinfo"    {"type": "Normal", "object": {"kind":"ServiceBinding","namespace":"customer1-workload","name":"multi-binding-1","uid":"def0c814-98cd-4542-b1ed-0f696f5a0674","apiVersion":"servicebinding.io/v1","resourceVersion":"206043"}, "reason": "Updated"}

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