uselagoon / remote-controller

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

Initial harbor integration #51

Closed shreddedbacon closed 3 years ago

shreddedbacon commented 3 years ago

There is a requirement to have regional or cluster based Harbors for Lagoon. Currently Lagoon core can only define 1 harbor, and the credentials are created and handled there and then passed into builds to be consumed.

This PR is to move this functionality out of Lagoon core and into the controller.

This will allow controllers in multiple clusters to be able to point to a more geographically preferred Harbor to allow for better push/pull performance.

New flags are added to support this

A lot of these have defaults that are probably ok to leave.

The controller will overwrite or add the following environment variables directly into the Project Variables that are injected from Lagoon, this is to allow the existing functionality in the kubectl-build-deploy-dind image to work without changes.

There is a way to prevent these from being overwritten on the Lagoon side using this variable set to true (and it can be defined at the project, or environment level)

closes #48