Class KafkaConnectResources

java.lang.Object
io.strimzi.api.kafka.model.connect.KafkaConnectResources

public class KafkaConnectResources extends Object
Encapsulates the naming scheme used for the resources which the Cluster Operator manages for a KafkaConnect cluster.
  • Method Details

    • componentName

      public static String componentName(String clusterName)
      Returns the name of the Kafka Connect Deployment for a KafkaConnect cluster of the given name.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding Kafka Connect Deployment.
    • serviceAccountName

      public static String serviceAccountName(String clusterName)
      Returns the name of the Kafka Connect ServiceAccount for a KafkaConnect cluster of the given name.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding Kafka Connect ServiceAccount.
    • serviceName

      public static String serviceName(String clusterName)
      Returns the name of the HTTP REST Service for a KafkaConnect cluster of the given name. This returns only the name of the service without any namespace. Therefore it cannot be used to connect to the Connect REST API. USe the qualifiedServiceName or url methods instead.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding Service.
    • jmxSecretName

      public static String jmxSecretName(String clusterName)
      Returns the name of the Kafka Secret with JMX credentials.
      Parameters:
      clusterName - The metadata.name of the Kafka resource.
      Returns:
      The name of the corresponding Kafka JMX Secret.
    • metricsAndLogConfigMapName

      public static String metricsAndLogConfigMapName(String clusterName)
      Returns the name of the Kafka Connect metrics and log ConfigMap for a KafkaConnect cluster of the given name.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding KafkaConnect metrics and log ConfigMap.
    • configStorageTopicOffsets

      public static String configStorageTopicOffsets(String clusterName)
      Returns the name of the Kafka Connect config offsets for a KafkaConnect cluster of the given name.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding KafkaConnect config offsets value.
    • configStorageTopicStatus

      public static String configStorageTopicStatus(String clusterName)
      Returns the name of the Kafka Connect config status for a KafkaConnect cluster of the given name.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding KafkaConnect config status value.
    • qualifiedServiceName

      public static String qualifiedServiceName(String clusterName, String namespace)
      Returns qualified name of the service which works across different namespaces.
      Parameters:
      clusterName - Name of the Connect CR
      namespace - Namespace of the Connect deployment
      Returns:
      qualified namespace in the format "<service-name>.<namespace>.svc"
    • url

      public static String url(String clusterName, String namespace, int port)
      Returns the URL of the Kafka Connect REST API for a KafkaConnect cluster of the given name.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      namespace - The namespace where KafkaConnect cluster is running.
      port - The port on which the KafkaConnect API is available.
      Returns:
      The base URL of the KafkaConnect REST API.
    • initContainerClusterRoleBindingName

      public static String initContainerClusterRoleBindingName(String clusterName, String namespace)
      Get the name of the resource init container role binding given the name of the namespace and cluster.
      Parameters:
      clusterName - The cluster name.
      namespace - The namespace.
      Returns:
      The name of the init container's cluster role binding.
    • dockerFileConfigMapName

      public static String dockerFileConfigMapName(String clusterName)
      Returns the name of the Kafka Connect ConfigMap for a KafkaConnect build which contains the Dockerfile.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding Kafka Connect ConfigMap.
    • buildPodName

      public static String buildPodName(String clusterName)
      Returns the name of the Kafka Connect Pod for a KafkaConnect build that builds the new image.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding Kafka Connect build Pod.
    • buildServiceAccountName

      public static String buildServiceAccountName(String clusterName)
      Returns the name of the Kafka Connect Build ServiceAccount for a KafkaConnect cluster of the given name.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding Kafka Connect Build ServiceAccount.
    • buildConfigName

      public static String buildConfigName(String clusterName)
      Returns the name of the Kafka Connect BuildConfig for a KafkaConnect build that builds the new image.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      Returns:
      The name of the corresponding Kafka Connect BuildConfig.
    • buildName

      public static String buildName(String clusterName, Long buildVersion)
      Returns the name of the Kafka Connect Build for a KafkaConnect build that builds the new image.
      Parameters:
      clusterName - The metadata.name of the KafkaConnect resource.
      buildVersion - The version of the build for which the name should be generated
      Returns:
      The name of the corresponding Kafka Connect BuildConfig Build.