ingress

package
v1.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package ingress lets us use an internal type for supporting multiple kinds of ingresses.

This package's sole reason for existence is for compatibility with Kubernetes API servers below v1.18. However, our client-go library is already beyond the supported version skew (https://kubernetes.io/releases/version-skew-policy/) so it is not guaranteed to continue working in the future, and will definitely be removed once cert-manager no longer supports Kubernetes 1.17.

Index

Constants

View Source
const ConvertedGVKAnnotation = `internal.cert-manager.io/converted-gvk`

ConvertedGVKAnnotation is the annotation key set by cert-manager on Ingress resources converted from networking.k8s.io/v1beta1 to networking.k8s.io/v1

On Kubernetes 1.16, 1.17, and 1.18, the `networking.k8s.io/v1` API did not exist yet. For these Kubernetes versions, cert-manager converts `networking.k8s.io/v1beta1` into `networking.k8s.io/v1`, which is the one version used across cert-manager.

But this conversion means that we lose the "original" apiVersion, which is needed by the ingress-shim sync function to set the correct `ownerReference` on the Certificate it creates.

This annotation is only set on Ingresses on Kubernetes 1.16, 1.17, and 1.18.

Variables

This section is empty.

Functions

func Convert_core_LoadBalancerStatus_To_v1_LoadBalancerStatus

func Convert_core_LoadBalancerStatus_To_v1_LoadBalancerStatus(in *corev1.LoadBalancerStatus, out *corev1.LoadBalancerStatus, s conversion.Scope) error

func Convert_networking_HTTPIngressPath_To_v1beta1_HTTPIngressPath

func Convert_networking_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *networkingv1.HTTPIngressPath, out *networkingv1beta1.HTTPIngressPath, s conversion.Scope) error

func Convert_networking_IngressBackend_To_v1beta1_IngressBackend

func Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networkingv1.IngressBackend, out *networkingv1beta1.IngressBackend, s conversion.Scope) error

func Convert_networking_IngressRuleValue_To_v1beta1_IngressRuleValue

func Convert_networking_IngressRuleValue_To_v1beta1_IngressRuleValue(in *networkingv1.IngressRuleValue, out *networkingv1beta1.IngressRuleValue, s conversion.Scope) error

func Convert_networking_IngressRule_To_v1beta1_IngressRule

func Convert_networking_IngressRule_To_v1beta1_IngressRule(in *networkingv1.IngressRule, out *networkingv1beta1.IngressRule, s conversion.Scope) error

func Convert_networking_IngressSpec_To_v1beta1_IngressSpec

func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networkingv1.IngressSpec, out *networkingv1beta1.IngressSpec, s conversion.Scope) error

func Convert_networking_IngressStatus_To_v1beta1_IngressStatus

func Convert_networking_IngressStatus_To_v1beta1_IngressStatus(in *networkingv1.IngressStatus, out *networkingv1beta1.IngressStatus, s conversion.Scope) error

func Convert_networking_Ingress_To_v1beta1_Ingress

func Convert_networking_Ingress_To_v1beta1_Ingress(in *networkingv1.Ingress, out *networkingv1beta1.Ingress, s conversion.Scope) error

Convert_networking_Ingress_To_v1beta1_Ingress uses unsafe pointer manipulation to manipulate a *networkingv1beta1.Ingress into pointing at the same underlying data as the input *networkingv1.Ingress. Both the `in` and `out` Object's data will be manipulated by this function.

Recommended usage:

// as in and out will point to the same data, make sure any manipulation doesn't affect the original Ingress
in := myIngress.DeepCopy()
out := new(networkingv1beta1.Ingress)
err := Convert_networking_Ingress_To_v1beta1_Ingress(in, out, nil)

func Convert_v1_LoadBalancerStatus_To_core_LoadBalancerStatus

func Convert_v1_LoadBalancerStatus_To_core_LoadBalancerStatus(in *corev1.LoadBalancerStatus, out *corev1.LoadBalancerStatus, s conversion.Scope) error

func Convert_v1beta1_HTTPIngressPath_To_networking_HTTPIngressPath

