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 support for health status uri customisation #750

Merged
merged 3 commits into from
Nov 5, 2019

Conversation

Dean-Coakley
Copy link
Contributor

Proposed changes

Fixes: #721

Allow customisation of health check uri via cli arg.

  • Add -health-check-uri cli argument.
  • Add controller.healthCheckURI field to helm chart.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@Dean-Coakley Dean-Coakley added the enhancement Pull requests for new features/feature enhancements label Nov 1, 2019
@Dean-Coakley Dean-Coakley self-assigned this Nov 1, 2019
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.

@Dean-Coakley thx for the PR!

please see a few comments

additionally, If the configured URI is not a valid NGINX location, the IC must exit reporting an error.

cmd/nginx-ingress/main.go Outdated Show resolved Hide resolved
deployments/helm-chart/values.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@Rulox Rulox left a comment

Choose a reason for hiding this comment

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

As @pleshakov says we need validation, other than that lgtm! 👍

@Dean-Coakley
Copy link
Contributor Author

Dean-Coakley commented Nov 4, 2019

@pleshakov

If the configured URI is not a valid NGINX location, the IC must exit reporting an error.

Sorry for missing that. Good catch.

Should be ok now.

deployments/helm-chart/values.yaml Outdated Show resolved Hide resolved
cmd/nginx-ingress/main.go Show resolved Hide resolved
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.

@Dean-Coakley
thx.
I left a suggestion.

Additionally, just realized that the update of the helm chart doc https://github.com/nginxinc/kubernetes-ingress/blob/master/deployments/helm-chart/README.md is missing :( no doc for healthStatusURI param.

Update. sorry, just realized that / should not be allowed as the location, because we have / in the default server config -- https://github.com/nginxinc/kubernetes-ingress/blob/master/internal/configs/version1/nginx-plus.tmpl#L115
Make sure to cover that case. I suggest you also add a unit test for validateLocation

Copy link
Contributor

@Rulox Rulox left a comment

Choose a reason for hiding this comment

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

lgtm once addressed what @pleshakov pointed, approving! 🚀

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.

👍

@Dean-Coakley Dean-Coakley merged commit 75c602e into master Nov 5, 2019
@Dean-Coakley Dean-Coakley deleted the health-status-uri branch November 5, 2019 20:07
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.

Allow nginx-health path to be configurable
3 participants