Skip to content

Commit

Permalink
Update construct_service.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Liwanshi authored Nov 2, 2023
1 parent 3fbee68 commit 4082c32
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/reconciliation/construct_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Check failure on line 127 in pkg/reconciliation/construct_service.go

View workflow job for this annotation

GitHub Actions / Run unit tests

service.SpecIPFamilies undefined (type *"k8s.io/api/core/v1".Service has no field or method SpecIPFamilies)
// Create a variable of type corev1.IPFamilyPolicyType
ipFamilyPolicy := corev1.IPFamilyPolicySingleStack
// Set IPFamilyPolicy for localSeedSvc
service.Spec.IPFamilyPolicy = &ipFamilyPolicy

addAdditionalOptions(service, &dc.Spec.AdditionalServiceConfig.SeedService)

Expand All @@ -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}

Check failure on line 154 in pkg/reconciliation/construct_service.go

View workflow job for this annotation

GitHub Actions / Run unit tests

service.SpecIPFamilies undefined (type "k8s.io/api/core/v1".Service has no field or method SpecIPFamilies)
// Create a variable of type corev1.IPFamilyPolicyType
ipFamilyPolicy := corev1.IPFamilyPolicySingleStack
// Set IPFamilyPolicy for localSeedSvc
service.Spec.IPFamilyPolicy = &ipFamilyPolicy

addAdditionalOptions(&service, &dc.Spec.AdditionalServiceConfig.AdditionalSeedService)

Expand Down

0 comments on commit 4082c32

Please sign in to comment.