Red Hat Camel K is deprecated
Red Hat Camel K is deprecated and the End of Life date for this product is June 30, 2025. For help migrating to the current go-to solution, Red Hat build of Apache Camel, see the Migration Guide.6.2.7. Service Trait
Service trait 会公开与 Service 资源的集成,以便在同一命名空间中的其他应用程序(或集成)可以访问它。
如果集成依赖于可公开 HTTP 端点的 Camel 组件,它默认启用。
此特征在以下配置集中提供: Kubernetes、OpenShift。
6.2.7.1. 配置
运行任何与 CLI 的集成时,可以指定特征属性:
$ kamel run --trait service.[key]=[value] --trait service.[key2]=[value2] Integration.java
可用的配置选项如下:
属性 | 类型 | Description |
---|---|---|
|
| 可用于启用或禁用特征。所有特征共享此通用属性。 |
|
| 如果需要创建服务,从代码中自动检测。 |
|
| 启用 Service 以作为 NodePort 公开 |