Use websockets instead of SPDY for streaming#1183
Conversation
4cd56dd to
5cb3583
Compare
|
I was able to trigger the issue by forcing the old SPDY streaming in kubectl: Which leads me to believe we should add an option to disable the fallback and not risk any silent fails. Edit: I propose something like an environment variable |
|
I like the idea. I'm going to add such an env var. |
d12d280 to
672cb9c
Compare
|
@bastjan good call with this! Because I now found a RBAC issue that would otherwise cause a fallback. Websocket exec calls are a "GET" while SPY are a "PUT". EDIT: I'm also going against the checkbox here and also change the chart, because without the change the e2e tests will fail. |
RBAC my eternal "follow up fix for ..." enemy. |
e2f4952 to
446f296
Compare
|
@bastjan can you have a final quick look? Had to kick the tests a bit due to the k8s version bump. |
bastjan
left a comment
There was a problem hiding this comment.
We should probably release this at least as a minor and add a doc page we can link to in the release.
|
Something like diff --git a/docs/modules/ROOT/pages/explanations/system-requirements.adoc b/docs/modules/ROOT/pages/explanations/system-requirements.adoc
index f5022cfa..8097cf06 100644
--- a/docs/modules/ROOT/pages/explanations/system-requirements.adoc
+++ b/docs/modules/ROOT/pages/explanations/system-requirements.adoc
@@ -2,7 +2,9 @@
== Supported Kubernetes Versions
-K8up (v2 or later) officially only supports recent stable Kubernetes versions.
+K8up (v2 or later) officially only supports recent stable Kubernetes versions with support for WebSocket connections in the API server (`1.31` or later).
+
+Older Kubernetes versions may work by setting `--insecure-allow-podexec-spdy-fallback=true` in the operator, but are not officially supported and support may be removed in future releases.
K8up v1 (not maintained anymore) supports legacy Kubernetes clusters such as OpenShift `3.11` (Kubernetes 1.11).
|
4eafdf5 to
2599180
Compare
This commit will try to do an upgrade to a websocket connection. If it fails, a log will be emitted and it will fall back to a SPDY connection. Signed-off-by: Simon Beck <simon.beck@vshn.ch>
Websocket fallback is now disabled by default, since it's possible to produce silent corruption. Signed-off-by: Simon Beck <simon.beck@vshn.ch>
Signed-off-by: Simon Beck <simon.beck@vshn.ch>
Signed-off-by: Simon Beck <simon.beck@vshn.ch>
a520428 to
f4007fb
Compare
|
Thanks for the review! I'll do a minor k8up release after the tests are done. |
Summary
This PR switches the streaming protocol for application aware backups from SPDY to WebSockets. This is how upstream
kubectl execdoes it and should fix truncated backups (#1109). Websocket exec is supported by default since Kubernetes 1.31.For clusters older than 1.31 a fallback option exists
--insecure-allow-podexec-spdy-fallback=true. The fallback is disabled by default because of the risk of silent data corruption.Checklist
For Code changes
bug,enhancement,documentation,change,breaking,dependencyas they show up in the changelog
area:operatorcharts/directory.