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

feat(context): pass `nginx` to snippets and server_config contexts #271

Closed sticky-note closed 3 years ago

sticky-note 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

Describe the changes you're proposing

pass nginx to snippets and server_config contexts

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

myii commented 3 years ago

Shouldn't be a problem however we have had a report about memory issues when passing full dicts by context:

Something we need to consider in the long run.

aboe76 commented 3 years ago

@myii I think you are right, about that considering the memory issues. especially on large configurations.

sticky-note commented 3 years ago

That's exactly why I waited for a review @myii At which number of vhosts can we consider a large deployment ? The idea a making a local copy of nginx map, popping nginx:servers:managed and passing that copy to each templates seems attractive. Will it be sufficient?

sticky-note commented 3 years ago

@vutny @myii @aboe76, Seems to consume significantly less RAM on sls rendering with:

{%- set _nginx = nginx.copy() %}
{%- do _nginx.pop('snippets') %}
{%- do _nginx.pop('servers') %}

@myii Ok to merge like that ?

saltstack-formulas-travis commented 3 years ago

:tada: This PR is included in version 2.5.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: