Documentation ¶
Index ¶
- Variables
- func ClustersEquals(a, b []*cluster) bool
- func ValidateEnvoyRetryOn(retryOn string) bool
- func VirtualHostsEquals(a, b []*virtualHost) bool
- func WithAccessLog(accessLogger AccessLogger) option
- func WithDefaultRetryOn(defaultRetryOn string) option
- func WithEnvoyListenerIpv4Address(address string) option
- func WithEnvoyPort(port uint32) option
- func WithHostSelectionRetryAttempts(attempts int64) option
- func WithHttpExtAuthzCluster(httpExtAuthz HttpExtAuthz) option
- func WithHttpGrpcLogger(httpGrpcLogger HttpGrpcLogger) option
- func WithOutlierPercentage(percentage int32) option
- func WithSyncSecrets(syncSecrets bool) option
- func WithTracingProvider(tracingProvider string) option
- func WithUpstreamHealthCheck(config UpstreamHealthCheck) option
- func WithUpstreamPort(port uint32) option
- func WithUseRemoteAddress(useRemoteAddress bool) option
- type AccessLogger
- type Certificate
- type Configurator
- type EnvoySnapshot
- type HttpExtAuthz
- type HttpGrpcLogger
- type KubernetesConfigurator
- type Snapshotter
- type UpstreamHealthCheck
Constants ¶
This section is empty.
Variables ¶
var (
DefaultAccessLogFormat = map[string]interface{}{
"bytes_received": "%BYTES_RECEIVED%",
"bytes_sent": "%BYTES_SENT%",
"downstream_local_address": "%DOWNSTREAM_LOCAL_ADDRESS%",
"downstream_remote_address": "%DOWNSTREAM_REMOTE_ADDRESS%",
"duration": "%DURATION%",
"forwarded_for": "%REQ(X-FORWARDED-FOR)%",
"protocol": "%PROTOCOL%",
"request_id": "%REQ(X-REQUEST-ID)%",
"request_method": "%REQ(:METHOD)%",
"request_path": "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%",
"response_code": "%RESPONSE_CODE%",
"response_flags": "%RESPONSE_FLAGS%",
"start_time": "%START_TIME(%s.%3f)%",
"upstream_cluster": "%UPSTREAM_CLUSTER%",
"upstream_host": "%UPSTREAM_HOST%",
"upstream_local_address": "%UPSTREAM_LOCAL_ADDRESS%",
"upstream_service_time": "%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%",
"user_agent": "%REQ(USER-AGENT)%",
}
)
Functions ¶
func ClustersEquals ¶
func ClustersEquals(a, b []*cluster) bool
func ValidateEnvoyRetryOn ¶ added in v0.16.0
func VirtualHostsEquals ¶
func VirtualHostsEquals(a, b []*virtualHost) bool
func WithAccessLog ¶ added in v0.19.0
func WithAccessLog(accessLogger AccessLogger) option
WithAccessLog configures the access log formats
func WithDefaultRetryOn ¶ added in v0.16.0
func WithDefaultRetryOn(defaultRetryOn string) option
WithDefaultRetryOn configures the default retry policy
func WithEnvoyListenerIpv4Address ¶ added in v0.14.0
func WithEnvoyListenerIpv4Address(address string) option
WithEWithEnvoyListenerIpv4AddressnvoyPort configures envoy IPv4 listen address into a KubernetesConfigurator
func WithEnvoyPort ¶
func WithEnvoyPort(port uint32) option
WithEnvoyPort configures the given envoy port into a KubernetesConfigurator
func WithHostSelectionRetryAttempts ¶
func WithHostSelectionRetryAttempts(attempts int64) option
WithHostSelectionRetryAttempts configures number of host selection reattempts into a KubernetesConfigurator
func WithHttpExtAuthzCluster ¶ added in v0.15.0
func WithHttpExtAuthzCluster(httpExtAuthz HttpExtAuthz) option
WithHttpExtAuthzCluster configures the options for the gRPC cluster
func WithHttpGrpcLogger ¶ added in v0.15.0
func WithHttpGrpcLogger(httpGrpcLogger HttpGrpcLogger) option
WithHttpGrpcLogger configures the options for the gPRC access logger
func WithOutlierPercentage ¶
func WithOutlierPercentage(percentage int32) option
WithOutlierPercentage configures the given percentage as maximal outlier percentage into a KubernetesConfigurator
func WithSyncSecrets ¶ added in v0.19.1
func WithSyncSecrets(syncSecrets bool) option
WithSyncSecrets configures the syncSecrets option
func WithTracingProvider ¶ added in v0.20.0
func WithTracingProvider(tracingProvider string) option
WithTracingProvider configures the tracing provider for HTTP connection manager
func WithUpstreamHealthCheck ¶
func WithUpstreamHealthCheck(config UpstreamHealthCheck) option
WithUpstreamHealthCheck configures the upstream health check into the KubernetesConfigurator
func WithUpstreamPort ¶
func WithUpstreamPort(port uint32) option
WithUpstreamPort configures the given upstream port into a KubernetesConfigurator
func WithUseRemoteAddress ¶ added in v0.14.0
func WithUseRemoteAddress(useRemoteAddress bool) option
WithUseRemoteAddress configures the useRemoteAddress option into the KubernetesConfigurator
Types ¶
type AccessLogger ¶ added in v0.19.0
type AccessLogger struct {
Format map[string]interface{} `json:"format"`
}
type Certificate ¶
type Configurator ¶
type Configurator interface { Generate([]*k8s.Ingress, []*v1.Secret) (cache.Snapshot, error) NodeID() string }
Configurator is an interface that implements Generate and NodeID
type EnvoySnapshot ¶ added in v0.19.0
type HttpExtAuthz ¶ added in v0.15.0
type HttpGrpcLogger ¶ added in v0.15.0
type KubernetesConfigurator ¶
KubernetesConfigurator takes a given Ingress Class and lister to find only ingresses of that class
func NewKubernetesConfigurator ¶
func NewKubernetesConfigurator(nodeID string, certificates []Certificate, ca string, ingressClasses []string, options ...option) *KubernetesConfigurator
NewKubernetesConfigurator returns a Kubernetes configurator given a lister and ingress class
func (*KubernetesConfigurator) Generate ¶
func (c *KubernetesConfigurator) Generate(ingresses []*k8s.Ingress, secrets []*v1.Secret) (cache.Snapshot, error)
Generate creates a new snapshot
func (*KubernetesConfigurator) NodeID ¶
func (c *KubernetesConfigurator) NodeID() string
NodeID returns the NodeID
type Snapshotter ¶
type Snapshotter struct {
// contains filtered or unexported fields
}
Snapshotter watches for Ingress changes and updates the config snapshot
func NewSnapshotter ¶
func NewSnapshotter(snapshotCache cache.SnapshotCache, config Configurator, aggregator *k8s.Aggregator) *Snapshotter
NewSnapshotter returns a new Snapshotter
func (*Snapshotter) ConfigDump ¶ added in v0.19.0
func (s *Snapshotter) ConfigDump() (EnvoySnapshot, error)
func (*Snapshotter) CurrentSnapshot ¶ added in v0.19.0
func (s *Snapshotter) CurrentSnapshot() (cache.ResourceSnapshot, error)
func (*Snapshotter) Run ¶
func (s *Snapshotter) Run(a *k8s.Aggregator)
Run will periodically refresh the snapshot