externaldns

package
v3.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package externaldns implements External DNS controller for Virtual Server.

Index

Constants

View Source
const (
	// ControllerName is the name of the externaldns controller.
	ControllerName = "externaldns"
)

Variables

KeyFunc creates a key for an API object. The key can be passed to a worker function that processes an object from a queue such as ProcessItem.

Functions

func DefaultItemBasedRateLimiter

func DefaultItemBasedRateLimiter() workqueue.RateLimiter

DefaultItemBasedRateLimiter returns a new rate limiter with base delay of 5 seconds, max delay of 5 minutes.

Types

type BlockingEventHandler

type BlockingEventHandler struct {
	WorkFunc func(obj interface{})
}

BlockingEventHandler is an implementation of cache.ResourceEventHandler that simply synchronously calls it's WorkFunc upon calls to OnAdd, OnUpdate or OnDelete.

func (*BlockingEventHandler) Enqueue

func (b *BlockingEventHandler) Enqueue(obj interface{})

Enqueue synchronously adds a key for an object to the workqueue.

func (*BlockingEventHandler) OnAdd

func (b *BlockingEventHandler) OnAdd(obj interface{}, _ bool)

OnAdd synchronously adds a newly created object to the workqueue.

func (*BlockingEventHandler) OnDelete

func (b *BlockingEventHandler) OnDelete(obj interface{})

OnDelete synchronously adds a deleted object to the workqueue.

func (*BlockingEventHandler) OnUpdate

func (b *BlockingEventHandler) OnUpdate(old, newObj interface{})

OnUpdate synchronously adds an updated object to the workqueue.

type ExtDNSController

type ExtDNSController struct {
	// contains filtered or unexported fields
}

ExtDNSController represents ExternalDNS controller.

func NewController

func NewController(opts *ExtDNSOpts) *ExtDNSController

NewController takes external dns config and return a new External DNS Controller.

func (*ExtDNSController) AddNewNamespacedInformer

func (c *ExtDNSController) AddNewNamespacedInformer(ns string)

AddNewNamespacedInformer adds watchers for a new namespace

func (*ExtDNSController) RemoveNamespacedInformer

func (c *ExtDNSController) RemoveNamespacedInformer(ns string)

RemoveNamespacedInformer removes watchers for a namespace we are no longer watching

func (*ExtDNSController) Run

func (c *ExtDNSController) Run(stopCh <-chan struct{})

Run sets up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type ExtDNSOpts

type ExtDNSOpts struct {
	// contains filtered or unexported fields
}

ExtDNSOpts represents config required for building the External DNS Controller.

func BuildOpts

func BuildOpts(ctx context.Context, ns []string, rdr record.EventRecorder, client k8s_nginx.Interface, resync time.Duration, idn bool) *ExtDNSOpts

BuildOpts builds the externalDNS controller options

type QueuingEventHandler

type QueuingEventHandler struct {
	Queue workqueue.RateLimitingInterface
}

QueuingEventHandler is an implementation of cache.ResourceEventHandler that simply queues objects that are added/updated/deleted.

func (*QueuingEventHandler) Enqueue

func (q *QueuingEventHandler) Enqueue(obj interface{})

Enqueue adds a key for an object to the workqueue.

func (*QueuingEventHandler) OnAdd

func (q *QueuingEventHandler) OnAdd(obj interface{}, _ bool)

OnAdd adds a newly created object to the workqueue.

func (*QueuingEventHandler) OnDelete

func (q *QueuingEventHandler) OnDelete(obj interface{})

OnDelete adds a deleted object to the workqueue for processing.

func (*QueuingEventHandler) OnUpdate

func (q *QueuingEventHandler) OnUpdate(old, newObj interface{})

OnUpdate adds an updated object to the workqueue.

type SyncFn

type SyncFn func(context.Context, *vsapi.VirtualServer) error

SyncFn is the reconciliation function passed to externaldns controller.

func SyncFnFor

func SyncFnFor(rec record.EventRecorder, client clientset.Interface, ig map[string]*namespacedInformer) SyncFn

SyncFnFor knows how to reconcile VirtualServer DNSEndpoint object.

Jump to

Keyboard shortcuts

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