kubescape / storage

Apache License 2.0
1 stars 6 forks source link

fix: reject Protobuf requests #16

Closed vladklokun closed 1 year ago

vladklokun commented 1 year ago

What this PR changes?

Prior to this PR, the types that this APIServer declared did not support Protobuf, yet the default APIServer configuration advertised it as supported. This led to certain requests made in Protobuf format fail and could lead to error messages in the server logs and unexpected issues in the cluster. One of the issues we have found is not being able to delete namespaces when the APIServer was running (see https://github.com/kubernetes/kubernetes/issues/86666).

This PR introduces a default serializer that rejects the Protobuf content type, thus not advertizing support for it, making clients fall back to other supported content types.