fix remote buildkit error: [415: Unsupported Media Type]#2864
Closed
wurenny wants to merge 0 commit intodevspace-sh:mainfrom
Closed
fix remote buildkit error: [415: Unsupported Media Type]#2864wurenny wants to merge 0 commit intodevspace-sh:mainfrom
wurenny wants to merge 0 commit intodevspace-sh:mainfrom
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. |
lizardruss
requested changes
Jul 9, 2024
Collaborator
lizardruss
left a comment
There was a problem hiding this comment.
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.
| return nil, err | ||
| } | ||
|
|
||
| if !ctx.KubeClient().SupportServerSideApply() { |
Collaborator
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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