code: func IsIngressNetwork(n *swarmapi.Network) bool {
  	if n.Spec.Ingress {
  		return true
  	}
  	// Check if legacy defined ingress network
  	_, ok := n.Spec.Annotations.Labels["com.docker.swarm.internal"]
  	return ok && n.Spec.Annotations.Name == "ingress"
  }
docs: // IsIngressNetwork check if the swarm network is an ingress network