google_sql

package
v0.0.0-...-65cd51f Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AvailabilityTypeRegional         = "REGIONAL"
	AvailabilityTypeZonal            = "ZONAL"
	DefaultSqlInstanceAutoBackupHour = 2
	DefaultSqlInstanceCollation      = "en_US.UTF8"
	DefaultSqlInstanceDiskSize       = 10
	DefaultSqlInstanceDiskType       = nais_io_v1.CloudSqlInstanceDiskTypeSSD
	DefaultSqlInstanceEdition        = google_sql_crd.SQLInstanceEditionEnterprise
)
View Source
const (
	GoogleSQLPasswordSuffix = "_PASSWORD"
)

Variables

This section is empty.

Functions

func CreateGoogleSQLDatabase

func CreateGoogleSQLDatabase(objectMeta metav1.ObjectMeta, instanceName, dbName, projectId string, cascadingDelete bool) *google_sql_crd.SQLDatabase

func CreateGoogleSQLUsers

func CreateGoogleSQLUsers(source Source, ast *resource.Ast, cfg Config, naisSqlDatabase *nais_io_v1.CloudSqlDatabase, naisSqlInstance *nais_io_v1.CloudSqlInstance, googleSqlInstance *googlesqlcrd.SQLInstance)

func CreateGoogleSqlInstance

func CreateGoogleSqlInstance(objectMeta metav1.ObjectMeta, instance *nais_io_v1.CloudSqlInstance, cfg Config) (*google_sql_crd.SQLInstance, error)

func CreateIAMPolicyMemberForInstance

func CreateIAMPolicyMemberForInstance(source resource.Source, resourceName string, cfg Config) *google_iam_crd.IAMPolicyMember

func CreateInstance

func CreateInstance(source Source, ast *resource.Ast, cfg Config) error

func CreateSqlSSLCertResource

func CreateSqlSSLCertResource(ast *resource.Ast, instanceName string, source Source, googleTeamProjectId string, clusterName string)

func MergeAndFilterDatabaseSQLUsers

func MergeAndFilterDatabaseSQLUsers(dbUsers []nais.CloudSqlDatabaseUser, instanceName string) []nais.CloudSqlDatabaseUser

func NaisCloudSqlInstanceWithDefaults

func NaisCloudSqlInstanceWithDefaults(instance *nais_io_v1.CloudSqlInstance, appName string) (*nais_io_v1.CloudSqlInstance, error)

func ValidateFlag

func ValidateFlag(key string, value string) error

Types

type Config

type Config interface {
	GetGoogleProjectID() string
	GetGoogleTeamProjectID() string
	GetGoogleCloudSQLProxyContainerImage() string
	ShouldCreateSqlInstanceInSharedVpc() bool
	SqlInstanceExists() bool
	SqlInstanceHasPrivateIpInSharedVpc() bool
	GetClusterName() string
}

type GoogleSqlUser

type GoogleSqlUser struct {
	Username string
	AppName  string
	DB       *nais.CloudSqlDatabase
	Instance *googlesqlcrd.SQLInstance
}

func (GoogleSqlUser) Create

func (in GoogleSqlUser) Create(objectMeta metav1.ObjectMeta, cascadingDelete bool, appName, projectId string) *googlesqlcrd.SQLUser

func (GoogleSqlUser) CreateUserEnvVars

func (in GoogleSqlUser) CreateUserEnvVars(password string) map[string]string

type Source

type Source interface {
	resource.Source
	GetGCP() *nais_io_v1.GCP
}

Jump to

Keyboard shortcuts

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