apiservermsgs

package
v4.3.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterTestInstanceTypePrimary   = "primary"
	ClusterTestInstanceTypeReplica   = "replica"
	ClusterTestInstanceTypePGBouncer = "pgbouncer"
	ClusterTestInstanceTypeBackups   = "backups"
	ClusterTestInstanceTypeUnknown   = "unknown"
)

a collection of constants used to enumerate the output for ClusterTestDetail => InstanceType

View Source
const DfShowAllSelector = "*"

DfShowAllSelector is a value that is used to represent "all"

View Source
const Error = "error"

Error code string

View Source
const Ok = "ok"

Ok status

View Source
const PGO_VERSION = "4.3.4"
View Source
const PodTypeBackup = "backup"
View Source
const PodTypePgbackrest = "pgbackrest"
View Source
const PodTypePgbouncer = "pgbouncer"
View Source
const PodTypePrimary = "primary"
View Source
const PodTypeReplica = "replica"
View Source
const PodTypeUnknown = "unknown"
View Source
const UpgradeError = " has not yet been upgraded. Please upgrade the cluster before running this Postgres Operator command."

UpgradeError is the error used for when a command is tried against a cluster that has not been upgraded to the current Operator version

Variables

View Source
var (
	// ErrPasswordTypeInvalid is used when a string that's not included in
	// PasswordTypeStrings is used
	ErrPasswordTypeInvalid = errors.New("invalid password type. choices are (md5, scram-sha-256)")
)

Functions

func GetPasswordType

func GetPasswordType(passwordTypeStr string) (pgpassword.PasswordType, error)

GetPasswordType returns the enumerated password type based on the string, and an error if it cannot match one

Types

type ApplyPolicyRequest

type ApplyPolicyRequest struct {
	Name          string
	Selector      string
	DryRun        bool
	Namespace     string
	ClientVersion string
}

ApplyPolicyRequest ... swagger:model

type ApplyPolicyResponse

type ApplyPolicyResponse struct {
	Name []string
	Status
}

ApplyPolicyResponse ... swagger:model

type ApplyResults

type ApplyResults struct {
	Results []string
}

ApplyResults ... swagger:model

type BasicAuthCredentials

type BasicAuthCredentials struct {
	Username     string
	Password     string
	APIServerURL string
}

BasicAuthCredentials ... swagger:model BasicAuthCredentials

func (BasicAuthCredentials) HasUsernameAndPassword

func (b BasicAuthCredentials) HasUsernameAndPassword() bool

type CatRequest

type CatRequest struct {
	Namespace string
	Args      []string
}

CatRequest ... swagger:model

type CatResponse

type CatResponse struct {
	Results []string
	Status
}

CatResponse ... swagger:model

type CloneRequest

type CloneRequest struct {
	// BackrestPVCSize, if set, is the size of the PVC to use for the pgBackRest
	// repository if local storage is being used
	BackrestPVCSize string
	// BackrestStorageSource contains the accepted values for where pgBackRest
	// repository storage exists ("local", "s3" or both)
	BackrestStorageSource string
	ClientVersion         string
	// EnableMetrics enables metrics support in the target cluster
	EnableMetrics bool
	Namespace     string
	// PVCSize, if set, is the size of the PVC to use for the primary and any
	// replicas
	PVCSize string
	// SourceClusterName is the name of the source PostgreSQL cluster being used
	// for the clone
	SourceClusterName string
	// TargetClusterName is the name of the target PostgreSQL cluster that the
	// PostgreSQL cluster will be cloned to
	TargetClusterName string
}

CloneRequest ... swagger:model

type CloneResponse

type CloneResponse struct {
	Status
	TargetClusterName string
	WorkflowID        string
}

CloneReseponse swagger:model

type ClusterScaleResponse

type ClusterScaleResponse struct {
	Results []string
	Status
}

ClusterScaleResponse ... swagger:model

type ClusterTablespaceDetail

type ClusterTablespaceDetail struct {
	// Name is the name of the tablespace. Becomes the name of the tablespace in
	// PostgreSQL
	Name string
	// optional: allows for the specification of the size of the PVC for the
	// tablespace, overriding the value that is in "StorageClass"
	PVCSize string
	// StorageConfig is the name of the storage config to use for the tablespace,
	// e.g. "nfsstorage", that is specified in the pgo.yaml configuration
	StorageConfig string
}

ClusterTablespaceDetail contains details required to create a tablespace swagger:model

type ClusterTestDetail

type ClusterTestDetail struct {
	Available    bool   // true if the object being tested is available (ready)
	Message      string // a descriptive message that can be displayed with
	InstanceType string // an enumerated set of what this instance can be, e.g. "primary"
}

swagger:model

type ClusterTestRequest

type ClusterTestRequest struct {
	Clustername string
	Selector    string
	// Version of API client
	// required: true
	ClientVersion string
	Namespace     string
	AllFlag       bool
}

ClusterTestRequest ... swagger:model

type ClusterTestResponse

type ClusterTestResponse struct {
	Results []ClusterTestResult
	Status
}

ClusterTestResponse ... swagger:model

type ClusterTestResult

type ClusterTestResult struct {
	ClusterName string
	Endpoints   []ClusterTestDetail // a list of endpoints
	Instances   []ClusterTestDetail // a list of instances (pods)
}

ClusterTestResult contains the output for a test on a single PostgreSQL cluster. This includes the endpoints (i.e. how to connect to instances in a cluster) and the instances themselves (which are pods) swagger:model

type CreateBackrestBackupRequest

type CreateBackrestBackupRequest struct {
	Namespace           string
	Args                []string
	Selector            string
	BackupOpts          string
	BackrestStorageType string
}

CreateBackrestBackupRequest ... swagger:model

type CreateBackrestBackupResponse

type CreateBackrestBackupResponse struct {
	Results []string
	Status
}

CreateBackrestBackupResponse ... swagger:model

type CreateClusterDetail

type CreateClusterDetail struct {
	// Database is the name of the database that is initially created for users to
	// connect to
	Database string
	// Name is the name of the PostgreSQL cluster
	Name string
	// Users contain an array of users along with their credentials
	Users []CreateClusterDetailUser
	// WorkflowID matches up to the WorkflowID of the cluster
	WorkflowID string
}

