Documentation ¶
Index ¶
- Constants
- func MakeMySQLCheckNameAvailabilityAzureClient(creds config.Credentials) mysql.CheckNameAvailabilityClient
- func MakeMySQLServerAzureClient(creds config.Credentials) mysql.ServersClient
- type MySQLCredentials
- type MySQLServerClient
- func (m *MySQLServerClient) CreateServerIfValid(ctx context.Context, instance v1alpha2.MySQLServer, tags map[string]*string, ...) (pollingURL string, server mysql.Server, err error)
- func (m *MySQLServerClient) Delete(ctx context.Context, obj runtime.Object, opts ...resourcemanager.ConfigOption) (bool, error)
- func (m *MySQLServerClient) DeleteServer(ctx context.Context, resourcegroup string, servername string) (status string, err error)
- func (m *MySQLServerClient) Ensure(ctx context.Context, obj runtime.Object, opts ...resourcemanager.ConfigOption) (bool, error)
- func (m *MySQLServerClient) GetOrPrepareSecret(ctx context.Context, secretClient secrets.SecretClient, ...) (map[string][]byte, error)
- func (m *MySQLServerClient) GetParents(obj runtime.Object) ([]resourcemanager.KubeParent, error)
- func (m *MySQLServerClient) GetServer(ctx context.Context, resourcegroup string, servername string) (server mysql.Server, err error)
- func (m *MySQLServerClient) GetStatus(obj runtime.Object) (*v1alpha1.ASOStatus, error)
- func (m *MySQLServerClient) GetUserProvidedAdminCredentials(ctx context.Context, instance *azurev1alpha2.MySQLServer) (*MySQLCredentials, error)
- func (m *MySQLServerClient) UpdateServerNameInSecret(ctx context.Context, secretClient secrets.SecretClient, data map[string][]byte, ...) error
- func (m *MySQLServerClient) UpsertSecrets(ctx context.Context, secretClient secrets.SecretClient, data map[string][]byte, ...) error
- type MySQLServerManager
Constants ¶
const ( UsernameSecretKey = "username" PasswordSecretKey = "password" FullyQualifiedServerNameSecretKey = "fullyQualifiedServerName" MySQLServerNameSecretKey = "mySqlServerName" FullyQualifiedUsernameSecretKey = "fullyQualifiedUsername" )
Variables ¶
This section is empty.
Functions ¶
func MakeMySQLCheckNameAvailabilityAzureClient ¶
func MakeMySQLCheckNameAvailabilityAzureClient(creds config.Credentials) mysql.CheckNameAvailabilityClient
func MakeMySQLServerAzureClient ¶
func MakeMySQLServerAzureClient(creds config.Credentials) mysql.ServersClient
Types ¶
type MySQLCredentials ¶
type MySQLCredentials struct {
// contains filtered or unexported fields
}
MySQLCredentials is a username/password pair for a MySQL account
type MySQLServerClient ¶
type MySQLServerClient struct { Creds config.Credentials SecretClient secrets.SecretClient Scheme *runtime.Scheme // KubeReader is used to read secrets in the case the customer has specified a secret containing their // MySQLServer admin username/password KubeReader client.Reader }
func NewMySQLServerClient ¶
func NewMySQLServerClient(creds config.Credentials, secretClient secrets.SecretClient, scheme *runtime.Scheme, kubeReader client.Reader) *MySQLServerClient
func (*MySQLServerClient) CreateServerIfValid ¶
func (*MySQLServerClient) Delete ¶
func (m *MySQLServerClient) Delete(ctx context.Context, obj runtime.Object, opts ...resourcemanager.ConfigOption) (bool, error)
Delete idempotently ensures the server is gone from Azure
func (*MySQLServerClient) DeleteServer ¶
func (*MySQLServerClient) Ensure ¶
func (m *MySQLServerClient) Ensure(ctx context.Context, obj runtime.Object, opts ...resourcemanager.ConfigOption) (bool, error)
Ensure idempotently instantiates the requested server (if possible) in Azure
func (*MySQLServerClient) GetOrPrepareSecret ¶
func (m *MySQLServerClient) GetOrPrepareSecret( ctx context.Context, secretClient secrets.SecretClient, instance *azurev1alpha2.MySQLServer, adminCredentials *MySQLCredentials) (map[string][]byte, error)
GetOrPrepareSecret gets the admin credentials if they are stored or generates some if not
func (*MySQLServerClient) GetParents ¶
func (m *MySQLServerClient) GetParents(obj runtime.Object) ([]resourcemanager.KubeParent, error)
GetParents returns all the potential kube parents of the server
func (*MySQLServerClient) GetStatus ¶
GetStatus returns a pointer to the server resources' status sub-resource
func (*MySQLServerClient) GetUserProvidedAdminCredentials ¶
func (m *MySQLServerClient) GetUserProvidedAdminCredentials( ctx context.Context, instance *azurev1alpha2.MySQLServer) (*MySQLCredentials, error)
GetUserProvidedAdminCredentials gets the user provided MySQLCredentials, or nil if none was specified by the user.
func (*MySQLServerClient) UpdateServerNameInSecret ¶
func (m *MySQLServerClient) UpdateServerNameInSecret(ctx context.Context, secretClient secrets.SecretClient, data map[string][]byte, fullservername string, instance *azurev1alpha2.MySQLServer) error
UpdateSecretWithFullServerName updates the secret with the fully qualified server name
func (*MySQLServerClient) UpsertSecrets ¶
func (m *MySQLServerClient) UpsertSecrets(ctx context.Context, secretClient secrets.SecretClient, data map[string][]byte, instance *azurev1alpha2.MySQLServer) error
UpsertSecrets saves the server's admin credentials in the secret store
type MySQLServerManager ¶
type MySQLServerManager interface { CreateServerIfValid(ctx context.Context, servername string, resourcegroup string, location string, tags map[string]*string, serverversion mysql.ServerVersion, sslenforcement mysql.SslEnforcementEnum, skuInfo mysql.Sku, adminlogin string, adminpassword string, createmode string, sourceserver string) (pollingURL string, server mysql.Server, err error) DeleteServer(ctx context.Context, resourcegroup string, servername string) (string, error) GetServer(ctx context.Context, resourcegroup string, servername string) (mysql.Server, error) // also embed async client methods resourcemanager.ARMClient }