routeapihelpers

package
v0.0.0-...-5152f1c Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package routeapihelpers contains utilities for handling OpenShift route objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IngressURI

func IngressURI(route *routev1.Route, host string) (*url.URL, *routev1.RouteIngress, error)

IngressURI calculates an admitted ingress URI. If 'host' is nonempty, only the ingress for that host is considered. If 'host' is empty, the first admitted ingress is used.

func ValidateHost

func ValidateHost(host string, allowNonCompliant string, hostPath *field.Path) field.ErrorList

ValidateHost checks that a route's host name satisfies OpenShift DNS requirements, with the assumption that the caller is not passing in an empty host name.

ValidateHost mimics the host validation in the validateRoute method in openshift-apiserver/pkg/route/apis/route/validation/validation package.

The host name length must be no more than 253 characters. The only characters allowed in host name are alphanumeric characters, '-' or '.', and it must start and end with an alphanumeric character. A trailing dot is NOT allowed.

If the allowNonCompliant annotation is not set to true, the host name must in addition consist of one or more labels, with each label no more than 63 characters from the character set described above, and each label must start and end with an alphanumeric character.

Types

This section is empty.

Jump to

Keyboard shortcuts

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