builder

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPVCKey

func GetPVCKey(mariadb *mariadbv1alpha1.MariaDB) types.NamespacedName

func GetSTSPort

func GetSTSPort(sts *appsv1.StatefulSet) (*corev1.ContainerPort, error)

func GetServicePort

func GetServicePort(svc *corev1.Service) (*v1.ServicePort, error)

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func New

func New(scheme *runtime.Scheme) *Builder

func (*Builder) BuildBackupCronJob added in v0.0.2

func (b *Builder) BuildBackupCronJob(key types.NamespacedName, backup *mariadbv1alpha1.Backup,
	mariaDB *mariadbv1alpha1.MariaDB) (*batchv1.CronJob, error)

func (*Builder) BuildBackupJob

func (b *Builder) BuildBackupJob(key types.NamespacedName, backup *mariadbv1alpha1.Backup,
	mariaDB *mariadbv1alpha1.MariaDB) (*batchv1.Job, error)

func (*Builder) BuildGrant added in v0.0.6

func (b *Builder) BuildGrant(mariadb *mariadbv1alpha1.MariaDB, opts GrantOpts) (*mariadbv1alpha1.Grant, error)

func (*Builder) BuildPVC

func (*Builder) BuildRestore added in v0.0.6

func (b *Builder) BuildRestore(mariaDb *mariadbv1alpha1.MariaDB, restoreSource *mariadbv1alpha1.RestoreSource,
	key types.NamespacedName) (*mariadbv1alpha1.Restore, error)

func (*Builder) BuildRestoreJob

func (b *Builder) BuildRestoreJob(key types.NamespacedName, restore *mariadbv1alpha1.Restore,
	mariaDB *mariadbv1alpha1.MariaDB) (*batchv1.Job, error)

func (*Builder) BuildSecret

func (b *Builder) BuildSecret(mariadb *mariadbv1alpha1.MariaDB, opts SecretOpts) (*corev1.Secret, error)

func (*Builder) BuildService

func (b *Builder) BuildService(mariadb *mariadbv1alpha1.MariaDB, key types.NamespacedName) (*corev1.Service, error)

func (*Builder) BuildServiceMonitor

func (b *Builder) BuildServiceMonitor(mariaDb *mariadbv1alpha1.MariaDB, key types.NamespacedName) (*monitoringv1.ServiceMonitor, error)

func (*Builder) BuildStatefulSet

func (b *Builder) BuildStatefulSet(mariadb *mariadbv1alpha1.MariaDB, key types.NamespacedName,
	dsn *corev1.SecretKeySelector) (*appsv1.StatefulSet, error)

func (*Builder) BuildUser added in v0.0.6

func (b *Builder) BuildUser(mariadb *mariadbv1alpha1.MariaDB, opts UserOpts) (*mariadbv1alpha1.User, error)

type GrantOpts

type GrantOpts struct {
	Key         types.NamespacedName
	Privileges  []string
	Database    string
	Table       string
	Username    string
	GrantOption bool
}

type SecretOpts

type SecretOpts struct {
	Key  types.NamespacedName
	Data map[string][]byte
}

type UserOpts

type UserOpts struct {
	Key                  types.NamespacedName
	PasswordSecretKeyRef v1.SecretKeySelector
	MaxUserConnections   int32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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