Class CruiseControlResources


  • public class CruiseControlResources
    extends Object
    Encapsulates the naming scheme used for the resources which the Cluster Operator manages for a CruiseControl cluster.
    • Constructor Detail

      • CruiseControlResources

        public CruiseControlResources()
    • Method Detail

      • deploymentName

        public static String deploymentName​(String clusterName)
        Returns the name of the Cruise Control Deployment for a Kafka cluster of the given name.
        Parameters:
        clusterName - The metadata.name of the Kafka resource.
        Returns:
        The name of the corresponding Cruise Control Deployment.
      • serviceAccountName

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

        public static String serviceName​(String clusterName)
        Returns the name of the Cruise Control Service for a Kafka cluster of the given name.
        Parameters:
        clusterName - The metadata.name of the Kafka resource.
        Returns:
        The name of the corresponding Cruise Control Service.
      • qualifiedServiceName

        public static String qualifiedServiceName​(String clusterName,
                                                  String namespace)
        Returns qualified name of the service which works across different namespaces.
        Parameters:
        clusterName - The metadata.name of the Kafka resource.
        namespace - Namespace of the Cruise Control deployment
        Returns:
        qualified namespace in the format "<service-name>.<namespace>.svc"
      • secretName

        public static String secretName​(String clusterName)
        Returns the name of the Cruise Control Secret for a Kafka cluster of the given name. This Secret will only exist if Kafka.spec.cruiseControl is configured in the Kafka resource with the given name.
        Parameters:
        clusterName - The metadata.name of the Kafka resource.
        Returns:
        The name of the corresponding Cruise Control Secret.
      • logAndMetricsConfigMapName

        public static String logAndMetricsConfigMapName​(String clusterName)
        Returns the name of the Cruise Control log ConfigMap for a Kafka cluster of the given name.
        Parameters:
        clusterName - The metadata.name of the Kafka resource.
        Returns:
        The name of the corresponding Cruise Control log ConfigMap.