Documentation
¶
Index ¶
- Constants
- Variables
- func GatewayAddressTypePtr(addr gatewayv1.AddressType) *gatewayv1.AddressType
- func GroupPtr(name string) *gatewayv1.Group
- func KindPtr(name string) *gatewayv1.Kind
- func ObjectNamePtr(name string) *gatewayv1.ObjectName
- type BackendTLSPolicyStatusManager
- type GatewayAddressStatusManager
- func (m *GatewayAddressStatusManager) SetAddressStatus(ctx context.Context, gw *gatewayv1.Gateway) error
- func (m *GatewayAddressStatusManager) SetStaticAddressStatus(ctx context.Context, gw *gatewayv1.Gateway) error
- func (m *GatewayAddressStatusManager) ValidateStaticAddresses(gw *gatewayv1.Gateway) bool
- type ListenerStatusInputs
- type ListenerStatusManager
- type ListenerStatusManagerConfig
- type ListenerStatusResult
- type ListenersStatus
- type RouteStatusInputs
- type RouteStatusManager
- type RouteStatusManagerConfig
- type SecretSyncHandler
- func (h *SecretSyncHandler) ConfigMapIsReferencedInGateway(ctx context.Context, _ client.Client, _ *slog.Logger, cfgMap *corev1.ConfigMap) bool
- func (h *SecretSyncHandler) EnqueueBackendTLSPolicyConfigMaps() handler.EventHandler
- func (h *SecretSyncHandler) EnqueueListenerSetTLSSecrets() handler.EventHandler
- func (h *SecretSyncHandler) EnqueueTLSSecrets() handler.EventHandler
- func (h *SecretSyncHandler) IsReferencedByGateway(ctx context.Context, _ client.Client, _ *slog.Logger, obj *corev1.Secret) bool
Constants ¶
const ( CiliumGammaConditionAccepted = CiliumGammaPrefix + "/GammaRoutesAttached" CiliumGammaReasonAccepted = "Accepted" )
const ( CiliumGammaConditionProgrammed = CiliumGammaPrefix + "/GammaRoutesProgrammed" CiliumGammaReasonProgrammed = "Programmed" )
const (
CiliumGammaPrefix = "gamma.cilium.io"
)
Variables ¶
var Cell = cell.Module( "gateway-api", "Manages the Gateway API controllers", cell.Config(gatewayApiConfig{ EnableGatewayAPISecretsSync: true, EnableGatewayAPIProxyProtocol: false, EnableGatewayAPIAppProtocol: false, EnableGatewayAPIAlpn: false, GatewayAPIServiceExternalTrafficPolicy: "Cluster", GatewayAPISecretsNamespace: "cilium-secrets", GatewayAPIXffNumTrustedHops: 0, GatewayAPIHostnetworkEnabled: false, GatewayAPIHostnetworkNodelabelselector: "", GatewayAPIUseRemoteAddress: true, }), cell.ProvidePrivate(newGatewayAPIPreconditions), cell.Invoke(initGatewayAPIController), cell.Provide(registerSecretSync), )
Functions ¶
func GatewayAddressTypePtr ¶
func GatewayAddressTypePtr(addr gatewayv1.AddressType) *gatewayv1.AddressType
func ObjectNamePtr ¶
func ObjectNamePtr(name string) *gatewayv1.ObjectName
Types ¶
type BackendTLSPolicyStatusManager ¶
type BackendTLSPolicyStatusManager struct {
// contains filtered or unexported fields
}
BackendTLSPolicyStatusManager calculates and writes BackendTLSPolicy status.
func NewBackendTLSPolicyStatusManager ¶
func NewBackendTLSPolicyStatusManager(client client.Client, controllerName string) *BackendTLSPolicyStatusManager
func (*BackendTLSPolicyStatusManager) SetBackendTLSPolicyStatuses ¶
func (m *BackendTLSPolicyStatusManager) SetBackendTLSPolicyStatuses( ctx context.Context, scopedLog *slog.Logger, gatewayName types.NamespacedName, btlspolicies []gatewayv1.BackendTLSPolicy, httpRoutes []gatewayv1.HTTPRoute, ) (helpers.BackendTLSPolicyServiceMap, error)
SetBackendTLSPolicyStatuses updates BackendTLSPolicy status for the current Gateway and returns the processed lookup map used by later ingestion. Policies that fail spec validation are moved from Valid to Invalid so ingestion can distinguish a broken policy from the absence of a policy.
type GatewayAddressStatusManager ¶
type GatewayAddressStatusManager struct {
// contains filtered or unexported fields
}
func NewGatewayAddressStatusManager ¶
func NewGatewayAddressStatusManager(client client.Client, logger *slog.Logger, hostNetworkLabel ...metav1.LabelSelector) *GatewayAddressStatusManager
func (*GatewayAddressStatusManager) SetAddressStatus ¶
func (m *GatewayAddressStatusManager) SetAddressStatus(ctx context.Context, gw *gatewayv1.Gateway) error
SetAddressStatus reads the managed frontend Service and projects its observed addresses into Gateway status. When at least one usable address is present, it also marks the Gateway and accepted listeners as Programmed.
func (*GatewayAddressStatusManager) SetStaticAddressStatus ¶
func (m *GatewayAddressStatusManager) SetStaticAddressStatus(ctx context.Context, gw *gatewayv1.Gateway) error
SetStaticAddressStatus compares requested static addresses with the assigned load balancer ingress addresses. It is a post-reconcile check for whether the requested static addresses were actually satisfied.
func (*GatewayAddressStatusManager) ValidateStaticAddresses ¶
func (m *GatewayAddressStatusManager) ValidateStaticAddresses(gw *gatewayv1.Gateway) bool
ValidateStaticAddresses validates spec.addresses before resource reconciliation continues. It only checks the requested static address shape; it does not look at assigned Service status. Invalid addresses are surfaced through Gateway conditions and reported as not valid.
type ListenerStatusInputs ¶
type ListenerStatusInputs struct {
MergedListeners []ingestion.ListenerWithContext
Namespaces []corev1.Namespace
AttachedListenerSets []gatewayv1.ListenerSet
DisallowedListenerSets []gatewayv1.ListenerSet
HTTPRoutes []gatewayv1.HTTPRoute
TLSRoutes []gatewayv1.TLSRoute
GRPCRoutes []gatewayv1.GRPCRoute
TCPRoutes []gatewayv1.TCPRoute
UDPRoutes []gatewayv1.UDPRoute
ReferenceGrants []gatewayv1.ReferenceGrant
}
type ListenerStatusManager ¶
type ListenerStatusManager struct {
// contains filtered or unexported fields
}
func NewListenerStatusManager ¶
func NewListenerStatusManager(client client.Client, logger *slog.Logger, cfg ListenerStatusManagerConfig) *ListenerStatusManager
func (*ListenerStatusManager) SetListenerStatuses ¶
func (m *ListenerStatusManager) SetListenerStatuses(ctx context.Context, gw *gatewayv1.Gateway, inputs ListenerStatusInputs) (*ListenerStatusResult, error)
type ListenerStatusResult ¶
type ListenerStatusResult struct {
GatewayStatus ListenersStatus
MergedAndValidListeners []ingestion.ListenerWithContext
}
type ListenersStatus ¶ added in v1.20.0
type ListenersStatus string
const ( ListenersStatusNoneValid ListenersStatus = "NoneValid" ListenersStatusValidWithUnsupportedProtocol ListenersStatus = "SomeValidWithUnsupported" ListenersStatusSomeInvalid ListenersStatus = "SomeInvalid" ListenersStatusAllValid ListenersStatus = "AllValid" )
type RouteStatusInputs ¶
type RouteStatusManager ¶
type RouteStatusManager struct {
// contains filtered or unexported fields
}
func NewRouteStatusManager ¶
func NewRouteStatusManager(client client.Client, logger *slog.Logger, controllerName string, cfg RouteStatusManagerConfig) *RouteStatusManager
func (*RouteStatusManager) SetRouteStatuses ¶
func (m *RouteStatusManager) SetRouteStatuses(ctx context.Context, scopedLog *slog.Logger, inputs RouteStatusInputs) error
type SecretSyncHandler ¶ added in v1.20.0
type SecretSyncHandler struct {
// contains filtered or unexported fields
}
func NewSecretSyncHandler ¶ added in v1.20.0
func (*SecretSyncHandler) ConfigMapIsReferencedInGateway ¶ added in v1.20.0
func (*SecretSyncHandler) EnqueueBackendTLSPolicyConfigMaps ¶ added in v1.20.0
func (h *SecretSyncHandler) EnqueueBackendTLSPolicyConfigMaps() handler.EventHandler
Enqueue BackendTLSPolicyConfigmaps produces a handler.EventHandler that, when it is passed a BackendTLSPolicy as the object.Object, returns any ConfigMaps referenced.
func (*SecretSyncHandler) EnqueueListenerSetTLSSecrets ¶ added in v1.20.1
func (h *SecretSyncHandler) EnqueueListenerSetTLSSecrets() handler.EventHandler
func (*SecretSyncHandler) EnqueueTLSSecrets ¶ added in v1.20.0
func (h *SecretSyncHandler) EnqueueTLSSecrets() handler.EventHandler
Source Files
¶
- cell.go
- controller.go
- endpointslice_reconcile.go
- gamma.go
- gamma_reconcile.go
- gamma_status.go
- gateway.go
- gateway_reconcile.go
- gateway_status.go
- gatewayclass.go
- gatewayclass_reconcile.go
- gatewayclass_status.go
- gatewayclassconfig.go
- gatewayclassconfig_reconcile.go
- helpers.go
- logger.go
- secretsync.go
- status_backendtlspolicy.go
- status_gateway_address.go
- status_listener.go
- status_route.go
Directories
¶
| Path | Synopsis |
|---|---|
|
testhelpers
testhelpers contains functions and fixtures that are helpful for testing multiple parts of the Gateway API code.
|
testhelpers contains functions and fixtures that are helpful for testing multiple parts of the Gateway API code. |
|
Package indexers holds functions related to building indexes for Kubernetes objects in the client cache.
|
Package indexers holds functions related to building indexes for Kubernetes objects in the client cache. |
|
policychecks holds objects that are used to be able run checks of various types of Policy for common problems, particularly related to things like:
|
policychecks holds objects that are used to be able run checks of various types of Policy for common problems, particularly related to things like: |
|
predicates holds functions that work as predicates for controller-runtime calls, filtering requests send to the watchhandler so that only objects that have the predicate function return `true` will be sent to the watch handler.
|
predicates holds functions that work as predicates for controller-runtime calls, filtering requests send to the watchhandler so that only objects that have the predicate function return `true` will be sent to the watch handler. |
|
routechecks holds a number of objects that fulfill the Input interface; this interface is used to be able to generically run checks of various types of Routes for common problems, particularly related to things like:
|
routechecks holds a number of objects that fulfill the Input interface; this interface is used to be able to generically run checks of various types of Routes for common problems, particularly related to things like: |
|
watchhandlers holds functions that return closures that are used as handler.TypedEventHandler[client.Object, reconcile.Request] in controller-runtime Watch() calls.
|
watchhandlers holds functions that return closures that are used as handler.TypedEventHandler[client.Object, reconcile.Request] in controller-runtime Watch() calls. |