diff --git a/pkg/reconciliation/construct_service.go b/pkg/reconciliation/construct_service.go index d4efac73..841de986 100644 --- a/pkg/reconciliation/construct_service.go +++ b/pkg/reconciliation/construct_service.go @@ -123,6 +123,12 @@ func newSeedServiceForCassandraDatacenter(dc *api.CassandraDatacenter) *corev1.S service.Spec.Selector = buildLabelSelectorForSeedService(dc) service.Spec.PublishNotReadyAddresses = true + // Adding ipFamilies and ipFamilyPolicy + service.SpecIPFamilies = []corev1.IPFamily{corev1.IPv4Protocol} + // Create a variable of type corev1.IPFamilyPolicyType + ipFamilyPolicy := corev1.IPFamilyPolicySingleStack + // Set IPFamilyPolicy for localSeedSvc + service.Spec.IPFamilyPolicy = &ipFamilyPolicy addAdditionalOptions(service, &dc.Spec.AdditionalServiceConfig.SeedService) @@ -145,8 +151,11 @@ func newAdditionalSeedServiceForCassandraDatacenter(dc *api.CassandraDatacenter) service.Spec.ClusterIP = "None" service.Spec.PublishNotReadyAddresses = true // Adding ipFamilies and ipFamilyPolicy - service.Spec.IPfamilies = []corev1.IPFamily{"IPv4"} - service.Spec.IPFamilyPolicy = corev1.IPFamilyPolicySingleStack + service.SpecIPFamilies = []corev1.IPFamily{corev1.IPv4Protocol} + // Create a variable of type corev1.IPFamilyPolicyType + ipFamilyPolicy := corev1.IPFamilyPolicySingleStack + // Set IPFamilyPolicy for localSeedSvc + service.Spec.IPFamilyPolicy = &ipFamilyPolicy addAdditionalOptions(&service, &dc.Spec.AdditionalServiceConfig.AdditionalSeedService)