types

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUser

type AuthUser struct {
	Username  string
	Password  string
	Encrypted bool
}

AuthUser authorization info for basic authentication

type ControllerConfig

type ControllerConfig struct {
	ConfigDefaults      []string
	ConfigGlobal        []string
	ConfigFrontend      []string
	Userlists           map[string]Userlist
	Servers             []*ingress.Server
	Backends            []*ingress.Backend
	DefaultServer       *HAProxyServer
	HAServers           []*HAProxyServer
	TCPEndpoints        []ingress.L4Service
	UDPEndpoints        []ingress.L4Service
	PassthroughBackends []*ingress.SSLPassthroughBackend
	HAPassthrough       []*HAProxyPassthrough
	StatsSSLCert        *ingress.SSLCert
	Cfg                 *HAProxyConfig
	BackendSlots        map[string]*HAProxyBackendSlots
	DNSResolvers        map[string]dnsresolvers.DNSResolver
	Procs               *HAProxyProcs
}

ControllerConfig has ingress generated and some transformations compatible with HAProxy

func (*ControllerConfig) Equal

func (c1 *ControllerConfig) Equal(c2 *ControllerConfig) bool

Equal return the equality between two ControllerConfig

type HAProxyBackendSlot

type HAProxyBackendSlot struct {
	BackendServerName string
	BackendEndpoint   *ingress.Endpoint
	Target            string
}

HAProxyBackendSlot combines BackendServerName with an ingress.Endpoint

type HAProxyBackendSlots

type HAProxyBackendSlots struct {
	// map from ip:port to server name
	Slots []HAProxyBackendSlot
	// resolver name used for this Backend definition
	UseResolver string
	// total slots for backend, even if Slots[] is empty, eg using resolver
	TotalSlots int
}

HAProxyBackendSlots contains used and empty backend server definitions

type HAProxyConfig

type HAProxyConfig struct {
	defaults.Backend       `json:",squash"`
	SSLCiphers             string `json:"ssl-ciphers"`
	SSLOptions             string `json:"ssl-options"`
	SSLDHParam             `json:",squash"`
	TLSALPN                string `json:"tls-alpn"`
	NbprocBalance          int    `json:"nbproc-balance"`
	NbprocSSL              int    `json:"nbproc-ssl"`
	Nbthread               int    `json:"nbthread"`
	LoadServerState        bool   `json:"load-server-state"`
	TimeoutHTTPRequest     string `json:"timeout-http-request"`
	TimeoutConnect         string `json:"timeout-connect"`
	TimeoutClient          string `json:"timeout-client"`
	TimeoutClientFin       string `json:"timeout-client-fin"`
	TimeoutServer          string `json:"timeout-server"`
	TimeoutQueue           string `json:"timeout-queue"`
	TimeoutServerFin       string `json:"timeout-server-fin"`
	TimeoutStop            string `json:"timeout-stop"`
	TimeoutTunnel          string `json:"timeout-tunnel"`
	TimeoutKeepAlive       string `json:"timeout-keep-alive"`
	BindIPAddrTCP          string `json:"bind-ip-addr-tcp"`
	BindIPAddrHTTP         string `json:"bind-ip-addr-http"`
	BindIPAddrStats        string `json:"bind-ip-addr-stats"`
	BindIPAddrHealthz      string `json:"bind-ip-addr-healthz"`
	Syslog                 string `json:"syslog-endpoint"`
	SyslogFormat           string `json:"syslog-format"`
	SyslogTag              string `json:"syslog-tag"`
	ModSecurity            string `json:"modsecurity-endpoints"`
	ModSecTimeoutHello     string `json:"modsecurity-timeout-hello"`
	ModSecTimeoutIdle      string `json:"modsecurity-timeout-idle"`
	ModSecTimeoutProc      string `json:"modsecurity-timeout-processing"`
	BackendCheckInterval   string `json:"backend-check-interval"`
	ConfigDefaults         string `json:"config-defaults"`
	ConfigGlobal           string `json:"config-global"`
	ConfigFrontend         string `json:"config-frontend"`
	Forwardfor             string `json:"forwardfor"`
	MaxConn                int    `json:"max-connections"`
	NoTLSRedirect          string `json:"no-tls-redirect-locations"`
	SSLHeadersPrefix       string `json:"ssl-headers-prefix"`
	HealthzPort            int    `json:"healthz-port"`
	HTTPStoHTTPPort        int    `json:"https-to-http-port"`
	StatsPort              int    `json:"stats-port"`
	StatsAuth              string `json:"stats-auth"`
	StatsSSLCert           string `json:"stats-ssl-cert"`
	CookieKey              string `json:"cookie-key"`
	StrictHost             bool   `json:"strict-host"`
	DynamicScaling         bool   `json:"dynamic-scaling"`
	SSLEngine              string `json:"ssl-engine"`
	SSLModeAsync           bool   `json:"ssl-mode-async"`
	StatsSocket            string
	UseProxyProtocol       bool   `json:"use-proxy-protocol"`
	StatsProxyProtocol     bool   `json:"stats-proxy-protocol"`
	UseHostOnHTTPS         bool   `json:"use-host-on-https"`
	HTTPPort               int    `json:"http-port"`
	HTTPLogFormat          string `json:"http-log-format"`
	HTTPSPort              int    `json:"https-port"`
	HTTPSLogFormat         string `json:"https-log-format"`
	TCPLogFormat           string `json:"tcp-log-format"`
	DrainSupport           bool   `json:"drain-support"`
	DrainSupportRedispatch bool   `json:"drain-support-redispatch"`
	DNSResolvers           string `json:"dns-resolvers"`
	DNSTimeoutRetry        string `json:"dns-timeout-retry"`
	DNSHoldObsolete        string `json:"dns-hold-obsolete"`
	DNSHoldValid           string `json:"dns-hold-valid"`
	DNSAcceptedPayloadSize int    `json:"dns-accepted-payload-size"`
	DNSClusterDomain       string `json:"dns-cluster-domain"`
}

