Documentation
¶
Index ¶
- Constants
- type API
- type CertificateResolver
- type Configuration
- type Core
- type EncodedCharacters
- type EntryPoint
- type EntryPoints
- type EntryPointsTransport
- type Experimental
- type FastProxyConfig
- type ForwardedHeaders
- type ForwardingTimeouts
- type Global
- type HTTP2Config
- type HTTP3Config
- type HTTPConfig
- type LifeCycle
- type ObservabilityConfig
- type PluginConf
- type Providers
- type ProxyProtocol
- type RedirectEntryPoint
- type Redirections
- type RespondingTimeouts
- type ServersTransport
- type Spiffe
- type SpiffeClientConfig
- type TCPServersTransport
- type TLSClientConfig
- type TLSConfig
- type Tracing
- type UDPConfig
Constants ¶
const ( // DefaultInternalEntryPointName the name of the default internal entry point. DefaultInternalEntryPointName = "ingress" // DefaultGraceTimeout controls how long Ingress serves pending requests // prior to shutting down. DefaultGraceTimeout = 10 * time.Second // DefaultIdleTimeout before closing an idle connection. DefaultIdleTimeout = 180 * time.Second // DefaultReadTimeout defines the default maximum duration for reading the entire request, including the body. DefaultReadTimeout = 60 * time.Second // DefaultAcmeCAServer is the default ACME API endpoint. DefaultAcmeCAServer = "https://acme-v02.api.letsencrypt.org/directory" // DefaultUDPTimeout defines how long to wait by default on an idle session, // before releasing all resources related to that session. DefaultUDPTimeout = 3 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
BasePath string `` /* 172-byte string literal not displayed */
Insecure bool `` /* 160-byte string literal not displayed */
Dashboard bool `` /* 128-byte string literal not displayed */
Debug bool `` /* 153-byte string literal not displayed */
DisableDashboardAd bool `` /* 164-byte string literal not displayed */
DashboardName string `` /* 151-byte string literal not displayed */
}
API holds the API configuration.
type CertificateResolver ¶
type CertificateResolver struct {
ACME *acmeprovider.Configuration `` /* 137-byte string literal not displayed */
Tailscale *struct{} `` /* 187-byte string literal not displayed */
}
CertificateResolver contains the configuration for the different types of certificates resolver.
type Configuration ¶
type Configuration struct {
Global *Global `` /* 128-byte string literal not displayed */
ServersTransport *ServersTransport `` /* 156-byte string literal not displayed */
TCPServersTransport *TCPServersTransport `` /* 169-byte string literal not displayed */
EntryPoints EntryPoints `` /* 139-byte string literal not displayed */
Providers *Providers `` /* 133-byte string literal not displayed */
API *API `` /* 149-byte string literal not displayed */
Metrics *otypes.Metrics `` /* 129-byte string literal not displayed */
Ping *ping.Handler `` /* 143-byte string literal not displayed */
Log *otypes.IngressLog `` /* 149-byte string literal not displayed */
AccessLog *otypes.AccessLog `` /* 166-byte string literal not displayed */
Tracing *Tracing `` /* 162-byte string literal not displayed */
HostResolver *types.HostResolverConfig `` /* 179-byte string literal not displayed */
CertificatesResolvers map[string]CertificateResolver `` /* 182-byte string literal not displayed */
Experimental *Experimental `` /* 140-byte string literal not displayed */
// Deprecated: Please do not use this field.
Core *Core `description:"Core controls." json:"core,omitempty" toml:"core,omitempty" yaml:"core,omitempty" export:"true"`
Spiffe *SpiffeClientConfig `` /* 133-byte string literal not displayed */
OCSP *tls.OCSPConfig `` /* 150-byte string literal not displayed */
}
Configuration is the static configuration.
func (*Configuration) SetEffectiveConfiguration ¶
func (c *Configuration) SetEffectiveConfiguration()
SetEffectiveConfiguration adds missing configuration parameters derived from existing ones. It also takes care of maintaining backwards compatibility.
func (*Configuration) ValidateConfiguration ¶
func (c *Configuration) ValidateConfiguration() error
ValidateConfiguration validate that configuration is coherent.
type Core ¶
type Core struct {
// Deprecated: Please do not use this field and rewrite the router rules to use the v3 syntax.
DefaultRuleSyntax string `` /* 168-byte string literal not displayed */
}
Core configures Ingress core behavior.
type EncodedCharacters ¶
type EncodedCharacters struct {
AllowEncodedSlash bool `` /* 212-byte string literal not displayed */
AllowEncodedBackSlash bool `` /* 229-byte string literal not displayed */
AllowEncodedNullCharacter bool `` /* 235-byte string literal not displayed */
AllowEncodedSemicolon bool `` /* 228-byte string literal not displayed */
AllowEncodedPercent bool `` /* 220-byte string literal not displayed */
AllowEncodedQuestionMark bool `` /* 241-byte string literal not displayed */
AllowEncodedHash bool `` /* 208-byte string literal not displayed */
}
EncodedCharacters configures which encoded characters are allowed in the request path.
func (*EncodedCharacters) SetDefaults ¶
func (ec *EncodedCharacters) SetDefaults()
type EntryPoint ¶
type EntryPoint struct {
Address string `description:"Entry point address." json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
AllowACMEByPass bool `` /* 182-byte string literal not displayed */
ReusePort bool `` /* 187-byte string literal not displayed */
AsDefault bool `` /* 212-byte string literal not displayed */
Transport *EntryPointsTransport `` /* 162-byte string literal not displayed */
ProxyProtocol *ProxyProtocol `` /* 187-byte string literal not displayed */
ForwardedHeaders *ForwardedHeaders `` /* 162-byte string literal not displayed */
HTTP HTTPConfig `description:"HTTP configuration." json:"http,omitempty" toml:"http,omitempty" yaml:"http,omitempty" export:"true"`
HTTP2 *HTTP2Config `description:"HTTP/2 configuration." json:"http2,omitempty" toml:"http2,omitempty" yaml:"http2,omitempty" export:"true"`
HTTP3 *HTTP3Config `` /* 155-byte string literal not displayed */
UDP *UDPConfig `description:"UDP configuration." json:"udp,omitempty" toml:"udp,omitempty" yaml:"udp,omitempty"`
Observability *ObservabilityConfig `` /* 149-byte string literal not displayed */
}
EntryPoint holds the entry point configuration.
func (*EntryPoint) GetAddress ¶
func (ep *EntryPoint) GetAddress() string
GetAddress strips any potential protocol part of the address field of the entry point, in order to return the actual address.
func (*EntryPoint) GetProtocol ¶
func (ep *EntryPoint) GetProtocol() (string, error)
GetProtocol returns the protocol part of the address field of the entry point. If none is specified, it defaults to "tcp".
func (*EntryPoint) SetDefaults ¶
func (ep *EntryPoint) SetDefaults()
SetDefaults sets the default values.
type EntryPoints ¶
type EntryPoints map[string]*EntryPoint
EntryPoints holds the HTTP entry point list.
type EntryPointsTransport ¶
type EntryPointsTransport struct {
LifeCycle *LifeCycle `` /* 152-byte string literal not displayed */
RespondingTimeouts *RespondingTimeouts `` /* 191-byte string literal not displayed */
KeepAliveMaxTime ptypes.Duration `` /* 186-byte string literal not displayed */
KeepAliveMaxRequests int `` /* 208-byte string literal not displayed */
}
EntryPointsTransport configures communication between clients and Ingress.
func (*EntryPointsTransport) SetDefaults ¶
func (t *EntryPointsTransport) SetDefaults()
SetDefaults sets the default values.
type Experimental ¶
type Experimental struct {
Plugins map[string]plugins.Descriptor `description:"Plugins configuration." json:"plugins,omitempty" toml:"plugins,omitempty" yaml:"plugins,omitempty" export:"true"`
LocalPlugins map[string]plugins.LocalDescriptor `` /* 146-byte string literal not displayed */
AbortOnPluginFailure bool `` /* 219-byte string literal not displayed */
FastProxy *FastProxyConfig `` /* 183-byte string literal not displayed */
OTLPLogs bool `` /* 149-byte string literal not displayed */
Knative bool `` /* 136-byte string literal not displayed */
// Deprecated: KubernetesIngressNGINX provider is not an experimental feature starting with v3.6.2. Please remove its usage from the static configuration.
KubernetesIngressNGINX bool `` /* 198-byte string literal not displayed */
// Deprecated: KubernetesGateway provider is not an experimental feature starting with v3.1. Please remove its usage from the static configuration.
KubernetesGateway bool `` /* 194-byte string literal not displayed */
}
Experimental experimental Ingress features.
type FastProxyConfig ¶
type FastProxyConfig struct {
Debug bool `` /* 148-byte string literal not displayed */
}
FastProxyConfig holds the FastProxy configuration.
type ForwardedHeaders ¶
type ForwardedHeaders struct {
Insecure bool `` /* 134-byte string literal not displayed */
TrustedIPs []string `` /* 145-byte string literal not displayed */
Connection []string `` /* 200-byte string literal not displayed */
NotAppendXForwardedFor bool `` /* 282-byte string literal not displayed */
}
ForwardedHeaders Trust client forwarding headers.
type ForwardingTimeouts ¶
type ForwardingTimeouts struct {
DialTimeout ptypes.Duration `` /* 228-byte string literal not displayed */
ResponseHeaderTimeout ptypes.Duration `` /* 293-byte string literal not displayed */
IdleConnTimeout ptypes.Duration `` /* 229-byte string literal not displayed */
}
ForwardingTimeouts contains timeout configurations for forwarding requests to the backend servers.
func (*ForwardingTimeouts) SetDefaults ¶
func (f *ForwardingTimeouts) SetDefaults()
SetDefaults sets the default values.
type Global ¶
type Global struct {
CheckNewVersion bool `` /* 218-byte string literal not displayed */
SendAnonymousUsage bool `` /* 282-byte string literal not displayed */
NotAppendXForwardedFor bool `` /* 282-byte string literal not displayed */
}
Global holds the global configuration.
type HTTP2Config ¶
type HTTP2Config struct {
MaxConcurrentStreams int32 `` /* 240-byte string literal not displayed */
MaxDecoderHeaderTableSize int32 `` /* 261-byte string literal not displayed */
MaxEncoderHeaderTableSize int32 `` /* 257-byte string literal not displayed */
}
HTTP2Config is the HTTP2 configuration of an entry point.
func (*HTTP2Config) SetDefaults ¶
func (c *HTTP2Config) SetDefaults()
SetDefaults sets the default values.
type HTTP3Config ¶
type HTTP3Config struct {
AdvertisedPort int `` /* 176-byte string literal not displayed */
}
HTTP3Config is the HTTP3 configuration of an entry point.
type HTTPConfig ¶
type HTTPConfig struct {
Redirections *Redirections `` /* 136-byte string literal not displayed */
Middlewares []string `` /* 177-byte string literal not displayed */
TLS *TLSConfig `` /* 196-byte string literal not displayed */
EncodedCharacters *EncodedCharacters `` /* 198-byte string literal not displayed */
EncodeQuerySemicolons bool `` /* 207-byte string literal not displayed */
SanitizePath *bool `` /* 222-byte string literal not displayed */
MaxHeaderBytes int `` /* 165-byte string literal not displayed */
}
HTTPConfig is the HTTP configuration of an entry point.
func (*HTTPConfig) SetDefaults ¶
func (c *HTTPConfig) SetDefaults()
SetDefaults sets the default values.
type LifeCycle ¶
type LifeCycle struct {
RequestAcceptGraceTimeout ptypes.Duration `` /* 250-byte string literal not displayed */
GraceTimeOut ptypes.Duration `` /* 191-byte string literal not displayed */
}
LifeCycle contains configurations relevant to the lifecycle (such as the shutdown phase) of Ingress.
func (*LifeCycle) SetDefaults ¶
func (a *LifeCycle) SetDefaults()
SetDefaults sets the default values.
type ObservabilityConfig ¶
type ObservabilityConfig struct {
AccessLogs *bool `` /* 152-byte string literal not displayed */
Metrics *bool `` /* 139-byte string literal not displayed */
Tracing *bool `` /* 139-byte string literal not displayed */
TraceVerbosity otypes.TracingVerbosity `` /* 180-byte string literal not displayed */
}
ObservabilityConfig holds the observability configuration for an entry point.
func (*ObservabilityConfig) SetDefaults ¶
func (o *ObservabilityConfig) SetDefaults()
SetDefaults sets the default values.
type Providers ¶
type Providers struct {
ProvidersThrottleDuration ptypes.Duration `` /* 356-byte string literal not displayed */
Docker *docker.Provider `` /* 161-byte string literal not displayed */
Swarm *docker.SwarmProvider `` /* 164-byte string literal not displayed */
File *file.Provider `description:"Enables File provider." json:"file,omitempty" toml:"file,omitempty" yaml:"file,omitempty" export:"true"`
KubernetesIngress *ingress.Provider `` /* 206-byte string literal not displayed */
KubernetesIngressNGINX *ingressnginx.Provider `` /* 227-byte string literal not displayed */
KubernetesCRD *crd.Provider `` /* 190-byte string literal not displayed */
KubernetesGateway *gateway.Provider `` /* 210-byte string literal not displayed */
Knative *knative.Provider `` /* 165-byte string literal not displayed */
Rest *rest.Provider `` /* 153-byte string literal not displayed */
ConsulCatalog *consulcatalog.ProviderBuilder `` /* 190-byte string literal not displayed */
Nomad *nomad.ProviderBuilder `` /* 157-byte string literal not displayed */
Ecs *ecs.Provider `` /* 153-byte string literal not displayed */
Consul *consul.ProviderBuilder `` /* 162-byte string literal not displayed */
Etcd *etcd.Provider `` /* 153-byte string literal not displayed */
ZooKeeper *zk.Provider `` /* 173-byte string literal not displayed */
Redis *redis.Provider `` /* 157-byte string literal not displayed */
HTTP *http.Provider `` /* 153-byte string literal not displayed */
Plugin map[string]PluginConf `description:"Plugins configuration." json:"plugin,omitempty" toml:"plugin,omitempty" yaml:"plugin,omitempty"`
}
Providers contains providers configuration.
type ProxyProtocol ¶
type ProxyProtocol struct {
Insecure bool `description:"Trust all." json:"insecure,omitempty" toml:"insecure,omitempty" yaml:"insecure,omitempty" export:"true"`
TrustedIPs []string `description:"Trust only selected IPs." json:"trustedIPs,omitempty" toml:"trustedIPs,omitempty" yaml:"trustedIPs,omitempty"`
}
ProxyProtocol contains Proxy-Protocol configuration.
type RedirectEntryPoint ¶
type RedirectEntryPoint struct {
To string `` /* 128-byte string literal not displayed */
Scheme string `` /* 132-byte string literal not displayed */
Permanent bool `` /* 141-byte string literal not displayed */
Priority int `` /* 139-byte string literal not displayed */
}
RedirectEntryPoint is the definition of an entry point redirection.
func (*RedirectEntryPoint) SetDefaults ¶
func (r *RedirectEntryPoint) SetDefaults()
SetDefaults sets the default values.
type Redirections ¶
type Redirections struct {
EntryPoint *RedirectEntryPoint `` /* 150-byte string literal not displayed */
}
Redirections is a set of redirection for an entry point.
type RespondingTimeouts ¶
type RespondingTimeouts struct {
ReadTimeout ptypes.Duration `` /* 230-byte string literal not displayed */
WriteTimeout ptypes.Duration `` /* 224-byte string literal not displayed */
IdleTimeout ptypes.Duration `` /* 257-byte string literal not displayed */
}
RespondingTimeouts contains timeout configurations for incoming requests to the Ingress instance.
func (*RespondingTimeouts) SetDefaults ¶
func (a *RespondingTimeouts) SetDefaults()
SetDefaults sets the default values.
type ServersTransport ¶
type ServersTransport struct {
InsecureSkipVerify bool `` /* 173-byte string literal not displayed */
RootCAs []types.FileOrContent `` /* 131-byte string literal not displayed */
MaxIdleConnsPerHost int `` /* 293-byte string literal not displayed */
ForwardingTimeouts *ForwardingTimeouts `` /* 191-byte string literal not displayed */
Spiffe *Spiffe `` /* 170-byte string literal not displayed */
}
ServersTransport options to configure communication between Ingress and the servers.
type Spiffe ¶
type Spiffe struct {
IDs []string `` /* 155-byte string literal not displayed */
TrustDomain string `` /* 141-byte string literal not displayed */
}
Spiffe holds the SPIFFE configuration.
type SpiffeClientConfig ¶
type SpiffeClientConfig struct {
WorkloadAPIAddr string `` /* 146-byte string literal not displayed */
}
SpiffeClientConfig defines the SPIFFE client configuration.
type TCPServersTransport ¶
type TCPServersTransport struct {
DialKeepAlive ptypes.Duration `` /* 467-byte string literal not displayed */
DialTimeout ptypes.Duration `` /* 236-byte string literal not displayed */
// TerminationDelay, corresponds to the deadline that the proxy sets, after one
// of its connected peers indicates it has closed the writing capability of its
// connection, to close the reading capability as well, hence fully terminating the
// connection. It is a duration in milliseconds, defaulting to 100. A negative value
// means an infinite deadline (i.e. the reading capability is never closed).
TerminationDelay ptypes.Duration `` /* 256-byte string literal not displayed */
TLS *TLSClientConfig `` /* 174-byte string literal not displayed */
}
TCPServersTransport options to configure communication between Ingress and the servers.
type TLSClientConfig ¶
type TLSClientConfig struct {
InsecureSkipVerify bool `` /* 174-byte string literal not displayed */
RootCAs []types.FileOrContent `` /* 157-byte string literal not displayed */
Spiffe *Spiffe `` /* 174-byte string literal not displayed */
}
TLSClientConfig options to configure TLS communication between Ingress and the servers.
type TLSConfig ¶
type TLSConfig struct {
Options string `` /* 165-byte string literal not displayed */
CertResolver string `` /* 189-byte string literal not displayed */
Domains []types.Domain `` /* 165-byte string literal not displayed */
}
TLSConfig is the default TLS configuration for all the routers associated to the concerned entry point.
type Tracing ¶
type Tracing struct {
ServiceName string `` /* 159-byte string literal not displayed */
ResourceAttributes map[string]string `` /* 187-byte string literal not displayed */
CapturedRequestHeaders []string `` /* 213-byte string literal not displayed */
CapturedResponseHeaders []string `` /* 217-byte string literal not displayed */
SafeQueryParams []string `` /* 154-byte string literal not displayed */
SampleRate float64 `` /* 167-byte string literal not displayed */
AddInternals bool `` /* 182-byte string literal not displayed */
OTLP *otypes.OTelTracing `` /* 158-byte string literal not displayed */
// Deprecated: please use ResourceAttributes instead.
GlobalAttributes map[string]string `` /* 194-byte string literal not displayed */
}
Tracing holds the tracing configuration.