mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-09 18:56:06 +02:00
standby cluster that streams from a remote primary (#1830)
* add the possibility to create a standby cluster that streams from a remote primary * extending unit tests * add more docs and e2e test Co-authored-by: machine424 <ayoubmrini424@gmail.com>
This commit is contained in:
co-authored by
machine424
parent
2dfb11ad4c
commit
0dc370f15d
@@ -321,9 +321,15 @@ class K8s:
|
||||
def get_cluster_replica_pod(self, labels='application=spilo,cluster-name=acid-minimal-cluster', namespace='default'):
|
||||
return self.get_cluster_pod('replica', labels, namespace)
|
||||
|
||||
def get_secret_data(self, username, clustername='acid-minimal-cluster', namespace='default'):
|
||||
return self.api.core_v1.read_namespaced_secret(
|
||||
"{}.{}.credentials.postgresql.acid.zalan.do".format(username.replace("_","-"), clustername), namespace).data
|
||||
def get_secret(self, username, clustername='acid-minimal-cluster', namespace='default'):
|
||||
secret = self.api.core_v1.read_namespaced_secret(
|
||||
"{}.{}.credentials.postgresql.acid.zalan.do".format(username.replace("_","-"), clustername), namespace)
|
||||
secret.metadata.resource_version = None
|
||||
secret.metadata.uid = None
|
||||
return secret
|
||||
|
||||
def create_secret(self, secret, namespace='default'):
|
||||
return self.api.core_v1.create_namespaced_secret(namespace, secret)
|
||||
|
||||
class K8sBase:
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user