cluster

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package cluster holds the cluster TPR logic and definitions A cluster is comprised of a master service, replica service, master deployment, and replica deployment

Package cluster holds the cluster TPR logic and definitions A cluster is comprised of a master service, replica service, master deployment, and replica deployment

Package cluster holds the cluster TPR logic and definitions A cluster is comprised of a master service, replica service, master deployment, and replica deployment

Index

Constants

View Source
const DB_UPGRADE_JOB_PATH = "/pgconf/postgres-operator/database/1/database-upgrade-job.json"
View Source
const REPLICA_SUFFIX = "-replica"

Variables

View Source
var DeploymentTemplate1 *template.Template
View Source
var JobTemplate1 *template.Template
View Source
var ReplicaDeploymentTemplate1 *template.Template
View Source
var ServiceTemplate1 *template.Template
View Source
var StrategyMap map[string]ClusterStrategy

Functions

func AddUpgrade

func AddUpgrade(clientset *kubernetes.Clientset, client *rest.RESTClient, upgrade *tpr.PgUpgrade, namespace string, cl *tpr.PgCluster) error

func Process

func Process(clientset *kubernetes.Clientset, client *rest.RESTClient, stopchan chan struct{}, namespace string)

Types

type ClusterStrategy1

type ClusterStrategy1 struct{}

func (ClusterStrategy1) AddCluster

func (r ClusterStrategy1) AddCluster(clientset *kubernetes.Clientset, client *rest.RESTClient, cl *tpr.PgCluster, namespace string) error

func (ClusterStrategy1) DeleteCluster

func (r ClusterStrategy1) DeleteCluster(clientset *kubernetes.Clientset, tprclient *rest.RESTClient, cl *tpr.PgCluster, namespace string) error

func (ClusterStrategy1) MajorUpgrade

func (r ClusterStrategy1) MajorUpgrade(clientset *kubernetes.Clientset, tprclient *rest.RESTClient, cl *tpr.PgCluster, upgrade *tpr.PgUpgrade, namespace string) error

func (ClusterStrategy1) MajorUpgradeFinalize

func (r ClusterStrategy1) MajorUpgradeFinalize(clientset *kubernetes.Clientset, client *rest.RESTClient, cl *tpr.PgCluster, upgrade *tpr.PgUpgrade, namespace string) error

func (ClusterStrategy1) MinorUpgrade

func (r ClusterStrategy1) MinorUpgrade(clientset *kubernetes.Clientset, tprclient *rest.RESTClient, cl *tpr.PgCluster, upgrade *tpr.PgUpgrade, namespace string) error

type DeploymentTemplateFields

type DeploymentTemplateFields struct {
	Name                 string
	ClusterName          string
	Port                 string
	CCP_IMAGE_TAG        string
	PG_MASTER_USER       string
	PG_MASTER_PASSWORD   string
	PG_USER              string
	PG_PASSWORD          string
	PG_DATABASE          string
	PG_ROOT_PASSWORD     string
	PGDATA_PATH_OVERRIDE string
	PVC_NAME             string
	//next 2 are for the replica deployment only
	REPLICAS         string
	PG_MASTER_HOST   string
	SECURITY_CONTEXT string
}

type JobTemplateFields

type JobTemplateFields struct {
	Name              string
	OLD_PVC_NAME      string
	NEW_PVC_NAME      string
	CCP_IMAGE_TAG     string
	OLD_DATABASE_NAME string
	NEW_DATABASE_NAME string
	OLD_VERSION       string
	NEW_VERSION       string
}

type ServiceTemplateFields

type ServiceTemplateFields struct {
	Name        string
	ClusterName string
	Port        string
}

Jump to

Keyboard shortcuts

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