Open ianmacclancy opened 2 years ago
This issue was mentioned on this review: https://github.com/solo-io/gloo/pull/7508/files#r1041445418
This issue has been marked as stale because of no activity in the last 180 days. It will be closed in the next 180 days unless it is tagged "no stalebot" or other activity occurs.
Problem:
There is not any way for plugins to return typed errors that the main engine could decide on how to handle based on its settings.
Context
Currently, we support VirtualHostPlugins which define custom logic for converting a Gloo virtualHost into an Envoy virutalHost
That interface, https://github.com/solo-io/gloo/blob/master/projects/gloo/pkg/plugins/plugins.go#L138, can modify the output resource, or return an error
If an error is returned, https://github.com/solo-io/gloo/blob/d965ab8502a47dc2d1e57c97afa716ce79887a5a/projects/gloo/pkg/translator/route_config.go#L134, we apply an error onto the Gloo CR (which then appears as on the status)
This is valuable in the case of resource delegation, https://github.com/solo-io/gloo/blob/366920486f232157e6ae66724e4370a858217dd8/projects/gateway/pkg/translator/converter.go#L250, where a resource that is not found, should result in a warning. We have some plugins (or soon will have in the case of WAF) that could benefit from resulting in warnings instead of errors
Steps
Links
Relevant slack conversation (Internal only)