Documentation ¶
Overview ¶
Package ingress contains all the logic for Cilium Ingress Controller For every Ingress object, the controller will check if spec.ingressClassName is cilium, then perform the respective operations
- Create one Load Balancer service, the external IP/FQDN is available will bubble up to Ingress status once ready.
- Create CiliumEnvoyConfig with all routing details.
- Create dummy Endpoint for above LB service
All above child resources are having respective ownerReferences for proper cleanup.
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 ¶
const Subsys = "ingress-controller"
Variables ¶
var DefaultIngressOptions = Options{ MaxRetries: 10, EnforcedHTTPS: true, EnabledSecretsSync: true, LBAnnotationPrefixes: []string{}, }
DefaultIngressOptions specifies default values for cilium ingress controller.
Functions ¶
This section is empty.
Types ¶
type IngressController ¶ added in v1.12.0
type IngressController struct {
// contains filtered or unexported fields
}
IngressController is a simple pattern that allows to perform the following tasks:
- Watch cilium Ingress object
- Manage related child resources for this Ingress
- Service
- Endpoint
- CiliumEnvoyConfig
- Manage synced TLS secrets in given namespace
- TLS secrets
func NewIngressController ¶ added in v1.12.0
func NewIngressController(options ...Option) (*IngressController, error)
NewIngressController returns a controller for ingress objects having ingressClassName as cilium
func (*IngressController) Run ¶ added in v1.12.0
func (ic *IngressController) Run()
Run kicks off the controlled loop
type Option ¶
Option customizes the configuration of cilium ingress controller
func WithHTTPSEnforced ¶
WithHTTPSEnforced specifies if https enforcement should be done or not
func WithLBAnnotationPrefixes ¶
WithLBAnnotationPrefixes configures LB annotations to be used for LB service
func WithMaxRetries ¶
WithMaxRetries sets the maximum number of retries while processing events
func WithSecretsNamespace ¶
WithSecretsNamespace configures destination namespace for syncing all TLS secrets across namespaces.
func WithSecretsSyncEnabled ¶
WithSecretsSyncEnabled specifies if secrets syncs process should be done or not
type Options ¶
type Options struct { MaxRetries int EnforcedHTTPS bool EnabledSecretsSync bool SecretsNamespace string LBAnnotationPrefixes []string }
Options stores all the configurations values for cilium ingress controller.
type SortableRoute ¶ added in v1.12.0
type SortableRoute []*envoy_config_route_v3.Route
SortableRoute is a slice of envoy Route, which can be sorted based on matching order as per Ingress requirement.
- Exact Match must have the highest priority - If multiple prefix matches are satisfied, the longest path is having higher priority
As Envoy route matching logic is done sequentially, we need to enforce such sorting order.
func (SortableRoute) Len ¶ added in v1.12.0
func (s SortableRoute) Len() int
func (SortableRoute) Less ¶ added in v1.12.0
func (s SortableRoute) Less(i, j int) bool
func (SortableRoute) Swap ¶ added in v1.12.0
func (s SortableRoute) Swap(i, j int)
Source Files ¶
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. |