gardener / landscaper

Development of Landscaper - A deployer for K8S workloads with integrated data flow engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Events for the container deployer

robertgraeff opened this issue · comments

How to categorize this issue?

/area container-deployer
/kind bug
/priority 3

What happened:

As soon as there is a DeployItem for the container deployer, the container deployer enters a loop of reconcile events. Even after the DeployItem has been successfully processed and the corresponding Pod has gone, there are lots of log entries like this:

   {
        "level": "info",
        "ts": "2023-07-28T13:46:38.735Z",
        "logger": "deployer.container.podReconciler",
        "msg": "history: deployitem update",
        "reconciledResource": {
            "name": "container-1-container-deployer-2n7lc",
            "namespace": "example"
        },
        "writeID": "w000030",
        "deployitemPhase": "Succeeded",
        "jobID": "00c721a4-b8fe-41ff-b423-bde984a7b862",
        "jobIDFinished": "00c721a4-b8fe-41ff-b423-bde984a7b862",
        "oldGeneration": 1,
        "newGeneration": 1,
        "operation": "",
        "oldResourceVersion": "11587009",
        "newResourceVersion": "11587021"
    },
    {
        "level": "info",
        "ts": "2023-07-28T13:46:39.668Z",
        "logger": "deployer.container",
        "msg": "deploy item not reconciled because no new job ID or test reconcile annotation",
        "reconciledResourceKind": "DeployItem",
        "deployItemType": "landscaper.gardener.cloud/container",
        "reconcileID": "b80b9ead-b49b-4242-bb09-8a46672d6e47",
        "reconciledResource": {
            "name": "container-1-container-deployer-2n7lc",
            "namespace": "example"
        }
    }

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Deploy an Installation with a container DeployItem, for example test/integration/testdata/container-deployer/installation-1.

Anything else we need to know?:

The PodReconciler does not only get events from the PodEventHandler, but also regularly watches DeployItems. Therefore, it receives all events itself, which it triggers for the container deployer. This results in a loop of events.

Probably, the issue occurs only if the landscaper host and resource cluster are the same. If these are different clusters, the PodReconciler would watch the host cluster, whereas the DeployItems are on the resource cluster. (But I did not verify this.)

Environment:

  • Landscaper version: v0.73.0
  • Kubernetes version (use kubectl version):
  • Others: