annotations

package
v1.10.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(name string, annotations ...map[string]string) (out bool, err error)

func HandleBackendCfgSnippet added in v1.8.10

func HandleBackendCfgSnippet(k store.K8s, api api.HAProxyClient) (reload bool, err error)

func Int

func Int(name string, annotations ...map[string]string) (out int, err error)

func ModelBackend

func ModelBackend(name, defaultNS string, k store.K8s, annotations ...map[string]string) (backend *models.Backend, err error)

ModelBackend takes an annotation holding the path of a backend cr and returns corresponding Backend model

func ModelDefaults

func ModelDefaults(name, defaultNS string, k store.K8s, annotations ...map[string]string) (defaults *models.Defaults, err error)

ModelDefaults takes an annotation holding the path of a defaults cr and returns corresponding Defaults model

func ModelGlobal

func ModelGlobal(name, defaultNS string, k store.K8s, annotations ...map[string]string) (global *models.Global, err error)

ModelGlobal takes an annotation holding the path of a global cr and returns corresponding Global model

func ModelLog

func ModelLog(name, defaultNS string, k store.K8s, annotations ...map[string]string) (log models.LogTargets, err error)

ModelLog takes an annotation holding the path of a global cr and returns corresponding LogTargerts model

func ParseBool

func ParseBool(name string, annotations ...map[string]string) (out string, err error)

func RemoveBackendCfgSnippet

func RemoveBackendCfgSnippet(backend string)

func Secret

func Secret(name, defaultNs string, k store.K8s, annotations ...map[string]string) (secret *store.Secret, err error)

func SetDefaultValue

func SetDefaultValue(annotation, value string)

func String

func String(name string, annotations ...map[string]string) string

func Timeout

func Timeout(name string, annotations ...map[string]string) (out *int64, err error)

func UpdateBackendCfgSnippet

func UpdateBackendCfgSnippet(k store.K8s, api api.HAProxyClient, backend string) (updated []string, err error)

func UpdateFrontendCfgSnippet

func UpdateFrontendCfgSnippet(api api.HAProxyClient, frontends ...string) (updated []string, err error)

func UpdateGlobalCfgSnippet

func UpdateGlobalCfgSnippet(api api.HAProxyClient) (updated []string, err error)

Types

type Annotation

type Annotation interface {
	GetName() string
	Process(k store.K8s, annotations ...map[string]string) error
}

type Annotations

type Annotations interface {
	GlobalCfgSnipp() []Annotation
	Global(g *models.Global, l *models.LogTargets) []Annotation
	Defaults(d *models.Defaults) []Annotation
	Backend(b *models.Backend, s store.K8s, c certs.Certificates) []Annotation
	Frontend(i *store.Ingress, r *rules.List, m maps.Maps) []Annotation
	Secret(name, defaultNs string, k store.K8s, annotations ...map[string]string) (secret *store.Secret, err error)
	Timeout(name string, annotations ...map[string]string) (out *int64, err error)
	String(name string, annotations ...map[string]string) string
}

func New

func New() Annotations

type CfgSnippet

type CfgSnippet struct {
	// contains filtered or unexported fields
}

func NewBackendCfgSnippet

func NewBackendCfgSnippet(n string, b string) *CfgSnippet

func NewFrontendCfgSnippet

func NewFrontendCfgSnippet(n string, f string) *CfgSnippet

func NewGlobalCfgSnippet

func NewGlobalCfgSnippet(n string) *CfgSnippet

func (*CfgSnippet) GetName

func (a *CfgSnippet) GetName() string

func (*CfgSnippet) Process

func (a *CfgSnippet) Process(k store.K8s, annotations ...map[string]string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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