controller

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthCredentialsFromBroker

func GetAuthCredentialsFromBroker(client kubernetes.Interface, broker *v1alpha1.Broker) (username, password string, err error)

GetAuthCredentialsFromBroker returns the auth credentials, if any, contained in the secret referenced in the Broker's AuthSecret field, or returns an error. If the AuthSecret field is nil, empty values are returned.

Types

type ClientBuilder

type ClientBuilder interface {
	// Config returns a new restclient.Config with the given user agent name.
	Config(name string) (*restclient.Config, error)
	// ConfigOrDie return a new restclient.Config with the given user agent
	// name, or logs a fatal error.
	ConfigOrDie(name string) *restclient.Config
	// Client returns a new clientset.Interface with the given user agent
	// name.
	Client(name string) (clientset.Interface, error)
	// ClientOrDie returns a new clientset.Interface with the given user agent
	// name or logs a fatal error, destroying the computer and killing the
	// operator and programmer.
	ClientOrDie(name string) clientset.Interface
}

ClientBuilder allows you to get clients and configs for controllers

type Controller

type Controller interface {
	// Run runs the controller until the given stop channel can be read from.
	Run(stopCh <-chan struct{})
}

Controller describes a controller that backs the service catalog API for Open Service Broker compliant Brokers.

func NewController

func NewController(
	kubeClient kubernetes.Interface,
	serviceCatalogClient servicecatalogclientset.ServicecatalogV1alpha1Interface,
	brokerInformer informers.BrokerInformer,
	serviceClassInformer informers.ServiceClassInformer,
	instanceInformer informers.InstanceInformer,
	bindingInformer informers.BindingInformer,
	brokerClientCreateFunc brokerapi.CreateFunc,
) (Controller, error)

NewController returns a new Open Service Broker catalog controller.

type SimpleClientBuilder

type SimpleClientBuilder struct {
	// ClientConfig is a skeleton config to clone and use as the basis for each controller client
	ClientConfig *restclient.Config
}

SimpleClientBuilder returns a fixed client with different user agents

func (SimpleClientBuilder) Client

Client returns a new clientset.Interface with the given user agent name.

func (SimpleClientBuilder) ClientOrDie

func (b SimpleClientBuilder) ClientOrDie(name string) clientset.Interface

ClientOrDie returns a new clientset.Interface with the given user agent name or logs a fatal error, destroying the computer and killing the operator and programmer.

func (SimpleClientBuilder) Config

func (b SimpleClientBuilder) Config(name string) (*restclient.Config, error)

Config returns a new restclient.Config with the given user agent name.

func (SimpleClientBuilder) ConfigOrDie

func (b SimpleClientBuilder) ConfigOrDie(name string) *restclient.Config

ConfigOrDie return a new restclient.Config with the given user agent name, or logs a fatal error.

Jump to

Keyboard shortcuts

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