From 44ef884ac461ef1cfac51e61de9b4ebdd4bfa98b Mon Sep 17 00:00:00 2001 From: Yuxiang Zhu Date: Jul 26 2018 07:34:00 +0000 Subject: Add parameter for custom registry/repo to the test template This template will be used in the pipeline so that an intermediate image can be used for test environment setup. The default value is still pointing to the official registry. Also add CPU and memory limits for the created pods, otherwise we are easily to hit the current UpShift quota. --- diff --git a/openshift/waiverdb-test-template.yaml b/openshift/waiverdb-test-template.yaml index f54ce40..e67a815 100644 --- a/openshift/waiverdb-test-template.yaml +++ b/openshift/waiverdb-test-template.yaml @@ -22,6 +22,10 @@ parameters: displayName: WaiverDB application version description: Python version of the WaiverDB application being tested required: true +- name: WAIVERDB_APP_IMAGE_REPO + displayName: The registry/repo of WaiverDB application being tested + required: true + value: docker-registry.engineering.redhat.com/factory2/waiverdb - name: FLASK_SECRET_KEY displayName: Flask secret key generate: expression @@ -142,6 +146,10 @@ objects: key: database-password - name: POSTGRESQL_DATABASE value: waiverdb + resources: + limits: + memory: 200Mi + cpu: 100m triggers: - type: ConfigChange - apiVersion: v1 @@ -213,7 +221,7 @@ objects: spec: containers: - name: web - image: "docker-registry.engineering.redhat.com/factory2/waiverdb:${WAIVERDB_APP_VERSION}" + image: "${WAIVERDB_APP_IMAGE_REPO}:${WAIVERDB_APP_VERSION}" ports: - containerPort: 8080 volumeMounts: @@ -252,6 +260,7 @@ objects: resources: limits: memory: 384Mi + cpu: 100m volumes: - name: config-volume configMap: