serving icon indicating copy to clipboard operation
serving copied to clipboard

Optimize DryRun

Open vagababov opened this issue 5 years ago • 15 comments

While investigating https://github.com/knative/pkg/issues/1509 we stumbled upon problem that DryRun validation of podspecs is not really working at scale, since we're overwhelming the RateLimiter in the k8s API client that is used to invoke dry run.

Right now we moved it again to be disabled by default, but it is possible we can investigate the avenues to avoid unnecessary dry runs. E.g. avoid them when pod-spec hasn't changed in updates or completely ignore when the only update is status update.

In what area(s)?

/area API

/assign @whaught

vagababov avatar Jul 30 '20 18:07 vagababov

https://github.com/knative/serving/blob/2644ad1fbed6eb753080b4789595182cfdb23563/pkg/webhook/validate_unstructured.go#L104

I believe we ignore no-op updates. That said there may still be common-cases where we can avoid dry-run on Create.

whaught avatar Jul 30 '20 18:07 whaught

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 Oct 29 '20 01:10 github-actions[bot]

/lifecycle frozen

we can't really enable this right now

vagababov avatar Oct 29 '20 01:10 vagababov

/triage needs-user-input

Is this still important?

evankanderson avatar Mar 22 '21 03:03 evankanderson

@dprotaso

Is this still important (/remove-triage needs-user-input, /triage accepted, /help) or should we close it?

evankanderson avatar Jun 23 '21 20:06 evankanderson

/triage accepted /good-first-issue

Moving to Icebox and labeling this as a good first issue.

My only opinion here is to have PodSpec dry run occur when the user has request dry-runs for our CRD types - Service and Configuration. For example using kubectl create or kubectl apply there is a --dry-run=server flag. Users shouldn't need the annotation on the Knative Service.

note: I haven't tested whether the dry-run flag works for CRs. If not an alternative could be to add support for dry-run in kn

To implement this we know from the AdmissionRequest whether it's a DryRun or not

dprotaso avatar Apr 29 '22 01:04 dprotaso

@dprotaso: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to this:

/triage accepted /good-first-issue

Moving to Icebox and labeling this as a good first issue.

My only opinion here is to have PodSpec dry run occur when the user has request dry-runs for our CRD types - Service and Configuration. For example using kubectl create or kubectl apply there is a --dry-run=server flag. Users shouldn't need the annotation on the Knative Service.

note: I haven't tested whether the dry-run flag works for CRs. If not an alternative could be to add support for dry-run in kn

To implement this we know from the AdmissionRequest whether it's a DryRun or not

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.

knative-prow[bot] avatar Apr 29 '22 01:04 knative-prow[bot]

I would Like to work on this @dprotaso @ReToCode @vagababov Please assign

ashutosh887 avatar May 03 '23 02:05 ashutosh887

/assign @ashutosh887

dprotaso avatar May 04 '23 23:05 dprotaso

@ashutosh887 are you still working on this?

dprotaso avatar May 29 '23 18:05 dprotaso

/unassign @ashutosh887

dprotaso avatar Aug 16 '23 13:08 dprotaso

@dprotaso

/triage accepted /good-first-issue

Moving to Icebox and labeling this as a good first issue.

My only opinion here is to have PodSpec dry run occur when the user has request dry-runs for our CRD types - Service and Configuration. For example using kubectl create or kubectl apply there is a --dry-run=server flag. Users shouldn't need the annotation on the Knative Service.

note: I haven't tested whether the dry-run flag works for CRs. If not an alternative could be to add support for dry-run in kn

To implement this we know from the AdmissionRequest whether it's a DryRun or not

When run kubectl apply -f deployment.yaml --dry-run=server -oyaml , It will return the deployment yaml, do we also need implement this for Service and Configuration?

xiangpingjiang avatar Aug 20 '23 16:08 xiangpingjiang

/assign

Priyansurout avatar Sep 28 '23 03:09 Priyansurout

@Priyansurout are you still working on this?

dprotaso avatar Oct 20 '23 23:10 dprotaso

@dprotaso no sir

Priyansurout avatar Oct 21 '23 04:10 Priyansurout