Documentation
¶
Overview ¶
Copyright 2025 HAProxy Technologies LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2025 HAProxy Technologies LLC ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2025 HAProxy Technologies LLC ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func ListenerSetCertificateRefIndexFunc(logger *slog.Logger) client.IndexerFunc
- func ListenerSetCertificateRefNamespaceIndexFunc(logger *slog.Logger) client.IndexerFunc
- func ListenerSetCertificateRefs(listenerSet *gatewayv1.ListenerSet) []types.NamespacedName
- func ServiceNameIndexFunc(logger *slog.Logger) client.IndexerFunc
- type FieldIndices
- type ServiceNameIndexFuncWithLogger
Constants ¶
const ( // EndpointSliceServiceNameIndexField is the name of the Index Field used to index EndpointSlices by their service // owners. EndpointSliceServiceNameIndexField = "k8sServiceName" // EndpointSliceServiceNameLabel is the label used to identify the Kubernetes service name on an EndpointSlice. EndpointSliceServiceNameLabel = "kubernetes.io/service-name" )
const ( // ListenerSetCertificateRefIndexField maps a ListenerSet to the Secrets its entries' // TLS certificateRefs name. ListenerSetCertificateRefIndexField = "listenerSetCertificateRef" // ListenerSetCertificateRefNamespaceIndexField maps a ListenerSet to the namespaces its // cross-namespace certificateRefs target -- the namespaces a ReferenceGrant can be // written in to permit them. Same-namespace references are left out: they need no // grant, so a grant event cannot concern them. ListenerSetCertificateRefNamespaceIndexField = "listenerSetCertificateRefNamespace" )
Variables ¶
This section is empty.
Functions ¶
func ListenerSetCertificateRefIndexFunc ¶ added in v1.1.0
func ListenerSetCertificateRefIndexFunc(logger *slog.Logger) client.IndexerFunc
ListenerSetCertificateRefIndexFunc indexes a ListenerSet by the namespaced names of the Secrets it references. It only routes an event: nothing here decides whether the reference resolves (a ReferenceGrant may be missing) or whether the ListenerSet is attached, which the reference manager re-checks when it derives ReferencedSecrets.
func ListenerSetCertificateRefNamespaceIndexFunc ¶ added in v1.1.0
func ListenerSetCertificateRefNamespaceIndexFunc(logger *slog.Logger) client.IndexerFunc
ListenerSetCertificateRefNamespaceIndexFunc indexes a ListenerSet by the namespaces its cross-namespace certificateRefs target, so a ReferenceGrant event can be routed to the ListenerSets it could permit.
func ListenerSetCertificateRefs ¶ added in v1.1.0
func ListenerSetCertificateRefs(listenerSet *gatewayv1.ListenerSet) []types.NamespacedName
ListenerSetCertificateRefs returns the v1 Secrets a ListenerSet's entries' TLS certificateRefs point at; the ListenerSet's own namespace defaults the ones that name none, and duplicates are collapsed.
The key carries the Secret's namespace because a certificateRef may target another one, and a bare name would then also match a same-named Secret elsewhere.
func ServiceNameIndexFunc ¶
func ServiceNameIndexFunc(logger *slog.Logger) client.IndexerFunc
ServiceNameIndexFunc is a client.IndexerFunc that parses a Kubernetes object and returns the value of the Kubernetes service-name label. Used to index EndpointSlices by their service owners.
Types ¶
type FieldIndices ¶
type FieldIndices map[string]client.IndexerFunc
FieldIndices is a map of field names to their indexer functions.
func CreateEndpointSliceFieldIndices ¶
func CreateEndpointSliceFieldIndices(logger *slog.Logger) FieldIndices
CreateEndpointSliceFieldIndices creates a FieldIndices map for the EndpointSlice resource.
func ListenerSetCertificateRefFieldIndices ¶ added in v1.1.0
func ListenerSetCertificateRefFieldIndices(logger *slog.Logger) FieldIndices
ListenerSetCertificateRefFieldIndices is the FieldIndices a ListenerSet controller has to register before its informer starts, so a Secret or a ReferenceGrant event can be routed to the ListenerSets that depend on it by a List rather than a scan of the whole type.