-
Notifications
You must be signed in to change notification settings - Fork 368
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] #2893
Conversation
…e], compatibility legacy kube api server which not support server-side apply Signed-off-by: wurenny <[email protected]>
✅ Deploy Preview for devspace-docs canceled.
|
Signed-off-by: Russell Centanni <[email protected]>
c05afea
to
e84bd0b
Compare
Signed-off-by: Russell Centanni <[email protected]>
a3b7334
to
d84d605
Compare
@wurenny This is a re-creation of your original PR with some linting & test fixes. |
pkg/devspace/kubectl/client.go
Outdated
"net/http" | ||
"os" | ||
"time" |
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.
Those stdlib imports should be at the top, below fmt.
pkg/devspace/kubectl/util.go
Outdated
func IsIncompatibleServerError(err error) bool { | ||
// 415: Unsupported media type means we're talking to a server which doesn't support server-side apply. | ||
// Also included the apiserver enabled feature: ServerSideApply=false option | ||
if _, ok := err.(*kerrors.StatusError); !ok { |
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.
We might want to use an error.As
here.
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.
Just used kerrors.IsUnsupportedMediaType(err)
instead.
Signed-off-by: Russell Centanni <[email protected]>
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
reproduce