controller

package
v0.3.1-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2017 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCRD

func CreateCRD(clientset apiextensionsclient.Interface) error

CreateCRD provision the Custom Resource Definition and wait until the API is ready to interact it with

func CreateDomainTPRs

func CreateDomainTPRs(host string, clientset kubernetes.Interface) error

CreateDomainTPRs generates the third party resource required for interacting with releases

func GenAdler32Hash

func GenAdler32Hash(text string) string

GenAdler32Hash generates a adler32 hash from a given string

func SearchForPrimary

func SearchForPrimary(indexer cache.Indexer, d *kong.Domain, systemNamespace string) (primaryDomain *kong.Domain, err error)

SearchForPrimary searchs for a primary domain

Types

type Config

type Config struct {
	KongAdminHost  string
	Host           string
	TLSInsecure    bool
	TLSConfig      rest.TLSClientConfig
	ClusterDNS     string
	PodNamespace   string
	AutoClaim      bool
	WipeOnDelete   bool
	ResyncOnFailed int64
}

Config defines configuration parameters for the Operator.

type KongController

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

KongController watches the kubernetes api server and adds/removes apis on Kong

func NewKongController

func NewKongController(
	client kubernetes.Interface,
	extClient restclient.Interface,
	kongcli *kong.CoreClient,
	cfg *Config,
	resyncPeriod time.Duration,
) *KongController

NewKongController creates a new KongController

func (*KongController) Run

func (k *KongController) Run(workers int, stopc <-chan struct{})

Run starts the kong controller.

type TaskQueue

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

TaskQueue manages a work queue through an independent worker that invokes the given sync function for every work item inserted.

func NewTaskQueue

func NewTaskQueue(syncFn func(string, int) error, queueName string) *TaskQueue

NewTaskQueue creates a new task queue with the given sync function. The sync function is called for every element inserted into the queue.

func (*TaskQueue) Add

func (t *TaskQueue) Add(obj interface{})

Add enqueues ns/name of the given api object in the task queue.

Jump to

Keyboard shortcuts

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