Class KafkaDeployer
- java.lang.Object
-
- io.debezium.testing.openshift.tools.kafka.KafkaDeployer
-
public class KafkaDeployer extends Object
Deployment management for Kafka & Kafka Connect clusters via Strimzi- Author:
- Jakub Cechacek
-
-
Constructor Summary
Constructors Constructor Description KafkaDeployer(String project, io.fabric8.openshift.client.OpenShiftClient ocp)KafkaDeployer(String project, io.fabric8.openshift.client.OpenShiftClient ocp, okhttp3.OkHttpClient http)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KafkaControllerdeployKafkaCluster(String yamlPath)Deploys Kafka ClusterKafkaConnectControllerdeployKafkaConnectCluster(String yamlPath, String loggingYamlPath, boolean useConnectorResources)Deploys Kafka Connect Clusterio.fabric8.kubernetes.api.model.SecretdeployPullSecret(String yamlPath)Deploys pull secret and links it to "default" service account in the projectOperatorControllergetOperator()Accessor for operator controller.private io.fabric8.kubernetes.client.dsl.NonNamespaceOperation<io.strimzi.api.kafka.model.KafkaConnect,io.strimzi.api.kafka.KafkaConnectList,io.fabric8.kubernetes.client.dsl.Resource<io.strimzi.api.kafka.model.KafkaConnect>>kafkaConnectOperation()private io.fabric8.kubernetes.client.dsl.NonNamespaceOperation<io.strimzi.api.kafka.model.Kafka,io.strimzi.api.kafka.KafkaList,io.fabric8.kubernetes.client.dsl.Resource<io.strimzi.api.kafka.model.Kafka>>kafkaOperation()io.strimzi.api.kafka.model.KafkaConnectwaitForConnectCluster(String name)io.strimzi.api.kafka.model.KafkawaitForKafkaCluster(String name)
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
ocp
private final io.fabric8.openshift.client.OpenShiftClient ocp
-
http
private final okhttp3.OkHttpClient http
-
ocpUtils
private final OpenShiftUtils ocpUtils
-
project
private final String project
-
-
Method Detail
-
getOperator
public OperatorController getOperator()
Accessor for operator controller.- Returns:
OperatorControllerinstance for cluster operator inproject
-
deployKafkaCluster
public KafkaController deployKafkaCluster(String yamlPath) throws InterruptedException
Deploys Kafka Cluster- Parameters:
yamlPath- path to CR descriptor (must be available on class path)- Returns:
KafkaControllerinstance for deployed cluster- Throws:
InterruptedException
-
deployKafkaConnectCluster
public KafkaConnectController deployKafkaConnectCluster(String yamlPath, String loggingYamlPath, boolean useConnectorResources) throws InterruptedException
Deploys Kafka Connect Cluster- Parameters:
yamlPath- path to CR descriptor (must be available on class path)useConnectorResources- true if connector deployment should be managed by operator- Returns:
KafkaControllerinstance for deployed cluster- Throws:
InterruptedException
-
waitForKafkaCluster
public io.strimzi.api.kafka.model.Kafka waitForKafkaCluster(String name) throws InterruptedException
- Throws:
InterruptedException
-
waitForConnectCluster
public io.strimzi.api.kafka.model.KafkaConnect waitForConnectCluster(String name) throws InterruptedException
- Throws:
InterruptedException
-
deployPullSecret
public io.fabric8.kubernetes.api.model.Secret deployPullSecret(String yamlPath)
Deploys pull secret and links it to "default" service account in the project- Parameters:
yamlPath- path to Secret descriptor- Returns:
- deployed pull secret
-
kafkaOperation
private io.fabric8.kubernetes.client.dsl.NonNamespaceOperation<io.strimzi.api.kafka.model.Kafka,io.strimzi.api.kafka.KafkaList,io.fabric8.kubernetes.client.dsl.Resource<io.strimzi.api.kafka.model.Kafka>> kafkaOperation()
-
kafkaConnectOperation
private io.fabric8.kubernetes.client.dsl.NonNamespaceOperation<io.strimzi.api.kafka.model.KafkaConnect,io.strimzi.api.kafka.KafkaConnectList,io.fabric8.kubernetes.client.dsl.Resource<io.strimzi.api.kafka.model.KafkaConnect>> kafkaConnectOperation()
-
-