Skip to content

Commit

Permalink
fix: service.spec.ipFamilies field incorrectly overwritten (#6876)
Browse files Browse the repository at this point in the history
  • Loading branch information
iziang authored Mar 25, 2024
1 parent bb2f7f6 commit 10b9279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/apps/transformer_cluster_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func resolveServiceDefaultFields(obj, objCopy *corev1.ServiceSpec) {
if len(objCopy.SessionAffinity) == 0 {
objCopy.SessionAffinity = obj.SessionAffinity
}
if len(objCopy.IPFamilies) == 0 {
if len(objCopy.IPFamilies) == 0 || (len(objCopy.IPFamilies) == 1 && *objCopy.IPFamilyPolicy != corev1.IPFamilyPolicySingleStack) {
objCopy.IPFamilies = obj.IPFamilies
}
if objCopy.IPFamilyPolicy == nil {
Expand Down

0 comments on commit 10b9279

Please sign in to comment.