Yay! Good news for Apiman on Kubernetes. My first official contribution to Kubernetes was just merged in. The proposal speaks to using Kubernetes Service Annotations to determine endpoint information about a service API including a reference to a description document of the API. Some thing I’ve learned is that the namespace part of the annotation name should describe the structure
, and the name itself goes to the right of the slash. I think that’s pretty elegant. Naming things really is the hardest part of our job..
Here is an exampe fragment taken from the Fabric8 quickstarts.
... "objects" : [ { "apiVersion" : "v1", "kind" : "Service", "metadata" : { "annotations" : { "api.service.kubernetes.io/protocol" : "REST", "api.service.kubernetes.io/scheme" "http", "api.service.kubernetes.io/path" : "cxfcdi", "api.service.kubernetes.io/description-path" : "cxfcdi/swagger.json", "api.service.kubernetes.io/description-language" : "SwaggerJSON" }, ...
Hopefully service developers will start using this new standardized convention. Using the annotations will make it a snap to import your service API into an API management tool like Apiman. Now I have to update the Fabric8 docs.
Cheers
--Kurt