Package io.strimzi.api.kafka.model
Class KafkaConnectResources
- java.lang.Object
-
- io.strimzi.api.kafka.model.KafkaConnectResources
-
- Direct Known Subclasses:
KafkaConnectS2IResources
public class KafkaConnectResources extends Object
Encapsulates the naming scheme used for the resources which the Cluster Operator manages for aKafkaConnectcluster.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbuildConfigName(String clusterName)Returns the name of the Kafka ConnectBuildConfigfor aKafkaConnectbuild that builds the new image.static StringbuildName(String clusterName, Long buildVersion)Returns the name of the Kafka ConnectBuildfor aKafkaConnectbuild that builds the new image.static StringbuildPodName(String clusterName)Returns the name of the Kafka ConnectPodfor aKafkaConnectbuild that builds the new image.static StringbuildServiceAccountName(String clusterName)Returns the name of the Kafka Connect BuildServiceAccountfor aKafkaConnectcluster of the given name.static StringconfigStorageTopicOffsets(String clusterName)Returns the name of the Kafka Connect config offsets for aKafkaConnectcluster of the given name.static StringconfigStorageTopicStatus(String clusterName)Returns the name of the Kafka Connect config status for aKafkaConnectcluster of the given name.static StringdeploymentName(String clusterName)Returns the name of the Kafka ConnectDeploymentfor aKafkaConnectcluster of the given name.static StringdockerFileConfigMapName(String clusterName)Returns the name of the Kafka ConnectConfigMapfor aKafkaConnectbuild which contains the Dockerfile.static StringinitContainerClusterRoleBindingName(String clusterName, String namespace)Get the name of the resource init container role binding given the name of thenamespaceandcluster.static StringmetricsAndLogConfigMapName(String clusterName)Returns the name of the Kafka Connect metrics and logConfigMapfor aKafkaConnectcluster of the given name.static StringqualifiedServiceName(String clusterName, String namespace)Returns qualified name of the service which works across different namespaces.static StringserviceAccountName(String clusterName)Returns the name of the Kafka ConnectServiceAccountfor aKafkaConnectcluster of the given name.static StringserviceName(String clusterName)Returns the name of the HTTP RESTServicefor aKafkaConnectcluster of the given name.static Stringurl(String clusterName, String namespace, int port)Returns the URL of the Kafka Connect REST API for aKafkaConnectcluster of the given name.
-
-
-
Method Detail
-
deploymentName
public static String deploymentName(String clusterName)
Returns the name of the Kafka ConnectDeploymentfor aKafkaConnectcluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- Returns:
- The name of the corresponding Kafka Connect
Deployment.
-
serviceAccountName
public static String serviceAccountName(String clusterName)
Returns the name of the Kafka ConnectServiceAccountfor aKafkaConnectcluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- Returns:
- The name of the corresponding Kafka Connect
ServiceAccount.
-
serviceName
public static String serviceName(String clusterName)
Returns the name of the HTTP RESTServicefor aKafkaConnectcluster 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 thequalifiedServiceNameorurlmethods instead.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- Returns:
- The name of the corresponding
Service.
-
metricsAndLogConfigMapName
public static String metricsAndLogConfigMapName(String clusterName)
Returns the name of the Kafka Connect metrics and logConfigMapfor aKafkaConnectcluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- 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 aKafkaConnectcluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- 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 aKafkaConnectcluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- 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 CRnamespace- 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 aKafkaConnectcluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.namespace- The namespace whereKafkaConnectcluster is running.port- The port on which theKafkaConnectAPI is available.- Returns:
- The base URL of the
KafkaConnectREST API.
-
initContainerClusterRoleBindingName
public static String initContainerClusterRoleBindingName(String clusterName, String namespace)
Get the name of the resource init container role binding given the name of thenamespaceandcluster.- 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 ConnectConfigMapfor aKafkaConnectbuild which contains the Dockerfile.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- Returns:
- The name of the corresponding Kafka Connect
ConfigMap.
-
buildPodName
public static String buildPodName(String clusterName)
Returns the name of the Kafka ConnectPodfor aKafkaConnectbuild that builds the new image.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- Returns:
- The name of the corresponding Kafka Connect build
Pod.
-
buildServiceAccountName
public static String buildServiceAccountName(String clusterName)
Returns the name of the Kafka Connect BuildServiceAccountfor aKafkaConnectcluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- Returns:
- The name of the corresponding Kafka Connect Build
ServiceAccount.
-
buildConfigName
public static String buildConfigName(String clusterName)
Returns the name of the Kafka ConnectBuildConfigfor aKafkaConnectbuild that builds the new image.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.- Returns:
- The name of the corresponding Kafka Connect
BuildConfig.
-
buildName
public static String buildName(String clusterName, Long buildVersion)
Returns the name of the Kafka ConnectBuildfor aKafkaConnectbuild that builds the new image.- Parameters:
clusterName- Themetadata.nameof theKafkaConnectresource.buildVersion- The version of the build for which the name should be generated- Returns:
- The name of the corresponding Kafka Connect
BuildConfigBuild.
-
-