Skip to content

Commit

Permalink
fix: resource allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp authored Dec 24, 2024
1 parent a8dc09a commit 336861e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost/:3000/api || exit 1
USER nonroot

# Start up command with 50MB of heap size, each application needs to determine what is the best value. DONT use default as it is 4GB.
CMD ["--max-old-space-size=50", "/app/dist/main"]
# Start up command with 200MB of heap size, each application needs to determine what is the best value. DONT use default as it is 4GB.
CMD ["--max-old-space-size=200", "/app/dist/main"]
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
periodSeconds: 30
timeoutSeconds: 5
resources:
{{- toYaml .Values.backend.containerResources | nindent 12 }}
{{- toYaml .Values.frontend.containerResources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /data
Expand Down
16 changes: 5 additions & 11 deletions charts/nr-epd-organics-info/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,10 @@ backend:
#-- the deployment strategy, can be "Recreate" or "RollingUpdate"
deploymentStrategy: Recreate
imagePullPolicy: Always
#-- autoscaling for the component. it is optional and is an object.
initContainerResources:
requests:
cpu: 30m
memory: 100Mi
containerResources:
requests:
cpu: 30m
memory: 100Mi
memory: 300Mi
autoscaling:
#-- enable or disable autoscaling.
enabled: true
Expand Down Expand Up @@ -71,10 +66,6 @@ frontend:
# -- the deployment strategy, can be "Recreate" or "RollingUpdate"
deploymentStrategy: Recreate
imagePullPolicy: Always
containerResources:
requests:
cpu: 50m
memory: 30Mi
#-- autoscaling for the component. it is optional and is an object.
autoscaling:
#-- enable or disable autoscaling.
Expand All @@ -92,7 +83,10 @@ frontend:
pdb:
enabled: false # enable it in PRODUCTION for having pod disruption budget.
minAvailable: 1 # the minimum number of pods that must be available during the disruption budget.

containerResources:
requests:
cpu: 50m
memory: 100Mi
env:
osmGrayscaleFlag: "false"
zoomToResultsControlFlag: "true"
Expand Down

0 comments on commit 336861e

Please sign in to comment.