Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

ALB Ingress Controller "use-annotation" backends #987

Closed
billyshambrook opened this issue Jun 13, 2020 · 0 comments · Fixed by #988
Closed

ALB Ingress Controller "use-annotation" backends #987

billyshambrook opened this issue Jun 13, 2020 · 0 comments · Fixed by #988
Labels
api bug Something isn't working

Comments

@billyshambrook
Copy link

What steps did you take and what happened:

AWS ALB Ingress Controller allows you to reference an annotation as a Ingress Backend.ServiceName like in this example https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/tasks/ssl_redirect/

If you apply that yaml example and try navigating to the Ingress view the following error is thrown:

2020-06-12T23:47:41.177-0400	ERROR	api/content_manager.go:130	generate content	{"client-id": "9cea0b24-ad28-11ea-ba16-acde48001122", "err": "generate content: add row for object: get status for object: build status for ingress: get service from object store: get object from object store: services \"ssl-redirect\" not found", "content-path": "overview/namespace/default/discovery-and-load-balancing/ingresses"}
github.com/vmware-tanzu/octant/internal/api.(*ContentManager).runUpdate.func1
	/private/tmp/octant-20200604-13237-14eiloi/src/github.com/vmware-tanzu/octant/internal/api/content_manager.go:130
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run.func1
	/private/tmp/octant-20200604-13237-14eiloi/src/github.com/vmware-tanzu/octant/internal/api/poller.go:86
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run
	/private/tmp/octant-20200604-13237-14eiloi/src/github.com/vmware-tanzu/octant/internal/api/poller.go:95
github.com/vmware-tanzu/octant/internal/api.(*ContentManager).Start
	/private/tmp/octant-20200604-13237-14eiloi/src/github.com/vmware-tanzu/octant/internal/api/content_manager.go:106

This also affects the "Resource Viewer" as if you view a service "Resource Viewer" it will try to parse the ingress that the service is attached to and will fail finding this service.

What did you expect to happen:

The service to be ignored and no errors found when viewing the Resource Viewer.

Anything else you would like to add:

Am happy to create a PR for this, I can see that backends are looked up in these 2 places:

It could just skip the backend if ServicePort == "use-annotation".

And/Or it could return nil, nil if the error is NotFound from the DynamicCache. However Octant will still mark the Ingress object status has having an error as it expects the backend to be there unless we implement the first option as well.

Environment:

  • Octant version (use octant version): 0.13.1
  • Kubernetes version (use kubectl version): v1.18.3
  • OS (macOS 10.15, Windows 10, Ubuntu 19.10 etc): macOS 10.15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants