feat(streams): add support for nginx streams#292
Open
MemoryLeak55 wants to merge 17 commits intosaltstack-formulas:masterfrom
Open
feat(streams): add support for nginx streams#292MemoryLeak55 wants to merge 17 commits intosaltstack-formulas:masterfrom
MemoryLeak55 wants to merge 17 commits intosaltstack-formulas:masterfrom
Conversation
javierbertoli
requested changes
Apr 29, 2022
Member
javierbertoli
left a comment
There was a problem hiding this comment.
@thomas-thorburn-connect this seems a nice addition to the formula!
There are a few minor format/code quality issues (some whitespaces at the end of some lines).
Also, if you can add some tests for this code, similar the the tests for snippets, that'd be great.
| {% endif %} | ||
| {% endif %} | ||
|
|
||
| {% if salt['grains.get']('os_family') == 'FreeBSD' %} |
Member
There was a problem hiding this comment.
There's a whitespace after the closing bracket, that tests are showing. Can you remove it?
| - server: 127.0.0.1:19999 | ||
| - keepalive: 64 | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
There are whitespaces after the closing bracket, that tests are showing. Can you remove them?
| - server: | ||
| - listen: 7000 | ||
| - proxy_pass: some_upstream | ||
|
|
Member
There was a problem hiding this comment.
There are whitespaces after the closing bracket, that tests are showing. Can you remove them?
This file contains hidden or 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
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.
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]Changes related to the build system[chore]Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]Changes to the continuous integration configuration[feat]A new feature[fix]A bug fix[perf]A code change that improves performance[refactor]A code change that neither fixes a bug nor adds a feature[revert]A change used to revert a previous commit[style]Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]Documentation changes[test]Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE?No.
Related issues and/or pull requests
N/A
Describe the changes you're proposing
Currently the formula does not have support for streams (TCP and UDP loadbalancing), and putting it in the nginx.conf file doesn't work due to key conflicts (the
serverkey is used for the main config, but also used by streams). Either way, I couldn't get it right and it seems a bit cleaner in my opinion to have streams working like snippets instead of putting everything in the main config.see https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/
Pillar / config required to test the proposed changes
I exactly copied and pasted the snippets functionality and changed it to streams, and added some defaults to the map file. I don't know how to test it, but am willing to learn. It's working for my use case so far, for what it's worth
Debug log showing how the proposed changes work
Documentation checklist
README(e.g.Available states). ---> N/Apillar.example.Testing checklist
state_top).Additional context
I've tried squashing the PR into a single commit that conforms to the commit message guidelines with little success.
As per the title the squash message should be