Documentation ¶
Index ¶
- Constants
- func GenerateEscapedName(externalID string) string
- func MarshalRawParameters(in map[string]interface{}) ([]byte, error)
- func NewClientConfigurationForBroker(meta metav1.ObjectMeta, commonSpec *v1beta1.CommonServiceBrokerSpec, ...) *osb.ClientConfiguration
- func UnmarshalRawParameters(in []byte) (map[string]interface{}, error)
- type BrokerClientManager
- type BrokerKey
- type ClientBuilder
- type Controller
- type ReconciliationAction
- 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" // DefaultClusterIDConfigMapName is the k8s name that the clusterid configmap will have DefaultClusterIDConfigMapName string = "cluster-info" // DefaultClusterIDConfigMapNamespace is the k8s namespace that the clusterid configmap will be stored in. DefaultClusterIDConfigMapNamespace string = "default" )
Variables ¶
This section is empty.
Functions ¶
func GenerateEscapedName ¶ added in v0.1.40
GenerateEscapedName takes in an OSB ID and filters it to fit K8S name restrictions. It escapes all characters except for lowercase alphanumerics (excluding z as we use that for the escape character), hyphens, and periods, changing them into their UTF-8 hex equivalents separated by 'z'. Hyphens that come after periods and periods that come after hyphens or periods are also escaped. If the resulting string is over the K8S limit of 63 characters, it appends the md5 hash of the original OSB ID to the first 31 characters (minus trailing periods) of the escaped name.
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(meta metav1.ObjectMeta, commonSpec *v1beta1.CommonServiceBrokerSpec, authConfig *osb.AuthConfig, osbAPITimeOut time.Duration) *osb.ClientConfiguration
NewClientConfigurationForBroker creates a new ClientConfiguration for connecting to the specified Broker
func UnmarshalRawParameters ¶ added in v0.0.16
UnmarshalRawParameters produces a map structure from a given raw YAML/JSON input
Types ¶
type BrokerClientManager ¶ added in v0.1.33
type BrokerClientManager struct {
// contains filtered or unexported fields
}
BrokerClientManager stores OSB client instances per broker
func NewBrokerClientManager ¶ added in v0.1.33
func NewBrokerClientManager(brokerClientCreateFunc osb.CreateFunc) *BrokerClientManager
NewBrokerClientManager creates BrokerClientManager instance
func (*BrokerClientManager) BrokerClient ¶ added in v0.1.33
func (m *BrokerClientManager) BrokerClient(brokerKey BrokerKey) (osb.Client, bool)
BrokerClient returns broker client for a broker specified by the brokerKey
func (*BrokerClientManager) RemoveBrokerClient ¶ added in v0.1.33
func (m *BrokerClientManager) RemoveBrokerClient(brokerKey BrokerKey)
RemoveBrokerClient removes broker client broker
func (*BrokerClientManager) UpdateBrokerClient ¶ added in v0.1.33
func (m *BrokerClientManager) UpdateBrokerClient(brokerKey BrokerKey, clientConfig *osb.ClientConfiguration) (osb.Client, error)
UpdateBrokerClient creates new broker client if necessary (the ClientConfig has changed or there is no client for the broker), the method returns created or stored osb.Client instance.
type BrokerKey ¶ added in v0.1.33
type BrokerKey struct {
// contains filtered or unexported fields
}
BrokerKey defines a key which points to a broker (cluster wide or namespaced)
func NewClusterServiceBrokerKey ¶ added in v0.1.33
NewClusterServiceBrokerKey creates a BrokerKey instance which points to cluster wide broker
func NewServiceBrokerKey ¶ added in v0.1.33
NewServiceBrokerKey creates a BrokerKey instance which points to namespaced broker
func (*BrokerKey) IsClusterScoped ¶ added in v0.1.33
IsClusterScoped whether this broker key points to cluster scoped service broker.
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, secretInformer v12.SecretInformer, serviceCatalogClient servicecatalogclientset.ServicecatalogV1beta1Interface, clusterServiceBrokerInformer informers.ClusterServiceBrokerInformer, serviceBrokerInformer informers.ServiceBrokerInformer, clusterServiceClassInformer informers.ClusterServiceClassInformer, serviceClassInformer informers.ServiceClassInformer, instanceInformer informers.ServiceInstanceInformer, bindingInformer informers.ServiceBindingInformer, clusterServicePlanInformer informers.ClusterServicePlanInformer, servicePlanInformer informers.ServicePlanInformer, brokerClientCreateFunc osb.CreateFunc, brokerRelistInterval time.Duration, osbAPIPreferredVersion string, recorder record.EventRecorder, reconciliationRetryDuration time.Duration, operationPollingMaximumBackoffDuration time.Duration, clusterIDConfigMapName string, clusterIDConfigMapNamespace string, osbAPITimeOut time.Duration, ) (Controller, error)
NewController returns a new Open Service Broker catalog controller.
type ReconciliationAction ¶ added in v0.1.4
type ReconciliationAction string
ReconciliationAction represents a type of action the reconciler should take for a resource.
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.
Source Files ¶
- broker_client_manager.go
- client_builder.go
- controller.go
- controller_binding.go
- controller_clusterservicebroker.go
- controller_clusterserviceclass.go
- controller_clusterserviceplan.go
- controller_instance.go
- controller_servicebroker.go
- controller_serviceclass.go
- controller_serviceplan.go
- originating_identity.go
- parameters.go
- serializer.go