k8s

package
v0.0.0-...-1b4be3e Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database a k8s database representation

func New

func New(ns string) (m *Database, err error)

New creates a new database instance

func (*Database) CheckPodNotReady

func (m *Database) CheckPodNotReady(labelSelector string) (err error)

CheckPodNotReady checks if a pod is in state NotReady

func (*Database) CreateDatabaseDeployment

func (m *Database) CreateDatabaseDeployment(name string, c config.DatabaseConfig) (deploy *appsv1.Deployment, err error)

CreateDatabaseDeployment creates a k8s database deployment, based on a yaml file

func (*Database) CreateDatabaseService

func (m *Database) CreateDatabaseService(name string, c config.DatabaseConfig) (svc *v1.Service, err error)

CreateDatabaseService creates a k8s database service, based on a yaml file

func (*Database) GetPodIP

func (m *Database) GetPodIP(labelSelector string) (ip string, err error)

GetPodIP returns the pods actual ip based on as lable selector

func (*Database) ScaleDatabaseResources

func (m *Database) ScaleDatabaseResources(name string, scale int32) (err error)

ScaleDatabaseResources scales k8s db resources

Jump to

Keyboard shortcuts

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