Documentation
¶
Index ¶
- Constants
- func InjectExternalProxyRevision[T client.Object](controller *networkingv1alpha1.ExternalProxy, target T) T
- func NewEndpointSliceFromBackend(name string, backend *networkingv1alpha1.ExternalProxyBackend, ...) *discoveryv1.EndpointSlice
- func NewEndpointSlices(instance *networkingv1alpha1.ExternalProxy) []*discoveryv1.EndpointSlice
- func NewIngress(instance *networkingv1alpha1.ExternalProxy) *networkingv1.Ingress
- func NewService(instance *networkingv1alpha1.ExternalProxy) *corev1.Service
- func ServiceKey(instance *networkingv1alpha1.ExternalProxy) client.ObjectKey
- func ShouldReconcileResource[T client.Object](controller *networkingv1alpha1.ExternalProxy, object T) bool
- type StatusUpdater
Constants ¶
const (
Kind = "ExternalProxy"
)
Variables ¶
This section is empty.
Functions ¶
func InjectExternalProxyRevision ¶
func InjectExternalProxyRevision[T client.Object](controller *networkingv1alpha1.ExternalProxy, target T) T
InjectExternalProxyRevision sets the revision annotation on the target object.
func NewEndpointSliceFromBackend ¶
func NewEndpointSliceFromBackend(name string, backend *networkingv1alpha1.ExternalProxyBackend, filter func(string) net.IP) *discoveryv1.EndpointSlice
NewEndpointSliceFromBackend creates an EndpointSlice from a given backend and filters out IP addresses using a specified function.
func NewEndpointSlices ¶
func NewEndpointSlices(instance *networkingv1alpha1.ExternalProxy) []*discoveryv1.EndpointSlice
NewEndpointSlices generates a list of EndpointSlice objects from the ExternalProxy instance.
It creates separate EndpointSlices for IPv4 and IPv6 addresses for each backend specified in the instance.
func NewIngress ¶
func NewIngress(instance *networkingv1alpha1.ExternalProxy) *networkingv1.Ingress
NewIngress creates a new Ingress object based on the specification provided in the ExternalProxy instance.
func NewService ¶
func NewService(instance *networkingv1alpha1.ExternalProxy) *corev1.Service
NewService creates a new Service object based on the given ExternalProxy instance.
func ServiceKey ¶
func ServiceKey(instance *networkingv1alpha1.ExternalProxy) client.ObjectKey
ServiceKey generates a client.ObjectKey for accessing the Service associated with a given ExternalProxy instance.
func ShouldReconcileResource ¶
func ShouldReconcileResource[T client.Object](controller *networkingv1alpha1.ExternalProxy, object T) bool
ShouldReconcileResource checks whether reconciliation is necessary for the given resource based on the revision of the ExternalProxy controller.
Types ¶
type StatusUpdater ¶
type StatusUpdater interface {
UpdateStatus(context.Context, *networkingv1alpha1.ExternalProxy, *networkingv1alpha1.ExternalProxyStatus) error
}
StatusUpdater defines an interface for updating the status of ExternalProxy objects.
func NewStatusUpdater ¶
func NewStatusUpdater(c client.Client) StatusUpdater
NewStatusUpdater creates a new instance of StatusUpdater with the provided client.