我有一个安装了 Camel-k 运算符并正常工作的 Kubernets 环境,如果我使用 Kamel-client 它可以工作(“kamel run Routes.xml”),但我需要在不使用 kamel-client 的情况下运行 XML Route。
我发现我可以创建一个 .yaml ( https://operatorhub.io/operator/camel-k ) 并使用“kubectl apply -f integrationJava.yaml”,这对我有用,它是 XML 之前的第一步,但是我收到一个错误。
apiVersion: camel.apache.org/v1
kind: Integration
metadata:
name: example
spec:
sources:
- content: |
import org.apache.camel.builder.RouteBuilder;
public class Example extends RouteBuilder {
@Override
public void configure() throws Exception {
from("timer:tick")
.setBody(constant("Hello World!"))
.to("log:info?skipBodyLineSeparator=false");
}
}
name: Example.java
骆驼操作员吊舱出错
12/03/2021 09:57:53 {"level":"error","ts":1615553873.387946,"logger":"controller","msg":"Reconciler error","controller":"integration-controller","name":"javaintegration","namespace":"operator","error":"error executing post actions: error during replace resource: could not create or replace resource javaintegration: Deployment.apps \"javaintegration\" is invalid: [spec.template.spec.volumes[0].configMap.items[0].path: Required value, spec.template.spec.containers[0].volumeMounts[0].name: Not found: \"i-source-000\"]","errorVerbose":"Deployment.apps \"javaintegration\" is invalid: [spec.template.spec.volumes[0].configMap.items[0].path: Required value, spec.template.spec.containers[0].volumeMounts[0].name: Not found: \"i-source-000\"]
它说的是有关volumes / volumeMounts的内容,但我已经在crd-integration.yml中查找了这些参数,但它没有类似的东西。
或者这是骆驼运营商本身的一些参数?