Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Bind(serviceID, planID string, bindParams map[string]interface{}, ...) (map[string]interface{}, error)
- func (c *Client) Deprovision(serviceID, instanceName, namespace string) error
- func (c *Client) GetCatalog(catalogPath string, catalogNames ...string) ([]osb.Service, error)
- func (c *Client) GetProvisionInfo(instanceID, serviceID string) (*ProvisionInfo, error)
- func (c *Client) Provision(provisionInfo ProvisionInfo) error
- type Credentials
- type ElasticsearchProvider
- func (p ElasticsearchProvider) Bind(app *appcat.AppBinding, params map[string]interface{}, ...) (*Credentials, error)
- func (p ElasticsearchProvider) Create(provisionInfo ProvisionInfo) error
- func (p ElasticsearchProvider) Delete(name, namespace string) error
- func (p ElasticsearchProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
- func (p ElasticsearchProvider) Metadata() (string, string)
- type MemcachedProvider
- func (p MemcachedProvider) Bind(app *appcat.AppBinding, params map[string]interface{}, ...) (*Credentials, error)
- func (p MemcachedProvider) Create(provisionInfo ProvisionInfo) error
- func (p MemcachedProvider) Delete(name, namespace string) error
- func (p MemcachedProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
- func (p MemcachedProvider) Metadata() (string, string)
- type MongoDbProvider
- func (p MongoDbProvider) Bind(app *appcat.AppBinding, params map[string]interface{}, ...) (*Credentials, error)
- func (p MongoDbProvider) Create(provisionInfo ProvisionInfo) error
- func (p MongoDbProvider) Delete(name, namespace string) error
- func (p MongoDbProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
- func (p MongoDbProvider) Metadata() (string, string)
- type MySQLProvider
- func (p MySQLProvider) Bind(app *appcat.AppBinding, params map[string]interface{}, ...) (*Credentials, error)
- func (p MySQLProvider) Create(provisionInfo ProvisionInfo) error
- func (p MySQLProvider) Delete(name, namespace string) error
- func (p MySQLProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
- func (p MySQLProvider) Metadata() (string, string)
- type PostgreSQLProvider
- func (p PostgreSQLProvider) Bind(app *appcat.AppBinding, params map[string]interface{}, ...) (*Credentials, error)
- func (p PostgreSQLProvider) Create(provisionInfo ProvisionInfo) error
- func (p PostgreSQLProvider) Delete(name, namespace string) error
- func (p PostgreSQLProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
- func (p PostgreSQLProvider) Metadata() (string, string)
- type Provider
- func NewElasticsearchProvider(config *rest.Config) Provider
- func NewMemcachedProvider(config *rest.Config) Provider
- func NewMongoDbProvider(config *rest.Config) Provider
- func NewMySQLProvider(config *rest.Config) Provider
- func NewPostgreSQLProvider(config *rest.Config) Provider
- func NewRedisProvider(config *rest.Config) Provider
- type ProvisionInfo
- type RedisProvider
- func (p RedisProvider) Bind(app *appcat.AppBinding, params map[string]interface{}, ...) (*Credentials, error)
- func (p RedisProvider) Create(provisionInfo ProvisionInfo) error
- func (p RedisProvider) Delete(name, namespace string) error
- func (p RedisProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
- func (p RedisProvider) Metadata() (string, string)
Constants ¶
View Source
const ( // Key to set instance id InstanceKey = "servicecatalog.k8s.io/instance-id" // Key to provision info ProvisionInfoKey = "servicecatalog.k8s.io/provision-info" // The file path for checking the namespace in which the broker server is running NamespaceFilePath = "/var/run/secrets/kubernetes.io/serviceaccount/namespace" // Name of the providers KubeDBServiceElasticsearch = "315fc21c-829e-4aa1-8c16-f7921c33550d" KubeDBServiceMemcached = "d88856cb-fe3f-4473-ba8b-641480da810f" KubeDBServiceMongoDB = "d690058d-666c-45d8-ba98-fcb9fb47742e" KubeDBServiceMySQL = "938a70c5-f2bc-4658-82dd-566bed7797e9" KubeDBServicePostgreSQL = "2010d83f-d908-4d9f-879c-ce8f5f527f2a" KubeDBServiceRedis = "ccfd1c81-e59f-4875-a39f-75ba55320ce0" // Name of the plans of under different services PlanElasticSearchDemo = "c4e99557-3a81-452e-b9cf-660f01c155c0" PlanElasticSearchClusterDemo = "2f05622b-724d-458f-abc8-f223b1afa0b9" PlanElasticSearch = "6fa212e2-e043-4ae9-91c2-8e5c4403d894" PlanMemcachedDemo = "af1ce2dc-5734-4e41-aaa2-8aa6a58d688f" PlanMemcached = "d40e49b2-f8fb-4d47-96d3-35089bd0942d" PlanMongoDBDemo = "498c12a6-7a68-4983-807b-75737f99062a" PlanMongoDBClusterDemo = "6af19c54-7757-42e5-bb74-b8350037c4a2" PlanMongoDB = "e8f87ba6-0711-42db-a663-a3c75b78a541" PlanMySQLDemo = "1fd1abf1-e8e1-44a2-8214-bf0fd1ce9417" PlanMySQL = "6ed1ab9e-a640-4f26-9328-423b2e3816d7" PlanPostgresDemo = "c4bcf392-7ebb-4623-a79d-13d00d761d56" PlanPostgresHADemo = "41818203-0e2d-4d30-809f-a60c8c73dae8" PlanPostgres = "13373a9b-d5f5-4d9a-88df-d696bbc19071" PlanRedisDemo = "4b6ad8a7-272e-4cfd-bb38-5b9d4bd3962f" PlanRedis = "45716530-cadb-4247-b06a-24a34200d734" )
Variables ¶
View Source
var ( WaitForMySQLBeReady = waitForMySQLBeReady WaitForPostgreSQLBeReady = waitForPostgreSQLBeReady WaitForElasticsearchBeReady = waitForElasticsearchBeReady WaitForMongoDbBeReady = waitForMongoDbBeReady WaitForRedisBeReady = waitForRedisBeReady WaitForMemcachedBeReady = waitForMemcachedBeReady )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Deprovision ¶
func (*Client) GetCatalog ¶
func (*Client) GetProvisionInfo ¶
func (c *Client) GetProvisionInfo(instanceID, serviceID string) (*ProvisionInfo, error)
func (*Client) Provision ¶
func (c *Client) Provision(provisionInfo ProvisionInfo) error
type Credentials ¶
type Credentials struct { Protocol string Host string `json:"host,omitempty"` Port int32 `json:"port,omitempty"` URI string `json:"uri,omitempty"` Username interface{} `json:"username,omitempty"` Password interface{} `json:"password,omitempty"` RootCert interface{} `json:"rootCert,omitempty"` }
func (Credentials) ToMap ¶
func (c Credentials) ToMap() (map[string]interface{}, error)
ToMap converts the credentials into the OSB API credentials response see https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#device-object
{ "credentials": { "uri": "mysql://mysqluser:pass@mysqlhost:3306/dbname", "username": "mysqluser", "password": "pass", "host": "mysqlhost", "port": 3306, "database": "dbname" } }
type ElasticsearchProvider ¶
type ElasticsearchProvider struct {
// contains filtered or unexported fields
}
func (ElasticsearchProvider) Bind ¶
func (p ElasticsearchProvider) Bind( app *appcat.AppBinding, params map[string]interface{}, data map[string]interface{}) (*Credentials, error)
func (ElasticsearchProvider) Create ¶
func (p ElasticsearchProvider) Create(provisionInfo ProvisionInfo) error
func (ElasticsearchProvider) Delete ¶
func (p ElasticsearchProvider) Delete(name, namespace string) error
func (ElasticsearchProvider) GetProvisionInfo ¶
func (p ElasticsearchProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
func (ElasticsearchProvider) Metadata ¶
func (p ElasticsearchProvider) Metadata() (string, string)
type MemcachedProvider ¶
type MemcachedProvider struct {
// contains filtered or unexported fields
}
func (MemcachedProvider) Bind ¶
func (p MemcachedProvider) Bind( app *appcat.AppBinding, params map[string]interface{}, data map[string]interface{}) (*Credentials, error)
func (MemcachedProvider) Create ¶
func (p MemcachedProvider) Create(provisionInfo ProvisionInfo) error
func (MemcachedProvider) Delete ¶
func (p MemcachedProvider) Delete(name, namespace string) error
func (MemcachedProvider) GetProvisionInfo ¶
func (p MemcachedProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
func (MemcachedProvider) Metadata ¶
func (p MemcachedProvider) Metadata() (string, string)
type MongoDbProvider ¶
type MongoDbProvider struct {
// contains filtered or unexported fields
}
func (MongoDbProvider) Bind ¶
func (p MongoDbProvider) Bind( app *appcat.AppBinding, params map[string]interface{}, data map[string]interface{}) (*Credentials, error)
func (MongoDbProvider) Create ¶
func (p MongoDbProvider) Create(provisionInfo ProvisionInfo) error
func (MongoDbProvider) Delete ¶
func (p MongoDbProvider) Delete(name, namespace string) error
func (MongoDbProvider) GetProvisionInfo ¶
func (p MongoDbProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
func (MongoDbProvider) Metadata ¶
func (p MongoDbProvider) Metadata() (string, string)
type MySQLProvider ¶
type MySQLProvider struct {
// contains filtered or unexported fields
}
func (MySQLProvider) Bind ¶
func (p MySQLProvider) Bind( app *appcat.AppBinding, params map[string]interface{}, data map[string]interface{}) (*Credentials, error)
func (MySQLProvider) Create ¶
func (p MySQLProvider) Create(provisionInfo ProvisionInfo) error
func (MySQLProvider) Delete ¶
func (p MySQLProvider) Delete(name, namespace string) error
func (MySQLProvider) GetProvisionInfo ¶
func (p MySQLProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
func (MySQLProvider) Metadata ¶
func (p MySQLProvider) Metadata() (string, string)
type PostgreSQLProvider ¶
type PostgreSQLProvider struct {
// contains filtered or unexported fields
}
func (PostgreSQLProvider) Bind ¶
func (p PostgreSQLProvider) Bind( app *appcat.AppBinding, params map[string]interface{}, data map[string]interface{}) (*Credentials, error)
func (PostgreSQLProvider) Create ¶
func (p PostgreSQLProvider) Create(provisionInfo ProvisionInfo) error
func (PostgreSQLProvider) Delete ¶
func (p PostgreSQLProvider) Delete(name, namespace string) error
func (PostgreSQLProvider) GetProvisionInfo ¶
func (p PostgreSQLProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
func (PostgreSQLProvider) Metadata ¶
func (p PostgreSQLProvider) Metadata() (string, string)
type Provider ¶
type Provider interface { Metadata() (catalog string, serviceName string) Bind(app *appcat.AppBinding, params map[string]interface{}, chartSecrets map[string]interface{}) (*Credentials, error) Create(provisionInfo ProvisionInfo) error Delete(name, namespace string) error GetProvisionInfo(instanceID string) (*ProvisionInfo, error) }
func NewMemcachedProvider ¶
func NewMongoDbProvider ¶
func NewMySQLProvider ¶
func NewPostgreSQLProvider ¶
func NewRedisProvider ¶
type ProvisionInfo ¶
type ProvisionInfo struct { InstanceID string ServiceID string PlanID string Params map[string]interface{} ExtraParams map[string]interface{} InstanceName string Namespace string }
func (*ProvisionInfo) Match ¶
func (p *ProvisionInfo) Match(q *ProvisionInfo) bool
type RedisProvider ¶
type RedisProvider struct {
// contains filtered or unexported fields
}
func (RedisProvider) Bind ¶
func (p RedisProvider) Bind( app *appcat.AppBinding, params map[string]interface{}, data map[string]interface{}) (*Credentials, error)
func (RedisProvider) Create ¶
func (p RedisProvider) Create(provisionInfo ProvisionInfo) error
func (RedisProvider) Delete ¶
func (p RedisProvider) Delete(name, namespace string) error
func (RedisProvider) GetProvisionInfo ¶
func (p RedisProvider) GetProvisionInfo(instanceID string) (*ProvisionInfo, error)
func (RedisProvider) Metadata ¶
func (p RedisProvider) Metadata() (string, string)
Click to show internal directories.
Click to hide internal directories.