Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

[nginx-ingress-controller] Custom errors should be optional #926

Merged
merged 2 commits into from
May 28, 2016

Conversation

aledbf
Copy link
Contributor

@aledbf aledbf commented May 8, 2016

Without this change the errors in the upstream server are redirected to the default backend.

fixes #897

@aledbf aledbf force-pushed the configure-errors branch 2 times, most recently from 60df9b2 to 7460272 Compare May 9, 2016 13:45
@rh-kube-bot
Copy link

Can one of the admins verify this patch?

1 similar comment
@rh-kube-bot
Copy link

Can one of the admins verify this patch?

@databus23
Copy link

Any progress on this? I'm eagerly waiting for this. :)
/cc @bprashanth

@@ -124,6 +124,20 @@ type nginxConfiguration struct {
// accessed using HTTPS.
HSTSMaxAge string `structs:"hsts-max-age,omitempty"`

// enables or disable if HTTP codes should be passed to a client or be redirected to nginx for

Choose a reason for hiding this comment

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

Hmm, can you just pass a list and parse in the controller instead of each code?

Choose a reason for hiding this comment

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

can you also add some text to the docs about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@aledbf aledbf changed the title WIP: [nginx-ingress-controller] Custom errors should be optional [nginx-ingress-controller] Custom errors should be optional May 24, 2016
@aledbf aledbf force-pushed the configure-errors branch 3 times, most recently from 6ffb32f to 2917c10 Compare May 26, 2016 04:39
glog.Infof("NGINX error: %v", err)
return false, err
}

if glog.V(3) {

Choose a reason for hiding this comment

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

suggest simply having a global --verbose=true and flipping log level to V(4) everywhere. That's been helpful for me at least, I almost never really want levelled logs. Just everything, or default. If you want to do that (not in this pr) you can copy how https://github.com/kubernetes/contrib/blob/master/ingress/controllers/gce/main.go#L111 is handled

@bprashanth
Copy link

LGTM sorry for the delay, all I had were a couple of nits that can easily be fixed in a follow up pr

@bprashanth bprashanth merged commit 1b1761e into kubernetes-retired:master May 28, 2016
@aledbf aledbf deleted the configure-errors branch May 30, 2016 14:13
aledbf pushed a commit to aledbf/contrib that referenced this pull request Nov 10, 2016
[nginx-ingress-controller] Custom errors should be optional
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nginx Ingress Controller - Option to disable interception of errors
6 participants