Skip to content

Commit

Permalink
Use generated headless service name for Cruise Control
Browse files Browse the repository at this point in the history
  • Loading branch information
baluchicken committed Jun 3, 2019
1 parent b26b80d commit 063fde4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/resources/cruisecontrol/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"
"strings"

"github.com/banzaicloud/kafka-operator/pkg/resources/kafka"
"github.com/banzaicloud/kafka-operator/pkg/resources/templates"
"github.com/banzaicloud/kafka-operator/pkg/util"
"github.com/go-logr/logr"
Expand All @@ -38,7 +39,7 @@ func (r *Reconciler) configMap(log logr.Logger) runtime.Object {
# Configuration for the metadata client.
# =======================================
# The Kafka cluster to control.
bootstrap.servers=kafka-headless:29092
bootstrap.servers=%s:%d
# The maximum interval in milliseconds between two metadata refreshes.
#metadata.max.age.ms=300000
# Client id for the Cruise Control. It is used for the metadata client.
Expand Down Expand Up @@ -220,7 +221,7 @@ func (r *Reconciler) configMap(log logr.Logger) runtime.Object {
webserver.accesslog.path=access.log
# HTTP Request Log retention days
webserver.accesslog.retention.days=14
`, strings.Join(r.KafkaCluster.Spec.ZKAddresses, ",")) +
`, fmt.Sprintf(kafka.HeadlessServiceTemplate, r.KafkaCluster.Name), r.KafkaCluster.Spec.ListenersConfig.InternalListeners[0].ContainerPort, strings.Join(r.KafkaCluster.Spec.ZKAddresses, ",")) +
generateSSLConfig(&r.KafkaCluster.Spec.ListenersConfig),
"capacity.json": `
{
Expand Down

0 comments on commit 063fde4

Please sign in to comment.