func Convert_v1beta1_HTTPIngressPath_To_networking_HTTPIngressPath(in *networkingv1beta1.HTTPIngressPath, out *networkingv1.HTTPIngressPath, s conversion.Scope) error

func Convert_v1beta1_IngressBackend_To_networking_IngressBackend

func Convert_v1beta1_IngressBackend_To_networking_IngressBackend(in *networkingv1beta1.IngressBackend, out *networkingv1.IngressBackend, s conversion.Scope) error

func Convert_v1beta1_IngressRuleValue_To_networking_IngressRuleValue

func Convert_v1beta1_IngressRuleValue_To_networking_IngressRuleValue(in *networkingv1beta1.IngressRuleValue, out *networkingv1.IngressRuleValue, s conversion.Scope) error

func Convert_v1beta1_IngressRule_To_networking_IngressRule

func Convert_v1beta1_IngressRule_To_networking_IngressRule(in *networkingv1beta1.IngressRule, out *networkingv1.IngressRule, s conversion.Scope) error

func Convert_v1beta1_IngressSpec_To_networking_IngressSpec

func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *networkingv1beta1.IngressSpec, out *networkingv1.IngressSpec, s conversion.Scope) error

func Convert_v1beta1_IngressStatus_To_networking_IngressStatus

func Convert_v1beta1_IngressStatus_To_networking_IngressStatus(in *networkingv1beta1.IngressStatus, out *networkingv1.IngressStatus, s conversion.Scope) error

func Convert_v1beta1_Ingress_To_networking_Ingress

func Convert_v1beta1_Ingress_To_networking_Ingress(in *networkingv1beta1.Ingress, out *networkingv1.Ingress, s conversion.Scope) error

Convert_v1beta1_Ingress_To_networking_Ingress uses unsafe pointer manipulation to manipulate a *networkingv1.Ingress into pointing at the same underlying data as the input *networkingv1beta1.Ingress. Both the `in` and `out` Object's data will be manipulated by this function.

Recommended usage:

// as in and out will point to the same data, make sure any manipulation doesn't affect the original Ingress
in := myIngress.DeepCopy()
out := new(networkingv1.Ingress)
err := Convert_v1beta1_Ingress_To_networking_Ingress(in, out, nil)

Types

type InternalIngressCreateUpdater

type InternalIngressCreateUpdater interface {
	Ingresses(namespace string) InternalIngressInterface
}

InternalIngressCreateUpdater mimics a client-go networking/v1 or networking/v1beta1 Interface.

func NewCreateUpdater

func NewCreateUpdater(ctx *controller.Context) (InternalIngressCreateUpdater, error)

NewCreateUpdater returns an InternalIngressCreateUpdater configured for v1 or v1beta1 ingresses depending on the versions available in the discovery client

type InternalIngressInterface

type InternalIngressInterface interface {
	Create(ctx context.Context, ingress *networkingv1.Ingress, opts metav1.CreateOptions) (*networkingv1.Ingress, error)
	Update(ctx context.Context, ingress *networkingv1.Ingress, opts metav1.UpdateOptions) (*networkingv1.Ingress, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*networkingv1.Ingress, error)
}

InternalIngressInterface mimics a client-go networking/v1/IngressInterface It always returns a *networkingv1.Ingress, so when implementing this you must convert any type of Ingress into a v1.Ingress.

type InternalIngressLister

type InternalIngressLister interface {
	List(selector labels.Selector) (ret []*networkingv1.Ingress, err error)
	Ingresses(namespace string) InternalIngressNamespaceLister
}

InternalIngressLister mimics a client-go networking/v1/IngressLister.

func NewListerInformer

NewListerInformer returns an InternalIngressLister configured for v1 or v1beta1 ingresses depending on the API Versions available in the discovery client.

type InternalIngressNamespaceLister

type InternalIngressNamespaceLister interface {
	List(selector labels.Selector) (ret []*networkingv1.Ingress, err error)
	Get(name string) (*networkingv1.Ingress, error)
}

InternalIngressNamespaceLister mimics a client-go networking/v1/IngressNamespaceLister

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL