From efb6731ca61aa2255f0204bbc09f09de69c07bf6 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Fri, 31 Jan 2020 15:33:36 +0100 Subject: [PATCH] minor fixes --- charts/postgres-operator/values-crd.yaml | 4 ++-- charts/postgres-operator/values.yaml | 4 ++-- e2e/tests/test_e2e.py | 11 +++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/charts/postgres-operator/values-crd.yaml b/charts/postgres-operator/values-crd.yaml index ece0aabd1..61cab3d06 100644 --- a/charts/postgres-operator/values-crd.yaml +++ b/charts/postgres-operator/values-crd.yaml @@ -281,8 +281,8 @@ resources: cpu: 500m memory: 500Mi requests: - cpu: 100m - memory: 250Mi + cpu: 100m + memory: 250Mi # Affinity for pod assignment # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index e542c74b1..deb506329 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -257,8 +257,8 @@ resources: cpu: 500m memory: 500Mi requests: - cpu: 100m - memory: 250Mi + cpu: 100m + memory: 250Mi # Affinity for pod assignment # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity diff --git a/e2e/tests/test_e2e.py b/e2e/tests/test_e2e.py index 227c32e93..993cbd643 100644 --- a/e2e/tests/test_e2e.py +++ b/e2e/tests/test_e2e.py @@ -87,7 +87,7 @@ class EndToEndTestCase(unittest.TestCase): "memory": "50Mi" }, "limits": { - "cpu": "80m", + "cpu": "200m", "memory": "200Mi" } } @@ -97,17 +97,17 @@ class EndToEndTestCase(unittest.TestCase): "acid.zalan.do", "v1", "default", "postgresqls", "acid-minimal-cluster", pg_patch_resources) k8s.wait_for_master_failover(failover_targets) - pods = self.api.core_v1.list_namespaced_pod( + pods = k8s.api.core_v1.list_namespaced_pod( 'default', label_selector='spilo-role=master,' + cluster_label).items self.assert_master_is_unique() masterPod = pods[0] self.assertEqual(masterPod.spec.resources.limits.cpu, minCPULimit, "Expected CPU limit {}, found {}" - .format(minCPULimit, masterPod.spec.resources.limits.cpu)) - self.assertEqual(masterPod.spec.resources.limits.memory, "250Mi", + .format(minCPULimit, masterPod.spec.containers[0].resources.limits.cpu)) + self.assertEqual(masterPod.spec.resources.limits.memory, minMemoryLimit, "Expected memory limit {}, found {}" - .format(minMemoryLimit, masterPod.spec.resources.limits.memory)) + .format(minMemoryLimit, masterPod.spec.containers[0].resources.limits.memory)) @timeout_decorator.timeout(TEST_TIMEOUT_SEC) def test_multi_namespace_support(self): @@ -130,7 +130,6 @@ class EndToEndTestCase(unittest.TestCase): ''' Scale up from 2 to 3 and back to 2 pods by updating the Postgres manifest at runtime. ''' - k8s = self.k8s labels = "version=acid-minimal-cluster"