CreateClusterDetail provides details about the PostgreSQL cluster that is created

swagger:model

type CreateClusterDetailUser

type CreateClusterDetailUser struct {
	// Password is the password used for this username, but it may be empty based
	// on what data is allowed to be returned by the server
	Password string
	// Username is the username in PostgreSQL for the user
	Username string
}

CreateClusterDetailUser provides information about an individual PostgreSQL user, such as password

swagger:model

type CreateClusterRequest

type CreateClusterRequest struct {
	Name                string `json:"Name"`
	Namespace           string
	NodeLabel           string
	PasswordLength      int
	PasswordSuperuser   string
	PasswordReplication string
	Password            string
	SecretFrom          string
	UserLabels          string
	Tablespaces         []ClusterTablespaceDetail
	Policies            string
	CCPImage            string
	CCPImageTag         string
	CCPImagePrefix      string
	PGOImagePrefix      string
	ReplicaCount        int
	ServiceType         string
	MetricsFlag         bool
	BadgerFlag          bool
	AutofailFlag        bool
	ArchiveFlag         bool
	BackrestStorageType string
	//BackrestRestoreFrom  string
	PgbouncerFlag bool
	// PgBouncerReplicas represents the total number of pgBouncer pods to deploy with a
	// PostgreSQL cluster. Only works if PgbouncerFlag is set, and if so, it must
	// be at least 1. If 0 is passed in, it will automatically be set to 1
	PgBouncerReplicas    int32
	CustomConfig         string
	StorageConfig        string
	WALStorageConfig     string
	ReplicaStorageConfig string
	// Version of API client
	// required: true
	ClientVersion             string
	PodAntiAffinity           string
	PodAntiAffinityPgBackRest string
	PodAntiAffinityPgBouncer  string
	SyncReplication           *bool
	BackrestS3Key             string
	BackrestS3KeySecret       string
	BackrestS3Bucket          string
	BackrestS3Region          string
	BackrestS3Endpoint        string
	Standby                   bool
	BackrestRepoPath          string

	// allow the user to set custom sizes for PVCs
	// PVCSize applies to the primary/replica storage specs
	PVCSize string
	// BackrestPVCSize applies to the pgBackRest storage spec
	BackrestPVCSize string
	// WALPVCSize applies to the WAL storage spec
	WALPVCSize string

	// Username is an optional parameter that allows the user to override the
	// default user name to use for the PostgreSQL cluster
	Username string
	// ShowSystemAccounts is an optional parameter than when set to true, will
	// also show the results of the available system accounts (e.g. the PostgreSQL
	// superuser)
	ShowSystemAccounts bool
	// Database is an optional parameter that allows the user to specify the name
	// of the initial database that is created
	Database string
	// TLSOnly indicates that a PostgreSQL cluster should be deployed with only
	// TLS connections accepted. Requires that TLSSecret and CASecret are set
	TLSOnly bool
	// TLSSecret is the name of the secret that contains the keypair required to
	// deploy a TLS-enabled PostgreSQL cluster
	TLSSecret string
	// CASecret is the name of the secret that contains the CA to use along with
	// the TLS keypair for deploying a TLS-enabled PostgreSQL cluster
	CASecret string
	// CPULimit is the value of the max CPU utilization for a Pod that has a
	// PostgreSQL cluster
	CPULimit string
	// CPURequest is the value of how much CPU should be requested for deploying
	// the PostgreSQL cluster
	CPURequest string
	// MemoryLimit is the value of of the limit of how much RAM a Pod with a
	// PostgreSQL instance should use. At this time we do not recommend setting
	// this.
	MemoryLimit string
	// MemoryRequest is the value of how much RAM should be requested for
	// deploying the PostgreSQL cluster
	MemoryRequest string
	// PgBouncerCPULimit, if specified, is the value of the max CPU for a
	// pgBouncer pod
	PgBouncerCPULimit string
	// PgBouncerCPURequest, if specified, is the value of how much CPU should be
	// requested for deploying pgBouncer instances. Defaults to not being
	// requested
	PgBouncerCPURequest string
	// PgBouncerMemoryLimit is the value of of the limit of how much RAM a Pod
	// with a pgBouncer should use
	PgBouncerMemoryLimit string
	// PgBouncerMemoryRequest, if specified, is the value of how much RAM should
	// be requested for deploying pgBouncer instances. Defaults to the server
	// specified default
	PgBouncerMemoryRequest string
	// BackrestCPULimit, if specified, is the value of the max amount of CPU
	// to be utilized for a pgBackRest Pod
	BackrestCPULimit string
	// BackrestCPURequest, if specified, is the value of how much CPU should be
	// requested the pgBackRest repository. Defaults to not being requested
	BackrestCPURequest string
	// BackrestMemoryLimit, if specified is the max amount of memory a pgBackRest
	// Pod should use
	BackrestMemoryLimit string
	// BackrestMemoryRequest, if specified, is the value of how much RAM should
	// be requested for the pgBackRest repository. Defaults to the server
	// specified default
	BackrestMemoryRequest string
	// BackrestStorageConfig sets the storage configuration to use for the
	// pgBackRest local repository. This overrides the value in pgo.yaml, though
	// the value of BackrestPVCSize can override the PVC size set in this
	// storage config
	BackrestStorageConfig string
	// BackrestS3CASecretName specifies the name of a secret to use for the
	// pgBackRest S3 CA instead of the default
	BackrestS3CASecretName string
}

CreateClusterRequest

swagger:model

type CreateClusterResponse

type CreateClusterResponse struct {
	Result CreateClusterDetail `json:"result"`
	Status `json:"status"`
}

CreateClusterResponse

swagger:model

type CreateFailoverRequest

type CreateFailoverRequest struct {
	Namespace     string
	ClusterName   string
	Target        string
	ClientVersion string
}

CreateFailoverRequest ... swagger:model

type CreateFailoverResponse

type CreateFailoverResponse struct {
	Results []string
	Targets string
	Status
}

CreateFailoverResponse ... swagger:model

type CreateNamespaceRequest

