config

package
v0.38.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 22 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"

	// IsolationServicePrefix is the prefix of the isolated services.
	IsolationServicePrefix = "kourier-isolation-"

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

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

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

	// HTTPSPortInternal is the port for internal HTTPS availability.
	HTTPSPortInternal = 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"

	// ServingNamespaceEnv is an env variable specifying where the serving is deployed.
	// e.g. OpenShift deploys Kourier in different namespace so `system.Namespace()` does not work.
	ServingNamespaceEnv = "SERVING_NAMESPACE"

	// ListenerPortAnnotationKey is the annotation key for assigning the ingress to a particular
	// envoy listener port. Only applicable to internal services.
	ListenerPortAnnotationKey = "kourier.knative.dev/listener-port"
)
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"

	// IsolationIngressPort if the config map value enabling port-level traffic isolation
	IsolationIngressPort TrafficIsolationType = "port"
)

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 ListenerServiceHostnames added in v0.33.0

func ListenerServiceHostnames(port string) string

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.

func ServingNamespace added in v0.33.0

func ServingNamespace() string

ServingNamespace returns the namespace where the serving is deployed.

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
	// Desire level of incoming traffic isolation
	TrafficIsolation TrafficIsolationType
	// 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.String
}

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 TrafficIsolationType added in v0.33.0

type TrafficIsolationType string

TrafficIsolationType is the type for traffic isolation configuration

Jump to

Keyboard shortcuts

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