Configure Resources Limits

This commit is contained in:
2023-10-10 02:10:54 -03:00
parent 48f754f470
commit 7c95983a36
7 changed files with 43 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ function main() {
minikube kubectl -- $@ minikube kubectl -- $@
} }
minikube start --driver kvm2 minikube start --driver kvm2 --cpus 6 --memory 6Gib
minikube addons enable ingress-dns minikube addons enable ingress-dns
minikube addons enable ingress minikube addons enable ingress

View File

@@ -17,6 +17,13 @@ spec:
- name: backend - name: backend
image: yoshiunfriendly/backend-hideyoshi.com image: yoshiunfriendly/backend-hideyoshi.com
imagePullPolicy: Always imagePullPolicy: Always
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "750m"
ports: ports:
- containerPort: 8070 - containerPort: 8070
env: env:

View File

@@ -19,6 +19,13 @@ spec:
- name: frontend - name: frontend
image: yoshiunfriendly/frontend-hideyoshi.com:latest image: yoshiunfriendly/frontend-hideyoshi.com:latest
imagePullPolicy: "Always" imagePullPolicy: "Always"
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "1536Mi"
cpu: "750m"
ports: ports:
- containerPort: 5000 - containerPort: 5000
env: env:

View File

@@ -17,6 +17,13 @@ spec:
- name: postgres - name: postgres
image: postgres:14-bullseye image: postgres:14-bullseye
imagePullPolicy: "IfNotPresent" imagePullPolicy: "IfNotPresent"
resources:
requests:
memory: "512Mi"
cpu: "500m"
limits:
memory: "512Mi"
cpu: "500m"
ports: ports:
- containerPort: 5432 - containerPort: 5432
env: env:

View File

@@ -17,6 +17,13 @@ spec:
- name: redis - name: redis
image: bitnami/redis image: bitnami/redis
imagePullPolicy: "IfNotPresent" imagePullPolicy: "IfNotPresent"
resources:
requests:
memory: "1024Mi"
cpu: "250m"
limits:
memory: "1024Mi"
cpu: "500m"
ports: ports:
- containerPort: 6379 - containerPort: 6379
env: env:

View File

@@ -19,6 +19,13 @@ spec:
command: [ "./run-queue.sh" ] command: [ "./run-queue.sh" ]
args: [ "-q" ] args: [ "-q" ]
imagePullPolicy: "Always" imagePullPolicy: "Always"
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "1024Mi"
cpu: "500m"
env: env:
- name: REDIS_BASE_URL - name: REDIS_BASE_URL
valueFrom: valueFrom:

View File

@@ -17,6 +17,13 @@ spec:
- name: storage - name: storage
image: yoshiunfriendly/storage-hideyoshi.com:latest image: yoshiunfriendly/storage-hideyoshi.com:latest
imagePullPolicy: "Always" imagePullPolicy: "Always"
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
ports: ports:
- containerPort: 8000 - containerPort: 8000
env: env: