I want to implement custom metric API server to use with HPA. we have proprietary monitoring system that have client library in C# but all the implementation i saw online are in Go.
Is there a definition of REST API (request and response) that the HPA call? or this can be only in Go (for some reason)?
I can use this to create a proxy server between Go and my C# server but i rather go straight to my server from HPA
types.go
files are the source of truth for Kubernetes API definitions. All other definition formats are generated from these files. You can find files with definitions of custom metrics API here:
Script to generate swagger API definitions can be found here but is probably not worth the trouble since the API is so simple.
"Is there a definition of REST API (request and response) that the HPA call? or this can be only in Go (for some reason)?"
From what I was able to find the original API definitions in types.go are in GO code. For some APIs other API definitions are available, but they're all generated from types.go
files and this particular API doesn't have any other definitions pre-generated because it's not an official part of k8s APIs. I'm not 100% sure but it certainly looks like currently GO is the only way to go.