Skip to content

Commit

Permalink
chore: Add information on how to debug the camel-k operator
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpoth authored and nicolaferraro committed Jul 14, 2020
1 parent ad275d9 commit 8c7307f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/modules/ROOT/pages/developers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,16 @@ oc scale deployment/camel-k-operator --replicas 0

You can scale it back to 1 when you're done and you have updated the operator image.

You can setup the IDE (e.g. Goland) to execute the https://github.com/apache/camel-k/blob/master/cmd/manager/main.go[/cmd/manager/main.go] file in debug mode.
You can setup the IDE (e.g. Goland) to execute the https://github.com/apache/camel-k/blob/master/cmd/manager/main.go[/cmd/manager/main.go] file in debug mode with `operator` as argument.

When configuring the IDE task, make sure to add all required environment variables in the *IDE task configuration screen*:

* Set the `KUBERNETES_CONFIG` environment variable to point to your Kubernetes configuration file (usually `<homedir>/.kube/config`).
* Set the `WATCH_NAMESPACE` environment variable to a Kubernetes namespace you have access to.
* Set the `OPERATOR_NAME` environment variable to `camel-k`.

After you setup the IDE task, you can run and debug the operator process.

After you setup the IDE task, with Java 11+ to be used by default, you can run and debug the operator process.

NOTE: The operator can be fully debugged in Minishift, because it uses OpenShift S2I binary builds under the hood.
The build phase cannot be (currently) debugged in Minikube because the Kaniko builder requires that the operator and the publisher pod
Expand Down

0 comments on commit 8c7307f

Please sign in to comment.