This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: operators.coreos.com/v1alpha1 | |
kind: CatalogSource | |
metadata: | |
name: dapr-catalog | |
namespace: openshift-marketplace | |
spec: | |
sourceType: grpc | |
image: docker.io/lburgazzoli/dapr-operator-catalog:latest | |
displayName: Dapr Catalog | |
publisher: Me |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// camel-k: language=groovy | |
// camel-k: dependency=camel-endpoint-dsl | |
def k = kafka("default-topic") | |
.brokers('{{KAFKA_URL}}') | |
.securityProtocol('SASL_SSL') | |
.saslMechanism('PLAIN') | |
.saslJaasConfig('org.apache.kafka.common.security.plain.PlainLoginModule required username="{{KAFKA_USR}}" password="{{KAFKA_PWD}}";') | |
.keySerializer('org.apache.kafka.common.serialization.StringSerializer') | |
.valueSerializer('org.apache.kafka.common.serialization.StringSerializer') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.bf2.cos.connector.camel.it; | |
import java.time.Duration; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Properties; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.kafka.clients.admin.AdminClientConfig; | |
import org.apache.kafka.clients.admin.KafkaAdminClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def "kamelet with filter and flow"() { | |
setup: | |
setFlowMode(YamlDeserializationMode.FLOW) | |
loadKamelets ''' | |
apiVersion: camel.apache.org/v1alpha1 | |
kind: Kamelet | |
metadata: | |
name: filter-action | |
spec: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def "kamelet (filter with flow)"() { | |
setup: | |
setFlowMode(YamlDeserializationMode.FLOW) | |
addTemplate('simple-filter') { | |
from('kamelet:source') | |
.filter().simple('${header.foo} == "a"') | |
.to("kamelet:sink") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.slf4j:slf4j-simple:1.7.30 | |
//DEPS org.apache.camel:camel-main:3.9.0 | |
//DEPS org.apache.camel:camel-direct:3.9.0 | |
//DEPS org.apache.camel:camel-log:3.9.0 | |
//DEPS org.apache.camel:camel-timer:3.9.0 | |
//DEPS org.apache.camel:camel-bean:3.9.0 | |
import org.apache.camel.builder.RouteBuilder; | |
import org.apache.camel.main.Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.slf4j:slf4j-simple:1.7.30 | |
//DEPS org.apache.camel:camel-kamelet:3.9.0 | |
//DEPS org.apache.camel:camel-main:3.9.0 | |
//DEPS org.apache.camel:camel-direct:3.9.0 | |
//DEPS org.apache.camel:camel-log:3.9.0 | |
//DEPS org.apache.camel:camel-timer:3.9.0 | |
//DEPS org.apache.camel:camel-seda:3.9.0 | |
import org.apache.camel.Exchange; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inserts a blank line between shell prompts | |
add_newline = false | |
format = """ | |
$username\ | |
$hostname \ | |
$directory\ | |
$git_branch\ | |
$git_commit\ | |
$git_state\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void watch(WebClient client, String token, String resourceVersion) { | |
String path = "/api/v1/namespaces/" + namespace + "/services"; | |
JsonParser parser = JsonParser.newParser().objectValueMode() | |
.handler(event -> onChunk(event.objectValue())); | |
client.get(path) | |
.addQueryParam("watch", "true") | |
.addQueryParam("resourceVersion", resourceVersion) | |
.as(BodyCodec.pipe(new WriteStream<Buffer>() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CamelSource { | |
int maxElements; | |
int timeout; | |
TimeUnit timeoutUnit; | |
List<SourceRecord> records; | |
BlockingQueue<SourceRecord> queue; | |
@Override |
NewerOlder