controller

package
v0.0.0-...-4f1f1eb Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2016 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package controller implements a Controller syncing Kubernetes Node IPs to DNS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller syncs Kubernetes Node IPs to a DNS service.

func New

func New(opts *Options) (*Controller, error)

New creates a new Controller.

func (*Controller) Run

func (c *Controller) Run() error

Run starts the Controller Controller in an endless loop.

func (*Controller) Stop

func (c *Controller) Stop()

Stop will unblock Run(). Only call this once.

type Options

type Options struct {
	// DNSProvider is the provider for dns services, required.
	DNSProvider dnsprovider.Interface

	// ZoneName, like "example.com.", required.
	ZoneName string

	// TTL value of Records, defaults to 60
	TTL int64

	// SyncInterval is the interval for syncing with the DNS Provider, defaults to 60 seconds.
	SyncInterval time.Duration

	// Client is the Kubernetes Client to use or use default when nil.
	Client unversioned.Interface

	// AddressTypes are the address types to sync to DNS, defaults to NodeExternalIP,
	// required when ApexAddressType is not set.
	AddressTypes []api.NodeAddressType

	// ApexAddressType defines which address should be sync to the apex zone,
	// required when AddressTypes is not set.
	ApexAddressType api.NodeAddressType

	// Selector to target only specific Nodes.
	Selector labels.Selector
}

Options for creating a new Controller.

Jump to

Keyboard shortcuts

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