uselagoon / remote-controller

A group of controllers for handling Lagoon builds and tasks in Kubernetes or Openshift
5 stars 1 forks source link

check if pull secret actually includes robot account for given harbor during `CreateOrRefreshRobot` #61

Closed Schnitzel closed 3 years ago

Schnitzel commented 3 years ago

during some more edge cases I found another possible issue, that would make the whole system more resilient against edge cases.

Assuming:

Then during CreateOrRefreshRobot() the code does not actually realize that the robot account is not existing in lagoon-internal-registry-secret and just continues, causing the deployment to fail.

So my suggestion is that we should actually check if the secret lagoon-internal-registry-secret contains a robot account for the current harbor and if not, force recreate the robot account.