ingress

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Class

func Class(configuration configuration.Configuration, version *version.Version) capsulewebhook.Handler

func Collision

func Collision(configuration configuration.Configuration) capsulewebhook.Handler

func Hostnames

func Hostnames(configuration configuration.Configuration) capsulewebhook.Handler

func NewEmptyIngressHostname

func NewEmptyIngressHostname(spec api.AllowedListSpec) error

func NewIngressClassForbidden

func NewIngressClassForbidden(class string, spec api.DefaultAllowedListSpec) error

func NewIngressClassNotValid

func NewIngressClassNotValid(class string, spec api.DefaultAllowedListSpec) error

func NewIngressClassUndefined

func NewIngressClassUndefined(spec api.DefaultAllowedListSpec) error

func NewIngressHostnameCollision

func NewIngressHostnameCollision(hostname string) error

func NewIngressHostnamesNotValid

func NewIngressHostnamesNotValid(invalidHostnames []string, notMatchingHostnames []string, spec api.AllowedListSpec) error

func TenantFromIngress

func TenantFromIngress(ctx context.Context, c client.Client, ingress Ingress) (*capsulev1beta2.Tenant, error)

func Wildcard

func Wildcard() capsulewebhook.Handler

Types

type Extension

type Extension struct {
	*extensionsv1beta1.Ingress
}

func (Extension) HostnamePathsPairs

func (e Extension) HostnamePathsPairs() (pairs map[string]sets.Set[string])

func (Extension) IngressClass

func (e Extension) IngressClass() (res *string)

func (Extension) Name

func (e Extension) Name() string

func (Extension) Namespace

func (e Extension) Namespace() string

func (Extension) SetIngressClass

func (e Extension) SetIngressClass(ingressClassName string)

func (Extension) SetNamespace

func (e Extension) SetNamespace(ns string)

type HostnamesList

type HostnamesList []string

func (HostnamesList) IsStringInList

func (h HostnamesList) IsStringInList(value string) (ok bool)

func (HostnamesList) Len

func (h HostnamesList) Len() int

func (HostnamesList) Less

func (h HostnamesList) Less(i, j int) bool

func (HostnamesList) Swap

func (h HostnamesList) Swap(i, j int)

type Ingress

type Ingress interface {
	IngressClass() *string
	Namespace() string
	Name() string
	HostnamePathsPairs() map[string]sets.Set[string]
	SetIngressClass(string)
	SetNamespace(string)
}

func FromRequest

func FromRequest(req admission.Request, decoder *admission.Decoder) (ingress Ingress, err error)

type NetworkingV1

type NetworkingV1 struct {
	*networkingv1.Ingress
}

func (NetworkingV1) HostnamePathsPairs

func (n NetworkingV1) HostnamePathsPairs() (pairs map[string]sets.Set[string])

func (NetworkingV1) IngressClass

func (n NetworkingV1) IngressClass() (res *string)

func (NetworkingV1) Name

func (n NetworkingV1) Name() string

func (NetworkingV1) Namespace

func (n NetworkingV1) Namespace() string

func (NetworkingV1) SetIngressClass

func (n NetworkingV1) SetIngressClass(ingressClassName string)

func (NetworkingV1) SetNamespace

func (n NetworkingV1) SetNamespace(ns string)

type NetworkingV1Beta1

type NetworkingV1Beta1 struct {
	*networkingv1beta1.Ingress
}

func (NetworkingV1Beta1) HostnamePathsPairs

func (n NetworkingV1Beta1) HostnamePathsPairs() (pairs map[string]sets.Set[string])

func (NetworkingV1Beta1) IngressClass

func (n NetworkingV1Beta1) IngressClass() (res *string)

func (NetworkingV1Beta1) Name

func (n NetworkingV1Beta1) Name() string

func (NetworkingV1Beta1) Namespace

func (n NetworkingV1Beta1) Namespace() string

func (NetworkingV1Beta1) SetIngressClass

func (n NetworkingV1Beta1) SetIngressClass(ingressClassName string)

func (NetworkingV1Beta1) SetNamespace

func (n NetworkingV1Beta1) SetNamespace(ns string)

Jump to

Keyboard shortcuts

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