Documentation ¶
Index ¶
- Constants
- Variables
- func GetPasswordType(passwordTypeStr string) (pgpassword.PasswordType, error)
- type ApplyPolicyRequest
- type ApplyPolicyResponse
- type ApplyResults
- type BasicAuthCredentials
- type CatRequest
- type CatResponse
- type CloneRequest
- type CloneResponse
- type ClusterScaleResponse
- type ClusterTablespaceDetail
- type ClusterTestDetail
- type ClusterTestRequest
- type ClusterTestResponse
- type ClusterTestResult
- type CreateBackrestBackupRequest
- type CreateBackrestBackupResponse
- type CreateClusterDetail
- type CreateClusterDetailUser
- type CreateClusterRequest
- type CreateClusterResponse
- type CreateFailoverRequest
- type CreateFailoverResponse
- type CreateNamespaceRequest
- type CreateNamespaceResponse
- type CreatePgAdminRequest
- type CreatePgAdminResponse
- type CreatePgbouncerRequest
- type CreatePgbouncerResponse
- type CreatePgoroleRequest
- type CreatePgoroleResponse
- type CreatePgouserRequest
- type CreatePgouserResponse
- type CreatePolicyRequest
- type CreatePolicyResponse
- type CreateScheduleRequest
- type CreateScheduleResponse
- type CreateUpgradeRequest
- type CreateUpgradeResponse
- type CreateUserRequest
- type CreateUserResponse
- type CreatepgDumpBackupRequest
- type CreatepgDumpBackupResponse
- type DeleteClusterRequest
- type DeleteClusterResponse
- type DeleteLabelRequest
- type DeleteNamespaceRequest
- type DeleteNamespaceResponse
- type DeletePgAdminRequest
- type DeletePgAdminResponse
- type DeletePgbouncerRequest
- type DeletePgbouncerResponse
- type DeletePgoroleRequest
- type DeletePgoroleResponse
- type DeletePgouserRequest
- type DeletePgouserResponse
- type DeletePolicyRequest
- type DeletePolicyResponse
- type DeleteScheduleRequest
- type DeleteScheduleResponse
- type DeleteUserRequest
- type DeleteUserResponse
- type DfDetail
- type DfPVCType
- type DfRequest
- type DfResponse
- type FailoverTargetSpec
- type InstanceDetail
- type KeyValue
- type LabelRequest
- type LabelResponse
- type NamespaceResult
- type NodeInfo
- type PgBackRestInfo
- type PgBackRestInfoArchive
- type PgBackRestInfoBackup
- type PgBackRestInfoBackupArchive
- type PgBackRestInfoBackupBackrest
- type PgBackRestInfoBackupInfo
- type PgBackRestInfoBackupInfoRepository
- type PgBackRestInfoBackupTimestamp
- type PgBackRestInfoDB
- type PgBackRestInfoStatus
- type PgRestoreRequest
- type PgRestoreResponse
- type Pgbackup
- type PgbackupList
- type PgoroleInfo
- type PgouserInfo
- type QueryFailoverRequest
- type QueryFailoverResponse
- type QueryRestartRequest
- type QueryRestartResponse
- type ReloadRequest
- type ReloadResponse
- type RestartDetail
- type RestartRequest
- type RestartResponse
- type RestartTargetSpec
- type RestoreRequest
- type RestoreResponse
- type ScaleDownResponse
- type ScaleQueryResponse
- type ScaleQueryTargetSpec
- type ShowBackrestDetail
- type ShowBackrestResponse
- type ShowBackupResponse
- type ShowClusterDeployment
- type ShowClusterDetail
- type ShowClusterPod
- type ShowClusterPodPVC
- type ShowClusterReplica
- type ShowClusterRequest
- type ShowClusterResponse
- type ShowClusterService
- type ShowConfigResponse
- type ShowNamespaceRequest
- type ShowNamespaceResponse
- type ShowPVCRequest
- type ShowPVCResponse
- type ShowPVCResponseResult
- type ShowPgAdminDetail
- type ShowPgAdminRequest
- type ShowPgAdminResponse
- type ShowPgBouncerDetail
- type ShowPgBouncerRequest
- type ShowPgBouncerResponse
- type ShowPgoroleRequest
- type ShowPgoroleResponse
- type ShowPgouserRequest
- type ShowPgouserResponse
- type ShowPolicyRequest
- type ShowPolicyResponse
- type ShowScheduleRequest
- type ShowScheduleResponse
- type ShowUserRequest
- type ShowUserResponse
- type ShowWorkflowDetail
- type ShowWorkflowResponse
- type ShowpgDumpDetail
- type Status
- type StatusDetail
- type StatusResponse
- type UpdateBackrestS3VerifyTLS
- type UpdateClusterAutofailStatus
- type UpdateClusterLoginState
- type UpdateClusterRequest
- type UpdateClusterResponse
- type UpdateClusterStandbyStatus
- type UpdateNamespaceRequest
- type UpdateNamespaceResponse
- type UpdatePgBouncerDetail
- type UpdatePgBouncerRequest
- type UpdatePgBouncerResponse
- type UpdatePgoroleRequest
- type UpdatePgoroleResponse
- type UpdatePgouserRequest
- type UpdatePgouserResponse
- type UpdateUserRequest
- type UpdateUserResponse
- type UserResponseDetail
- type VersionResponse
- type WatchRequest
- type WatchResponse
Constants ¶
const ( ClusterTestInstanceTypePrimary = "primary" ClusterTestInstanceTypeReplica = "replica" ClusterTestInstanceTypePGBouncer = "pgbouncer" ClusterTestInstanceTypeBackups = "backups" ClusterTestInstanceTypeUnknown = "unknown" )
a collection of constants used to enumerate the output for ClusterTestDetail => InstanceType
const DfShowAllSelector = "*"
DfShowAllSelector is a value that is used to represent "all"
const Error = "error"
Error code string
const Ok = "ok"
Ok status
const PGO_VERSION = "4.5.1"
const PodTypeBackup = "backup"
const PodTypePgbackrest = "pgbackrest"
const PodTypePgbouncer = "pgbouncer"
const PodTypePrimary = "primary"
const PodTypeReplica = "replica"
const PodTypeUnknown = "unknown"
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 ¶
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 ¶
ApplyPolicyResponse ... swagger:model
type BasicAuthCredentials ¶
BasicAuthCredentials ... swagger:model BasicAuthCredentials
func (BasicAuthCredentials) HasUsernameAndPassword ¶
func (b BasicAuthCredentials) HasUsernameAndPassword() bool
type CatRequest ¶
CatRequest ... swagger:model
type CatResponse ¶
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 ¶
CloneReseponse swagger:model
type ClusterScaleResponse ¶
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 ¶
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 // ExporterCPULimit, if specified, is the value of the max CPU for a // Crunchy Postgres Exporter sidecar container ExporterCPULimit string // ExporterCPURequest, if specified, is the value of how much CPU should be // requested for a Crunchy Postgres Exporter sidecar container. Defaults to // not being requested ExporterCPURequest string // ExporterMemoryLimit is the value of of the limit of how much RAM a // Crunchy Postgres Exporter sidecar container should use ExporterMemoryLimit string // ExporterMemoryRequest, if specified, is the value of how much RAM should // be requested for a Crunchy Postgres Exporter sidecar container. Defaults // to the server specified default ExporterMemoryRequest string // ExporterCPULimit, if specified, is the value of the max amount of CPU // to be utilized for a Crunchy Postgres Exporter sidecar container 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 BackrestConfig string BackrestS3Key string BackrestS3KeySecret string BackrestS3Bucket string BackrestS3Region string BackrestS3Endpoint string BackrestS3URIStyle string BackrestS3VerifyTLS UpdateBackrestS3VerifyTLS 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 // ReplicationTLSSecret is the name of the secret that contains the keypair // used for having instances in a PostgreSQL cluster authenticate each another // using certificate-based authentication. The CN of the certificate must // either be "primaryuser" (the current name of the replication user) OR // have a mapping to primaryuser in the pg_ident file. The // ReplicationTLSSecret must be verifable by the certificate chain in the // CASecret ReplicationTLSSecret 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 // PGDataSourceSpec defines the data source that should be used to populate the initial PGDATA // directory when bootstrapping a new PostgreSQL cluster PGDataSource crv1.PGDataSourceSpec // Annotations provide any custom annotations for a cluster Annotations crv1.ClusterAnnotations `json:"annotations"` }
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 ¶
CreateFailoverResponse ... swagger:model
type CreateNamespaceRequest ¶
CreateNamespaceRequest ... swagger:model
type CreateNamespaceResponse ¶
CreateNamespaceResponse ... swagger:model
type CreatePgAdminRequest ¶
type CreatePgAdminRequest struct { Args []string ClientVersion string Namespace string Selector string }
CreatePgAdminRequest ... swagger:model
type CreatePgAdminResponse ¶
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 ¶
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 ¶
CreateScheduleResponse ... swagger:model
type CreateUpgradeRequest ¶
type CreateUpgradeRequest struct { Args []string Selector string Namespace string ClientVersion string IgnoreValidation bool UpgradeCCPImageTag string }
CreateUpgradeRequest ... swagger:model
type CreateUpgradeResponse ¶
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 ¶
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 ¶
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 ¶
DeleteNamespaceResponse ... swagger:model
type DeletePgAdminRequest ¶
type DeletePgAdminRequest struct { Args []string Selector string Namespace string ClientVersion string Uninstall bool }
DeletePgAdminRequest ... swagger:model
type DeletePgAdminResponse ¶
DeletePgAdminResponse ... swagger:model
type DeletePgbouncerRequest ¶
type DeletePgbouncerRequest struct { Args []string Selector string Namespace string ClientVersion string Uninstall bool }
DeletePgbouncerRequest ... swagger:model
type DeletePgbouncerResponse ¶
DeletePgbouncerResponse ... swagger:model
type DeletePgoroleRequest ¶
type DeletePgoroleRequest struct { PgoroleName []string Namespace string AllFlag bool ClientVersion string }
DeletePgoroleRequest ... swagger:model
type DeletePgoroleResponse ¶
DeletePgoroleResponse ... swagger:model
type DeletePgouserRequest ¶
type DeletePgouserRequest struct { PgouserName []string Namespace string AllFlag bool ClientVersion string }
DeletePgouserRequest ... swagger:model
type DeletePgouserResponse ¶
DeletePgouserResponse ... swagger:model
type DeletePolicyRequest ¶
type DeletePolicyRequest struct { Selector string Namespace string AllFlag bool ClientVersion string PolicyName string }
DeletePolicyRequest ... swagger:model
type DeletePolicyResponse ¶
DeletePolicyResponse ... swagger:model
type DeleteScheduleRequest ¶
type DeleteScheduleRequest struct { Namespace string ScheduleName string ClusterName string Selector string }
DeleteScheduleResponse ... swagger:model
type DeleteScheduleResponse ¶
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 DfRequest ¶
DfRequest contains the parameters that can be used to get disk utilization for PostgreSQL clusters swagger:model
type DfResponse ¶
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 ¶
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 LabelRequest ¶
type LabelRequest struct { Selector string Namespace string Args []string LabelCmdLabel string DryRun bool DeleteLabel bool ClientVersion string }
LabelRequest ... swagger:model
type LabelResponse ¶
LabelResponse ... swagger:model
type NamespaceResult ¶
NamespaceResult ... 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 PgBackRestInfoBackupInfo ¶
type PgBackRestInfoBackupInfo struct { Delta int64 `json:"delta"` Repository PgBackRestInfoBackupInfoRepository `json:"repository"` Size int64 `json:"size"` }
type PgBackRestInfoDB ¶
type PgBackRestInfoStatus ¶
type PgRestoreRequest ¶
type PgRestoreRequest struct { Namespace string FromCluster string FromPVC string PGDumpDB string RestoreOpts string PITRTarget string NodeLabel string }
PgRestoreRequest ... swagger:model
type PgRestoreResponse ¶
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 ¶
PgroleInfo ... swagger:model
type PgouserInfo ¶
PgouserInfo ... swagger:model
type QueryFailoverRequest ¶
QueryFailoverRequest ... swagger:model
type QueryFailoverResponse ¶
type QueryFailoverResponse struct { Results []FailoverTargetSpec Status Standby bool }
QueryFailoverResponse ... swagger:model
type QueryRestartRequest ¶
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 ¶
ReloadRequest ... swagger:model
type ReloadResponse ¶
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 RestoreOpts string PITRTarget string NodeLabel string BackrestStorageType string }
RestoreRequest ... swagger:model
type RestoreResponse ¶
RestoreResponse ... swagger:model
type ScaleDownResponse ¶
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 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 PVC []ShowClusterPodPVC ReadyStatus string Ready bool Primary bool Type string }
ShowClusterPod
swagger:model
type ShowClusterPodPVC ¶
type ShowClusterPodPVC struct { // Capacity is the total storage capacity available. This comes from a // Kubernetes resource Quantity string Capacity string // Name is the name of the PVC Name string }
ShowClusterPodPVC contains information about a PVC that is bound to a Pod
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 ClusterPorts []string ExternalIP string ClusterName string Pgbouncer bool BackrestRepo bool }
ShowClusterService
swagger:model
type ShowConfigResponse ¶
ShowConfigResponse ... swagger:model
type ShowNamespaceRequest ¶
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 ¶
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 ¶
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 ¶
ShowWorkflowDetail ... swagger:model
type ShowWorkflowResponse ¶
type ShowWorkflowResponse struct { Results ShowWorkflowDetail Status }
ShowWorkflowResponse ... swagger:model
type ShowpgDumpDetail ¶
ShowpgDumpDetail swagger:model
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 UpdateBackrestS3VerifyTLS ¶
type UpdateBackrestS3VerifyTLS int
UpdateBackrestS3VerifyTLS defines the types for updating the S3 TLS verification configuration
const ( UpdateBackrestS3VerifyTLSDoNothing UpdateBackrestS3VerifyTLS = iota UpdateBackrestS3VerifyTLSEnable UpdateBackrestS3VerifyTLSDisable )
set the different values around updating the S3 TLS verification configuration
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 // Annotations provide any custom annotations for a cluster Annotations crv1.ClusterAnnotations `json:"annotations"` 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 // ExporterCPULimit, if specified, is the value of the max amount of CPU // to be utilized for a Crunchy Postgres Exporter instance ExporterCPULimit string // ExporterCPURequest, if specified, is the value of how much CPU should be // requested the Crunchy Postgres Exporter. Defaults to not being requested ExporterCPURequest string // ExporterMemoryLimit, if specified is the max amount of memory a Crunchy // Postgres Exporter instance should use ExporterMemoryLimit string // ExporterMemoryRequest, if specified, is the value of how much RAM should // be requested for the Crunchy Postgres Exporter instance. ExporterMemoryRequest 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 ¶
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 ¶
UpdateNamespaceRequest ... swagger:model
type UpdateNamespaceResponse ¶
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 ¶
VersionResponse ... swagger:model
type WatchRequest ¶
WatchRequest ... swagger:model
type WatchResponse ¶
WatchResponse ... swagger:model
Source Files ¶
- backrestmsgs.go
- catmsgs.go
- clonemsgs.go
- clustermsgs.go
- common.go
- configmsgs.go
- dfmsgs.go
- failovermsgs.go
- labelmsgs.go
- namespacemsgs.go
- pgadminmsgs.go
- pgbouncermsgs.go
- pgdumpmsgs.go
- pgorolemsgs.go
- pgousermsgs.go
- policymsgs.go
- pvcmsgs.go
- reloadmsgs.go
- restartmsgs.go
- schedulemsgs.go
- statusmsgs.go
- upgrademsgs.go
- usermsgs.go
- versionmsgs.go
- watchmsgs.go
- workflowmsgs.go