[CAMEL-21032] Generate k8s service for health endpoint#14971
[CAMEL-21032] Generate k8s service for health endpoint#14971christophd merged 1 commit intoapache:mainfrom
Conversation
christophd
left a comment
There was a problem hiding this comment.
Can we enhance the TraitHelper.exposesHttpService() logic to understand that there is a health endpoint exposed? Something needs to listen on the port to return the health status. I still do not understand what represents this health endpoint
| Assertions.assertEquals("NodePort", service.getSpec().getType()); | ||
| Assertions.assertEquals(1, ports.size()); | ||
| Assertions.assertEquals("http", ports.get(0).getName()); | ||
| Assertions.assertEquals(8080, ports.get(0).getPort()); |
There was a problem hiding this comment.
the Kubernetes service should be exposed on port 80 by default so other components in the cluster can call the service with its pure domain name URL (e.g. http://my-service.default/ instead of http://my-service.default:8080/
| // We may (later) decide that the health endpoint can be disabled. | ||
| // if (!TraitHelper.exposesHttpService(context)) { | ||
| // TraitHelper.configureHttpService(traitsSpec); | ||
| // } |
There was a problem hiding this comment.
Do you plan to implement this TraitHelper.configureHttpService(traitsSpec);?
| return traitConfig.getService().getEnabled(); | ||
| } | ||
|
|
||
| if (traitConfig.getContainer().getPort() != null) { |
There was a problem hiding this comment.
I think we need similar for the Knative trait as it also checks on TraitHelper.exposesHttpService()
|
You can now do this ... |
https://issues.apache.org/jira/browse/CAMEL-21032