rds

package
v0.0.0-...-2ccca0a Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RDS

type RDS struct {
	EC2             *ec2.EC2
	Subnets         []string
	SecurityGroups  []string
	ServiceProvider provider.ServiceProvider
}

RDS represents AWS RDS database

func New

func New(db *crd.Database, kc *kubernetes.Clientset) (*RDS, error)

New compiles a new RDS struct based on the CR

func (*RDS) CreateDatabase

func (r *RDS) CreateDatabase(db *crd.Database) (*provider.DBEndpoint, error)

CreateDatabase creates a database from the CRD database object, is also ensures that the correct subnets are created for the database so we can access it

func (*RDS) CreateService

func (k *RDS) CreateService(namespace string, dbEndpoint *provider.DBEndpoint, internalname string, owner *crd.Database) (*v1.Service, error)

CreateService Creates or updates a service in Kubernetes with the new information

func (*RDS) DeleteDatabase

func (r *RDS) DeleteDatabase(db *crd.Database) error

DeleteDatabase attempts to delete the RDS database

func (*RDS) DeleteService

func (k *RDS) DeleteService(namespace string, dbname string) error

func (*RDS) GetSecret

func (k *RDS) GetSecret(namespace string, name string) (*v1.Secret, error)

Jump to

Keyboard shortcuts

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