Merge pull request #7479 from equinix-ms/main

Make custom-default-backend upstream name more unique.
This commit is contained in:
Ricardo Katz 2021-08-12 17:09:55 -03:00 committed by GitHub
commit e9f0ad3485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -724,7 +724,7 @@ func (n *NGINXController) getBackendServers(ingresses []*ingress.Ingress) ([]*in
endps := getEndpoints(location.DefaultBackend, &sp, apiv1.ProtocolTCP, n.store.GetServiceEndpoints)
// custom backend is valid only if contains at least one endpoint
if len(endps) > 0 {
name := fmt.Sprintf("custom-default-backend-%v", location.DefaultBackend.GetName())
name := fmt.Sprintf("custom-default-backend-%v-%v", location.DefaultBackend.GetNamespace(), location.DefaultBackend.GetName())
klog.V(3).Infof("Creating \"%v\" upstream based on default backend annotation", name)
nb := upstream.DeepCopy()