ingress

package
v1.15.13 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package ingress contains all the logic for Cilium Ingress Controller. Only Ingress resources having annotations."kubernetes.io/ingress.class" or spec.ingressClassName set to "cilium" are managed and processed by the Cilium Ingress Controller.

Two LB modes are supported:

  • dedicated LB mode: a dedicated LB is used for each Ingress.
  • shared LB mode: all eligible Ingresses are using the same LB.

Each LB mode will have its own translation logic, which converts Ingress resource(s) into internal representation, and then turns it into a set of Cilium configurations (e.g. CiliumEnvoyConfig, LB Service, Endpoints etc.).

  • Create one Load Balancer service, the external IP/FQDN is available will bubble up to Ingress status once ready. (dedicated LB mode only)
  • Create dummy Endpoint for above LB service. (dedicated LB mode only)
  • Create CiliumEnvoyConfig with all routing details. (both modes)

There is a small secret sync component, which will watch all tls ingress secrets and sync them to another give namespace. This is to limit the permission during runtime in all nodes.

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"ingress",
	"Manages the Kubernetes Ingress controllers",

	cell.Config(IngressConfig{
		EnableIngressController:     false,
		EnforceIngressHTTPS:         true,
		EnableIngressProxyProtocol:  false,
		EnableIngressSecretsSync:    true,
		IngressSecretsNamespace:     "cilium-secrets",
		IngressLBAnnotationPrefixes: []string{"service.beta.kubernetes.io", "service.kubernetes.io", "cloud.google.com"},
		IngressSharedLBServiceName:  "cilium-ingress",
		IngressDefaultLBMode:        "dedicated",
	}),
	cell.Invoke(registerReconciler),
	cell.Provide(registerSecretSync),
)

Cell manages the Kubernetes Ingress related controllers.

Functions

func EnqueueReferencedTLSSecrets added in v1.15.0

func EnqueueReferencedTLSSecrets(c client.Client, logger logrus.FieldLogger) handler.EventHandler

func IsReferencedByCiliumIngress added in v1.15.0

func IsReferencedByCiliumIngress(ctx context.Context, c client.Client, logger logrus.FieldLogger, obj *corev1.Secret) bool

Types

type IngressConfig added in v1.15.13

type IngressConfig struct {
	EnableIngressController       bool
	EnforceIngressHTTPS           bool
	EnableIngressProxyProtocol    bool
	EnableIngressSecretsSync      bool
	IngressSecretsNamespace       string
	IngressLBAnnotationPrefixes   []string
	IngressSharedLBServiceName    string
	IngressDefaultLBMode          string
	IngressDefaultSecretNamespace string
	IngressDefaultSecretName      string
}

func (IngressConfig) Flags added in v1.15.13

func (r IngressConfig) Flags(flags *pflag.FlagSet)

func (IngressConfig) IsEnabled added in v1.15.13

func (r IngressConfig) IsEnabled() bool

IsEnabled returns true if the Ingress Controller is enabled.

Directories

Path Synopsis
Package annotations contains all annotations that supported by cilium ingress controller along with some sensible defaults.
Package annotations contains all annotations that supported by cilium ingress controller along with some sensible defaults.

Jump to

Keyboard shortcuts

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