-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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 httpHeaders to httpGet liveness probe #20116
Conversation
Labelling this PR as size/L |
Oh, I was just wanting exactly this, neat. We're in the middle of fixing flaky tests so it may be a few days before I get to an actual review. |
GCE e2e test build/test passed for commit 3b7edc4821d8dc0ad2e74cba74103152b4b10d0c. |
The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label? |
GCE e2e test build/test passed for commit 4cc5122ad62c49a37c83d2dc003b53aa05a9b527. |
GCE e2e test build/test passed for commit 46817ee9eb2c3b37789da96216e03459adefd8f6. |
@@ -66,11 +66,13 @@ The [http-liveness.yaml](http-liveness.yaml) demonstrates the HTTP check. | |||
httpGet: | |||
path: /healthz | |||
port: 8080 | |||
httpHeaders: | |||
X-Custom-Header: [ Awesome ] |
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.
what doe this being a list of values mean?
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.
That's the actual type for http.Header. It results in the same header being output multiple times, with different values for each occurrence. I guess it might make sense for e.g. chains of X-Forwarded-For? Or for cookies, see http://stackoverflow.com/questions/3241326/set-more-than-one-http-header-with-the-same-name
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.
HTTP lets you specify headers multiple times. Generally I find this feature very annoying, but we definitely should support it.
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.
Sure we should support it, but should we support is as a multi-map (like this) or as a list of {key, value} (which feels more natural to me and less "because that is how Go does it).
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.
Yeah, that's a good question. @thockin's way is probably more consistent with the rest of the API but the current way is going to be a lot more compact. I don't think there's much risk of us wanting to add other fields in here, so I guess I have an extremely minor preference for the current way. up to @thockin
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.
I think the vast majority of cases will be one key, one value. Our API (and the documented conventions) eschew maps where the value is more than a simple primitive.
This can be a list of (key, value) or if you reallllly want to the map-like semantic a list of { key, []value}.
For defaulting you should init a nil map to be an empty map. For validation, I don't know that there's much to validate. Does the HTTP spec say anything about what is allowed in headers, or max number of them or sizes? |
For validation, the RFC allows header field names to use alphanumeric plus a bunch of other ASCII characters ( |
In general, we can always expand the supported character set if needed, but On Thu, Jan 28, 2016 at 9:58 AM, Rudi C notifications@github.com wrote:
|
PTAL. |
GCE e2e test build/test passed for commit 38ea010b8a14b6b1d0c88242e91bd7bcdd1cd3b2. |
GCE e2e test build/test passed for commit 8d880ad1fabca3481e9b43ce7bd1c9268602c1dc. |
PR needs rebase |
GCE e2e test build/test passed for commit ad88a00d9484f22312047af18c7cbae5588abb37. |
I looked over this and have no objections. switching reviewer to @thockin |
Just fixing the testLabels test. It tripped over the defaulting. :-( That and rebasing generated code being painful. |
Sorry, it's a busy project with a few heavily contended files... |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test failed for commit e330c0bb5d5a2303682f62d88dfc0528e8e2cf85. |
"There is no hell, only the Kubernetes submit queue." I'm assuming this is a flake and doesn't need a rebase. |
@therc |
k8s-bot test this issue: #20631 |
I'll keep my eye on this one |
GCE e2e test build/test passed for commit 2681f884b46c0cb9b3ef5ddecc8102c9abef3ae1. |
PR needs rebase |
Sorry, rebase again. It's on my screen all-day in case of any delays :) |
Also update existing documentation and try to steer users away from 'host'. Add validation.
Even preemptive rebasing was pointless... |
GCE e2e test build/test passed for commit a2d1bb7. |
@k8s-oncall this has been a long-suffering PR, if there's bandwidth to merge it, that would be very gracious :) |
This is actually 2nd in the queue right now, and everything is green. I will just let the queue merge this unless I go on a manual merging spree--will keep this tab open. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit a2d1bb7. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
Also update existing documentation and try to steer users away from 'host'.
Fixes #14713
cc: @thockin
Release Note:
Allow HTTP readinessProbes and livenessProbes to include a list of arbitrary HTTP headers.