config

package
v0.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ControllerName is the name of the kourier controller.
	ControllerName = "net-kourier-controller"

	// InternalServiceName is the name of the internal service.
	InternalServiceName = "kourier-internal"

	// ExternalServiceName is the name of the external service.
	ExternalServiceName = "kourier"

	// HTTPPortExternal is the port for external availability.
	HTTPPortExternal = uint32(8080)

	// HTTPPortLocal is the port for internal availability.
	HTTPPortLocal = uint32(8081)

	// HTTPSPortLocal is the port for internal HTTPS availability.
	HTTPSPortLocal = uint32(8444)

	// HTTPSPortExternal is the port for external HTTPS availability.
	HTTPSPortExternal = uint32(8443)

	// HTTPPortProb is the port for prob
	HTTPPortProb = uint32(8090)

	// HTTPSPortProb is the port for prob
	HTTPSPortProb = uint32(9443)

	// InternalKourierDomain is an internal envoy endpoint.
	InternalKourierDomain = "internalkourier"

	// GatewayNamespaceEnv is an env variable specifying where the gateway is deployed.
	GatewayNamespaceEnv = "KOURIER_GATEWAY_NAMESPACE"

	// KourierIngressClassName is the class name to reconcile.
	KourierIngressClassName = "kourier.ingress.networking.knative.dev"
)
View Source
const (
	// ConfigName is the name of config map for Kourier.
	ConfigName = "config-kourier"

	// IdleTimeoutKey is the config map key for the amount of time that Kourier waits
	// for incoming requests. This value is set to "stream_idle_timeout" in Envoy.
	IdleTimeoutKey = "stream-idle-timeout"

	// TracingCollectorFullEndpoint is the config map key to configure tracing at kourier gateway level
	TracingCollectorFullEndpoint = "tracing-collector-full-endpoint"
)

Variables

View Source
var ExternalAuthz = &ExternalAuthzConfig{
	Enabled: false,
}

ExternalAuthz is the configuration of external authorization.

Functions

func GatewayNamespace added in v0.19.0

func GatewayNamespace() string

GatewayNamespace returns the namespace where the gateway is deployed.

func GetDisableHTTP2 added in v0.31.0

func GetDisableHTTP2(annotations map[string]string) (val string)

GetDisableHTTP2 specifies whether http2 is going to be disabled

func ServiceHostnames added in v0.19.0

func ServiceHostnames() (string, string)

ServiceHostnames returns the external and internal service's respective hostname.

Example: kourier.kourier-system.svc.cluster.local.

Types

type ExternalAuthzConfig added in v0.19.0

type ExternalAuthzConfig struct {
	Enabled    bool
	Cluster    *v3Cluster.Cluster
	HTTPFilter *hcm.HttpFilter
}

ExternalAuthzConfig specifies parameters for external authorization configuration.

type Kourier added in v0.24.0

type Kourier struct {
	// EnableServiceAccessLogging specifies whether requests reaching the Kourier gateway
	// should be logged.
	EnableServiceAccessLogging bool
	// EnableProxyProtocol specifies whether proxy protocol feature is enabled
	EnableProxyProtocol bool
	// ClusterCertSecret specifies the secret name for the server certificates of
	// Kourier Internal.
	ClusterCertSecret string
	// IdleTimeout specifies the amount of time that Kourier waits for incoming requests.
	// The default value is 5 minutes. This will not interfere any smaller configured
	// timeouts that may have existed in configurations prior to
	// this option, for example, the "timeoutSeconds" specified in Knative service is still
	// valid.
	IdleTimeout time.Duration
	// TrustedHopsCount configures the number of additional ingress proxy hops from the
	// right side of the x-forwarded-for HTTP header to trust.
	TrustedHopsCount uint32
	// EnableCryptoMB specifies whether Kourier enable CryptoMB private provider to accelerate
	// TLS handshake. The default value is "false".
	EnableCryptoMB bool
	// CipherSuites specifies the cipher suites for TLS external listener.
	CipherSuites sets.Set[string]
	// Tracing specifies the configuration for gateway tracing
	Tracing Tracing
}

Kourier includes the configuration for Kourier. +k8s:deepcopy-gen=true

func DefaultConfig added in v0.24.0

func DefaultConfig() *Kourier

func NewConfigFromConfigMap added in v0.24.0

func NewConfigFromConfigMap(config *corev1.ConfigMap) (*Kourier, error)

NewConfigFromConfigMap creates a Kourier from the supplied configMap.

func NewConfigFromMap added in v0.24.0

func NewConfigFromMap(configMap map[string]string) (*Kourier, error)

NewConfigFromMap creates a DeploymentConfig from the supplied Map.

func (*Kourier) DeepCopy added in v0.24.0

func (in *Kourier) DeepCopy() *Kourier

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kourier.

func (*Kourier) DeepCopyInto added in v0.24.0

func (in *Kourier) DeepCopyInto(out *Kourier)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Tracing added in v0.39.0

type Tracing struct {
	Enabled           bool
	CollectorHost     string
	CollectorPort     uint16
	CollectorEndpoint string
}

Tracing contains all fields required to configure tracing at kourier gateway level. This object is mostly filled by the asTracing method, using TracingCollectorFullEndpoint value as the source.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL