controller

package
v0.1.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 46 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PostgresPassword = "POSTGRES_PASSWORD"
	PostgresUser     = "POSTGRES_USER"
	DefaultHostPort  = 5432
)
View Source
const (
	UserListMountPath           = "/var/run/pgbouncer/secret"
	ServingServerCertMountPath  = "/var/run/pgbouncer/tls/serving/server"
	ServingClientCertMountPath  = "/var/run/pgbouncer/tls/serving/client"
	UpstreamServerCertMountPath = "/var/run/pgbouncer/tls/upstream/server"
)
View Source
const (
	AuthSecretSuffix = "-auth"
)
View Source
const (
	PgBouncerPortName = "api"
)
View Source
const UserListKey string = "userlist"

Variables

This section is empty.

Functions

func WaitUntilPodRunningBySelector

func WaitUntilPodRunningBySelector(kubeClient kubernetes.Interface, namespace string, selector *metav1.LabelSelector, count int) error

Types

type Controller

type Controller struct {
	amc.Config
	*amc.Controller
	// contains filtered or unexported fields
}

func New

func New(
	clientConfig *rest.Config,
	client kubernetes.Interface,
	crdClient crd_cs.Interface,
	extClient cs.Interface,
	dc dynamic.Interface,
	appCatalogClient appcat_cs.Interface,
	promClient pcm.MonitoringV1Interface,
	opt amc.Config,
	topology *core_util.Topology,
	recorder record.EventRecorder,
) *Controller

func (*Controller) CheckStatefulSetPodStatus

func (c *Controller) CheckStatefulSetPodStatus(statefulSet *apps.StatefulSet) error

func (*Controller) CreateOrPatchDefaultSecret

func (c *Controller) CreateOrPatchDefaultSecret(pgbouncer *api.PgBouncer) (kutil.VerbType, error)

func (*Controller) EnsureCustomResourceDefinitions

func (c *Controller) EnsureCustomResourceDefinitions() error

Ensuring Custom Resource Definitions

func (*Controller) GetDefaultSecretSpec

func (c *Controller) GetDefaultSecretSpec(pgbouncer *api.PgBouncer) *core.Secret

func (*Controller) Init

func (c *Controller) Init() error

InitInformer initializes PgBouncer, DormantDB amd Snapshot watcher

func (*Controller) PgBouncerForSecret

func (c *Controller) PgBouncerForSecret(s *core.Secret) (*api.PgBouncer, error)

func (*Controller) PgBouncerForService

func (c *Controller) PgBouncerForService(s *core.Service) (*api.PgBouncer, error)

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

Blocks caller. Intended to be called as a Go routine.

func (*Controller) RunControllers

func (c *Controller) RunControllers(stopCh <-chan struct{})

RunControllers runs queue.worker

func (*Controller) StartAndRunControllers

func (c *Controller) StartAndRunControllers(stopCh <-chan struct{})

StartAndRunControllers starts InformetFactory and runs queue.worker

type OperatorConfig

type OperatorConfig struct {
	amc.Config

	ClientConfig     *rest.Config
	KubeClient       kubernetes.Interface
	CRDClient        crd_cs.Interface
	DBClient         cs.Interface
	AppCatalogClient appcat_cs.Interface
	DynamicClient    dynamic.Interface
	PromClient       pcm.MonitoringV1Interface
}

func NewOperatorConfig

func NewOperatorConfig(clientConfig *rest.Config) *OperatorConfig

func (*OperatorConfig) New

func (c *OperatorConfig) New() (*Controller, error)

Jump to

Keyboard shortcuts

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