Change:
Currently, when loadbalancer service's ipFammilies updatedservice controller will ignore this event. That means cloud provider can't update ipv4/ipv6 backend. So, I'm thinking service controller need add watching 'service's ipFammilies updated' event, It'd be important for cloud provider update dual-stack backend. code at Our load balancer supports dual-stack. When the services in the cluster are updated from IPv4 to IPv6(same ipv6-ipv4ipv4-ipv4/ipv6), it is expected that the cloud provider can perceive this event and update the IPv4/IPv6 address to the backend of the load balancer. /sig cloud-provider /area cloudprovider
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
yeah, that is right, the logic need to be adapted /kind bug /sig network /sig cloud-provider

Discussion:
return true } <ins> // User can upgrade (add another clusterIP or ipFamily) or can downgrade (remove secondary clusterIP or ipFamily), // but CAN NOT change primary/secondary clusterIP || ipFamily UNLESS they are changing from/to/ON ExternalName // so not care about order, only need check the length. if len(oldService.Spec.IPFamilies) != len(newService.Spec.IPFamilies) { c.eventRecorder.Eventf(newService, v1.EventTypeNormal, "IPFamilies", "Count: %v -> %v", len(oldService.Spec.IPFamilies), len(newService.Spec.IPFamilies)) return true } </ins> return false }

}, expectedNeedsUpdate: true, }, <ins> { testName: "If service IPFamilies from single stack to dual stack", updateFn: func() { protocol := "http" oldSvc = &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name:      "tcp-service", Namespace: "default", }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{{ Port:        80, Protocol:    v1.ProtocolTCP, TargetPort:  intstr.Parse("22"), AppProtocol: &protocol, }}, IPFamilies: []v1.IPFamily{v1.IPv4Protocol}, Type:       v1.ServiceTypeLoadBalancer, }, } newSvc = oldSvc.DeepCopy() newSvc.Spec.IPFamilies = []v1.IPFamily{v1.IPv4Protocol, v1.IPv6Protocol} }, expectedNeedsUpdate: true, }, { testName: "If service IPFamilies from dual stack to single stack", updateFn: func() { protocol := "http" oldSvc = &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name:      "tcp-service", Namespace: "default", }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{{ Port:        80, Protocol:    v1.ProtocolTCP, TargetPort:  intstr.Parse("22"), AppProtocol: &protocol, }}, IPFamilies: []v1.IPFamily{v1.IPv4Protocol, v1.IPv6Protocol}, Type:       v1.ServiceTypeLoadBalancer, }, } newSvc = oldSvc.DeepCopy() newSvc.Spec.IPFamilies = []v1.IPFamily{v1.IPv4Protocol} }, expectedNeedsUpdate: true, }, { testName: "If service IPFamilies not change", updateFn: func() { protocol := "http" oldSvc = &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name:      "tcp-service", Namespace: "default", }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{{ Port:        80, Protocol:    v1.ProtocolTCP, TargetPort:  intstr.Parse("22"), AppProtocol: &protocol, }}, IPFamilies: []v1.IPFamily{v1.IPv4Protocol}, Type:       v1.ServiceTypeLoadBalancer, }, } newSvc = oldSvc.DeepCopy() }, expectedNeedsUpdate: false, }, </ins> } controller, _, _ := newController()