Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { // Name represents an unique apiv1.Service name formatted as <namespace>-<name>-<port> Name string `json:"name"` Service *apiv1.Service `json:"service,omitempty"` Port intstr.IntOrString `json:"port"` // This indicates if the communication protocol between the backend and the endpoint is HTTP or HTTPS // Allowing the use of HTTPS // The endpoint/s must provide a TLS connection. // The certificate used in the endpoint cannot be a self signed certificate Secure bool `json:"secure"` // Endpoints contains the list of endpoints currently running Endpoints []Endpoint `json:"endpoints,omitempty"` }
Backend describes one or more remote server/s (endpoints) associated with a service +k8s:deepcopy-gen=true
func (*Backend) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend.
func (*Backend) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Configuration ¶
type Configuration struct { // Backends are a list of backends used by all the Ingress rules in the // ingress controller. This list includes the default backend Backends []*Backend `json:"backends,omitempty"` // Servers Servers []*Server `json:"servers,omitempty"` }
Configuration holds the definition of all the parts required to describe all ingresses reachable by the ingress controller (using a filter by namespace)
func (*Configuration) Equal ¶
func (c1 *Configuration) Equal(c2 *Configuration) bool
Equal tests for equality between two Configuration types
type Endpoint ¶
type Endpoint struct { // Address IP address of the endpoint Address string `json:"address"` // Port number of the TCP port Port string `json:"port"` // MaxFails returns the number of unsuccessful attempts to communicate // allowed before this should be considered dow. // Setting 0 indicates that the check is performed by a Kubernetes probe MaxFails int `json:"maxFails"` // FailTimeout returns the time in seconds during which the specified number // of unsuccessful attempts to communicate with the server should happen // to consider the endpoint unavailable FailTimeout int `json:"failTimeout"` // Target returns a reference to the object providing the endpoint Target *apiv1.ObjectReference `json:"target,omipempty"` }
Endpoint describes a kubernetes endpoint in a backend +k8s:deepcopy-gen=true
func (*Endpoint) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
func (*Endpoint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Location ¶
type Location struct { // Path is an extended POSIX regex as defined by IEEE Std 1003.1, // (i.e this follows the egrep/unix syntax, not the perl syntax) // matched against the path of an incoming request. Currently it can // contain characters disallowed from the conventional "path" // part of a URL as defined by RFC 3986. Paths must begin with // a '/'. If unspecified, the path defaults to a catch all sending // traffic to the backend. Path string `json:"path"` // IsDefBackend indicates if service specified in the Ingress // contains active endpoints or not. Returning true means the location // uses the default backend. IsDefBackend bool `json:"isDefBackend"` // Ingress returns the ingress from which this location was generated Ingress *extensions.Ingress `json:"ingress"` // Backend describes the name of the backend to use. Backend string `json:"backend"` // Service describes the referenced services from the ingress Service *apiv1.Service `json:"service,omitempty"` // Port describes to which port from the service Port intstr.IntOrString `json:"port"` // Denied returns an error when this location cannot not be allowed // Requesting a denied location should return HTTP code 403. Denied error `json:"denied,omitempty"` DefaultBackend *apiv1.Service `json:"defaultBackend,omitempty"` KongPlugins map[string]string }
Location describes an URI inside a server. Also contains additional information about annotations in the Ingress.
In some cases when more than one annotations is defined a particular order in the execution is required. The chain in the execution order of annotations should be: - Whitelist - RateLimit - BasicDigestAuth - ExternalAuth - Redirect
type RawSSLCert ¶
type SSLCert ¶
type SSLCert struct { metav1.ObjectMeta `json:"metadata,omitempty"` // ID contains the object metadata UID from the Kubenretes Secret ID string `json:"id,omitempty"` Certificate *x509.Certificate `json:"certificate,omitempty"` // CAFileName contains the path to the file with the root certificate CAFileName string `json:"caFileName"` // PemFileName contains the path to the file with the certificate and key concatenated PemFileName string `json:"pemFileName"` // FullChainPemFileName contains the path to the file with the certificate and key concatenated // This certificate contains the full chain (ca + intermediates + cert) FullChainPemFileName string `json:"fullChainPemFileName"` // PemSHA contains the sha1 of the pem file. // This is used to detect changes in the secret that contains the certificates PemSHA string `json:"pemSha"` // CN contains all the common names defined in the SSL certificate CN []string `json:"cn"` // ExpiresTime contains the expiration of this SSL certificate in timestamp format ExpireTime time.Time `json:"expires"` Raw RawSSLCert }
SSLCert describes a SSL certificate to be used in a server
func (SSLCert) GetObjectKind ¶
func (s SSLCert) GetObjectKind() schema.ObjectKind
GetObjectKind implements the ObjectKind interface as a noop
type Server ¶
type Server struct { // Hostname returns the FQDN of the server Hostname string `json:"hostname"` // SSLCertificate path to the SSL certificate on disk SSLCertificate string `json:"sslCertificate"` // SSLFullChainCertificate path to the SSL certificate on disk // This certificate contains the full chain (ca + intermediates + cert) SSLFullChainCertificate string `json:"sslFullChainCertificate"` // SSLExpireTime has the expire date of this certificate SSLExpireTime time.Time `json:"sslExpireTime"` SSLCert *SSLCert `json:"-"` // SSLPemChecksum returns the checksum of the certificate file on disk. // There is no restriction in the hash generator. This checksim can be // used to determine if the secret changed without the use of file // system notifications SSLPemChecksum string `json:"sslPemChecksum"` // Locations list of URIs configured in the server. Locations []*Location `json:"locations,omitempty"` // Alias return the alias of the server name Alias string `json:"alias,omitempty"` }
Server describes a website