Documentation ¶
Index ¶
- Constants
- func GetControllerOf(controllee metav1.Object) *metav1.OwnerReference
- func IsControlledBy(obj metav1.Object, owner metav1.Object) bool
- func MarshalRawParameters(in map[string]interface{}) ([]byte, error)
- func NewClientConfigurationForBroker(broker *v1alpha1.ServiceBroker, authConfig *osb.AuthConfig) *osb.ClientConfiguration
- func NewControllerRef(owner metav1.Object, gvk schema.GroupVersionKind) *metav1.OwnerReference
- func UnmarshalRawParameters(in []byte) (map[string]interface{}, error)
- type ClientBuilder
- type Controller
- type SimpleClientBuilder
- func (b SimpleClientBuilder) Client(name string) (clientset.Interface, error)
- func (b SimpleClientBuilder) ClientOrDie(name string) clientset.Interface
- func (b SimpleClientBuilder) Config(name string) (*restclient.Config, error)
- func (b SimpleClientBuilder) ConfigOrDie(name string) *restclient.Config
Constants ¶
const ( // ContextProfilePlatformKubernetes is the platform name sent in the OSB // ContextProfile for requests coming from Kubernetes. ContextProfilePlatformKubernetes string = "kubernetes" )
Variables ¶
This section is empty.
Functions ¶
func GetControllerOf ¶ added in v0.0.14
func GetControllerOf(controllee metav1.Object) *metav1.OwnerReference
GetControllerOf returns the controllerRef if controllee has a controller, otherwise returns nil.
func IsControlledBy ¶ added in v0.0.14
IsControlledBy checks if the given object has a controller ownerReference set to the given owner
func MarshalRawParameters ¶ added in v0.0.22
MarshalRawParameters marshals the specified map of parameters into JSON
func NewClientConfigurationForBroker ¶ added in v0.0.17
func NewClientConfigurationForBroker(broker *v1alpha1.ServiceBroker, authConfig *osb.AuthConfig) *osb.ClientConfiguration
NewClientConfigurationForBroker creates a new ClientConfiguration for connecting to the specified Broker
func NewControllerRef ¶ added in v0.0.14
func NewControllerRef(owner metav1.Object, gvk schema.GroupVersionKind) *metav1.OwnerReference
NewControllerRef creates an OwnerReference pointing to the given owner.
func UnmarshalRawParameters ¶ added in v0.0.16
UnmarshalRawParameters produces a map structure from a given raw YAML/JSON input
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. // workers specifies the number of goroutines, per resource, processing work // from the resource workqueues Run(workers int, 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.ServiceBrokerInformer, serviceClassInformer informers.ServiceClassInformer, instanceInformer informers.ServiceInstanceInformer, bindingInformer informers.ServiceInstanceCredentialInformer, servicePlanInformer informers.ServicePlanInformer, brokerClientCreateFunc osb.CreateFunc, brokerRelistInterval time.Duration, osbAPIPreferredVersion string, recorder record.EventRecorder, reconciliationRetryDuration time.Duration, ) (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 ¶
func (b SimpleClientBuilder) Client(name string) (clientset.Interface, error)
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.