From 4ce10a4bdad80037d227d84bede3f9723b5e4234 Mon Sep 17 00:00:00 2001 From: Roman Chernobelskiy <1326903+rchernobelskiy@users.noreply.github.com> Date: Thu, 29 Apr 2021 00:07:24 -0400 Subject: [PATCH 1/2] All dns lookup for all pods --- operator/pkg/reconciliation/construct_statefulset.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/operator/pkg/reconciliation/construct_statefulset.go b/operator/pkg/reconciliation/construct_statefulset.go index bb3a1506a..50b349c8e 100644 --- a/operator/pkg/reconciliation/construct_statefulset.go +++ b/operator/pkg/reconciliation/construct_statefulset.go @@ -7,6 +7,7 @@ package reconciliation import ( "fmt" + api "github.com/datastax/cass-operator/operator/pkg/apis/cassandra/v1beta1" "github.com/datastax/cass-operator/operator/pkg/httphelper" "github.com/datastax/cass-operator/operator/pkg/images" @@ -93,12 +94,12 @@ func rackNodeAffinitylabels(dc *api.CassandraDatacenter, rackName string) (map[s if rack.Zone != "" { if _, found := nodeAffinityLabels[zoneLabel]; found { log.Error(nil, - "Deprecated parameter Zone is used and also defined in NodeAffinityLabels. " + - "You should only define it in NodeAffinityLabels") + "Deprecated parameter Zone is used and also defined in NodeAffinityLabels. "+ + "You should only define it in NodeAffinityLabels") } nodeAffinityLabels = utils.MergeMap( emptyMapIfNil(nodeAffinityLabels), map[string]string{zoneLabel: rack.Zone}, - ) + ) } break } @@ -198,7 +199,7 @@ func newStatefulSetForCassandraDatacenterHelper( MatchLabels: statefulSetSelectorLabels, }, Replicas: &replicaCountInt32, - ServiceName: dc.GetDatacenterServiceName(), + ServiceName: dc.GetAllPodsServiceName(), PodManagementPolicy: appsv1.ParallelPodManagement, Template: *template, VolumeClaimTemplates: volumeClaimTemplates, From 7237698322d5f79fb2917945411b1af9178a15cd Mon Sep 17 00:00:00 2001 From: Roman Chernobelskiy <1326903+rchernobelskiy@users.noreply.github.com> Date: Thu, 29 Apr 2021 00:09:51 -0400 Subject: [PATCH 2/2] less noise --- operator/pkg/reconciliation/construct_statefulset.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/operator/pkg/reconciliation/construct_statefulset.go b/operator/pkg/reconciliation/construct_statefulset.go index 50b349c8e..5094fbc34 100644 --- a/operator/pkg/reconciliation/construct_statefulset.go +++ b/operator/pkg/reconciliation/construct_statefulset.go @@ -7,7 +7,6 @@ package reconciliation import ( "fmt" - api "github.com/datastax/cass-operator/operator/pkg/apis/cassandra/v1beta1" "github.com/datastax/cass-operator/operator/pkg/httphelper" "github.com/datastax/cass-operator/operator/pkg/images" @@ -94,12 +93,12 @@ func rackNodeAffinitylabels(dc *api.CassandraDatacenter, rackName string) (map[s if rack.Zone != "" { if _, found := nodeAffinityLabels[zoneLabel]; found { log.Error(nil, - "Deprecated parameter Zone is used and also defined in NodeAffinityLabels. "+ - "You should only define it in NodeAffinityLabels") + "Deprecated parameter Zone is used and also defined in NodeAffinityLabels. " + + "You should only define it in NodeAffinityLabels") } nodeAffinityLabels = utils.MergeMap( emptyMapIfNil(nodeAffinityLabels), map[string]string{zoneLabel: rack.Zone}, - ) + ) } break }