From d49b10bde62008e8da7e75ebb19b8e5fb7c945ac Mon Sep 17 00:00:00 2001 From: Andrei Kurilov <18027129+akurilov@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:07:38 +0300 Subject: [PATCH] fix: priority and resources --- Dockerfile | 2 +- helm/webapp/templates/deployment.yaml | 1 + helm/webapp/values.yaml | 17 ++++++++++------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0af287..48f8460 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,6 @@ RUN \ npm install -D tailwindcss && \ npx tailwindcss -i ./tailwind.input.css -o ./web/tailwind.output.css -FROM nginx:1.27.0-alpine3.19 +FROM nginx:1.27.1-alpine3.20 COPY --from=builder /tmp/web /usr/share/nginx/html EXPOSE 80 diff --git a/helm/webapp/templates/deployment.yaml b/helm/webapp/templates/deployment.yaml index b9c4cc6..6833f2f 100644 --- a/helm/webapp/templates/deployment.yaml +++ b/helm/webapp/templates/deployment.yaml @@ -27,6 +27,7 @@ spec: serviceAccountName: {{ include "webapp.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + priorityClassName: "{{ .Values.priority.class }}" containers: - name: {{ .Chart.Name }} env: diff --git a/helm/webapp/values.yaml b/helm/webapp/values.yaml index 56ab40c..e6c5f5c 100644 --- a/helm/webapp/values.yaml +++ b/helm/webapp/values.yaml @@ -53,18 +53,21 @@ ingress: resources: requests: - cpu: 10m - memory: 128Mi + cpu: 1m + memory: 16Mi limits: - cpu: 1000m - memory: 256Mi + cpu: 100m + memory: 64Mi autoscaling: enabled: true minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationValue: 1000m - targetMemoryUtilizationValue: 128Mi + maxReplicas: 10 + targetCPUUtilizationValue: 100m + targetMemoryUtilizationValue: 64Mi + +priority: + class: "awk-critical" nodeSelector: {}