-
Notifications
You must be signed in to change notification settings - Fork 2k
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 fetch custom NGINX template from ConfigMap #303
Conversation
1922bb6
to
1144d00
Compare
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.
👍
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.
Please see my suggestions
nginx-controller/nginx/nginx.go
Outdated
} | ||
// UpdateIngressConfigFile writes the Ingress configuration file to the filesystem | ||
func (nginx *NginxController) UpdateIngressConfigFile(name string, cfg []byte) { | ||
filename := nginx.getIngressNginxConfigFileName(name) // "/etc/nginx/nginx.ingress.conf" |
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.
please remove the comment // "/etc/nginx/nginx.ingress.conf"
"text/template" | ||
) | ||
|
||
// TemplateExecutor generates, executes NGINX configuration templates |
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.
TemplateExecutor does not generate
0a87142
to
f57d6bb
Compare
f57d6bb
to
a636f5d
Compare
Custom templates can now be set on startup or updated via ConfigMap
Custom template via ConfigMap on startup
Custom template via ConfigMap update
Example in documentation
Updated ConfigMap/Annotations table
Invalid template or invalid NGINX configuration on startup causes Ingress Controller to stop, and logs the error.
Invalid template or invalid NGINX configuration update does not apply any configuration changes, and logs the error.