Package io.strimzi.api.kafka.model.kafka
Class KafkaResources
java.lang.Object
io.strimzi.api.kafka.model.kafka.KafkaResources
Encapsulates the naming scheme used for the resources which the Cluster Operator manages for a
Kafka cluster.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringautoRebalancingKafkaRebalanceResourceName(String cluster, KafkaAutoRebalanceMode kafkaAutoRebalanceMode) Compose the name of the KafkaRebalance custom resource to be used for running an auto-rebalancing in the specified mode for the specified Kafka clusterstatic 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 StringclusterOperatorCertsSecretName(String cluster) Name of the secret with the Cluster Operator certificates for connecting to this clusterstatic StringentityOperatorDeploymentName(String clusterName) Returns the name of the Entity OperatorDeploymentfor aKafkacluster of the given name.static StringentityOperatorSecretName(String clusterName) Deprecated.static StringentityTopicOperatorCcApiSecretName(String clusterName) Returns the name of the Cruise Control API authSecretused by the Topic Operator in aKafkacluster of the given name.static StringentityTopicOperatorLoggingConfigMapName(String clusterName) Returns the name of the Entity Topic Operator loggingConfigMapfor aKafkacluster of the given name.static StringentityTopicOperatorRoleBinding(String clusterName) Get the name of the Entity Topic Operator role binding given the name of the Kafka cluster.static StringentityTopicOperatorSecretName(String clusterName) Returns the name of the Entity Topic OperatorSecretfor aKafkacluster of the given name.static StringentityUserOperatorLoggingConfigMapName(String clusterName) Returns the name of the Entity User Operator loggingConfigMapfor aKafkacluster of the given name.static StringentityUserOperatorRoleBinding(String clusterName) Get the name of the Entity User Operator role binding given the name of the Kafka cluster.static StringentityUserOperatorSecretName(String clusterName) Returns the name of the Entity User 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 StringkafkaComponentName(String clusterName) Returns the name of the KafkaStrimziPodSetfor aKafkacluster of the given name.static StringkafkaJmxSecretName(String clusterName) Returns the name of the Kafka Secret with JMX credentials.static StringkafkaMetricsAndLogConfigMapName(String clusterName) Returns the name of the Kafka metrics and logConfigMapfor aKafkacluster of the given name.static StringkafkaNetworkPolicyName(String clusterName) Returns the name of the Kafka Network Policy.static StringkafkaPodName(String clusterName, int podNum) Returns the name of the KafkaPodfor aKafkacluster not usingKafkaNodePoolresources.static StringkafkaPodName(String clusterName, String nodePoolName, int podNum) Returns the name of the KafkaPodfor aKafkacluster usingKafkaNodePoolresources.static StringkafkaSecretName(String clusterName) Returns the name of the Kafka Secret with server certificates.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 StringzookeeperComponentName(String clusterName) Returns the name of the ZooKeeperStrimziPodSetfor 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 StringzookeeperJmxSecretName(String clusterName) Returns the name of the ZooKeeper Secret with JMX credentials.static StringzookeeperMetricsAndLogConfigMapName(String clusterName) Returns the name of the ZooKeeper metrics and logConfigMapfor aKafkacluster of the given name.static StringzookeeperNetworkPolicyName(String clusterName) Returns the name of the ZooKeeper Network Policy.static StringzookeeperPodName(String clusterName, int podNum) Returns the name of the ZooKeeperPodfor aKafkacluster of the given name.static StringzookeeperSecretName(String clusterName) Returns the name of the ZooKeeper Secret with server certificates.static StringzookeeperServiceName(String clusterName) Returns the name of the ZooKeeper service name for aKafkacluster of the given name.
-
Method Details
-
clusterCaCertificateSecretName
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
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
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
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.
-
kafkaComponentName
Returns the name of the KafkaStrimziPodSetfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Kafka
StrimziPodSet.
-
kafkaPodName
Returns the name of the KafkaPodfor aKafkacluster not usingKafkaNodePoolresources.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.podNum- The ordinal number of the Kafka pod- Returns:
- The name of the corresponding Kafka
Pod.
-
kafkaPodName
Returns the name of the KafkaPodfor aKafkacluster usingKafkaNodePoolresources.- Parameters:
clusterName- Themetadata.nameof theKafkaresourcenodePoolName- Themetadata.nameof theKafkaNodePoolresourcepodNum- The ordinal number of the Kafka pod- Returns:
- The name of the corresponding Kafka
Pod.
-
bootstrapServiceName
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
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
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:
-
brokersServiceName
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
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. This is used only for the backwards compatible service names (listener name has to be `external` and port has to be 9094).- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding bootstrap
Service.
-
brokerSpecificService
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
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.
-
initContainerClusterRoleBindingName
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.
-
kafkaSecretName
Returns the name of the Kafka Secret with server certificates.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Kafka Secret.
-
kafkaJmxSecretName
Returns the name of the Kafka Secret with JMX credentials.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Kafka JMX Secret.
-
kafkaNetworkPolicyName
Returns the name of the Kafka Network Policy.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Kafka Network Policy.
-
zookeeperComponentName
Returns the name of the ZooKeeperStrimziPodSetfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding ZooKeeper
StrimziPodSet.
-
zookeeperPodName
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.
-
zookeeperMetricsAndLogConfigMapName
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
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
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.
-
zookeeperSecretName
Returns the name of the ZooKeeper Secret with server certificates.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding ZooKeeper Secret.
-
zookeeperJmxSecretName
Returns the name of the ZooKeeper Secret with JMX credentials.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding ZooKeeper JMX Secret.
-
zookeeperNetworkPolicyName
Returns the name of the ZooKeeper Network Policy.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding ZooKeeper Network Policy.
-
entityOperatorDeploymentName
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
Deprecated.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. This secret is not used anymore and is deprecated. This method will be removed in the future.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Entity Operator
Secret.
-
entityTopicOperatorSecretName
Returns the name of the Entity Topic OperatorSecretfor aKafkacluster of the given name. ThisSecretwill only exist ifKafka.spec.entityOperator.topicOperatoris configured in theKafkaresource with the given name. Note: This secret is used by both EntityTopicOperator and the TLS sidecar in the same EntityOperator.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Entity Topic Operator
Secret.
-
entityTopicOperatorCcApiSecretName
Returns the name of the Cruise Control API authSecretused by the Topic Operator in aKafkacluster of the given name. ThisSecretwill only exist ifKafka.spec.cruiseControlis configured in theKafkaresource with the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding
Secret.
-
entityTopicOperatorLoggingConfigMapName
Returns the name of the Entity Topic Operator loggingConfigMapfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Entity Topic Operator metrics and log
ConfigMap.
-
entityTopicOperatorRoleBinding
Get the name of the Entity Topic Operator role binding given the name of the Kafka cluster.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the Entity Topic Operator role binding.
-
entityUserOperatorSecretName
Returns the name of the Entity User OperatorSecretfor aKafkacluster of the given name. ThisSecretwill only exist ifKafka.spec.entityOperator.userOperatoris configured in theKafkaresource with the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Entity Operator
Secret.
-
entityUserOperatorLoggingConfigMapName
Returns the name of the Entity User Operator loggingConfigMapfor aKafkacluster of the given name.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the corresponding Entity User Operator metrics and log
ConfigMap.
-
entityUserOperatorRoleBinding
Get the name of the Entity User Operator role binding given the name of the Kafka cluster.- Parameters:
clusterName- Themetadata.nameof theKafkaresource.- Returns:
- The name of the Entity User Operator role binding.
-
clusterOperatorCertsSecretName
Name of the secret with the Cluster Operator certificates for connecting to this cluster- Parameters:
cluster- Name of the Kafka cluster- Returns:
- Name of the Cluster Operator certificate secret
-
autoRebalancingKafkaRebalanceResourceName
public static String autoRebalancingKafkaRebalanceResourceName(String cluster, KafkaAutoRebalanceMode kafkaAutoRebalanceMode) Compose the name of the KafkaRebalance custom resource to be used for running an auto-rebalancing in the specified mode for the specified Kafka cluster- Parameters:
cluster- Kafka cluster name (from Kafka custom resource metadata)kafkaAutoRebalanceMode- Auto-rebalance mode- Returns:
- the name of the KafkaRebalance custom resource to be used for running an auto-rebalancing in the specified mode for the specified Kafka cluster
-