Skip to content

Commit

Permalink
chore(doc): Java api support
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed May 8, 2023
1 parent 10bbd11 commit d4a6dac
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav-end.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* API
** xref:apis/camel-k.adoc[Camel K API]
** xref:apis/kamelets.adoc[Kamelets API]
** xref:apis/java.adoc[Java API]
* xref:contributing/developers.adoc[Contributing]
** xref:contributing/local-development.adoc[Local development]
** xref:contributing/local-deployment-olm.adoc[Local OLM deployment]
Expand Down
23 changes: 23 additions & 0 deletions docs/modules/ROOT/pages/apis/java.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
= Java API

If you want to integrate the Kubernetes API in your software, we support a https://github.com/fabric8io/kubernetes-client[kubernetes-client] typed API to access Camel K/Kamelets resources from Java programming language. This autogenerated project is released with any release of Camel K, so, the version you're willing to use is aligned with the one of the operator released.

Importing the dependency in Maven projects looks like:

[source,xml]
----
<dependency>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-crds</artifactId>
<version>${version}</version>
</dependency>
----

At this stage you can easily use them such in the following example:

[source,java]
----
var client = new KubernetesClientBuilder().build();
var camelCatalogClient = client.resources(CamelCatalog.class);
camelCatalogClient.list() ...
----

0 comments on commit d4a6dac

Please # to comment.