mariadb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServiceName -
	ServiceName = "mariadb"
)

Variables

This section is empty.

Functions

func DbDatabaseJob

func DbDatabaseJob(database *databasev1beta1.MariaDBDatabase, databaseHostName string, databaseSecret string, containerImage string, serviceAccountName string) (*batchv1.Job, error)

DbDatabaseJob -

func DbInitJob

func DbInitJob(db *databasev1beta1.MariaDB) *batchv1.Job

DbInitJob -

func DeleteDbDatabaseJob

func DeleteDbDatabaseJob(database *databasev1beta1.MariaDBDatabase, databaseHostName string, databaseSecret string, containerImage string, serviceAccountName string) (*batchv1.Job, error)

DeleteDbDatabaseJob -

func Endpoints

func Endpoints(db *databasev1beta1.MariaDB) *corev1.Endpoints

Endpoints func

func EndpointsForAdoption

func EndpointsForAdoption(db metav1.Object, adoption *databasev1beta1.AdoptionRedirectSpec) *corev1.Endpoints

EndpointsForAdoption - create an endpoint based on the adoption configuration

func ExecInPod

func ExecInPod(ctx context.Context, h *helper.Helper, config *rest.Config, namespace string, pod string, container string, cmd []string, fun func(*bytes.Buffer, *bytes.Buffer) error) error

ExecInPod - execs a command in a running pod and pass its output to a callback function

func GetLabels

func GetLabels(name string) map[string]string

GetLabels -

func HeadlessService

func HeadlessService(db metav1.Object) *corev1.Service

HeadlessService - service to give galera pods connectivity via DNS

func LabelSelectors

func LabelSelectors(database metav1.Object, dbType string) map[string]string

LabelSelectors - labels for service, match statefulset and service should match

func Pod

func Pod(db *databasev1beta1.MariaDB, configHash string) *corev1.Pod

Pod -

func Pvc

Pvc - Returns the deployment object for the Database

func ResourceName

func ResourceName(name string) string

ResourceName - subresource name from a galera CR

func Service

func Service(db *databasev1beta1.MariaDB) *corev1.Service

Service func

func ServiceForAdoption

func ServiceForAdoption(db metav1.Object, dbType string, adoption *databasev1beta1.AdoptionRedirectSpec) *corev1.Service

ServiceForAdoption - create a service based on the adoption configuration

func ServiceLabels

func ServiceLabels(database metav1.Object) map[string]string

ServiceLabels - labels for service, match statefulset labels

func StatefulSet

func StatefulSet(g *mariadbv1.Galera) *appsv1.StatefulSet

StatefulSet returns a StatefulSet object for the galera cluster

func StatefulSetLabels

func StatefulSetLabels(database metav1.Object) map[string]string

StatefulSetLabels - labels for statefulset, match service labels

func StatefulSetName

func StatefulSetName(name string) string

StatefulSetName - statefulset name from a galera CR

Types

This section is empty.

Jump to

Keyboard shortcuts

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