-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add configuration file and runtime management of NGINX #77
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
kate-osborn
requested changes
Mar 28, 2022
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.
Looks good! Just a couple small comments/suggestions.
f5yacobucci
reviewed
Mar 29, 2022
f5yacobucci
reviewed
Mar 29, 2022
f5yacobucci
reviewed
Mar 29, 2022
f5yacobucci
reviewed
Mar 29, 2022
f5yacobucci
reviewed
Mar 29, 2022
f5yacobucci
reviewed
Mar 30, 2022
Problem: (1) Add/update/delete NGINX configuration files to/from the file system. (2) Reload NGINX to apply changes in the configuration files. Solution: For (1): Add a new component - file.Manager - that allows writing and removing configuration files for a server. The Manager writes server configuration files to /etc/nginx/conf.d folder. This folder is available to both gateway and NGINX containers as part of the shared volume /etc/nginx For (2): Add a new component - runtime.Manager - that allows reload NGINX. The Manager reloads NGINX by sending a HUP signal to the NGINX master process. Because the gateway process is running under user 1001 (rather than root), during the image build we add the CAP_KILL capability to the gateway binary.
pleshakov
force-pushed
the
nginx-file-and-runtime-management
branch
from
March 30, 2022 22:11
92f1545
to
6c884cf
Compare
kate-osborn
approved these changes
Mar 31, 2022
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.
🚀
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.
Problem:
(1) Add/update/delete NGINX configuration files to/from the file system.
(2) Reload NGINX to apply changes in the configuration files.
Solution:
For (1): Add a new component - file.Manager - that allows writing and removing configuration files for a server.
The Manager writes server configuration files to /etc/nginx/conf.d folder. This folder is available to both gateway and NGINX containers as part of the shared volume /etc/nginx
For (2): Add a new component - runtime.Manager - that allows reload NGINX. The Manager reloads NGINX by sending a HUP signal to the NGINX master process.
Because the gateway process is running under user 1001 (rather than root), during the image build we add the CAP_KILL capability to the gateway binary.
Notes to the reviewers:
(a) both file.Manager and runtime.Manager use OS dependencies. Some unit tests were added, but the coverage is not full. If you think it makes sense to extend the coverage, please share some advice.
(b) With configuration file and runtime management implemented, we now are able to pass traffic through the NGINX!
Wait until all pods are running. endpoints changes are not handled right now by the Gateway