uselagoon / remote-controller

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

recreate lagoon-internal-registry-secret secret if it does not exist #58

Closed Schnitzel closed 3 years ago

Schnitzel commented 3 years ago

during debugging and trying to find a workaround for https://github.com/amazeeio/lagoon-kbd/issues/57 I found that if:

  1. the secret lagoon-internal-registry-secret does not exist
  2. the robot account in harbor is still valid (not deleted, not expired yet) then:

I think we should always upsert the image with the robot account, but I guess this might not be possible as we cannot get the token anymore from harbor after the robot account was created. So maybe we need to check if the lagoon-internal-registry-secret does not exist, that we forcefully recreate the robot account?

shreddedbacon commented 3 years ago

Yep, that sounds good