parser

package
v0.0.0-...-0db023b Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAnnotationsPrefix = "nginx.ingress.kubernetes.io"

DefaultAnnotationsPrefix defines the common prefix used in the nginx ingress controller

Variables

View Source
var (
	// AnnotationsPrefix is the mutable attribute that the controller explicitly refers to
	AnnotationsPrefix = DefaultAnnotationsPrefix
)

Functions

func AnnotationsReferencesConfigmap

func AnnotationsReferencesConfigmap(ing *networking.Ingress) bool

AnnotationsReferencesConfigmap checks if at least one annotation in the Ingress rule references a configmap.

func GetAnnotationWithPrefix

func GetAnnotationWithPrefix(suffix string) string

GetAnnotationWithPrefix returns the prefix of ingress annotations

func GetBoolAnnotation

func GetBoolAnnotation(name string, ing *networking.Ingress) (bool, error)

GetBoolAnnotation extracts a boolean from an Ingress annotation

func GetIntAnnotation

func GetIntAnnotation(name string, ing *networking.Ingress) (int, error)

GetIntAnnotation extracts an int from an Ingress annotation

func GetStringAnnotation

func GetStringAnnotation(name string, ing *networking.Ingress) (string, error)

GetStringAnnotation extracts a string from an Ingress annotation

func StringToURL

func StringToURL(input string) (*url.URL, error)

StringToURL parses the provided string into URL and returns error message in case of failure

Types

type IngressAnnotation

type IngressAnnotation interface {
	Parse(ing *networking.Ingress) (interface{}, error)
}

IngressAnnotation has a method to parse annotations located in Ingress

Jump to

Keyboard shortcuts

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