type CreateNamespaceRequest struct {
	Args          []string
	Namespace     string
	ClientVersion string
}

CreateNamespaceRequest ... swagger:model

type CreateNamespaceResponse

type CreateNamespaceResponse struct {
	Results []string
	Status
}

CreateNamespaceResponse ... swagger:model

type CreatePgAdminRequest

type CreatePgAdminRequest struct {
	Args          []string
	ClientVersion string
	Namespace     string
	Selector      string
}

CreatePgAdminRequest ... swagger:model

type CreatePgAdminResponse

type CreatePgAdminResponse struct {
	Results []string
	Status
}

CreatePgAdminResponse ... swagger:model

type CreatePgbouncerRequest

type CreatePgbouncerRequest struct {
	Args          []string
	ClientVersion string
	// CPULimit, if specified, is the max CPU that should be used on a pgBouncer
	// Pod. Defaults to not being set.
	CPULimit string
	// CPURequest, if specified, is the value of how much CPU should be
	// requested for deploying pgBouncer instances. Defaults to not being
	// requested
	CPURequest string
	// MemoryLimit, if specified, is the max CPU that should be used on a
	// pgBouncer Pod. Defaults to not being set.
	MemoryLimit string
	// MemoryRequest, if specified, is the value of how much RAM should
	// be requested for deploying pgBouncer instances. Defaults to the server
	// specified default
	MemoryRequest string
	Namespace     string
	// Replicas represents the total number of pgBouncer pods to deploy with a
	// PostgreSQL cluster. Must be at least 1. If 0 is passed in, it will
	// automatically be set to 1
	Replicas int32
	Selector string
}

CreatePgbouncerRequest ... swagger:model

type CreatePgbouncerResponse

type CreatePgbouncerResponse struct {
	Results []string
	Status
}

CreatePgbouncerResponse ... swagger:model

type CreatePgoroleRequest

type CreatePgoroleRequest struct {
	PgoroleName        string
	PgorolePermissions string
	Namespace          string
	ClientVersion      string
}

CreatePgoroleRequest ... swagger:model

type CreatePgoroleResponse

type CreatePgoroleResponse struct {
	Status
}

CreatePgoroleResponse ... swagger:model

type CreatePgouserRequest

type CreatePgouserRequest struct {
	PgouserName       string
	PgouserPassword   string
	PgouserRoles      string
	AllNamespaces     bool
	PgouserNamespaces string
	Namespace         string
	ClientVersion     string
}

CreatePgouserRequest ... swagger:model

type CreatePgouserResponse

type CreatePgouserResponse struct {
	Status
}

CreatePgouserResponse ... swagger:model

type CreatePolicyRequest

type CreatePolicyRequest struct {
	Name          string
	URL           string
	SQL           string
	Namespace     string
	ClientVersion string
}

CreatePolicyRequest ... swagger:model

type CreatePolicyResponse

type CreatePolicyResponse struct {
	Status
}

CreatePolicyResponse ... swagger:model

type CreateScheduleRequest

type CreateScheduleRequest struct {
	ClusterName         string
	Name                string
	Namespace           string
	Schedule            string
	ScheduleType        string
	Selector            string
	PGBackRestType      string
	BackrestStorageType string
	PVCName             string
	ScheduleOptions     string
	StorageConfig       string
	PolicyName          string
	Database            string
	Secret              string
}

CreateScheduleRequest ... swagger:model

type CreateScheduleResponse

type CreateScheduleResponse struct {
	Results []string
	Status
}

CreateScheduleResponse ... swagger:model

type CreateUpgradeRequest

type CreateUpgradeRequest struct {
	Args             []string
	Selector         string
	Namespace        string
	ClientVersion    string
	IgnoreValidation bool
}

CreateUpgradeRequest ... swagger:model

type CreateUpgradeResponse

type CreateUpgradeResponse struct {
	Results []string
	Status
	WorkflowID string
}

CreateUpgradeResponse ... swagger:model

type CreateUserRequest

type CreateUserRequest struct {
	AllFlag         bool
	Clusters        []string
	ClientVersion   string
	ManagedUser     bool
	Namespace       string
	Password        string
	PasswordAgeDays int
	PasswordLength  int
	// PasswordType is one of "md5" or "scram-sha-256", defaults to "md5"
	PasswordType string
	Selector     string
	Username     string
}

CreateUserRequest contains the parameters that are passed in when an Operator user requests to create a new PostgreSQL user swagger:model

type CreateUserResponse

type CreateUserResponse struct {
	Results []UserResponseDetail
	Status
}

CreateUserResponse is the response to a create user request swagger:model

type CreatepgDumpBackupRequest

type CreatepgDumpBackupRequest struct {
	Namespace     string
	Args          []string
	Selector      string
	PGDumpDB      string
	PVCName       string
	StorageConfig string
	BackupOpts    string
}

CreatepgDumpBackup ... swagger:model

type CreatepgDumpBackupResponse

type CreatepgDumpBackupResponse struct {
	Results []string
	Status
}

CreatepgDumpBackupResponse ... swagger:model

type DeleteClusterRequest

type DeleteClusterRequest struct {
	Clustername string
	Selector    string
	// Version of API client
	// required: true
	ClientVersion string
	Namespace     string
	AllFlag       bool
	DeleteBackups bool
	DeleteData    bool
}

DeleteClusterRequest ... swagger:model

type DeleteClusterResponse

type DeleteClusterResponse struct {
	Results []string
	Status
}

DeleteClusterResponse ... swagger:model

type DeleteLabelRequest

type DeleteLabelRequest struct {
	Selector      string
	Namespace     string
	Args          []string
	LabelCmdLabel string
	ClientVersion string
}

DeleteLabelRequest ... swagger:model

type DeleteNamespaceRequest

type DeleteNamespaceRequest struct {
	Args          []string
	Selector      string
	Namespace     string
	AllFlag       bool
	ClientVersion string
}

DeleteNamespaceRequest ... swagger:model

type DeleteNamespaceResponse

type DeleteNamespaceResponse struct {
	Results []string
	Status
}

DeleteNamespaceResponse ... swagger:model

type DeletePgAdminRequest

