Documentation
¶
Overview ¶
MIT License
Copyright (c) 2022 Kubeshop ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License ¶
Copyright (c) 2022 Kubeshop ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License ¶
Copyright (c) 2022 Kubeshop ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Constants
- func NewHTTPExternalAuthorizationFilter(upstreamHostname string, upstreamPort uint32, clusterName string, ...) (*anypb.Any, error)
- func NewListenerBuilder() *listenerBuilder
- type AccessLogBuilder
- type Certificate
- type EnvoyConfiguration
- func (e *EnvoyConfiguration) AddCluster(clusterName, upstreamServiceHost string, upstreamServicePort uint32)
- func (e *EnvoyConfiguration) AddListener(l *listener.Listener)
- func (e *EnvoyConfiguration) AddRouteToVHost(vhost string, rt *route.Route) error
- func (e *EnvoyConfiguration) AddVirtualHost(vh *types.VirtualHost)
- func (e *EnvoyConfiguration) ClusterExist(name string) bool
- func (e *EnvoyConfiguration) GenerateSnapshot() (*cache.Snapshot, error)
- func (e *EnvoyConfiguration) GetVirtualHost(name string) *types.VirtualHost
- func (e *EnvoyConfiguration) GetVirtualHosts() map[string]*types.VirtualHost
- type HCMBuilder
- type TLS
Constants ¶
const ( AccessLogFormatJson string = "json" AccessLogFormatText string = "text" // The name of the Envoy extention that handles stdout access log AccessLogStdoutName string = "envoy.access_loggers.stdout" )
const (
RouteName string = "local_route"
)
Variables ¶
This section is empty.
Functions ¶
func NewHTTPExternalAuthorizationFilter ¶ added in v1.1.0
func NewHTTPExternalAuthorizationFilter(upstreamHostname string, upstreamPort uint32, clusterName string, pathPrefix string) (*anypb.Any, error)
https://github.com/envoyproxy/envoy/tree/main/examples/ext_authz https://github.com/envoyproxy/envoy/blob/main/docs/root/configuration/http/http_filters/ext_authz_filter.rst https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/ext_authz_filter#config-http-filters-ext-authz
func NewListenerBuilder ¶
func NewListenerBuilder() *listenerBuilder
Types ¶
type AccessLogBuilder ¶
type AccessLogBuilder struct {
// contains filtered or unexported fields
}
func NewJSONAccessLog ¶
func NewJSONAccessLog(template map[string]string) (*AccessLogBuilder, error)
func NewTextAccessLog ¶
func NewTextAccessLog(template string) (*AccessLogBuilder, error)
func (*AccessLogBuilder) GetAccessLog ¶
func (a *AccessLogBuilder) GetAccessLog() *accesslog.AccessLog
func (*AccessLogBuilder) Validate ¶
func (a *AccessLogBuilder) Validate() error
type Certificate ¶
type EnvoyConfiguration ¶
type EnvoyConfiguration struct {
// contains filtered or unexported fields
}
func New ¶
func New() *EnvoyConfiguration
func (*EnvoyConfiguration) AddCluster ¶
func (e *EnvoyConfiguration) AddCluster(clusterName, upstreamServiceHost string, upstreamServicePort uint32)
AddCluster creates Envoy cluster which is the representation of backend service For the simplicity right now we don't support endpoints assignments separately, i.e. one cluster - one endpoint, not multiple load balanced Cluster with the same name will be overwritten
func (*EnvoyConfiguration) AddListener ¶
func (e *EnvoyConfiguration) AddListener(l *listener.Listener)
func (*EnvoyConfiguration) AddRouteToVHost ¶
func (e *EnvoyConfiguration) AddRouteToVHost(vhost string, rt *route.Route) error
AddRouteToVHost appends new route with proxying to the upstream to the list of routes by path and method
func (*EnvoyConfiguration) AddVirtualHost ¶
func (e *EnvoyConfiguration) AddVirtualHost(vh *types.VirtualHost)
func (*EnvoyConfiguration) ClusterExist ¶
func (e *EnvoyConfiguration) ClusterExist(name string) bool
func (*EnvoyConfiguration) GenerateSnapshot ¶
func (e *EnvoyConfiguration) GenerateSnapshot() (*cache.Snapshot, error)
func (*EnvoyConfiguration) GetVirtualHost ¶
func (e *EnvoyConfiguration) GetVirtualHost(name string) *types.VirtualHost
func (*EnvoyConfiguration) GetVirtualHosts ¶
func (e *EnvoyConfiguration) GetVirtualHosts() map[string]*types.VirtualHost
type HCMBuilder ¶ added in v1.1.0
type HCMBuilder struct {
HTTPConnectionManager *hcm.HttpConnectionManager
}
func NewHCMBuilder ¶
func NewHCMBuilder() (*HCMBuilder, error)
func (*HCMBuilder) AddAccessLog ¶ added in v1.1.0
func (h *HCMBuilder) AddAccessLog(al *accesslog.AccessLog) *HCMBuilder
func (*HCMBuilder) AppendFilterHTTPExternalAuthorizationFilterToStart ¶ added in v1.1.0
func (h *HCMBuilder) AppendFilterHTTPExternalAuthorizationFilterToStart(anyAuthorization *anypb.Any)
AppendFilterHTTPExternalAuthorizationFilterToStart - `HTTPExternalAuthorization` needs to come before `CORS` and `Router`, so append it to the start of the list.
func (*HCMBuilder) GetHTTPConnectionManager ¶ added in v1.1.0
func (h *HCMBuilder) GetHTTPConnectionManager() *hcm.HttpConnectionManager
func (*HCMBuilder) Validate ¶ added in v1.1.0
func (h *HCMBuilder) Validate() error