uselagoon / build-deploy-tool

Tool to generate build resources
2 stars 5 forks source link

Selectively apply ingress objects, only when there is a change. Avoid the double apply #320

Open seanhamlin opened 1 month ago

seanhamlin commented 1 month ago

At present, if you have a lot of domains defined in your .lagoon.yml file (in this case > 400), a deployment can take a long time to run through.

The most impacted steps of the deployment are:

Route/Ingress Configuration (Duration: 00:12:47)
...
Backup Configuration (Duration: 00:12:14)

The total deployment duration was 25m 41secs, so the above 2 steps account for 97.4% of the deployment time.

Ideal scenario

shreddedbacon commented 1 month ago

This is partially resolved in the helm replacement branch by reducing the number of times that the apply takes place

shreddedbacon commented 1 month ago

I would also recommend that if you have 400 routes or ingress objects, that you look to try to consolidate as many of these using the alternativeNames feature to reduce the overall number of ingress objects that would be created.

shreddedbacon commented 1 month ago
  • Only apply ingress objects when there is a change that needs to be applied (e.g. adding a new domain, deleting a domain, some form of annotation change)

This will come to a degree, but its difficult to know what is changed and what hasn't changed without first analyzing the namespace ingress objects. Which would also add time to the process. There are some tradeoffs