From ed8ff0d6fa9a6b6223c085c52f5215e8de46c667 Mon Sep 17 00:00:00 2001 From: "Kabanov, Dmitrii" Date: Thu, 25 Jul 2019 17:23:14 -0700 Subject: [PATCH] Ceph-RGW: fix helm test The PS allows to run the tests when both options (rgw_ks and rgw_s3) are enabled at the same time. Change-Id: I262baa38b7c65ff9335a3db6a6e2a454c3ff3f5f --- ceph-rgw/templates/bin/_helm-tests.sh.tpl | 4 ++-- ceph-rgw/templates/pod-helm-tests.yaml | 4 ++++ ceph-rgw/values.yaml | 14 +++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ceph-rgw/templates/bin/_helm-tests.sh.tpl b/ceph-rgw/templates/bin/_helm-tests.sh.tpl index d0d1d9bac..3fa0c97a0 100644 --- a/ceph-rgw/templates/bin/_helm-tests.sh.tpl +++ b/ceph-rgw/templates/bin/_helm-tests.sh.tpl @@ -144,13 +144,13 @@ function rgw_s3_bucket_validation () fi } -if [ {{ .Values.conf.rgw_ks.enabled }} == true ]; +if [ "$RGW_TEST_TYPE" == RGW_KS ]; then echo "--> Keystone is enabled. Calling function to test keystone based auth " rgw_keystone_bucket_validation fi -if [ {{ .Values.conf.rgw_s3.enabled }} == true ]; +if [ "$RGW_TEST_TYPE" == RGW_S3 ]; then echo "--> S3 is enabled. Calling function to test S3 based auth " rgw_s3_bucket_validation diff --git a/ceph-rgw/templates/pod-helm-tests.yaml b/ceph-rgw/templates/pod-helm-tests.yaml index 768d2c4d0..5d0eba81c 100644 --- a/ceph-rgw/templates/pod-helm-tests.yaml +++ b/ceph-rgw/templates/pod-helm-tests.yaml @@ -52,6 +52,8 @@ spec: name: {{ $.Values.secrets.identity.user_rgw }} key: OS_TENANT_NAME {{- end }} + - name: "RGW_TEST_TYPE" + value: "RGW_KS" command: - /tmp/helm-tests.sh volumeMounts: @@ -82,6 +84,8 @@ spec: {{- end }} - name: RGW_HOST value: {{ tuple "ceph_object_store" "internal" "api" $envAll | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }} + - name: "RGW_TEST_TYPE" + value: "RGW_S3" command: - /tmp/helm-tests.sh volumeMounts: diff --git a/ceph-rgw/values.yaml b/ceph-rgw/values.yaml index 9c8c99e2d..819724c71 100644 --- a/ceph-rgw/values.yaml +++ b/ceph-rgw/values.yaml @@ -148,13 +148,13 @@ pod: limits: memory: "1024Mi" cpu: "2000m" - tests: - requests: - memory: "128Mi" - cpu: "100m" - limits: - memory: "1024Mi" - cpu: "2000m" + tests: + requests: + memory: "128Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" network_policy: ceph: