-
Notifications
You must be signed in to change notification settings - Fork 7
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: replace helm with go service templates #289
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…obs in deployments
…ons for templating
…emove unused code that the templating command replaces
shreddedbacon
force-pushed
the
service-templates
branch
from
June 21, 2024 01:20
bb44f7b
to
e03b200
Compare
shreddedbacon
force-pushed
the
service-templates
branch
from
June 21, 2024 02:18
2fe840f
to
693e226
Compare
…es container name and memory
tobybellwood
approved these changes
Jul 16, 2024
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.
I've been through this A LOT - and it looks like it's pretty spot-on to the current configuration. Ok for this to merge and head out the door 🥳
seanhamlin
reviewed
Jul 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fairly substantial pullrequest that moves away from using helm template generation to service templates defined in go.
Most of the old helm chart logic was identical, as such the work in the PR was to try and extract all the individual changes from each of the original templates into their core components. This meant that the template logic could be consolidated down from all the individual helmcharts. The result is that there are now service types defined in code, which can be extended or modified as required, and the template generator should be able to adjust accordingly with minimal changes overall.
The benefits of this are that we now have far better coverage of changes, and which values influence the resulting templates than before with helm. If modifying one value, you can now see how this change flows through to any templates or any other service generation steps.
A big part of this change is to also remove a substantial amount of legacy bash for handling the image build process. All of the old logic for determining build contexts, targets, dockerfiles, pull through images (both from external and private registries) has been moved into go. The result is simpler bash functionality so it focuses on the important parts only (building or pushing images)
Mutliple ports
This brings additional functionality that allows multiple ports to be opened for services,
Example docker-compose with the
lagoon.service.usecomposeports: true
label. Adding this results in the default port for the service being disabled, and only those ports defined in theports
section of that specific service will be created.it is then possible to expose one of these services to a route in
lagoon.yml
file like so. The first port in the list will always be the "default" port for a service defined route, but it is possible to direct a route to a different port by extending the service name.Note: There is additional work to consolidate the template generation that will need to be done after this pullrequest. That would be consolidating all the template generation steps down, but this would be another substantial change to the overall lagoon build structure that needs to be addressed (ie, we template ingress and services at different points of a build, with consolidation efforts, these could all be applied at the same time in one step)
There are still some other helm templates that remain that would be addressed by #115 and #287
Closes
closes #208
closes #243
closes #268