From b8f41db0688f73cc27853dd23c9e43e1a4988972 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Fri, 27 Sep 2024 22:14:59 +0530 Subject: [PATCH 1/2] Allow specifying resource requests for pod components Ref https://github.com/2i2c-org/unnamed-thingity-thing/issues/78 --- helm-chart/templates/deployment.yaml | 6 ++++-- helm-chart/values.yaml | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/helm-chart/templates/deployment.yaml b/helm-chart/templates/deployment.yaml index c162ea2..330af1c 100644 --- a/helm-chart/templates/deployment.yaml +++ b/helm-chart/templates/deployment.yaml @@ -56,7 +56,7 @@ spec: mountPath: /opt/unnamed-thingity-thing/comptest/comptest.yaml subPath: comptest.yaml containers: - - name: run-app + - name: django image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} workingDir: /opt/unnamed-thingity-thing/comptest @@ -67,6 +67,7 @@ spec: - comptest.wsgi securityContext: runAsUser: 0 + resources: {{ toJson .Values.resources }} volumeMounts: - name: storage mountPath: /opt/state @@ -74,9 +75,10 @@ spec: mountPath: /opt/unnamed-thingity-thing/comptest/comptest.yaml subPath: comptest.yaml - name: nginx - image: nginx:1.27 + image: {{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }} securityContext: runAsUser: 0 + resources: {{ toJson .Values.nginx.resources }} volumeMounts: - name: storage mountPath: /opt/state diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 372f182..14268d5 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -51,3 +51,9 @@ yamlSettings: DATABASES.default.NAME: /opt/state/db.sqlite3 adminUsers: [] + +nginx: + image: + repository: nginx + tag: 1.27 + resources: {} \ No newline at end of file From a97a1d3a247fa10643259cbea96863afde5bc06d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:48:18 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- helm-chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 14268d5..d16b5fc 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -56,4 +56,4 @@ nginx: image: repository: nginx tag: 1.27 - resources: {} \ No newline at end of file + resources: {}