zoneregistry

package module
v0.0.0-...-9dcd12a Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

README

zoneregistry

A CoreDNS plugin to handle service discovery across distributed kubernetes clusters

TODOs

  • Return A/AAAA instead of CNAMEs from the registry
  • Loadbalance the peers records
  • Add concurrency safety on the peers map
  • Add CI + automated testing
  • Add support for multiple zoneregistry masters
  • Add e2e test for standalone deployment
  • Add e2e test for k8s deployment
  • Update README

Configure

Configuration options can be used to customize the behaviour of a plugin:

{
zoneregistry ZONE
    peers [PEERS...]
    interval INTERVAL
    ttl TTL
    fallthrough [ZONES...]
}
  • peers the subzones to run healthchecks against.
  • interval can be used to override the default INTERVAL value of 60 seconds.
  • ttl can be used to override the default TTL value of 300 seconds.
  • fallthrough if zone matches and no record can be generated, pass request to the next plugin. If [ZONES...] is omitted, then fallthrough happens for all zones for which the plugin is authoritative. If specific zones are listed (for example in-addr.arpa and ip6.arpa), then only queries for those zones will be subject to fallthrough.

Example

Configuring the zone registry to perform healthchecks on 3 k8s clusters

. {
  zoneregistry service.pinax.network {
    peers riv-prod1. riv-prod2. mar-prod3.
    interval 60
    ttl 300
  }
}

riv-prod1. {
  forward . 172.21.0.1:53
}

riv-prod2. {
  forward . 172.21.0.2:53
}

mar-prod3. {
  forward . 172.19.0.1:53
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZoneRegistry

type ZoneRegistry struct {
	Next  plugin.Handler
	Zones []string
	Peers map[string]bool

	Fall fall.F
	// contains filtered or unexported fields
}

func (*ZoneRegistry) HealthCheck

func (zr *ZoneRegistry) HealthCheck()

func (*ZoneRegistry) Name

func (zr *ZoneRegistry) Name() string

func (*ZoneRegistry) ServeDNS

func (zr *ZoneRegistry) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the plugin.Handler interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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