type DeletePgAdminRequest struct {
	Args          []string
	Selector      string
	Namespace     string
	ClientVersion string
	Uninstall     bool
}

DeletePgAdminRequest ... swagger:model

type DeletePgAdminResponse

type DeletePgAdminResponse struct {
	Results []string
	Status
}

DeletePgAdminResponse ... swagger:model

type DeletePgbouncerRequest

type DeletePgbouncerRequest struct {
	Args          []string
	Selector      string
	Namespace     string
	ClientVersion string
	Uninstall     bool
}

DeletePgbouncerRequest ... swagger:model

type DeletePgbouncerResponse

type DeletePgbouncerResponse struct {
	Results []string
	Status
}

DeletePgbouncerResponse ... swagger:model

type DeletePgoroleRequest

type DeletePgoroleRequest struct {
	PgoroleName   []string
	Namespace     string
	AllFlag       bool
	ClientVersion string
}

DeletePgoroleRequest ... swagger:model

type DeletePgoroleResponse

type DeletePgoroleResponse struct {
	Results []string
	Status
}

DeletePgoroleResponse ... swagger:model

type DeletePgouserRequest

type DeletePgouserRequest struct {
	PgouserName   []string
	Namespace     string
	AllFlag       bool
	ClientVersion string
}

DeletePgouserRequest ... swagger:model

type DeletePgouserResponse

type DeletePgouserResponse struct {
	Results []string
	Status
}

DeletePgouserResponse ... swagger:model

type DeletePolicyRequest

type DeletePolicyRequest struct {
	Selector      string
	Namespace     string
	AllFlag       bool
	ClientVersion string
	PolicyName    string
}

DeletePolicyRequest ... swagger:model

type DeletePolicyResponse

type DeletePolicyResponse struct {
	Results []string
	Status
}

DeletePolicyResponse ... swagger:model

type DeleteScheduleRequest

type DeleteScheduleRequest struct {
	Namespace    string
	ScheduleName string
	ClusterName  string
	Selector     string
}

DeleteScheduleResponse ... swagger:model

type DeleteScheduleResponse

type DeleteScheduleResponse struct {
	Results []string
	Status
}

DeleteScheduleResponse ... swagger:model

type DeleteUserRequest

type DeleteUserRequest struct {
	AllFlag       bool
	ClientVersion string
	Clusters      []string
	Namespace     string
	Selector      string
	Username      string
}

DeleteUserRequest contains the parameters that are used to delete PostgreSQL users from clusters swagger:model

type DeleteUserResponse

type DeleteUserResponse struct {
	Results []UserResponseDetail
	Status
}

DeleteUserResponse contains the results from trying to delete PostgreSQL users from clusters. The content in this will be much sparser than the others swagger:model

type DfDetail

type DfDetail struct {
	InstanceName string
	PodName      string
	PVCType      DfPVCType
	PVCName      string
	PVCUsed      int64
	PVCCapacity  int64
}

DfDetail returns specific information about the utilization of a PVC swagger:model

type DfPVCType

type DfPVCType int
const (
	PVCTypePostgreSQL DfPVCType = iota
	PVCTypepgBackRest
	PVCTypeTablespace
	PVCTypeWriteAheadLog
)

the DfPVCType selectors help to display determine what type of PVC is being analyzed as part of the DF command

type DfRequest

type DfRequest struct {
	ClientVersion string
	Namespace     string
	Selector      string
}

DfRequest contains the parameters that can be used to get disk utilization for PostgreSQL clusters swagger:model

type DfResponse

type DfResponse struct {
	Results []DfDetail
	Status
}

DfResponse returns the results of how PVCs are being utilized, or an error message swagger:model

type FailoverTargetSpec

type FailoverTargetSpec struct {
	Name           string // the name of the PostgreSQL instance
	Node           string // the node that the instance is running on
	ReplicationLag int    // how far behind the instance is behind the primary, in MB
	Status         string // the current status of the instance
	Timeline       int    // the timeline the replica is on; timelines are adjusted after failover events
	PendingRestart bool   // whether or not a restart is pending for the target
}

FailoverTargetSpec swagger:model

type InstanceDetail

type InstanceDetail struct {
	InstanceName string
	Error        bool
	ErrorMessage string
}

InstanceDetail defines the details of an instance within a cluster restarted as a result of a cluster restart request. This includes the name of each instance, along with any errors that may have occurred while attempting to restart an instance.

type KeyValue

type KeyValue struct {
	Key   string
	Value int
}

KeyValue ... swagger:model

type LabelRequest

type LabelRequest struct {
	Selector      string
	Namespace     string
	Args          []string
	LabelCmdLabel string
	DryRun        bool
	DeleteLabel   bool
	ClientVersion string
}

LabelRequest ... swagger:model

type LabelResponse

type LabelResponse struct {
	Results []string
	Status
}

LabelResponse ... swagger:model

type LoadRequest

type LoadRequest struct {
	Args          []string
	Selector      string
	Namespace     string
	LoadConfig    string
	Policies      string
	ClientVersion string
}

LoadRequest ... swagger:model

type LoadResponse

type LoadResponse struct {
	Results []string
	Status
}

LoadResponse ... swagger:model

type NamespaceResult

type NamespaceResult struct {
	Namespace          string
	InstallationAccess bool
	UserAccess         bool
}

NamespaceResult ... swagger:model

type NodeInfo

type NodeInfo struct {
	Name   string
	Status string
	Labels map[string]string
}

NodeInfo ... swagger:model

type PgBackRestInfo

type PgBackRestInfo struct {
	Archives []PgBackRestInfoArchive `json:"archive"`
	Backups  []PgBackRestInfoBackup  `json:"backup"`
	Cipher   string                  `json:"cipher"`
	DBs      []PgBackRestInfoDB      `json:"db"`
	Name     string                  `json:"name"`
	Status   PgBackRestInfoStatus    `json:"status"`
}

PgBackRestInfo and its associated structs are available for parsing the info that comes from the output of the "pgbackrest info --output json" command

type PgBackRestInfoArchive

type PgBackRestInfoArchive struct {
	DB  PgBackRestInfoDB `json:"db"`
	ID  string           `json:"id"`
	Max string           `json:"max"`
	Min string           `json:"min"`
}

