You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/31 11:25:45 UTC

[GitHub] [apisix-ingress-controller] xiangtianyu opened a new issue, #1308: request help: error when ingress_publish_service is null

xiangtianyu opened a new issue, #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308

   ### Issue description
   
   I update our ingress controller to 1.5.0-rc1 right now, and met a strange error 
   
   `{"level":"error","time":"2022-08-31T18:58:37.882741632+08:00","caller":"ingress/status.go:280","message":"failed to get APISIX gateway external IPs","error":"resource name may not be empty"}`
   
   I trace the error and found if ingress_publish_service is "" in the config, the code in  `IngressPublishAddresses` will analyze namespace and name to "", so it will cause "resource name may not be empty"
   
   ```
   func IngressPublishAddresses(ingressPublishService string, ingressStatusAddress []string, kubeClient kubernetes.Interface) ([]string, error) {
   	addrs := []string{}
   
   	// if ingressStatusAddress is specified, it will be used first
   	if len(ingressStatusAddress) > 0 {
   		addrs = append(addrs, ingressStatusAddress...)
   		return addrs, nil
   	}
   
   	namespace, name, err := cache.SplitMetaNamespaceKey(ingressPublishService)
   	if err != nil {
   		log.Errorf("invalid ingressPublishService %s: %s", ingressPublishService, err)
   		return nil, err
   	}
   
   	svc, err := kubeClient.CoreV1().Services(namespace).Get(context.TODO(), name, metav1.GetOptions{})
   	if err != nil {
   		return nil, err
   	}
   
   	switch svc.Spec.Type {
   	case apiv1.ServiceTypeLoadBalancer:
   		if len(svc.Status.LoadBalancer.Ingress) < 1 {
   			return addrs, fmt.Errorf("%s", _gatewayLBNotReadyMessage)
   		}
   
   		for _, ip := range svc.Status.LoadBalancer.Ingress {
   			if ip.IP == "" {
   				// typically AWS load-balancers
   				addrs = append(addrs, ip.Hostname)
   			} else {
   				addrs = append(addrs, ip.IP)
   			}
   		}
   
   		addrs = append(addrs, svc.Spec.ExternalIPs...)
   		return addrs, nil
   	default:
   		return addrs, nil
   	}
   
   }
   ```
   
   Is this a bug?
   
   ### Environment
   
   - your apisix-ingress-controller version (output of apisix-ingress-controller version --long): 1.5.0-rc1
   - your Kubernetes cluster version (output of kubectl version):
   - if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] xuminwlt commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
xuminwlt commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1232835484

   Is it must set apisix gateway's namespace and svc name?
   apisix gateway's namespace is not the same to biz's namespace.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1306468539

   just change this
   
   https://github.com/apache/apisix-ingress-controller/blob/38b12fb4a5a2169eb3585e5b7e2f78c8ce447862/conf/config-default.yaml#L40-L49


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] xiangtianyu commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
xiangtianyu commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1233613957

   > > > thanks,it's expected behavior
   > > 
   > > 
   > > So that means we MUST set "ingress_publish_service" ?
   > 
   > Not required. But it is recommended to set.
   > 
   > Some platforms display Ingress status and other information based on this information (e.g. rancher
   
   But if we did not set this value, it will continuously output error


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1306469947

   If your cluster has LoadBalancer, you can set `ingress_publish_service`
   otherwise, use the`ingress_status_address` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] xiangtianyu commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
xiangtianyu commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1232818023

   > thanks,it's expected behavior
   
   So that means we MUST set "ingress_publish_service" ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1233611378

   > > thanks,it's expected behavior
   > 
   > 
   > 
   > So that means we MUST set "ingress_publish_service" ?
   
   Not required.  But it is recommended to set.
   
   Some platforms display Ingress status and other information based on this information (e.g. rancher


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tharwan commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
tharwan commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1306745326

   Alright, I set the ingress_status_adress to the IP of my node, but I still can not reach the ingress from my host.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tharwan commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
tharwan commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1306052104

   So what is the solution when do I need to set it and to what value?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1232814002

   thanks,it's expected behavior


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] github-actions[bot] commented on issue #1308: request help: error when ingress_publish_service is null

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1461127911

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1308: request help: error when ingress_publish_service is null

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1233613435

   > Is it must set apisix gateway's namespace and svc name?
   > 
   > apisix gateway's namespace is not the same to biz's namespace.
   
   please refer to https://github.com/apache/apisix-ingress-controller/blob/master/conf/config-default.yaml


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] github-actions[bot] commented on issue #1308: request help: error when ingress_publish_service is null

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1308:
URL: https://github.com/apache/apisix-ingress-controller/issues/1308#issuecomment-1420037158

   This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] github-actions[bot] closed issue #1308: request help: error when ingress_publish_service is null

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #1308: request help: error when ingress_publish_service is null
URL: https://github.com/apache/apisix-ingress-controller/issues/1308


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org