Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostCollection ¶
type HostCollection struct {
// contains filtered or unexported fields
}
HostCollection allows to aggregate the hosts from ingress resources.
func NewHostCollection ¶
func NewHostCollection() *HostCollection
NewHostCollection returns a new "empty" host collection.
func (*HostCollection) Hosts ¶
func (a *HostCollection) Hosts() []string
Hosts returns all hosts managed by this aggregator.
func (*HostCollection) Len ¶
func (a *HostCollection) Len() int
Len returns the number of hosts that the aggregator currently manages.
func (*HostCollection) WithRouteHostsIfRequired ¶
func (a *HostCollection) WithRouteHostsIfRequired(routes []traefik.Route) *HostCollection
WithRouteHostsIfRequired aggregates all (unique) hosts found in the provided routes. If the aggregator already manages at least one host, this method is a noop, regardless of the routes passed as parameters.
func (*HostCollection) WithTLSHostsIfAvailable ¶
func (a *HostCollection) WithTLSHostsIfAvailable(config *traefik.TLS) *HostCollection
WithTLSHostsIfAvailable aggregates all hosts found in the provided TLS configuration. If the TLS configuration is empty (i.e. `nil`), no hosts are extracted. This method should only be called on a freshly initialized aggregator.
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}
Selector allows to easily determine if a resource with a set of annotations should be processed.
func NewSelector ¶
NewSelector creates a new selector which selects resources with the `kubernetes.io/ingress.class` set to the specified value if it is not `nil`.
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target represents a service whose external/internal IP should be used as target for DNS records.
func NewTarget ¶
NewTarget creates a new target from the service with the specified name in the given namespace.
func (Target) IP ¶
IP returns the IP that should be used as target or an error if querying the IP fails.
func (Target) NamespacedName ¶
func (t Target) NamespacedName() types.NamespacedName
NamespacedName returns the namespaced name of the target service.