type PgBackRestInfoBackup

type PgBackRestInfoBackup struct {
	Archive   PgBackRestInfoBackupArchive   `json:"archive"`
	Backrest  PgBackRestInfoBackupBackrest  `json:"backrest"`
	Database  PgBackRestInfoDB              `json:"database"`
	Info      PgBackRestInfoBackupInfo      `json:"info"`
	Label     string                        `json:"label"`
	Prior     string                        `json:"prior"`
	Reference []string                      `json:"reference"`
	Timestamp PgBackRestInfoBackupTimestamp `json:"timestamp"`
	Type      string                        `json:"type"`
}

type PgBackRestInfoBackupArchive

type PgBackRestInfoBackupArchive struct {
	Start string `json:"start"`
	Stop  string `json:"stop"`
}

type PgBackRestInfoBackupBackrest

type PgBackRestInfoBackupBackrest struct {
	Format  int    `json:"format"`
	Version string `json:"version"`
}

type PgBackRestInfoBackupInfo

type PgBackRestInfoBackupInfo struct {
	Delta      int64                              `json:"delta"`
	Repository PgBackRestInfoBackupInfoRepository `json:"repository"`
	Size       int64                              `json:"size"`
}

type PgBackRestInfoBackupInfoRepository

type PgBackRestInfoBackupInfoRepository struct {
	Delta int64 `json:"delta"`
	Size  int64 `json:"size"`
}

type PgBackRestInfoBackupTimestamp

type PgBackRestInfoBackupTimestamp struct {
	Start int64 `json:"start"`
	Stop  int64 `json:"stop"`
}

type PgBackRestInfoDB

type PgBackRestInfoDB struct {
	ID       int    `json:"id"`
	SystemID int64  `json:"system-id,omitempty"`
	Version  string `json:"version,omitempty"`
}

type PgBackRestInfoStatus

type PgBackRestInfoStatus struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type PgRestoreRequest

type PgRestoreRequest struct {
	Namespace   string
	FromCluster string
	FromPVC     string
	PGDumpDB    string
	RestoreOpts string
	PITRTarget  string
	NodeLabel   string
}

PgRestoreRequest ... swagger:model

type PgRestoreResponse

type PgRestoreResponse struct {
	Results []string
	Status
}

PgRestoreResponse swagger:model

type Pgbackup

type Pgbackup struct {
	CreationTimestamp string
	Namespace         string             `json:"namespace"`
	Name              string             `json:"name"`
	StorageSpec       crv1.PgStorageSpec `json:"storagespec"`
	CCPImageTag       string             `json:"ccpimagetag"`
	BackupHost        string             `json:"backuphost"`
	BackupUserSecret  string             `json:"backupusersecret"`
	BackupPort        string             `json:"backupport"`
	BackupStatus      string             `json:"backupstatus"`
	BackupPVC         string             `json:"backuppvc"`
	BackupOpts        string             `json:"backupopts"`
	Toc               map[string]string  `json:"toc"`
}

Pgbackup ... swagger:model

type PgbackupList

type PgbackupList struct {
	Items []Pgbackup `json:"items"`
}

PgbackupList ... swagger:model

type PgoroleInfo

type PgoroleInfo struct {
	Name        string
	Permissions string
}

PgroleInfo ... swagger:model

type PgouserInfo

type PgouserInfo struct {
	Username  string
	Role      []string
	Namespace []string
}

PgouserInfo ... swagger:model

type QueryFailoverRequest

type QueryFailoverRequest struct {
	ClusterName   string
	ClientVersion string
}

QueryFailoverRequest ... swagger:model

type QueryFailoverResponse

type QueryFailoverResponse struct {
	Results []FailoverTargetSpec
	Status
	Standby bool
}

QueryFailoverResponse ... swagger:model

type QueryRestartRequest

type QueryRestartRequest struct {
	ClusterName   string
	ClientVersion string
}

QueryRestartRequest defines a request to query a specific cluster for available restart targets. swagger:model

type QueryRestartResponse

type QueryRestartResponse struct {
	Results []RestartTargetSpec
	Status
	Standby bool
}

QueryRestartResponse is the response generated when querying the available instances within a cluster in order to perform a restart against a specific target. swagger:model

type ReloadRequest

type ReloadRequest struct {
	Namespace string
	Args      []string
	Selector  string
}

ReloadRequest ... swagger:model

type ReloadResponse

type ReloadResponse struct {
	Results []string
	Status
}

ReloadResponse ... swagger:model

type RestartDetail

type RestartDetail struct {
	ClusterName  string
	Instances    []InstanceDetail
	Error        bool
	ErrorMessage string
}

RestartDetail defines the details for a cluster restart request, specifically information about each instance restarted as a result of the request. swagger:model

type RestartRequest

type RestartRequest struct {
	Namespace     string
	ClusterName   string
	Targets       []string
	ClientVersion string
}

RestartRequest defines a request to restart a cluster, or one or more targets (i.e. instances) within a cluster swagger:model

type RestartResponse

type RestartResponse struct {
	Result RestartDetail
	Status
}

RestartResponse is the response generated for a request to restart a cluster. swagger:model

type RestartTargetSpec

type RestartTargetSpec struct {
	Name           string // the name of the PostgreSQL instance
	Node           string // the node that the instance is running on
	ReplicationLag int    // how far behind the instance is behind the primary, in MB
	Status         string // the current status of the instance
	Timeline       int    // the timeline the replica is on; timelines are adjusted after failover events
	PendingRestart bool   // whether or not a restart is pending for the target
	Role           string // the role of the specific instance
}

RestartTargetSpec defines the details for a specific restart target identified while querying a cluster for available targets (i.e. instances). swagger:model

type RestoreRequest

type RestoreRequest struct {
	Namespace           string
	FromCluster         string
	ToPVC               string
	RestoreOpts         string
	PITRTarget          string
	NodeLabel           string
	BackrestStorageType string
}

RestoreRequest ... swagger:model

type RestoreResponse

type RestoreResponse struct {
	Results []string
	Status
}

RestoreResponse ... swagger:model

type ScaleDownResponse

type ScaleDownResponse struct {
	Results []string
	Status
}

