You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OperatorHub.io page provides this sample yaml for deploying an Integration:
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
When this is applied to my cluster, the Integration resource is created successfully, but is stuck in the "Deploying" phase.
I found this error in the operator logs:
{"level":"error","ts":1598544943.9755495,"logger":"controller-runtime.controller","msg":"Reconciler error","controller":"integration-controller","request":"camel827-1/example","error":"error executing post actions: error during replace resource: could not create or replace resource example: Deployment.apps \"example\" 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 \"example\" 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\"]\ncould not create or replace resource example\ngithub.com/apache/camel-k/pkg/util/kubernetes.ReplaceResource\n\tgithub.com/apache/camel-k/pkg/util/kubernetes/replace.go:69\ngithub.com/apache/camel-k/pkg/util/kubernetes.ReplaceResources\n\tgithub.com/apache/camel-k/pkg/util/kubernetes/replace.go:38\ngithub.com/apache/camel-k/pkg/trait.(*deployerTrait).Apply.func1\n\tgithub.com/apache/camel-k/pkg/trait/deployer.go:68\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:52\ngithub.com/apache/camel-k/pkg/controller/integration.(*deployAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/deploy.go:56\ngithub.com/apache/camel-k/pkg/controller/integration.(*ReconcileIntegration).Reconcile\n\tgithub.com/apache/camel-k/pkg/controller/integration/integration_controller.go:261\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88\nruntime.goexit\n\truntime/asm_amd64.s:1357\nerror during replace resource\ngithub.com/apache/camel-k/pkg/trait.(*deployerTrait).Apply.func1\n\tgithub.com/apache/camel-k/pkg/trait/deployer.go:69\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:52\ngithub.com/apache/camel-k/pkg/controller/integration.(*deployAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/deploy.go:56\ngithub.com/apache/camel-k/pkg/controller/integration.(*ReconcileIntegration).Reconcile\n\tgithub.com/apache/camel-k/pkg/controller/integration/integration_controller.go:261\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88\nruntime.goexit\n\truntime/asm_amd64.s:1357\nerror executing post actions\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:54\ngithub.com/apache/camel-k/pkg/controller/integration.(*deployAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/deploy.go:56\ngithub.com/apache/camel-k/pkg/controller/integration.(*ReconcileIntegration).Reconcile\n\tgithub.com/apache/camel-k/pkg/controller/integration/integration_controller.go:261\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:256\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88\nruntime.goexit\n\truntime/asm_amd64.s:1357","stacktrace":"github.com/apache/camel-k/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\tgithub.com/apache/camel-k/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:258\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\ngithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tgithub.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153\ngithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\tgithub.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
The text was updated successfully, but these errors were encountered:
By comparing this YAML to a working Integration, I believe the problem is in the last line: name: Example.java needs to be indented to be part of the item in the sources list. Currently the YAML is re-formatted to this in the cluster:
spec:
name: Example.java
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");
}
}
But it should be more like this:
spec:
sources:
- name: Example.java
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");
}
}
The OperatorHub.io page provides this sample yaml for deploying an Integration:
When this is applied to my cluster, the Integration resource is created successfully, but is stuck in the "Deploying" phase.
I found this error in the operator logs:
The text was updated successfully, but these errors were encountered: