Package io.strimzi.api.kafka.model
Class KafkaResources
- java.lang.Object
-
- io.strimzi.api.kafka.model.KafkaResources
-
public class KafkaResources extends Object
Encapsulates the naming scheme used for the resources which the Cluster Operator manages for aKafkacluster.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbootstrapServiceName(String clusterName)Returns the name of the internal bootstrapServicefor aKafkacluster of the given name.static StringbrokerSpecificService(String clusterName, int podNum)Returns the name of theServicefor a specific KafkaPodof aKafkacluster of the given name.static StringbrokersServiceName(String clusterName)Returns the name of the (headless) brokersServicefor aKafkacluster of the given name.static StringclientsCaCertificateSecretName(String clusterName)Returns the name of the Clients CA certificateSecretfor aKafkacluster of the given name.static StringclientsCaKeySecretName(String clusterName)Returns the name of the Clients CA keySecretfor aKafkacluster of the given name.static StringclusterCaCertificateSecretName(String clusterName)Returns the name of the Cluster CA certificateSecretfor aKafkacluster of the given name.static StringclusterCaKeySecretName(String clusterName)Returns the name of the Cluster CA keySecretfor aKafkacluster of the given name.static StringentityOperatorDeploymentName(String clusterName)Returns the name of the Entity OperatorDeploymentfor aKafkacluster of the given name.static StringentityOperatorSecretName(String clusterName)Returns the name of the Entity OperatorSecretfor aKafkacluster of the given name.static StringexternalBootstrapServiceName(String clusterName)Returns the name of the external bootstrapServicefor aKafkacluster of the given name.static StringinitContainerClusterRoleBindingName(String cluster, String namespace)Get the name of the resource init container role binding given the name of thenamespaceandcluster.static StringkafkaMetricsAndLogConfigMapName(String clusterName)Returns the name of the Kafka metrics and logConfigMapfor aKafkacluster of the given name.static StringkafkaPodName(String clusterName, int podNum)Returns the name of the KafkaPodfor aKafkacluster of the given name.static StringkafkaStatefulSetName(String clusterName)Returns the name of the KafkaStatefulSetfor aKafkacluster of the given name.static StringplainBootstrapAddress(String clusterName)Returns the address (<host>:<port>) of the internal plain bootstrapServicefor aKafkacluster of the given name.static StringtlsBootstrapAddress(String clusterName)Returns the address (<host>:<port>) of the internal TLS bootstrapServicefor aKafkacluster of the given name.static StringzookeeperHeadlessServiceName(String clusterName)Returns the name of the ZooKeeper headless service name for aKafkacluster of the given name.static StringzookeeperMetricsAndLogConfigMapName(String clusterName)Returns the name of the ZooKeeper metrics and logConfigMapfor aKafkacluster of the given name.static StringzookeeperPodName(String clusterName, int podNum)Returns the name of the ZooKeeperPodfor aKafkacluster of the given name.static StringzookeeperServiceName(String clusterName)Returns the name of the ZooKeeper service name for aKafkacluster of the given name.static StringzookeeperStatefulSetName(String clusterName)Returns the name of the ZooKeeperStatefulSetfor aKafkacluster of the given name.
-
-
-
Method Detail
-
zookeeperStatefulSetName
public static String zookeeperStatefulSetName(String clusterName)
Returns the name of the ZooKeeperStatefulSetfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding ZooKeeper
StatefulSet.
-
zookeeperPodName
public static String zookeeperPodName(String clusterName, int podNum)
Returns the name of the ZooKeeperPodfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.podNum- The number of the ZooKeeper pod- Returns:
- The name of the corresponding ZooKeeper
Pod.
-
kafkaStatefulSetName
public static String kafkaStatefulSetName(String clusterName)
Returns the name of the KafkaStatefulSetfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Kafka
StatefulSet.
-
kafkaPodName
public static String kafkaPodName(String clusterName, int podNum)
Returns the name of the KafkaPodfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.podNum- The number of the Kafka pod- Returns:
- The name of the corresponding Kafka
Pod.
-
entityOperatorDeploymentName
public static String entityOperatorDeploymentName(String clusterName)
Returns the name of the Entity OperatorDeploymentfor aKafkacluster of the given name. ThisDeploymentwill only exist ifKafka.spec.entityOperatoris configured in theKafkaresource with the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Entity Operator
Deployment.
-
entityOperatorSecretName
public static String entityOperatorSecretName(String clusterName)
Returns the name of the Entity OperatorSecretfor aKafkacluster of the given name. ThisSecretwill only exist ifKafka.spec.entityOperatoris configured in theKafkaresource with the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Entity Operator
Secret.
-
clusterCaCertificateSecretName
public static String clusterCaCertificateSecretName(String clusterName)
Returns the name of the Cluster CA certificateSecretfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Cluster CA certificate
Secret.
-
clusterCaKeySecretName
public static String clusterCaKeySecretName(String clusterName)
Returns the name of the Cluster CA keySecretfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Cluster CA key
Secret.
-
clientsCaCertificateSecretName
public static String clientsCaCertificateSecretName(String clusterName)
Returns the name of the Clients CA certificateSecretfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Clients CA certificate
Secret.
-
clientsCaKeySecretName
public static String clientsCaKeySecretName(String clusterName)
Returns the name of the Clients CA keySecretfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Clients CA key
Secret.
-
bootstrapServiceName
public static String bootstrapServiceName(String clusterName)
Returns the name of the internal bootstrapServicefor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding bootstrap
Service.
-
plainBootstrapAddress
public static String plainBootstrapAddress(String clusterName)
Returns the address (<host>:<port>) of the internal plain bootstrapServicefor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The address of the corresponding bootstrap
Service. - See Also:
tlsBootstrapAddress(String)
-
tlsBootstrapAddress
public static String tlsBootstrapAddress(String clusterName)
Returns the address (<host>:<port>) of the internal TLS bootstrapServicefor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The address of the corresponding bootstrap
Service. - See Also:
plainBootstrapAddress(String)
-
brokersServiceName
public static String brokersServiceName(String clusterName)
Returns the name of the (headless) brokersServicefor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding brokers
Service.
-
externalBootstrapServiceName
public static String externalBootstrapServiceName(String clusterName)
Returns the name of the external bootstrapServicefor aKafkacluster of the given name. ThisServicewill only exist ifKafka.spec.kafka.listeners.externalis configured for a loadbalancer or NodePort in theKafkaresource with the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding bootstrap
Service.
-
brokerSpecificService
public static String brokerSpecificService(String clusterName, int podNum)
Returns the name of theServicefor a specific KafkaPodof aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.podNum- The number of the Kafka pod corresponding to the service- Returns:
- The name of the corresponding Kafka
Service.
-
kafkaMetricsAndLogConfigMapName
public static String kafkaMetricsAndLogConfigMapName(String clusterName)
Returns the name of the Kafka metrics and logConfigMapfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Kafka metrics and log
ConfigMap.
-
zookeeperMetricsAndLogConfigMapName
public static String zookeeperMetricsAndLogConfigMapName(String clusterName)
Returns the name of the ZooKeeper metrics and logConfigMapfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding ZooKeeper metrics and log
ConfigMap.
-
zookeeperServiceName
public static String zookeeperServiceName(String clusterName)
Returns the name of the ZooKeeper service name for aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding ZooKeeper service name.
-
zookeeperHeadlessServiceName
public static String zookeeperHeadlessServiceName(String clusterName)
Returns the name of the ZooKeeper headless service name for aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding ZooKeeper headless service name.
-
initContainerClusterRoleBindingName
public static String initContainerClusterRoleBindingName(String cluster, String namespace)
Get the name of the resource init container role binding given the name of thenamespaceandcluster.- Parameters:
cluster- The cluster name.namespace- The namespace.- Returns:
- The name of the init container's cluster role binding.
-
-