diff --git a/openshift/scripts/oc_deploy_to_production.sh b/openshift/scripts/oc_deploy_to_production.sh index f04d5f697..4b1427b3f 100755 --- a/openshift/scripts/oc_deploy_to_production.sh +++ b/openshift/scripts/oc_deploy_to_production.sh @@ -34,7 +34,7 @@ MODULE_NAME=web bash $(dirname ${0})/oc_promote.sh ${SUFFIX} ${RUN_TYPE} # Using pmtiles now, TODO: remove once pmtiles is satisfactory in prod over sometime # MODULE_NAME=tileserv bash $(dirname ${0})/oc_promote.sh ${SUFFIX} ${RUN_TYPE} echo Provision database -PROJ_TARGET=${PROJ_TARGET} BUCKET=lwzrin DATA_SIZE=45Gi WAL_SIZE=15Gi bash $(dirname ${0})/oc_provision_crunchy.sh prod ${RUN_TYPE} +PROJ_TARGET=${PROJ_TARGET} BUCKET=lwzrin CPU_REQUEST=75m CPU_LIMIT=2000m MEMORY_REQUEST=2Gi MEMORY_LIMIT=16Gi DATA_SIZE=45Gi WAL_SIZE=15Gi bash $(dirname ${0})/oc_provision_crunchy.sh prod ${RUN_TYPE} CPU_REQUEST=75m CPU_LIMIT=2000m MEMORY_REQUEST=2Gi MEMORY_LIMIT=16Gi PVC_SIZE=45Gi PROJ_TARGET=${PROJ_TARGET} bash $(dirname ${0})/oc_provision_db.sh prod ${RUN_TYPE} # Using pmtiles now, TODO: remove once pmtiles is satisfactory in prod over sometime # echo Provision tileserv diff --git a/openshift/templates/crunchy.yaml b/openshift/templates/crunchy.yaml index f329e45a9..27ea5c76b 100644 --- a/openshift/templates/crunchy.yaml +++ b/openshift/templates/crunchy.yaml @@ -30,6 +30,23 @@ parameters: - name: WAL_SIZE description: WAL PVC size required: true + - name: CPU_REQUEST + description: | + Starting amount of CPU the container can use. + displayName: CPU REQUEST + value: "50m" + - name: CPU_LIMIT + description: Maximum amount of CPU the container can use. + displayName: CPU Limit + value: "250m" + - name: MEMORY_REQUEST + description: Starting amount of memory the container can use. + displayName: Memory Request + value: 256Mi + - name: MEMORY_LIMIT + description: Maximum amount of memory the container can use. + displayName: Memory Limit + value: 1Gi - name: SUFFIX description: Deployment suffix, e.g. pr-### required: true @@ -71,7 +88,13 @@ objects: postgresVersion: 14 instances: - name: crunchy - replicas: 3 + replicas: 1 + requests: + cpu: ${CPU_REQUEST} + memory: ${MEMORY_REQUEST} + limits: + cpu: ${CPU_LIMIT} + memory: ${MEMORY_LIMIT} dataVolumeClaimSpec: accessModes: - "ReadWriteOnce"