morvencao / kube-sidecar-injector

A Kubernetes mutating webhook server that implements sidecar injection
Apache License 2.0
628 stars 454 forks source link

关于API Server调用webhook报文格式的咨询 #33

Closed darren-wang closed 2 years ago

darren-wang commented 2 years ago

您好,想请教一下API Server调用webhook扩展时报文是JSON的还是protobuf的,因为我们的技术栈是以Java为主,对Go不是很了解,所以想尝试看看Java能不能实现类似的功能,目前就是对报文的形式不是很了解,我看Go的参数声明中既有JSON的又有protouf的,想跟您咨询一下API Server调用webhook扩展时报文的形式,是JSON还是protobuf,还是可以配置的,非常感谢!

morvencao commented 2 years ago

it should be JSON format, because the http request hander has Content-Type=application/json, but I'm sure if it can be configured to the protobuf format.

darren-wang commented 2 years ago

it should be JSON format, because the http request hander has Content-Type=application/json, but I'm sure if it can be configured to the protobuf format.

Thanks a lot, I will try it.