Documentation ¶
Index ¶
- Constants
- func AllowRoute(cond *gwapiv1.AllowedRoutes, route *gwapiv1b1.HTTPRoute, ...) bool
- type Ctx
- type FilterPolicyWrapper
- type FinalState
- type GatewayPolicies
- type HTTPRoutePolicies
- type Info
- type InitState
- func (s *InitState) AddIstioGateway(gw *istiov1a3.Gateway)
- func (s *InitState) AddK8sGateway(gw *gwapiv1b1.Gateway)
- func (s *InitState) AddPolicyForHTTPRoute(policy *mosniov1.FilterPolicy, route *gwapiv1b1.HTTPRoute, ...)
- func (s *InitState) AddPolicyForIstioGateway(policy *mosniov1.FilterPolicy, gw *istiov1a3.Gateway)
- func (s *InitState) AddPolicyForK8sGateway(policy *mosniov1.FilterPolicy, gw *gwapiv1b1.Gateway)
- func (s *InitState) AddPolicyForVirtualService(policy *mosniov1.FilterPolicy, vs *istiov1a3.VirtualService, ...)
- func (s *InitState) GetGatewaysWithHTTPRoute(route *gwapiv1b1.HTTPRoute) []*gwapiv1b1.Gateway
- func (s *InitState) GetGatewaysWithVirtualService(vs *istiov1a3.VirtualService) []*istiov1a3.Gateway
- func (s *InitState) Process(originalCtx context.Context) (*FinalState, error)
- type PolicyKind
- type PolicyScope
- type Proxy
- type ServerPort
- type ServerPortKey
- type VirtualServicePolicies
Constants ¶
View Source
const ( AnnotationInfo = "htnn.mosn.io/info" DefaultEnvoyFilterPriority = -10 )
Variables ¶
This section is empty.
Functions ¶
func AllowRoute ¶
func AllowRoute(cond *gwapiv1.AllowedRoutes, route *gwapiv1b1.HTTPRoute, gwNsName *types.NamespacedName) bool
Types ¶
type FilterPolicyWrapper ¶ added in v0.3.0
type FilterPolicyWrapper struct { *mosniov1.FilterPolicy // contains filtered or unexported fields }
type FinalState ¶
type FinalState struct {
EnvoyFilters map[component.EnvoyFilterKey]*istiov1a3.EnvoyFilter
}
finalState is the end of the translation. We convert the state to EnvoyFilter and write it to k8s.
type GatewayPolicies ¶ added in v0.3.0
type GatewayPolicies struct { Port *ServerPort Policies []*FilterPolicyWrapper }
type HTTPRoutePolicies ¶
type Info ¶
type Info struct { // FilterPolicies indicates what FilterPolicies are used to generated the EnvoyFilter. FilterPolicies []string `json:"filterpolicies"` }
type InitState ¶
type InitState struct { VirtualServicePolicies map[types.NamespacedName]*VirtualServicePolicies HTTPRoutePolicies map[types.NamespacedName]*HTTPRoutePolicies GatewayPolicies map[model.GatewaySection]*GatewayPolicies GatewayWithoutPolicies map[model.GatewaySection]*ServerPort ServerPortToGatewaySection map[ServerPortKey]*model.GatewaySection }
InitState is the beginning of our translation.
func NewInitState ¶
func NewInitState() *InitState
func (*InitState) AddIstioGateway ¶ added in v0.3.0
func (*InitState) AddK8sGateway ¶ added in v0.3.0
func (*InitState) AddPolicyForHTTPRoute ¶
func (*InitState) AddPolicyForIstioGateway ¶ added in v0.3.0
func (s *InitState) AddPolicyForIstioGateway(policy *mosniov1.FilterPolicy, gw *istiov1a3.Gateway)
func (*InitState) AddPolicyForK8sGateway ¶ added in v0.3.0
func (s *InitState) AddPolicyForK8sGateway(policy *mosniov1.FilterPolicy, gw *gwapiv1b1.Gateway)
func (*InitState) AddPolicyForVirtualService ¶
func (s *InitState) AddPolicyForVirtualService(policy *mosniov1.FilterPolicy, vs *istiov1a3.VirtualService, gws []*istiov1a3.Gateway)
func (*InitState) GetGatewaysWithHTTPRoute ¶
func (*InitState) GetGatewaysWithVirtualService ¶
func (s *InitState) GetGatewaysWithVirtualService(vs *istiov1a3.VirtualService) []*istiov1a3.Gateway
type PolicyKind ¶ added in v0.3.0
type PolicyKind int
const ( PolicyKindRDS PolicyKind = iota PolicyKindLDS )
type PolicyScope ¶
type PolicyScope int
const ( // sort from small to large PolicyScopeRule PolicyScope = iota // a route in a VirtualService or a rule in xRoute PolicyScopeRoute // a VirtualService or a xRoute PolicyScopePort // a port in a Gateway PolicyScopeGateway // a Istio/k8s Gateway )
type ServerPort ¶ added in v0.3.0
type ServerPortKey ¶ added in v0.3.0
type ServerPortKey struct { Namespace string ServerPort }
type VirtualServicePolicies ¶
type VirtualServicePolicies struct { VirtualService *istiov1a3.VirtualService RoutePolicies map[string][]*FilterPolicyWrapper Gateways []*istiov1a3.Gateway }
Click to show internal directories.
Click to hide internal directories.