ingress

package
v0.0.0-...-db7c515 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SingleHostValidator = singleHostValidator(0)

SingleHostValidator checks if the ingress has a single host. It knows how to handle different ingress types. If the received object is not an ingress then will return `ErrNotIngress` error.

Variables

View Source
var ErrNotIngress = errors.New("object is not an ingress")

ErrNotIngress will be used when the validating object is not an ingress.

Functions

This section is empty.

Types

type Validator

type Validator interface {
	Validate(ctx context.Context, obj metav1.Object) error
}

Validator knows how to validate an ingress.

var DummyValidator Validator = dummyValidator(0)

DummyValidator is a Validator that doesn't do anything.

func NewHostRegexValidator

func NewHostRegexValidator(hostRegexes []string) (Validator, error)

NewHostRegexValidator returns a new validator that checks an ingress hosts match at least one of the received regexes. It knows how to handle different ingress types. If the received object is not an ingress then will return `ErrNotIngress` error.

Jump to

Keyboard shortcuts

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