-
Notifications
You must be signed in to change notification settings - Fork 12
feat: support for api routes #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4eeea19 to
93a25c2
Compare
93a25c2 to
b866aab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements comprehensive route management features for the Lagoon build-deploy tool, introducing API-defined routes, route source tracking, and automated cleanup of removed routes. The implementation adds support for distinguishing between routes from different sources (API, YAML, autogenerated) and includes logic for automatic cleanup when routes are managed via the API.
- Adds route source tracking via
route.lagoon.sh/sourcelabel to distinguish between API, YAML, and autogenerated routes - Implements API-managed route cleanup functionality that automatically removes routes not defined in API or .lagoon.yml
- Introduces support for primary route designation and active/standby route types from the API
Reviewed Changes
Copilot reviewed 95 out of 95 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| legacy/build-deploy-docker-compose.sh | Adds internalSystemEnvVarCheck function and implements conditional route cleanup logic based on API route management |
| internal/lagoon/routes.go | Adds Source, Primary, and Type fields to RouteV2 with custom UnmarshalJSON to handle API/YAML field name differences |
| internal/generator/ingress.go | Updates route generation to support API routes via LAGOON_API_ROUTES variable and primary route selection logic |
| internal/templating/templates_ingress.go | Adds route source label to ingress templates based on route origin |
| internal/generator/generator.go | Implements autogenerated route configuration from API via LAGOON_API_AUTOGENERATED_CONFIG |
| Test files (multiple) | Updates test expectations with new route source labels and adds test coverage for API-defined routes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Looks good from a code review perspective, withholding full review for related PRs. |
Build support for uselagoon/lagoon#3990