Improve error from readiness probe validation#5385
Improve error from readiness probe validation#5385knative-prow-robot merged 2 commits intoknative:masterfrom
Conversation
As described in knative#5382, `failureThreshold` and `timeoutSeconds` in readinessprobe are disapplowed only when `periodSeconds` is zero. This patch improves the error. - Error message after this patch: ``` error: services.serving.knative.dev "hello-example" could not be patched: Internal error occurred: admission webhook "webhook.serving.knative.dev" denied the request: mutation failed: timeoutSeconds is disallowed when periodSeconds is zero: spec.template.spec.containers[0].readinessProbe.failureThreshold, spec.template.spec.containers[0].readinessProbe.periodSeconds ```
knative-prow-robot
left a comment
There was a problem hiding this comment.
@nak3: 0 warnings.
Details
In response to this:
Proposed Changes
As described in #5382,
failureThresholdandtimeoutSecondsin readinessprobe are
disapplowed only whenperiodSecondsis zero. This patch improves the
error.
- Error message after this patch:
error: services.serving.knative.dev "hello-example" could not be patched: Internal error occurred: admission webhook "webhook.serving.knative.dev" denied the request: mutation failed: timeoutSeconds is disallowed when periodSeconds is zero: spec.template.spec.containers[0].readinessProbe.failureThreshold, spec.template.spec.containers[0].readinessProbe.periodSeconds/lint
Fixes #5382
Release Note
NONE
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
| errs = errs.Also(apis.ErrDisallowedFields("failureThreshold")) | ||
| errs = errs.Also(&apis.FieldError{ | ||
| Message: "failureThreshold is disallowed when periodSeconds is zero", | ||
| Paths: []string{"periodSeconds", "failureThreshold"}, |
There was a problem hiding this comment.
PeriodSeconds probably can be omitted from the path, since its value is valid.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dgerd, nak3 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The following jobs failed due to test flakiness:
Automatically retrying... |
|
/test pull-knative-serving-integration-tests |
Proposed Changes
As described in #5382,
failureThresholdandtimeoutSecondsin readinessprobe aredisapplowed only when
periodSecondsis zero. This patch improves theerror.
/lint
Fixes #5382
Release Note