Skip to content
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

Merged
merged 1 commit into from
Jul 12, 2018

Conversation

Dean-Coakley
Copy link
Contributor

@Dean-Coakley Dean-Coakley commented Jul 10, 2018

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.

@Dean-Coakley Dean-Coakley added the enhancement Pull requests for new features/feature enhancements label Jul 10, 2018
@Dean-Coakley Dean-Coakley self-assigned this Jul 10, 2018
@Dean-Coakley Dean-Coakley reopened this Jul 11, 2018
Copy link
Contributor

@isaachawley isaachawley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@pleshakov pleshakov left a 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

}
// 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"
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TemplateExecutor does not generate

@Dean-Coakley Dean-Coakley force-pushed the template-configmap branch 4 times, most recently from 0a87142 to f57d6bb Compare July 12, 2018 10:56
@Dean-Coakley Dean-Coakley merged commit a636f5d into master Jul 12, 2018
@Dean-Coakley Dean-Coakley deleted the template-configmap branch July 12, 2018 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants