dynamicupdate

package
v0.0.0-...-996a9f2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

README

dynamicupdate

Name

dynamicupdate - enables dynamic updates according to RFC 2136

Description

The dynamic update plugin mimics file plugin to allow RFC 2136 dynamic updates to zones, but the files are read from CRD¨s in the the cluster.

Slightly patched coredns

It stores dynamic update transactions to an index on disk and replays these onto the zones served if restarted

Use with external-dns

Leader election (only one may run)

AXFR Transfers

Store state in CRD's (status)

Syntax


dynamicupdate NAMESPACE

---corefile . { dynamicupdate sub.example.net sub.example.net }

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Cfg = ctrl.GetConfigOrDie()
)

Functions

This section is empty.

Types

type DynamicUpdate

type DynamicUpdate struct {
	// Next plugin in the chain.
	Next plugin.Handler
	// Zones holds the configuration for the zones handled by this plugin.
	Zones *Zones
	// Namspaces holds the configuration for the namespaces handled by this plugin.
	Namespaces []string

	// K8sClient is the client used to communicate with the kubernetes API server.
	K8sClient client.Client

	// Client
	client.Client
	// Scheme
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

DynamicUpdate is a plugin that implements RFC2136.

func (DynamicUpdate) Merge

func (d DynamicUpdate) Merge(origin string) *file.Zone

Merge the dynamic zone with the static zone. Return a new zone.

func (DynamicUpdate) Name

func (d DynamicUpdate) Name() string

func (*DynamicUpdate) NewManager

func (d *DynamicUpdate) NewManager(cfg *rest.Config) error

func (DynamicUpdate) OnShutdown

func (d DynamicUpdate) OnShutdown() error

func (*DynamicUpdate) Ready

func (d *DynamicUpdate) Ready() bool

Ready implements the Ready interface.

func (*DynamicUpdate) Reconcile

func (r *DynamicUpdate) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

+kubebuilder:rbac:groups=rfc1035.ksdns.io,resources=zones,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=rfc1035.ksdns.io,resources=zones/status,verbs=get;update;patch +kubebuilder:rbac:groups=rfc1035.ksdns.io,resources=zones/finalizers,verbs=update

func (DynamicUpdate) Reload

func (d DynamicUpdate) Reload(zoneName string, t *transfer.Transfer) error

func (*DynamicUpdate) ServeDNS

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

ServeDNS implements the plugin.Handler interface.

func (*DynamicUpdate) SetupWithManager

func (r *DynamicUpdate) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (DynamicUpdate) Transfer

func (d DynamicUpdate) Transfer(zone string, serial uint32) (<-chan []dns.RR, error)

Transfer implements the transfer.Transfer interface.

type Zones

type Zones struct {
	Z            map[string]*file.Zone
	Names        []string
	DynamicZones map[string]*file.Zone
	sync.RWMutex
}

Types

func (*Zones) DeleteZone

func (z *Zones) DeleteZone(name string)

Jump to

Keyboard shortcuts

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