Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouteReplacingSanitizer ¶
type RouteReplacingSanitizer struct {
// contains filtered or unexported fields
}
func NewRouteReplacingSanitizer ¶
func NewRouteReplacingSanitizer(cfg *v1.GlooOptions_InvalidConfigPolicy) (*RouteReplacingSanitizer, error)
func (*RouteReplacingSanitizer) SanitizeSnapshot ¶
func (s *RouteReplacingSanitizer) SanitizeSnapshot( ctx context.Context, glooSnapshot *v1snap.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports, ) envoycache.Snapshot
type UpstreamRemovingSanitizer ¶
type UpstreamRemovingSanitizer struct { }
func NewUpstreamRemovingSanitizer ¶
func NewUpstreamRemovingSanitizer() *UpstreamRemovingSanitizer
func (*UpstreamRemovingSanitizer) SanitizeSnapshot ¶
func (s *UpstreamRemovingSanitizer) SanitizeSnapshot( ctx context.Context, glooSnapshot *v1snap.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports, ) envoycache.Snapshot
If there are any errors on upstreams, this function tries to remove the correspondent clusters and endpoints from the xDS snapshot. If the snapshot is still consistent after these mutations and there are no errors related to other resources, we are good to send it to Envoy.
type XdsSanitizer ¶
type XdsSanitizer interface { SanitizeSnapshot( ctx context.Context, glooSnapshot *v1snap.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports, ) envoycache.Snapshot }
XdsSanitizer modifies a provided xds snapshot before it is stored in the xds cache, with the goal of cleaning up a potentially invalid xds snapshot before being stored and served. It is logically invalid for us to return an error here (translation of resources always needs to result in a xds snapshot, so we are resilient to pod restarts); instead we should just return the xds snapshot unmodified.
type XdsSanitizers ¶
type XdsSanitizers []XdsSanitizer
func (XdsSanitizers) SanitizeSnapshot ¶
func (s XdsSanitizers) SanitizeSnapshot( ctx context.Context, glooSnapshot *v1snap.ApiSnapshot, xdsSnapshot envoycache.Snapshot, reports reporter.ResourceReports, ) envoycache.Snapshot