ScaleDownResponse swagger:model

type ScaleQueryResponse

type ScaleQueryResponse struct {
	Results []ScaleQueryTargetSpec
	Status
	Standby bool
}

ScaleQueryResponse swagger:model

type ScaleQueryTargetSpec

type ScaleQueryTargetSpec struct {
	Name           string // the name of the PostgreSQL instance
	Node           string // the node that the instance is running on
	ReplicationLag int    // how far behind the instance is behind the primary, in MB
	Status         string // the current status of the instance
	Timeline       int    // the timeline the replica is on; timelines are adjusted after failover events
	PendingRestart bool   // whether or not a restart is pending for the target
}

ScaleQueryTargetSpec swagger:model

type ShowBackrestDetail

type ShowBackrestDetail struct {
	Name        string
	Info        []PgBackRestInfo
	StorageType string
}

ShowBackrestDetail ... swagger:model

type ShowBackrestResponse

type ShowBackrestResponse struct {
	Items []ShowBackrestDetail
	Status
}

ShowBackrestResponse ... swagger:model

type ShowBackupResponse

type ShowBackupResponse struct {
	BackupList PgbackupList
	Status
}

ShowBackupResponse ... swagger:model

type ShowClusterDeployment

type ShowClusterDeployment struct {
	Name         string
	PolicyLabels []string
}

ShowClusterDeployment

swagger:model

type ShowClusterDetail

type ShowClusterDetail struct {
	// Defines the Cluster using a Crunchy Pgcluster crd
	Cluster     crv1.Pgcluster `json:"cluster"`
	Deployments []ShowClusterDeployment
	Pods        []ShowClusterPod
	Services    []ShowClusterService
	Replicas    []ShowClusterReplica
	Standby     bool
}

ShowClusterDetail ...

swagger:model

type ShowClusterPod

type ShowClusterPod struct {
	Name        string
	Phase       string
	NodeName    string
	PVCName     map[string]string
	ReadyStatus string
	Ready       bool
	Primary     bool
	Type        string
}

ShowClusterPod

swagger:model

type ShowClusterReplica

type ShowClusterReplica struct {
	Name string
}

ShowClusterReplica

swagger:model

type ShowClusterRequest

type ShowClusterRequest struct {
	// Name of the cluster to show
	// required: true
	Clustername string `json:"clustername"`
	// Selector of the cluster to show
	Selector string `json:"selector"`
	// Image tag of the cluster
	Ccpimagetag string `json:"ccpimagetag"`
	// Version of API client
	// required: true
	ClientVersion string `json:"clientversion"`
	// Namespace to search
	// required: true
	Namespace string `json:"namespace"`
	// Shows all clusters
	AllFlag bool `json:"allflag"`
}

ShowClusterRequest shows cluster

swagger:model

type ShowClusterResponse

type ShowClusterResponse struct {
	// results from show cluster
	Results []ShowClusterDetail
	// status of response
	Status
}

ShowClusterResponse ...

swagger:model

type ShowClusterService

type ShowClusterService struct {
	Name         string
	Data         string
	ClusterIP    string
	ExternalIP   string
	ClusterName  string
	Pgbouncer    bool
	BackrestRepo bool
}

ShowClusterService

swagger:model

type ShowConfigResponse

type ShowConfigResponse struct {
	Result config.PgoConfig
	Status
}

ShowConfigResponse ... swagger:model

type ShowNamespaceRequest

type ShowNamespaceRequest struct {
	Args          []string
	AllFlag       bool
	ClientVersion string
}

ShowNamespaceRequest ... swagger:model

type ShowNamespaceResponse

type ShowNamespaceResponse struct {
	Username string
	Results  []NamespaceResult
	Status
}

ShowNamespaceResponse ... swagger:model

type ShowPVCRequest

type ShowPVCRequest struct {
	ClusterName   string
	Selector      string
	ClientVersion string
	Namespace     string
	AllFlag       bool
}

ShowPVCRequest ... swagger:model

type ShowPVCResponse

type ShowPVCResponse struct {
	Results []ShowPVCResponseResult
	Status
}

ShowPVCResponse ... swagger:model

type ShowPVCResponseResult

type ShowPVCResponseResult struct {
	ClusterName string
	PVCName     string
}

ShowPVCResponseResult contains a semi structured result of information about a PVC in a cluster

type ShowPgAdminDetail

type ShowPgAdminDetail struct {
	// ClusterName is the name of the PostgreSQL cluster associated with this
	// pgAdmin deployment
	ClusterName string
	// HasPgAdmin is set to true if there is a pgAdmin deployment with this
	// cluster, otherwise its false
	HasPgAdmin bool
	// ServiceClusterIP contains the ClusterIP address of the Service
	ServiceClusterIP string
	// ServiceExternalIP contains the external IP address of the Service, if it
	// is assigned
	ServiceExternalIP string
	// ServiceName contains the name of the Kubernetes Service
	ServiceName string
	// Users contains the list of users configured for pgAdmin login
	Users []string
}

ShowPgAdminDetail is the specific information about a pgAdmin deployment for a cluster

swagger:model

type ShowPgAdminRequest

type ShowPgAdminRequest struct {
	// ClientVersion is the required parameter that includes the version of the
	// Operator that is requesting
	ClientVersion string

	// ClusterNames contains one or more names of cluster to be queried to show
	// information about their pgAdmin deployment
	ClusterNames []string

	// Namespace is the namespace to perform the query in
	Namespace string

	// Selector is optional and contains a selector to gather information about
	// a PostgreSQL cluster's pgAdmin
	Selector string
}

ShowPgAdminRequest contains the attributes for requesting information about a pgAdmin deployment

swagger:model

type ShowPgAdminResponse

type ShowPgAdminResponse struct {
	Results []ShowPgAdminDetail
	Status
}

ShowPgAdminResponse contains the attributes that are part of the response from the pgAdmin request, i.e. pgAdmin information

swagger:model

type ShowPgBouncerDetail

