Documentation ¶
Index ¶
- Constants
- type AddressType
- type EndpointsBuilder
- func (builder *EndpointsBuilder) Build() ([]*externaldns.Endpoint, error)
- func (builder *EndpointsBuilder) Validate() error
- func (builder *EndpointsBuilder) WithLoadBalancing(loadbalancing *LoadBalancing) *EndpointsBuilder
- func (builder *EndpointsBuilder) WithLoadBalancingFor(id string, weight int, geo string, isDefaultGeo bool) *EndpointsBuilder
- type LoadBalancing
- type ProviderBuilder
- type Target
- type TargetAddress
Constants ¶
const ( IPAddressType AddressType = "IPAddress" HostnameAddressType AddressType = "Hostname" // HostnameRegex checks for at least two groups of allowed for URLs characters separated by "." HostnameRegex = "^(?:[\\w\\-.~:\\/?#[\\]@!$&'()*+,;=]+)\\.(?:[\\w\\-.~:\\/?#[\\]@!$&'()*+,;=]+)$" WildcardGeo string = "*" DefaultTTL = 60 DefaultCnameTTL = 300 IDLength = 6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressType ¶ added in v0.7.0
type AddressType string
type EndpointsBuilder ¶ added in v0.7.0
type EndpointsBuilder struct {
// contains filtered or unexported fields
}
EndpointsBuilder builds an endpoints array.
func NewEndpointsBuilder ¶ added in v0.7.0
func NewEndpointsBuilder(target Target, hostname string) *EndpointsBuilder
NewEndpointsBuilder returns a new endpoints builder
func (*EndpointsBuilder) Build ¶ added in v0.7.0
func (builder *EndpointsBuilder) Build() ([]*externaldns.Endpoint, error)
Build returns a list of endpoints created based on the current configuration of the builder
func (*EndpointsBuilder) Validate ¶ added in v0.7.0
func (builder *EndpointsBuilder) Validate() error
Validate set of parameters passed inside the builder. Does not ensure validity of values, but checks for a correct set of inputs. e.g. will not check for invalid address type, but ensure they are not nil
func (*EndpointsBuilder) WithLoadBalancing ¶ added in v0.7.0
func (builder *EndpointsBuilder) WithLoadBalancing(loadbalancing *LoadBalancing) *EndpointsBuilder
WithLoadBalancing provides builder with necessary parameters to generate a load-balancing set of endpoints. If not used, the builder will provide a simple set of endpoints
func (*EndpointsBuilder) WithLoadBalancingFor ¶ added in v0.7.0
func (builder *EndpointsBuilder) WithLoadBalancingFor(id string, weight int, geo string, isDefaultGeo bool) *EndpointsBuilder
WithLoadBalancingFor performs identically to WithLoadBalancing but without the need to parse params in LoadBalancing struct
type LoadBalancing ¶ added in v0.7.0
type LoadBalancing struct { // Weight is the record weight to use when no other can be determined for a dns target cluster. // The maximum value accepted is determined by the target dns provider. Weight int // Geo is the country/continent/region code to use when no other can be determined for a dns target cluster. // The values accepted are determined by the target dns provider, please refer to the appropriate docs below. // // Route53: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-geo.html // Google: https://cloud.google.com/compute/docs/regions-zones Geo string // IsDefaultGeo specifies if this is the default geo for providers that support setting a default catch all geo endpoint such as Route53 IsDefaultGeo bool // Id is a way to distinguish endpoints created for the same target // with the same hostname for a different cluster Id string }
type ProviderBuilder ¶
type ProviderBuilder struct {
// contains filtered or unexported fields
}
ProviderBuilder builds a Provider.
func NewProviderBuilder ¶
func NewProviderBuilder(name, namespace string) *ProviderBuilder
NewProviderBuilder returns a new provider builder with the name and namespace provided
func (*ProviderBuilder) Build ¶
func (pb *ProviderBuilder) Build() *corev1.Secret
Build builds and returns the provider secret.
func (*ProviderBuilder) For ¶
func (pb *ProviderBuilder) For(secretType corev1.SecretType) *ProviderBuilder
For defines the type of provider secret being created
func (*ProviderBuilder) WithDataItem ¶
func (pb *ProviderBuilder) WithDataItem(key, value string) *ProviderBuilder
WithDataItem adds key/values that will be included in the provider secret data. Defaults to an empty map.
func (*ProviderBuilder) WithZonesInitialisedFor ¶
func (pb *ProviderBuilder) WithZonesInitialisedFor(domains ...string) *ProviderBuilder
WithZonesInitialisedFor sets the domains of zones to initialize in the provider. Only used by v1alpha1.SecretTypeKuadrantInmemory provider, ignored by all others. Defaults to the empty list.
type Target ¶ added in v0.7.0
type Target interface { metav1.Object GetAddresses() []TargetAddress }
Target wraps a kubernetes ingress traffic resource e.g.Gateway, Ingress, Route etc.. but can wrap any resources that has the desired geo and weight labels being applied, and can provide the required target addresses data. This should be implemented as required for each type of ingress resource i.e. Gateway
type TargetAddress ¶ added in v0.7.0
type TargetAddress struct { Type AddressType Value string }