kastenhq / kubestr

Apache License 2.0
349 stars 47 forks source link

Pass context to kube.Exec and similar functions. #25703 #249

Closed e-sumin closed 4 months ago

e-sumin commented 5 months ago

Currently, commands executed in pods are not aware of context state, and if context is cancelled they are still running. This PR changes K10 code so that context is always passed to any kind of kube.Exec method.

There is related Kanister PR https://github.com/kanisterio/kanister/pull/2878 which contains passing context right to the Kubernetes Executor.StreamWithContext which states "The context controls the entire lifetime of stream execution."

e-sumin commented 5 months ago

Go version bumped due to Kanister requirements.

e-sumin commented 5 months ago

TMP commit refers proper Kanister revision. Should be removed before merging.

PR should be merged only after Kanister one will be merged.