Skip to content

Commit

Permalink
Add Pgpool hba and pcp file name Constant (#1377)
Browse files Browse the repository at this point in the history
Signed-off-by: Hiranmoy Das Chowdhury <[email protected]>
  • Loading branch information
HiranmoyChowdhury authored Jan 25, 2025
1 parent 2e16351 commit 85c4437
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apis/kubedb/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ const (
EnvSkipPasswdEncryption = "PGPOOL_SKIP_PASSWORD_ENCRYPTION"
PgpoolConfigSecretMountPath = "/config"
PgpoolConfigVolumeName = "pgpool-config"
PgpoolPcpConfigVolumeName = "pgpool-pcp-config"
PgpoolContainerName = "pgpool"
PgpoolDefaultServicePort = 9999
PgpoolMonitoringDefaultServicePort = 9719
Expand All @@ -649,6 +650,9 @@ const (
PgpoolDatabasePortName = "db"
PgpoolPcpPortName = "pcp"
PgpoolCustomConfigFile = "pgpool.conf"
PgpoolCustomHBAConfigFile = "pool_hba.conf"
PgpoolCustomPCPFile = "pcp.conf"
PGPOOL_INSTALL_DIR = "/opt/pgpool-II"
// ========================================== ZooKeeper Constants =================================================//

KubeDBZooKeeperRoleName = "kubedb:zookeeper-version-reader"
Expand Down
4 changes: 4 additions & 0 deletions apis/kubedb/v1alpha2/pgpool_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ func (p *Pgpool) GetAuthSecretName() string {
return meta_util.NameWithSuffix(p.OffshootName(), "auth")
}

func (p *Pgpool) GetPcpConfigSecretName() string {
return meta_util.NameWithSuffix(p.OffshootName(), "pcp-config")
}

func (p *Pgpool) SetHealthCheckerDefaults() {
if p.Spec.HealthChecker.PeriodSeconds == nil {
p.Spec.HealthChecker.PeriodSeconds = pointer.Int32P(10)
Expand Down
5 changes: 5 additions & 0 deletions apis/ops/v1alpha1/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,8 @@ const (
UpdatePgBouncerBackendSecret = "UpdateBackendSecret"
ConfigSecretDelete = "ConfigSecretDeleted"
)

// Pgpool Constants
const (
UpdateConfigSecret = "UpdateConfigSecret"
)

0 comments on commit 85c4437

Please sign in to comment.