juliuskrah / camel-k-examples

Camel K Examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Camel K integration for GitHub

Run the application in dev mode

gitHubAPI.groovy
kamel run --dependency camel-jackson --dependency camel-netty-http --property file:application.properties --trait service.node-port=false --trait logging.level=DEBUG gitHubAPI.groovy --dev
GitHubAPI.java
kamel run --dependency camel-jackson --dependency camel-netty-http --property file:application.properties --trait service.node-port=false --trait logging.level=DEBUG GitHubAPI.java --dev

Forward the port

kubectl port-forward services/git-hub-api 8080:80

Payload

curl --location 'http://localhost:8080/dummy' \
--header 'x-my-header: foo' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer foobar' \
--data '[
    {
        "organization": "juliuskrah",
        "repository": "quarkus-liquibase"
    },
    {
        "organization": "juliuskrah",
        "repository": "hibernate-liquibase"
    },
    {
        "organization": "spring-projects",
        "repository": "spring-boot"
    }
]'

Configuring Camel-K Operator

run kubectl edit ip camel-k -n development change from Java 11 to Java 17

status:
  build:
    baseImage: eclipse-temurin:17-alpine

Maven Repository

settings.xml

<settings>
    <profiles>
        <profile>
            <id>camel-k</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>camel-repo-snapshot</id>
                    <!--...-->
                </repository>
                <repository>
                    <id>camel-repo-release</id>
                    <!--...-->
                </repository>
            </repositories>
        </profile>
    </profiles>
    <servers>
        <server>
            <id>camel-repo-snapshot</id>
            <username>xxx</username>
            <password>xxx</password>
        </server>
        <server>
            <id>camel-repo-release</id>
            <username>xxx</username>
            <password>xxx</password>
        </server>
    </servers>
</settings>

About

Camel K Examples


Languages

Language:Java 69.7%Language:Groovy 30.3%