Skip to content

Commit

Permalink
Resource Optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kamal-mohammed committed Mar 8, 2023
1 parent cf28981 commit eecc1ee
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.from.main.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ env:
APP_DOMAIN: ${{ secrets.APP_DOMAIN }}
TAG: "latest"
MIN_CPU: "50m"
MAX_CPU: "250m"
MAX_CPU: "400m"
MIN_MEM: "300Mi"
MAX_MEM: "1200Mi"
MAX_MEM: "1500Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
MAX_REPLICAS: "7"
BRANCH: "main"

on:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.from.release.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ env:
APP_DOMAIN: ${{ secrets.APP_DOMAIN }}
TAG: "latest"
MIN_CPU: "50m"
MAX_CPU: "250m"
MAX_CPU: "400m"
MIN_MEM: "300Mi"
MAX_MEM: "1200Mi"
MAX_MEM: "1500Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
MAX_REPLICAS: "7"
BRANCH: "grad-release"

on:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ env:
NAMESPACE: ${{ secrets.GRAD_NAMESPACE }}
TAG: "latest"
MIN_CPU: "50m"
MAX_CPU: "250m"
MAX_CPU: "400m"
MIN_MEM: "300Mi"
MAX_MEM: "1200Mi"
MAX_MEM: "1500Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
MAX_REPLICAS: "7"


on:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ env:
APP_DOMAIN: ${{ secrets.APP_DOMAIN }}
TAG: "latest"
MIN_CPU: "50m"
MAX_CPU: "250m"
MAX_CPU: "400m"
MIN_MEM: "300Mi"
MAX_MEM: "1200Mi"
MAX_MEM: "1500Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
MAX_REPLICAS: "7"


on:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ ARG DEPENDENCY=/workspace/app/target/dependency
COPY --from=build ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY --from=build ${DEPENDENCY}/META-INF /app/META-INF
COPY --from=build ${DEPENDENCY}/BOOT-INF/classes /app
ENTRYPOINT ["java","-Duser.name=EDUC_GRAD_REPORT_API","-Xms1G","-Xmx1G","-noverify","-XX:TieredStopAtLevel=1","-XX:+UseParallelGC","-XX:MinHeapFreeRatio=20","-XX:MaxHeapFreeRatio=40","-XX:GCTimeRatio=4","-XX:AdaptiveSizePolicyWeight=90","-XX:MaxMetaspaceSize=300m","-XX:ParallelGCThreads=1","-Djava.util.concurrent.ForkJoinPool.common.parallelism=1","-XX:CICompilerCount=2","-XX:+ExitOnOutOfMemoryError","-Djava.security.egd=file:/dev/./urandom","-Dspring.backgroundpreinitializer.ignore=true","-cp","app:app/lib/*","ca.bc.gov.educ.grad.report.api.ReportApiApplication"]
ENTRYPOINT ["java","-Duser.name=EDUC_GRAD_REPORT_API","-Xms1300m","-Xmx1300m","-noverify","-XX:TieredStopAtLevel=1","-XX:+UseParallelGC","-XX:MinHeapFreeRatio=20","-XX:MaxHeapFreeRatio=40","-XX:GCTimeRatio=4","-XX:AdaptiveSizePolicyWeight=90","-XX:MaxMetaspaceSize=300m","-XX:ParallelGCThreads=1","-Djava.util.concurrent.ForkJoinPool.common.parallelism=1","-XX:CICompilerCount=2","-XX:+ExitOnOutOfMemoryError","-Djava.security.egd=file:/dev/./urandom","-Dspring.backgroundpreinitializer.ignore=true","-cp","app:app/lib/*","ca.bc.gov.educ.grad.report.api.ReportApiApplication"]
6 changes: 6 additions & 0 deletions tools/openshift/api.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ objects:
target:
averageUtilization: 400
type: Utilization
- type: Resource
resource:
name: memory
target:
averageUtilization: 400
type: Utilization
parameters:
- name: REPO_NAME
description: Application repository name
Expand Down

0 comments on commit eecc1ee

Please sign in to comment.