HAProxyConfig has HAProxy specific configurations from ConfigMap

type HAProxyLocation

type HAProxyLocation struct {
	IsRootLocation       bool                `json:"isRootLocation"`
	IsDefBackend         bool                `json:"isDefBackend"`
	Path                 string              `json:"path"`
	Backend              string              `json:"backend"`
	OAuth                oauth.Config        `json:"oauth"`
	CORS                 cors.CorsConfig     `json:"cors"`
	HSTS                 hsts.Config         `json:"hsts"`
	WAF                  waf.Config          `json:"waf"`
	Rewrite              rewrite.Redirect    `json:"rewrite,omitempty"`
	Redirect             redirect.Redirect   `json:"redirect,omitempty"`
	Userlist             Userlist            `json:"userlist,omitempty"`
	Proxy                proxy.Configuration `json:"proxy,omitempty"`
	RateLimit            ratelimit.RateLimit `json:"rateLimit,omitempty"`
	SSLRedirect          bool                `json:"sslRedirect,omitempty"`
	HAMatchPath          string              `json:"haMatchPath"`
	HAMatchTxnPath       string              `json:"haMatchTxnPath"`
	HAWhitelist          string              `json:"whitelist,omitempty"`
	HARateLimitWhiteList string              `json:"rateLimitWhiteList,omitempty"`
}

HAProxyLocation has location data as a HAProxy friendly syntax

type HAProxyPassthrough

type HAProxyPassthrough struct {
	Hostname           string `json:"hostname"`
	ACLLabel           string `json:"aclLabel"`
	Backend            string `json:"backend"`
	HTTPPassBackend    string `json:"httpPassBackend"`
	HostnameIsWildcard bool   `json:"hostnameIsWildcard"`
	AliasHost          bool   `json:"aliasHost"`
	AliasHostIsRegex   bool   `json:"aliasHostIsRegex"`
	AliasRegex         bool   `json:"aliasRegex"`
}

HAProxyPassthrough has SSL passthrough configurations

type HAProxyProcs added in v0.7.1

type HAProxyProcs struct {
	Nbproc          int
	NbprocBalance   int
	NbprocSSL       int
	Nbthread        int
	BindprocBalance string
	BindprocSSL     string
	CPUMap          string
}

HAProxyProcs process and thread related configuration

type HAProxyServer

type HAProxyServer struct {
	IsDefaultServer    bool                  `json:"isDefaultServer"`
	IsCACert           bool                  `json:"isCACert"`
	UseHTTP            bool                  `json:"useHTTP"`
	UseHTTPS           bool                  `json:"useHTTPS"`
	Hostname           string                `json:"hostname"`
	HostnameIsWildcard bool                  `json:"hostnameIsWildcard"`
	HostnameLabel      string                `json:"hostnameLabel"`
	HostnameSocket     string                `json:"hostnameSocket"`
	ACLLabel           string                `json:"aclLabel"`
	SSLCertificate     string                `json:"sslCertificate"`
	SSLPemChecksum     string                `json:"sslPemChecksum"`
	RootLocation       *HAProxyLocation      `json:"defaultLocation"`
	Locations          []*HAProxyLocation    `json:"locations,omitempty"`
	SSLRedirect        bool                  `json:"sslRedirect"`
	HSTS               *hsts.Config          `json:"hsts"`
	CORS               *cors.CorsConfig      `json:"cors"`
	WAF                *waf.Config           `json:"waf"`
	HasRateLimit       bool                  `json:"hasRateLimit"`
	OAuth              *oauth.Config         `json:"oauth,omitempty"`
	CertificateAuth    authtls.AuthSSLConfig `json:"certificateAuth,omitempty"`
	AliasHost          string                `json:"aliasHost,omitempty"`
	AliasHostIsRegex   bool                  `json:"aliasHostIsRegex"`
	AliasRegex         string                `json:"aliasRegex"`
}

HAProxyServer and HAProxyLocation build some missing pieces from ingress.Server used by HAProxy

type Logger added in v0.8.1

type Logger interface {
	InfoV(v int, msg string, args ...interface{})
	Info(msg string, args ...interface{})
	Warn(msg string, args ...interface{})
	Error(msg string, args ...interface{})
	Fatal(msg string, args ...interface{})
}

Logger ...

type SSLDHParam

type SSLDHParam struct {
	DefaultMaxSize int    `json:"ssl-dh-default-max-size"`
	SecretName     string `json:"ssl-dh-param"`
	Filename       string
	PemSHA         string
}

SSLDHParam Diffie-Hellman related options

type Userlist

type Userlist struct {
	ListName string
	Realm    string
	Users    []AuthUser
}

Userlist list of users for basic authentication

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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