serving icon indicating copy to clipboard operation
serving copied to clipboard

Support startupProbe in webhook

Open ahmetb opened this issue 5 years ago • 9 comments

In what area(s)?

/area API /kind spec

What version of Knative?

v0.17.2-gke.3

Expected Behavior

startupProbe should be supported.

Actual Behavior

It seems startupProbe usage is actively prevented in serving webhook.

Error from server (BadRequest): error when creating "STDIN": admission webhook "validation.webhook.serving.knative.dev" denied the request: validation failed: must not set the field(s): spec.template.spec.containers[0].startupProbe

Steps to Reproduce the Problem

apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
  name: hello
spec:
  template:
    spec:
      containers:
      - image: gcr.io/google-samples/hello-app:1.0
        startupProbe:
          exec:
            command: ["/usr/bin/test", "-f", "/start"]
          periodSeconds: 2
          failureThreshold: 100

ahmetb avatar Nov 04 '20 21:11 ahmetb

I believe we want to look at consuming this field from Knative itself rather than relying on readinessProbe as much as we do today. Once we have a minimum K8s version that allows us to consume startupProbe, I assume we'll implement that and allow the same subset to be defined as we do today for readinessProbes (at least roughly).

If we allow this today, we might run into compatibility issues when we want to do that.

markusthoemmes avatar Jan 13 '21 10:01 markusthoemmes

/triage accepted

evankanderson avatar Mar 19 '21 19:03 evankanderson

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jun 18 '21 01:06 github-actions[bot]

/remove-lifecycle stale

julz avatar Jun 18 '21 08:06 julz

I think now we've landed the changes to use StartupProbe properly for our own startup-readiness-probe optimisations we should be in a good place to look at allowing user-provided StartupProbes now.

/assign

julz avatar Aug 25 '21 07:08 julz

Knative release 1.2 requires a minimum K8s version of 1.21.

joke avatar Jan 26 '22 12:01 joke

@julz if you're okay with it, I can take over this one (I've been working on substituting in a startupProbe for the default readinessProbe, which addresses this)

psschwei avatar Jan 26 '22 13:01 psschwei

/unassign /assign @psschwei

julz avatar Feb 13 '22 13:02 julz

I've pulled together a list of various probing scenarios that @dprotaso mentioned in a Google doc:

https://docs.google.com/document/d/1ODpaq-7ChhF7UeN7OSgekPlDrZXhT-3DZUVyl0SGRGQ/edit

Figured it's easier to discuss in this issue and/or the doc rather than in the PR...

psschwei avatar Mar 11 '22 18:03 psschwei

Is there any update on support for startupProbe here?

ankit-db avatar Oct 14 '22 18:10 ankit-db

Nope, haven't had any cycles to devote to this. /unassign

psschwei avatar Oct 14 '22 19:10 psschwei

/assign

jwcesign avatar Oct 25 '22 02:10 jwcesign

I read the docs and code, so the implement way shoud be: implement a startup prob in qp like readiness prob and once it success, stop it and start readinessProb.

I understand right?

But it looks quite few benifit because it does not support exec prob(I mean from qp side). image

cc @psschwei

jwcesign avatar Oct 27 '22 13:10 jwcesign

We had some discussion in #12565 (in particular, @dprotaso 's comment here). I also pulled together this doc that covers some of the different scenarios Dave was alluding to.

psschwei avatar Oct 27 '22 13:10 psschwei