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

improve validation around user-specified timeout values #2728

Closed
skriss opened this issue Jul 24, 2020 · 1 comment · Fixed by #2913
Closed

improve validation around user-specified timeout values #2728

skriss opened this issue Jul 24, 2020 · 1 comment · Fixed by #2913
Assignees
Labels
area/deployment Issues or PRs related to deployment tooling or infrastructure.

Comments

@skriss
Copy link
Member

skriss commented Jul 24, 2020

Currently, if an unparseable timeout value is specified in either the config file or in a TimeoutPolicy field in an HTTPProxy route, the parse error is swallowed and the timeout is disabled/set to infinity.

There are a few things we can do to improve this:

  • for the HTTPProxy fields, add kubebuilder validations (e.g. +kubebuilder:validation:Pattern)
  • for HTTPProxy, if there's an unparseable timeout value, set a validation error or warning in the proxy's status/conditions.
  • for the config file, if there's an unparseable timeout value, return the error so either contour serve can exit, or we can log a warning/error.

Also, consider what to do with unparseable timeout annotations on Ingress resources.

ref. #2697

@skriss skriss self-assigned this Jul 24, 2020
@jpeach jpeach added the area/deployment Issues or PRs related to deployment tooling or infrastructure. label Aug 3, 2020
skriss added a commit to skriss/contour that referenced this issue Sep 11, 2020
Returns errors when parsing timeout strings so they can be reported to
the user, either as invalid HTTPProxies, or in Contour logs. Previously,
such errors were swallowed and the timeout in question was disabled/set
to infinity.

Updates projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit to skriss/contour that referenced this issue Sep 11, 2020
Returns errors when parsing timeout strings so they can be reported to
the user, either as invalid HTTPProxies, or in Contour logs. Previously,
such errors were swallowed and the timeout in question was disabled/set
to infinity.

Updates projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit to skriss/contour that referenced this issue Sep 14, 2020
Returns errors when parsing timeout strings so they can be reported to
the user, either as invalid HTTPProxies, or in Contour logs. Previously,
such errors were swallowed and the timeout in question was disabled/set
to infinity.

Updates projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
@stevesloka
Copy link
Member

// cc auth impl: #2886 (comment)

skriss added a commit to skriss/contour that referenced this issue Sep 15, 2020
Returns errors when parsing timeout strings so they can be reported to
the user, either as invalid HTTPProxies, or in Contour logs. Previously,
such errors were swallowed and the timeout in question was disabled/set
to infinity.

Updates projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit to skriss/contour that referenced this issue Sep 16, 2020
Returns errors when parsing timeout strings so they can be reported to
the user, either as invalid HTTPProxies, or in Contour logs. Previously,
such errors were swallowed and the timeout in question was disabled/set
to infinity.

Updates projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit that referenced this issue Sep 16, 2020
…ty (#2905)

* internal/timeout: return parse errors instead of defaulting to infinity

Returns errors when parsing timeout strings so they can be reported to
the user, either as invalid HTTPProxies, or in Contour logs. Previously,
such errors were swallowed and the timeout in question was disabled/set
to infinity.

Updates #2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit to skriss/contour that referenced this issue Sep 16, 2020
Adds kubebuilder regex validations for all timeout string API
fields.

Closes projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit to skriss/contour that referenced this issue Sep 17, 2020
Adds kubebuilder regex validations for all timeout string API
fields.

Closes projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit to skriss/contour that referenced this issue Sep 17, 2020
Adds kubebuilder regex validations for all timeout string API
fields.

Closes projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit to skriss/contour that referenced this issue Sep 17, 2020
Adds kubebuilder regex validations for all timeout string API
fields.

Closes projectcontour#2728

Signed-off-by: Steve Kriss <[email protected]>
skriss added a commit that referenced this issue Sep 17, 2020
Adds kubebuilder regex validations for all timeout string API
fields.

Closes #2728

Signed-off-by: Steve Kriss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deployment Issues or PRs related to deployment tooling or infrastructure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants