Skip to content
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

feat: support cleaning up removed lagoonyml routes #238

Merged
merged 10 commits into from
Dec 4, 2023

Conversation

shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Oct 3, 2023

Allow for removed routes in .lagoon.yml and Lagoon API to be removed from the namespace.
This is feature flag wrapped for the moment, and will indicate in a build step if any actions would be performed if it detects any that would be removed.
Eventually this flag should be deprecated and cleanups should occur normally during a build

To enable it per project/environment, add the following variable as a GLOBAL scope

LAGOON_FEATURE_FLAG_CLEANUP_REMOVED_LAGOON_ROUTES=enabled

It can also be enabled at the cluster level by setting in the remote-controller

LAGOON_FEATURE_FLAG_DEFAULT_CLEANUP_REMOVED_LAGOON_ROUTES=enabled

It also has a label selector, so that if a route has been added manually, it can get a label route.lagoon.sh/remove=false so that this new build step will ignore it.

This is how it appears in the log when it is in no-op mode
image
And in op mode
image

@shreddedbacon shreddedbacon force-pushed the cleanup-removed-ingress branch 3 times, most recently from a6c52d6 to e41b4df Compare October 4, 2023 00:05
@shreddedbacon shreddedbacon force-pushed the cleanup-removed-ingress branch 9 times, most recently from d32ac9c to 0b27115 Compare October 19, 2023 21:50
@shreddedbacon shreddedbacon marked this pull request as ready for review October 19, 2023 22:29
…asier cleanups

refactor: ignore autogenerated, there is a separate cleanup for those
refactor: wording for cleanups
refactor: additional changes
refactor: move cleanup into configuration step to ensure removed routes are removed from envvars
@shreddedbacon shreddedbacon marked this pull request as draft November 22, 2023 20:43
@shreddedbacon shreddedbacon added this to the v2.17 milestone Nov 27, 2023
@shreddedbacon
Copy link
Member Author

I'd like to get this one updated after #255 is merged, so that this could use the warnings system to call out if routes could be removed, and the actions the user could take to clean them up.

@shreddedbacon shreddedbacon marked this pull request as ready for review December 1, 2023 00:45
Copy link
Member

@tobybellwood tobybellwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested working

@shreddedbacon shreddedbacon merged commit 72a1f89 into main Dec 4, 2023
2 checks passed
@shreddedbacon shreddedbacon deleted the cleanup-removed-ingress branch December 4, 2023 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants