clemlesne / blue-agent

Deploy Azure Pipelines agent on Kubernetes. Easy way. Cheap. Windows and Linux.
https://clemlesne.github.io/blue-agent/
Apache License 2.0
35 stars 9 forks source link

[Bug]: No organizationURL given #242

Open 24mu13 opened 3 months ago

24mu13 commented 3 months ago

Even if it's present on values.yaml, when running on the KEDA operator, I get the following error:

2024-06-04T18:58:57Z ERROR Failed to ensure ScaledJob is correctly created {"controller": "scaledjob", "controllerGroup": "keda.sh", "controllerKind": "ScaledJob", "ScaledJob": {"name":"agent-blue-agent","namespace":"default"}, "namespace": "default", "name": "agent-blue-agent", "reconcileID": "c4a72bcb-4c9a-420d-b3f3-7d8527e34ba0", "error": "error parsing azure Pipelines metadata: no organizationURL given"}

The error to the user in CLI is the following instead:

* Pod "agent-blue-agent-1" is invalid: spec.containers[0].lifecycle.preStop.exec.command: Required value
Riqardos commented 1 month ago

@24mu13 I had the same problem, issue is with these parameters:

 "pipelines" : {
      "cache" : {
        "volumeEnabled": true
      }
      "tmpdir": {
        "volumeEnabled": true
      }
    }

if they are both set to true, no command is set to azp-agent container and it ends up with error above.

https://github.com/clemlesne/blue-agent/blob/66d82a26837490803fab6548f011e702be32d6c1/src/helm/blue-agent/templates/_helpers.tpl#L167

The solution would be to add some dummy command there in the helm template or make the preStop hook customizable.

Riqardos commented 1 month ago

created PR for this

clemlesne commented 1 week ago

PR raquires a few fixes, it should be done quickly.

Thank you @24mu13 for the bug report!