type ShowPgBouncerDetail struct {
	// ClusterName is the name of the PostgreSQL cluster associated with this
	// pgBouncer deployment
	ClusterName string
	// HasPgBouncer is set to true if there is a pgBouncer deployment with this
	// cluster, otherwise its false
	HasPgBouncer bool
	// Password contains the password for the pgBouncer service account
	Password string
	// ServiceClusterIP contains the ClusterIP address of the Service
	ServiceClusterIP string
	// ServiceExternalIP contains the external IP address of the Service, if it
	// is assigned
	ServiceExternalIP string
	// ServiceName contains the name of the Kubernetes Service
	ServiceName string
	// Username is the username for the pgBouncer service account
	Username string
}

ShowPgBouncerDetail is the specific information about a pgBouncer deployment for a cluster

swagger:model

type ShowPgBouncerRequest

type ShowPgBouncerRequest struct {
	// ClientVersion is the required parameter that includes the version of the
	// Operator that is requesting
	ClientVersion string

	// ClusterNames contains one or more names of cluster to be queried to show
	// information about their pgBouncer deployment
	ClusterNames []string

	// Namespace is the namespace to perform the query in
	Namespace string

	// Selector is optional and contains a selector to gather information about
	// a PostgreSQL cluster's pgBouncer
	Selector string
}

ShowPgBouncerRequest contains the attributes for requesting information about a pgBouncer deployment

swagger:model

type ShowPgBouncerResponse

type ShowPgBouncerResponse struct {
	Results []ShowPgBouncerDetail
	Status
}

ShowPgBouncerResponse contains the attributes that are part of the response from the pgBouncer request, i.e. pgBouncer information

swagger:model

type ShowPgoroleRequest

type ShowPgoroleRequest struct {
	Namespace     string
	AllFlag       bool
	ClientVersion string
	PgoroleName   []string
}

ShowPgoroleRequest ... swagger:model

type ShowPgoroleResponse

type ShowPgoroleResponse struct {
	RoleInfo []PgoroleInfo
	Status
}

ShowPgoroleResponse ... swagger:model

type ShowPgouserRequest

type ShowPgouserRequest struct {
	Namespace     string
	AllFlag       bool
	ClientVersion string
	PgouserName   []string
}

ShowPgouserRequest ... swagger:model

type ShowPgouserResponse

type ShowPgouserResponse struct {
	UserInfo []PgouserInfo
	Status
}

ShowPgouserResponse ... swagger:model

type ShowPolicyRequest

type ShowPolicyRequest struct {
	Selector      string
	Namespace     string
	AllFlag       bool
	ClientVersion string
	Policyname    string
}

ShowPolicyRequest ... swagger:model

type ShowPolicyResponse

type ShowPolicyResponse struct {
	PolicyList crv1.PgpolicyList
	Status
}

ShowPolicyResponse ... swagger:model

type ShowScheduleRequest

type ShowScheduleRequest struct {
	Namespace    string
	ScheduleName string
	ClusterName  string
	Selector     string
}

ShowScheduleRequest ... swagger:model

type ShowScheduleResponse

type ShowScheduleResponse struct {
	Results []string
	Status
}

ShowSchewduleResponse ... swagger:model

type ShowUserRequest

type ShowUserRequest struct {
	AllFlag            bool
	Clusters           []string
	ClientVersion      string
	Expired            int
	Namespace          string
	Selector           string
	ShowSystemAccounts bool
}

ShowUserRequest finds information about users in various PostgreSQL clusters swagger:model

type ShowUserResponse

type ShowUserResponse struct {
	Results []UserResponseDetail
	Status
}

ShowUsersResponse ... swagger:model

type ShowWorkflowDetail

type ShowWorkflowDetail struct {
	ClusterName string
	Parameters  map[string]string
}

ShowWorkflowDetail ... swagger:model

type ShowWorkflowResponse

type ShowWorkflowResponse struct {
	Results ShowWorkflowDetail
	Status
}

ShowWorkflowResponse ... swagger:model

type ShowpgDumpDetail

type ShowpgDumpDetail struct {
	Name string
	Info string
}

ShowpgDumpDetail swagger:model

type Status

type Status struct {
	// status code
	Code string
	// status message
	Msg string
}

Status ... swagger:model Status

func (*Status) SetError

func (s *Status) SetError(msg string)

Syntactic sugar for consistency and readibility

type StatusDetail

type StatusDetail struct {
	NumDatabases int
	NumClaims    int
	VolumeCap    string
	DbTags       map[string]int
	NotReady     []string
	Nodes        []NodeInfo
	Labels       []KeyValue
}

StatusDetail ... this aggregated status comes from the pgo-status container by means of a volume mounted json blob it generates swagger:model

type StatusResponse

type StatusResponse struct {
	Result StatusDetail
	Status
}

ShowClusterResponse ... swagger:model

type UpdateClusterAutofailStatus

type UpdateClusterAutofailStatus int

set the types for updating the Autofail status

const (
	UpdateClusterAutofailDoNothing UpdateClusterAutofailStatus = iota
	UpdateClusterAutofailEnable
	UpdateClusterAutofailDisable
)

set the different values around updating the autofail configuration

type UpdateClusterLoginState

type UpdateClusterLoginState int
const (
	UpdateUserLoginDoNothing UpdateClusterLoginState = iota
	UpdateUserLoginEnable
	UpdateUserLoginDisable
)

set the different values around whether or not to disable/enable a user's ability to login

type UpdateClusterRequest

type UpdateClusterRequest struct {
	Clustername []string
	Selector    string
	// Version of API client
	// required: true
	ClientVersion string
	Namespace     string
	AllFlag       bool
	Autofail      UpdateClusterAutofailStatus
	// BackrestCPULimit, if specified, is the value of the max amount of CPU
	// to be utilized for a pgBackRest Pod
	BackrestCPULimit string
	// BackrestCPURequest, if specified, is the value of how much CPU should be
	// requested the pgBackRest repository. Defaults to not being requested
	BackrestCPURequest string
	// BackrestMemoryLimit, if specified is the max amount of memory a pgBackRest
	// Pod should use
	BackrestMemoryLimit string
	// BackrestMemoryRequest, if specified, is the value of how much RAM should
	// be requested for the pgBackRest repository.
	BackrestMemoryRequest string
	// CPULimit is the value of the max CPU utilization for a Pod that has a
	// PostgreSQL cluster
	CPULimit string
	// CPURequest is the value of how much CPU should be requested for deploying
	// the PostgreSQL cluster
	CPURequest string
	// MemoryLimit is the value of of the limit of how much RAM a Pod with a
	// PostgreSQL instance should use. At this time we do not recommend setting
	// this.
	MemoryLimit string
	// MemoryRequest is the value of how much RAM should be requested for
	// deploying the PostgreSQL cluster
	MemoryRequest string
	Standby       UpdateClusterStandbyStatus
	Startup       bool
	Shutdown      bool
	Tablespaces   []ClusterTablespaceDetail
}

