Skip to content

Add an entrypoint for configuring and templating streams #782

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

Closed
wants to merge 2 commits into from

Conversation

iain-henderson
Copy link
Contributor

Add an entrypoint to allow for templated stream configurations.

@thresheek
Copy link
Member

Hi @iain-henderson!

Thanks for contribution!

I'm not a huge fan of introducing yet another script to do that - maybe combine with the already existing http-based one?

I think it'd be ok if for stream we iterate over .stream-template or similarly named files and append the stream block if stream templates were found/processed?

@iain-henderson
Copy link
Contributor Author

All of that makes sense (I could honestly go either way, but consolidating the templating logic seems like a good choice).

@thresheek thresheek closed this in b053826 May 24, 2023
@thresheek
Copy link
Member

Many thanks!

I've modified the changes a bit and pushed it.

Notable changes to your PR include:

  • /etc/nginx/stream-conf.d as a path (corresponds to what https://github.com/nginxinc/kubernetes-ingress/ already uses)
  • dropped maxdepth in a search for .stream-template files since we know there can be nested directories in template dirs.
  • check for nginx.conf to be writable
  • create and respect NGINX_ENVSUBST_STREAM_OUTPUT_DIR

I hope to make it available with the next mainline release. Let's wait a bit to get it propagated to stable.

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