-
Notifications
You must be signed in to change notification settings - Fork 373
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
fix remote buildkit error: [415: Unsupported Media Type] #2864
Conversation
✅ Deploy Preview for devspace-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I might prefer a non-version based approach to solve this. See my comments. If it's not practical, we can discuss.
@@ -58,11 +58,16 @@ func (r *LocalRegistry) ensureDeployment(ctx devspacecontext.Context) (*appsv1.D | |||
return nil, err | |||
} | |||
|
|||
if !ctx.KubeClient().SupportServerSideApply() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, server side apply can also be disabled. Perhaps handling the 415 response and falling back to a Patch operation would be an option that would adapt to more version / configuration combinations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I proved it, and I would fix it with non-version based approach.
$ kubectl version
Client Version: v1.30.0
Server Version: v1.18.19
$ kubectl -n kube-system get po -l component=kube-apiserver -o yaml | grep -i serversideapply
- --feature-gates=ServerSideApply=false
$ kubectl apply --server-side=true -f - <<EOF
> apiVersion: v1
> kind: ConfigMap
> metadata:
> name: ssa-cm
> namespace: default
> data:
> foo: bar
> EOF
error: Server-side apply not available on the server: (415: Unsupported Media Type)
8939624
to
b60cfc9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue describe
since legacy kube api not support server-side apply, when use remote buildkit will get the error:
this pr will resolve the compatibility issue
The pr summary
What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix
Please provide a short message that should be published in the DevSpace release notes
fix remote buildkit error: [415: Unsupported Media Type], compatibility legacy kube api server which not support server-side apply
repreduce