UpdateClusterRequest ... swagger:model

type UpdateClusterResponse

type UpdateClusterResponse struct {
	Results []string
	Status
}

UpdateClusterResponse ... swagger:model

type UpdateClusterStandbyStatus

type UpdateClusterStandbyStatus int

UpdateClusterStandbyStatus defines the types for updating the Standby status

const (
	UpdateClusterStandbyDoNothing UpdateClusterStandbyStatus = iota
	UpdateClusterStandbyEnable
	UpdateClusterStandbyDisable
)

set the different values around updating the standby configuration

type UpdateNamespaceRequest

type UpdateNamespaceRequest struct {
	Args          []string
	ClientVersion string
}

UpdateNamespaceRequest ... swagger:model

type UpdateNamespaceResponse

type UpdateNamespaceResponse struct {
	Results []string
	Status
}

UpdateNamespaceResponse ... swagger:model

type UpdatePgBouncerDetail

type UpdatePgBouncerDetail struct {
	// ClusterName is the name of the PostgreSQL cluster associated with this
	// pgBouncer deployment
	ClusterName string
	// Error is set to true if there is an error. HasPgbouncer == false is not
	// an error
	Error bool
	// ErrorMessage contains an error message if there is an error
	ErrorMessage string
	// HasPgBouncer is set to true if there is a pgBouncer deployment with this
	// cluster, otherwise its false
	HasPgBouncer bool
}

UpdatePgBouncerDetail is the specific information about the pgBouncer update request for each deployment

swagger:model

type UpdatePgBouncerRequest

type UpdatePgBouncerRequest struct {
	// ClientVersion is the required parameter that includes the version of the
	// Operator that is requesting
	ClientVersion string

	// ClusterNames contains one or more names of pgBouncer deployments to be
	// updated
	ClusterNames []string

	// CPULimit, if specified, is the max CPU that should be used on a pgBouncer
	// Pod. Defaults to not being set.
	CPULimit string

	// CPURequest, if specified, is the value of how much CPU should be
	// requested for deploying pgBouncer instances. Defaults to not being
	// requested
	CPURequest string

	// MemoryLimit, if specified, is the max CPU that should be used on a
	// pgBouncer Pod. Defaults to not being set.
	MemoryLimit string

	// MemoryRequest, if specified, is the value of how much RAM should
	// be requested for deploying pgBouncer instances. Defaults to the server
	// specified default
	MemoryRequest string

	// Namespace is the namespace to perform the query in
	Namespace string

	// Replicas represents the total number of pgBouncer pods to deploy with a
	// PostgreSQL cluster. Must be at least 1. If 0 is passed in, it is ignored
	Replicas int32

	// RotatePassword is used to rotate the password for the "pgbouncer" service
	// account
	RotatePassword bool

	// Selector is optional and contains a selector for pgBouncer deployments that
	// are to be updated
	Selector string
}

UpdatePgBouncerRequest contains the attributes for updating a pgBouncer deployment

swagger:model

type UpdatePgBouncerResponse

type UpdatePgBouncerResponse struct {
	Results []UpdatePgBouncerDetail
	Status
}

UpdatePgBouncerResponse contains the resulting output of the update request

swagger:model

type UpdatePgoroleRequest

type UpdatePgoroleRequest struct {
	Name               string
	PgorolePermissions string
	PgoroleName        string
	ChangePermissions  bool
	Namespace          string
	ClientVersion      string
}

UpdatePgoroleRequest ... swagger:model

type UpdatePgoroleResponse

type UpdatePgoroleResponse struct {
	Status
}

ApplyPgoroleResponse ... swagger:model

type UpdatePgouserRequest

type UpdatePgouserRequest struct {
	Name              string
	PgouserRoles      string
	PgouserNamespaces string
	AllNamespaces     bool
	PgouserPassword   string
	PgouserName       string
	Namespace         string
	ClientVersion     string
}

UpdatePgouserRequest ... swagger:model

type UpdatePgouserResponse

type UpdatePgouserResponse struct {
	Status
}

ApplyPgouserResponse ... swagger:model

type UpdateUserRequest

type UpdateUserRequest struct {
	AllFlag         bool
	ClientVersion   string
	Clusters        []string
	Expired         int
	ExpireUser      bool
	LoginState      UpdateClusterLoginState
	ManagedUser     bool
	Namespace       string
	Password        string
	PasswordAgeDays int
	PasswordLength  int
	// PasswordType is one of "md5" or "scram-sha-256", defaults to "md5"
	PasswordType        string
	PasswordValidAlways bool
	RotatePassword      bool
	Selector            string
	Username            string
}

UpdateUserRequest is the API to allow an Operator user to update information about a PostgreSQL user swagger:model

type UpdateUserResponse

type UpdateUserResponse struct {
	Results []UserResponseDetail
	Status
}

UpdateUserResponse contains the response after an update user request swagger:model

type UserResponseDetail

type UserResponseDetail struct {
	ClusterName  string
	Error        bool
	ErrorMessage string
	Password     string
	Username     string
	ValidUntil   string
}

UserResponseDetail returns specific information about the user that was updated, including password, expiration time, etc. swagger:model

type VersionResponse

type VersionResponse struct {
	Version string
	Status
}

VersionResponse ... swagger:model

type WatchRequest

type WatchRequest struct {
	Topics        []string
	ClientVersion string
	Namespace     string
}

WatchRequest ... swagger:model

type WatchResponse

type WatchResponse struct {
	Results []string
	Status
}

WatchResponse ... swagger:model

Jump to

Keyboard shortcuts

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