From 6af41dd8918f540a05e4f70b53260b78f2942f4f Mon Sep 17 00:00:00 2001 From: Dilip <116056239+dt-dilip@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:11:51 +0530 Subject: [PATCH] Added env variable for api --- charts/cdefense/templates/api/config.yaml | 5 ++++- charts/cdefense/templates/api/deployment.yaml | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/charts/cdefense/templates/api/config.yaml b/charts/cdefense/templates/api/config.yaml index 443c7fc..7486ac0 100644 --- a/charts/cdefense/templates/api/config.yaml +++ b/charts/cdefense/templates/api/config.yaml @@ -28,4 +28,7 @@ data: MAX_SCAN_PER_USER: "10" ONLINE_SCAN_POOL_SIZE: "20" CDEFENSE_BACKEND_URL: "http://newapi" - CLOUDDEFENSE_NEWAPI_BASE_URL: https://{{ .Values.hostname }}/ \ No newline at end of file + CLOUDDEFENSE_NEWAPI_BASE_URL: https://{{ .Values.hostname }}/ + K8_RESOURCES_REQUEST_MEMORY: "3Gi" + K8_RESOURCES_REQUEST_CPU: "2000m" + K8_RESOURCES_LIMIT_MEMORY: "4Gi" \ No newline at end of file diff --git a/charts/cdefense/templates/api/deployment.yaml b/charts/cdefense/templates/api/deployment.yaml index 688f678..caaedac 100644 --- a/charts/cdefense/templates/api/deployment.yaml +++ b/charts/cdefense/templates/api/deployment.yaml @@ -283,6 +283,21 @@ spec: configMapKeyRef: name: scan-server-config key: CDEFENSE_BACKEND_URL + - name: K8_RESOURCES_REQUEST_MEMORY + valueFrom: + configMapKeyRef: + name: scan-server-config + key: K8_RESOURCES_REQUEST_MEMORY + - name: K8_RESOURCES_REQUEST_CPU + valueFrom: + configMapKeyRef: + name: scan-server-config + key: K8_RESOURCES_REQUEST_CPU + - name: K8_RESOURCES_LIMIT_MEMORY + valueFrom: + configMapKeyRef: + name: scan-server-config + key: K8_RESOURCES_LIMIT_MEMORY ports: - containerPort: 8080 livenessProbe: