saltstack-formulas / nginx-formula

Nginx Salt Formula
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
163 stars 421 forks source link

Add support for streams (TCP and UDP loadbalancing) #276

Closed MemoryLeak55 closed 2 years ago

MemoryLeak55 commented 3 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does 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 server key 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

Testing checklist

Additional context

I've not done a pull request before and I do not understand how the formulas are tested, please guide me in the right direction if there are mistakes.

baby-gnu commented 3 years ago

Hello @thomas-thorburn-connect, thanks for your PR.

Can you rewrite you commit messages to conform to the commit message formatting policy?

Regards.