Skip to content

Commit

Permalink
chore: add limits and requests to pods
Browse files Browse the repository at this point in the history
Signed-off-by: SdgJlbl <[email protected]>
  • Loading branch information
SdgJlbl committed Mar 29, 2024
1 parent 9631376 commit 8d277d6
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 1 deletion.
6 changes: 6 additions & 0 deletions charts/substra-backend/templates/deployment-api-events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ spec:
- name: api-event-app
image: {{ include "substra-backend.images.name" (dict "img" .Values.api.events.image "defaultTag" $.Chart.AppVersion) }}
imagePullPolicy: {{ .Values.api.events.image.pullPolicy }}
resources:
requests:
memory: "200Mi"
cpu: "500m"
limits:
memory: "400Mi"
command: ["/bin/bash"]
{{- if eq .Values.settings "prod" }}
args: ["-c", "python manage.py consume"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ spec:
initContainers:
- name: wait-registry
image: jwilder/dockerize:0.6.1
resources:
requests:
memory: "200Mi"
cpu: "500m"
limits:
memory: "400Mi"
command: ['dockerize', '-wait', 'tcp://{{ $.Release.Name }}-docker-registry:5000']
- name: kaniko
image: {{ include "common.images.name" $.Values.kaniko.image }}
resources:
requests:
memory: "2Gi"
cpu: "1000m"
limits:
memory: "4Gi"
args:
- "--context=/docker-context"
{{- if .dstImage }}
Expand All @@ -48,6 +60,13 @@ spec:
containers:
- image: gcr.io/google-containers/pause:3.2
name: pause
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
volumes:
- name: kaniko-dir
emptyDir: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ spec:
- name: worker-event-app
image: {{ include "substra-backend.images.name" (dict "img" .Values.worker.events.image "defaultTag" $.Chart.AppVersion) }}
imagePullPolicy: {{ .Values.worker.events.image.pullPolicy }}
resources:
requests:
memory: "200Mi"
cpu: "500m"
limits:
memory: "400Mi"
command: ["/bin/bash"]
{{- if eq .Values.settings "prod" }}
args: ["-c", "python manage.py consume"]
Expand Down
46 changes: 45 additions & 1 deletion charts/substra-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,15 @@ server:
## cpu: 100m
## memory: 128Mi
##
resources: {}
resources: {
requests: {
cpu: "1000m",
memory: "4Gi"
},
limits: {
memory: "32Gi"
}
}

persistence:
## @param server.persistence.storageClass Specify the _StorageClass_ used to provision the volume. Or the default _StorageClass_ will be used. Set it to `-` to disable dynamic provisioning
Expand Down Expand Up @@ -828,6 +836,15 @@ postgresql:
capabilities:
drop:
- ALL
resources: {
requests: {
cpu: "1000m",
memory: "200Mi"
},
limits: {
memory: "64Gi"
}
}

## @skip redis
##
Expand All @@ -849,6 +866,15 @@ redis:
appendonly yes
# Disable RDB persistence since AOF persistence is enabled
save ""
resources: {
requests: {
cpu: "1000m",
memory: "512Mi"
},
limits: {
memory: "1024Mi"
}
}

## @skip docker-registry
##
Expand All @@ -861,6 +887,15 @@ docker-registry:
deleteEnabled: true
service:
type: NodePort
resources: {
requests: {
cpu: "1000m",
memory: "16Gi"
},
limits: {
memory: "64Gi"
}
}

## @skip minio
##
Expand All @@ -881,6 +916,15 @@ minio:
capabilities:
drop:
- ALL
resources: {
requests: {
cpu: "1000m",
memory: "16Gi"
},
limits: {
memory: "64Gi"
}
}

## @skip localstack
##
Expand Down

0 comments on commit 8d277d6

Please sign in to comment.