package pgbouncer
import "github.com/oslokommune/okctl/pkg/kube/manifests/pgbouncer"
Package pgbouncer knows how to deploy PgBouncer to the Kubernetes cluster: - https://www.pgbouncer.org
Index ¶
- func Pod( name, database, namespace, pgBouncerSecret, dbParamsConfigMap, dbParamsSecret string, labels map[string]string, listenPort int32, ) *v1.Pod
- func Secret(name, namespace, username, secret string) *v1.Secret
- type Config
- type PgBouncer
Functions ¶
func Pod ¶
func Pod( name, database, namespace, pgBouncerSecret, dbParamsConfigMap, dbParamsSecret string, labels map[string]string, listenPort int32, ) *v1.Pod
Pod returns the Kubernetes Pod definition for PgBouncer - https://github.com/edoburu/docker-pgbouncer nolint: funlen
func Secret ¶
Secret returns the Secret for setting up the `userlist.txt`
Types ¶
type Config ¶
type Config struct { Name string Database string Namespace string Username string Password string DBParamsSecretName string DBParamsConfigmapName string Labels map[string]string ListenPort int32 In io.Reader Out io.Writer Err io.Writer ClientSet kubernetes.Interface Config *restclient.Config Logger *logrus.Logger }
Config contains all the required inputs
type PgBouncer ¶
type PgBouncer struct { ListenPort int32 Pod *v1.Pod Secret *v1.Secret In io.Reader Out io.Writer Err io.Writer Client kubernetes.Interface Config *restclient.Config Ctx context.Context Logger *logrus.Logger }
PgBouncer contains the state we need to deploy onto Kubernetes
func New ¶
New returns an initialised PgBouncer client
func (*PgBouncer) Create ¶
Create all the PgBouncer resources
func (*PgBouncer) CreateSecret ¶
CreateSecret first removes any existing secret then creates a new one
func (*PgBouncer) Delete ¶
Delete removes all PgBouncer Kubernetes resources
func (*PgBouncer) DeleteSecret ¶
DeleteSecret deletes the secret
func (*PgBouncer) Forward ¶
Forward start forwarding the connection
Source Files ¶
- Version
- v0.0.106 (latest)
- Published
- Oct 21, 2022
- Platform
- linux/amd64
- Imports
- 17 packages
- Last checked
- 19 hours ago –
Tools for package owners.