cluster

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: Apache-2.0 Imports: 20 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 = "/operator-conf/cluster-upgrade-job-1.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 CompleteClone added in v1.3.0

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

func Process

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

func ProcessClone added in v1.3.0

func ProcessClone(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

func (ClusterStrategy1) PrepareClone added in v1.3.0

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

type DeploymentTemplateFields

type DeploymentTemplateFields struct {
	Name                 string
	ClusterName          string
	Port                 string
	CCP_IMAGE_TAG        string
	PG_DATABASE          string
	OPERATOR_LABELS      string
	PGDATA_PATH_OVERRIDE string
	PVC_NAME             string
	BACKUP_PVC_NAME      string
	BACKUP_PATH          string
	PGROOT_SECRET_NAME   string
	PGUSER_SECRET_NAME   string
	PGMASTER_SECRET_NAME string
	SECURITY_CONTEXT     string
	//next 2 are for the replica deployment only
	REPLICAS       string
	PG_MASTER_HOST 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