Skip to content

Commit

Permalink
artms 515 change ipfamilypolicy
Browse files Browse the repository at this point in the history
IPv4/IPv6 dual-stack networking graduates to GA. Since 1.21, Kubernetes clusters are enabled to support dual-stack networking by default. In 1.23, the IPv6DualStack feature gate is removed.

For Headless Service , If the service doesn't have any selectors defined then it is defaulted to RequireDualStack on any cluster (single- or dual-stack)

https://github.com/kubernetes/kubernetes/blob/e6c093d87ea4cbb530a7b2ae91e54c0842d8308a/pkg/registry/core/service/storage/storage.go#L274
  • Loading branch information
Liwanshi authored Oct 30, 2023
1 parent 51de3b3 commit 3fbee68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/reconciliation/construct_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ func newAdditionalSeedServiceForCassandraDatacenter(dc *api.CassandraDatacenter)
service.Spec.Type = "ClusterIP"
service.Spec.ClusterIP = "None"
service.Spec.PublishNotReadyAddresses = true
// Adding ipFamilies and ipFamilyPolicy
service.Spec.IPfamilies = []corev1.IPFamily{"IPv4"}

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

View workflow job for this annotation

GitHub Actions / Run unit tests

service.Spec.IPfamilies undefined (type "k8s.io/api/core/v1".ServiceSpec has no field or method IPfamilies)
service.Spec.IPFamilyPolicy = corev1.IPFamilyPolicySingleStack

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

View workflow job for this annotation

GitHub Actions / Run unit tests

cannot use corev1.IPFamilyPolicySingleStack (constant "SingleStack" of type "k8s.io/api/core/v1".IPFamilyPolicy) as *"k8s.io/api/core/v1".IPFamilyPolicy value in assignment

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

Expand Down

0 comments on commit 3fbee68

Please sign in to comment.