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 retries support for vs/vsr #628

Merged
merged 15 commits into from
Jul 26, 2019
Merged

Add retries support for vs/vsr #628

merged 15 commits into from
Jul 26, 2019

Conversation

LorcanMcVeigh
Copy link
Contributor

Proposed changes

Added support and documentation for next-upstream-timeout and next-upstream-retries

Checklist

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

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • 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

@LorcanMcVeigh LorcanMcVeigh self-assigned this Jul 22, 2019
@LorcanMcVeigh LorcanMcVeigh changed the title Support retries Add retries support for vs/vsr Jul 22, 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.

@LorcanMcVeigh thanks for the PR!

Please see my comments.

Additionally, we need to validate all fields in our resources. Make sure to add validation for the newly added fields. You can take a look at how other fields in the upstream are validated. next_upstream might be tricky - make sure to study carefully how it works http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream As always, make sure you validation code works the same way as NGINX would validate those fields.

docs/virtualserver-and-virtualserverroute.md Outdated Show resolved Hide resolved
internal/configs/virtualserver.go Outdated Show resolved Hide resolved
pkg/apis/configuration/v1alpha1/types.go 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.

lgtm, 1 small suggestion. Also as Michael said, you need to add validation for the new fields. Check https://github.com/nginxinc/kubernetes-ingress/blob/master/pkg/apis/configuration/validation/validation.go#L124

internal/configs/virtualserver.go Outdated 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.

Thanks!
Couple of suggestions for the new changes

docs/virtualserver-and-virtualserverroute.md Outdated Show resolved Hide resolved
internal/configs/virtualserver_test.go 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.

Looks good , few questions/suggestions!

pkg/apis/configuration/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation_test.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation_test.go Outdated Show resolved Hide resolved
@LorcanMcVeigh LorcanMcVeigh requested a review from Rulox July 25, 2019 11:28
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.

@LorcanMcVeigh Please see additional comments

internal/configs/virtualserver_test.go Show resolved Hide resolved
pkg/apis/configuration/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation_test.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation_test.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation_test.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation.go Outdated 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.

Approving! Before merging, please fix the remaining small suggestions.

pkg/apis/configuration/validation/validation_test.go Outdated Show resolved Hide resolved
pkg/apis/configuration/validation/validation_test.go 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.

lgtm :shipit: @LorcanMcVeigh remember to squash all your commits in one before merging.

@LorcanMcVeigh LorcanMcVeigh merged commit 9ebd4ee into master Jul 26, 2019
@LorcanMcVeigh LorcanMcVeigh deleted the support-retries branch July 26, 2019 14:34
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.

3 participants