Class KafkaDeployer


  • public class KafkaDeployer
    extends Object
    Deployment management for Kafka & Kafka Connect clusters via Strimzi
    Author:
    Jakub Cechacek
    • 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
      • project

        private final String project
    • Constructor Detail

      • KafkaDeployer

        public KafkaDeployer​(String project,
                             io.fabric8.openshift.client.OpenShiftClient ocp,
                             okhttp3.OkHttpClient http)
      • KafkaDeployer

        public KafkaDeployer​(String project,
                             io.fabric8.openshift.client.OpenShiftClient ocp)
    • Method Detail

      • 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:
        KafkaController instance for deployed cluster
        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()