postgres

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultPostgresPort is the default port for postgres
	DefaultPostgresPort = 5432
	// ImageTagPostgres is the tag for the default postgres image used
	ImageTagPostgres = "postgres:13.0"
)

Variables

This section is empty.

Functions

func MakeDefaultPostgresPodContainers

func MakeDefaultPostgresPodContainers(ps *v1alpha1.Postgres, pw string) []v1.Container

MakeDefaultPostgresPodContainers creates the container for the Deployment

func MakeDefaultPostgresService

func MakeDefaultPostgresService(ps *v1alpha1.Postgres) *v1.Service

MakeDefaultPostgresService is responsible for creating the Service for postgres

func MakePVCPostgres

func MakePVCPostgres(postgres *v1alpha1.Postgres) (*v1.PersistentVolumeClaim, error)

MakePVCPostgres creates the PersistentVolumeClaim

func MakePostgresDeployment

func MakePostgresDeployment(ps *v1alpha1.Postgres, pw string) *appsv1.Deployment

MakePostgresDeployment creates has the Deployment

Types

type Client

type Client interface {
	CreateOrUpdate(ctx context.Context, obj runtime.Object) (controllerutil.OperationResult, error)
	ParseInputSecret(ctx context.Context, postgres v1alpha1.Postgres) (string, error)
	DeletePostgresPVC(ctx context.Context, postgres *v1alpha1.Postgres) error
	DeletePostgresDeployment(ctx context.Context, postgres *v1alpha1.Postgres) error
	DeletePostgresService(ctx context.Context, postgres *v1alpha1.Postgres) error
	GeneratePassword() (string, error)
}

Client is the interface for the postgres client

func NewRoleClient

func NewRoleClient(kube client.Client) Client

NewRoleClient creates the postgres client with interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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