Documentation
¶
Overview ¶
Package ingestion holds functions that translate from Kubernetes resources into Listener types for storage in the model.
Index ¶
- func GammaHTTPRoutes(input GammaInput) []model.HTTPListener
- func GatewayAPI(input Input) ([]model.HTTPListener, []model.TLSPassthroughListener)
- func Ingress(ing networkingv1.Ingress, defaultSecretNamespace, defaultSecretName string, ...) []model.HTTPListener
- func IngressPassthrough(ing networkingv1.Ingress, listenerPort uint32) []model.TLSPassthroughListener
- type GammaInput
- type GatewayClassConfig
- type Input
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GammaHTTPRoutes ¶ added in v1.16.0
func GammaHTTPRoutes(input GammaInput) []model.HTTPListener
GammaHTTPRoutes takes a GammaInput and gives back the associated HTTP Listeners It does not support TLS Routes because GAMMA is only for cleartext config - it is assumed that any TLS will be performed transparently by the underlying implementation in the spec.
func GatewayAPI ¶
func GatewayAPI(input Input) ([]model.HTTPListener, []model.TLSPassthroughListener)
GatewayAPI translates Gateway API resources into a model.
func Ingress ¶
func Ingress(ing networkingv1.Ingress, defaultSecretNamespace, defaultSecretName string, enforcedHTTPS bool, insecureListenerPort, secureListenerPort uint32, defaultRequestTimeout time.Duration) []model.HTTPListener
Ingress translates an Ingress resource to a HTTPListener. This function does not check IngressClass (via field or annotation). It's expected that only relevant Ingresses will have this function called on them.
func IngressPassthrough ¶ added in v1.15.0
func IngressPassthrough(ing networkingv1.Ingress, listenerPort uint32) []model.TLSPassthroughListener
IngressPassthrough translates an Ingress resource with the tls-passthrough annotation to a TLSListener. This function does not check IngressClass (via field or annotation). It's expected that only relevant Ingresses will have this function called on them.
Ingress objects with SSL Passthrough enabled have the following properties:
* must have a host set * rules with paths other than '/' are ignored * default backends are ignored
Types ¶
type GammaInput ¶ added in v1.16.0
type GammaInput struct { HTTPRoutes []gatewayv1.HTTPRoute ReferenceGrants []gatewayv1beta1.ReferenceGrant Services []corev1.Service }
GammaInput is the input for GatewayAPI.
type GatewayClassConfig ¶
type GatewayClassConfig struct { // Service is the front-end service configuration for the GatewayClass // Normally, this is used to configure the LoadBalancer type service, // and mapped to k8s Service object Service *ServiceConfig `json:"service,omitempty"` }
GatewayClassConfig is the struct for GatewayClass parameters The struct is used to unmarshal the ConfigMap data
type Input ¶
type Input struct { GatewayClass gatewayv1.GatewayClass GatewayClassConfig *v2alpha1.CiliumGatewayClassConfig Gateway gatewayv1.Gateway HTTPRoutes []gatewayv1.HTTPRoute TLSRoutes []gatewayv1alpha2.TLSRoute GRPCRoutes []gatewayv1.GRPCRoute ReferenceGrants []gatewayv1beta1.ReferenceGrant Services []corev1.Service ServiceImports []mcsapiv1alpha1.ServiceImport }
Input is the input for GatewayAPI.
type ServiceConfig ¶
type ServiceConfig struct { // Type is the type of the service (e.g. LoadBalancer, NodePort, ClusterIP). // Defaults to LoadBalancer Type *string `json:"type,omitempty"` ExternalTrafficPolicy *string `json:"externalTrafficPolicy,omitempty"` LoadBalancerClass *string `json:"loadBalancerClass,omitempty"` LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"` IPFamilies []string `json:"ipFamilies,omitempty"` IPFamilyPolicy *string `json:"ipFamilyPolicy,omitempty"` AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty"` TrafficDistribution *string `json:"trafficDistribution,omitempty"` }