Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

kandra: Allow PostgreSQL primary ssh access for PostgreSQL upgrade.

Alex Vandiver1b9a8dbc52f2
diff --git a/puppet/kandra/manifests/profile/postgresql.pp b/puppet/kandra/manifests/profile/postgresql.pp
index f1ef073250d..93e6d6ff72b 100644
--- a/puppet/kandra/manifests/profile/postgresql.pp
+++ b/puppet/kandra/manifests/profile/postgresql.pp
@@ -53,6 +53,13 @@ class kandra::profile::postgresql inherits kandra::profile::base {
before => File["${zulip::postgresql_base::postgresql_datadir}/standby.signal"],
notify => Exec[$zulip::postgresql_base::postgresql_restart],
}
+ Kandra::User_Dotfiles['root'] {
+ authorized_keys => ['common', 'postgres-upgrade'],
+ }
+ } else {
+ Kandra::User_Dotfiles['root'] {
+ keys => ['internal-read-only-deploy-key', 'postgres-upgrade'],
+ }
}
file { "${zulip::postgresql_base::postgresql_confdir}/pg_hba.conf":
diff --git a/puppet/kandra/manifests/profile/prod_app_frontend.pp b/puppet/kandra/manifests/profile/prod_app_frontend.pp
index 8b678f6dbda..d9b8a03e527 100644
--- a/puppet/kandra/manifests/profile/prod_app_frontend.pp
+++ b/puppet/kandra/manifests/profile/prod_app_frontend.pp
@@ -6,7 +6,8 @@ class kandra::profile::prod_app_frontend inherits kandra::profile::base {
keys => 'internal-limited-write-deploy-key',
}
Kandra::User_Dotfiles['zulip'] {
- keys => 'internal-limited-write-deploy-key',
+ keys => 'internal-limited-write-deploy-key',
+ authorized_keys => ['common', 'postgres-upgrade-only-supervisor'],
}
zulip::sysctl { 'conntrack':
diff --git a/puppet/kandra/manifests/profile/staging_app_frontend.pp b/puppet/kandra/manifests/profile/staging_app_frontend.pp
index 4ceebea7847..753eb5a8bfc 100644
--- a/puppet/kandra/manifests/profile/staging_app_frontend.pp
+++ b/puppet/kandra/manifests/profile/staging_app_frontend.pp
@@ -2,6 +2,10 @@ class kandra::profile::staging_app_frontend inherits kandra::profile::base {
include kandra::app_frontend
+ Kandra::User_Dotfiles['zulip'] {
+ authorized_keys => ['common', 'postgres-upgrade-only-supervisor'],
+ }
+
file { '/etc/nginx/sites-available/zulip-staging':
ensure => file,
require => Package['nginx-full'],