fixes
This commit is contained in:
parent
b2171beb67
commit
f0472fd443
|
|
@ -147,7 +147,7 @@ configKubernetes:
|
|||
pod_terminate_grace_period: 5m
|
||||
# template for database user secrets generated by the operator,
|
||||
# here username contains the namespace in the format namespace.username
|
||||
# if the user is in different namespace than cluster
|
||||
# if the secret is in different namespace than cluster
|
||||
secret_name_template: "{username}.{cluster}.credentials.{tprkind}.{tprgroup}"
|
||||
# set user and group for the spilo container (required to run Spilo as non-root process)
|
||||
# spilo_runasuser: "101"
|
||||
|
|
|
|||
|
|
@ -362,6 +362,17 @@ class K8sBase:
|
|||
|
||||
time.sleep(self.RETRY_TIMEOUT_SEC)
|
||||
|
||||
def wait_for_namespace_creation(self, namespace='default'):
|
||||
ns_found = False
|
||||
while ns_found != True:
|
||||
ns = self.api.core_v1.list_namespaces()
|
||||
for n in ns:
|
||||
if n == "appspace":
|
||||
ns_found = True
|
||||
break
|
||||
|
||||
time.sleep(self.RETRY_TIMEOUT_SEC)
|
||||
|
||||
def get_service_type(self, svc_labels, namespace='default'):
|
||||
svc_type = ''
|
||||
svcs = self.api.core_v1.list_namespaced_service(namespace, label_selector=svc_labels, limit=1).items
|
||||
|
|
|
|||
|
|
@ -594,11 +594,8 @@ class EndToEndTestCase(unittest.TestCase):
|
|||
app_namespace = "appspace"
|
||||
k8s = self.k8s
|
||||
v1_appnamespace = client.V1Namespace(metadata=client.V1ObjectMeta(name=app_namespace))
|
||||
try:
|
||||
k8s.api.core_v1.create_namespace(v1_appnamespace)
|
||||
except timeout_decorator.TimeoutError:
|
||||
print('Operator log: {}'.format(k8s.get_operator_log()))
|
||||
raise
|
||||
k8s.api.core_v1.create_namespace(v1_appnamespace)
|
||||
k8s.wait_for_namespace_creation(app_namespace)
|
||||
|
||||
k8s.api.custom_objects_api.patch_namespaced_custom_object(
|
||||
'acid.zalan.do', 'v1', 'default',
|
||||
|
|
|
|||
Loading…
Reference in New Issue