Skip to content

Commit

Permalink
test/e2e: use RGW for e2e testing
Browse files Browse the repository at this point in the history
Signed-off-by: Ryotaro Banno <[email protected]>
  • Loading branch information
ushitora-anqou committed Nov 21, 2024
1 parent ad25433 commit 3cfcb59
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ Dockerfile.cross

test/e2e/testdata/persistentvolumes.yaml
test/e2e/testdata/values-mantle-primary.yaml
test/e2e/testdata/values-mantle-secondary.yaml
include/
14 changes: 13 additions & 1 deletion charts/mantle/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,21 @@ spec:
{{- with .Values.controller.objectStorageBucketName }}
- --object-storage-bucket-name={{ . }}
{{- end }}
{{- with .Values.controller.objectStorageEndpoint}}
{{- with .Values.controller.objectStorageEndpoint }}
- --object-storage-endpoint={{ . }}
{{- end }}
{{- with .Values.controller.envSecret }}
- --env-secret={{ . }}
{{- end }}
{{- with .Values.controller.caCertConfigMap }}
- --ca-cert-configmap={{ . }}
{{- end }}
{{- with .Values.controller.caCertKey }}
- --ca-cert-key={{ . }}
{{- end }}
{{- with .Values.controller.exportDataStorageClass }}
- --export-data-storage-class={{ . }}
{{- end }}
env:
- name: POD_NAME
valueFrom:
Expand Down
7 changes: 7 additions & 0 deletions test/e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ test-multiple-k8s-clusters:
$(MAKE) install-rook-ceph-cluster1
$(MAKE) install-ceph-object-store
$(MAKE) install-mantle-cluster-wide
sed \
-e "s%{OBJECT_STORAGE_BUCKET_NAME}%$$(cat $(TMPDIR)/cm-export-data.json | jq -r .data.BUCKET_NAME)%" \
-e "s%{OBJECT_STORAGE_ENDPOINT}%http://$$(cat $(TMPDIR)/cm-export-data.json | jq -r .data.BUCKET_HOST)%" \
testdata/values-mantle-secondary-template.yaml \
> testdata/values-mantle-secondary.yaml
$(MAKE) install-mantle \
NAMESPACE=$(CEPH_CLUSTER1_NAMESPACE) \
HELM_RELEASE=mantle \
Expand All @@ -73,6 +78,8 @@ test-multiple-k8s-clusters:
$(MAKE) install-mantle-cluster-wide
sed \
-e "s%{ENDPOINT}%$$($(MINIKUBE) service list -p $(MINIKUBE_PROFILE_SECONDARY) -o json | jq -r '.[] | select(.Name == "mantle" and .Namespace == "rook-ceph") | .URLs | select(. | length > 0)[]' | head -1 | sed -r 's/^http:\/\///')%" \
-e "s%{OBJECT_STORAGE_BUCKET_NAME}%$$(cat $(TMPDIR)/cm-export-data.json | jq -r .data.BUCKET_NAME)%" \
-e "s%{OBJECT_STORAGE_ENDPOINT}%$$($(MINIKUBE) service list -p $(MINIKUBE_PROFILE_SECONDARY) -o json | jq -r '.[] | select(.Name == "rook-ceph-rgw-ceph-object-store-node-port" and .Namespace == "rook-ceph") | .URLs | select(. | length > 0)[]' | head -1)%" \
testdata/values-mantle-primary-template.yaml \
> testdata/values-mantle-primary.yaml
$(MAKE) install-mantle \
Expand Down
6 changes: 4 additions & 2 deletions test/e2e/testdata/values-mantle-primary-template.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
controller:
role: primary
mantleServiceEndpoint: {ENDPOINT}
objectStorageBucketName: dummy
objectStorageEndpoint: dummy
objectStorageBucketName: {OBJECT_STORAGE_BUCKET_NAME}
objectStorageEndpoint: {OBJECT_STORAGE_ENDPOINT}
envSecret: export-data
exportDataStorageClass: rook-ceph-block
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ controller:
mantleServiceEndpoint: ":58080"
ports:
- containerPort: 58080
objectStorageBucketName: dummy
objectStorageEndpoint: dummy
objectStorageBucketName: {OBJECT_STORAGE_BUCKET_NAME}
objectStorageEndpoint: {OBJECT_STORAGE_ENDPOINT}
envSecret: export-data

secondaryService:
type: NodePort
Expand Down

0 comments on commit 3cfcb59

Please sign in to comment.