diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index e2d9e0b9c1f8642f077e1d5139375a44d28ee686..eca88b9b059252c218980123b147d5bd137ec915 100644 --- a/devops/gc/deploy/README.md +++ b/devops/gc/deploy/README.md @@ -31,6 +31,7 @@ First you need to set variables in **values.yaml** file using any code editor. S |------|-------------|------|---------|---------| **global.domain** | your domain for the external endpoint, ex `example.com` | string | - | yes **global.onPremEnabled** | whether on-prem is enabled | boolean | false | yes +**global.limitsEnabled** | whether CPU and memory limits are enabled | boolean | true | yes ### Configmap variables @@ -52,8 +53,8 @@ First you need to set variables in **values.yaml** file using any code editor. S |------|-------------|------|---------|---------| **data.requestsCpu** | amount of requested CPU | string | 35m | yes **data.requestsMemory** | amount of requested memory| string | 640Mi | yes -**data.limitsCpu** | CPU limit | string | 1 | yes -**data.limitsMemory** | memory limit | string | 1G | yes +**data.limitsCpu** | CPU limit | string | 1 | only if `global.limitsEnabled` is true +**data.limitsMemory** | memory limit | string | 1G | only if `global.limitsEnabled` is true **data.image** | service image | string | - | yes **data.imagePullPolicy** | when to pull image | string | IfNotPresent | yes **data.serviceAccountName** | name of your service account | string | indexer | yes diff --git a/devops/gc/deploy/templates/deployment.yaml b/devops/gc/deploy/templates/deployment.yaml index e42da5931b5959ba4850e0ecdb5d0e82b54aa7c2..fcb3a7d59749cd54ca83b5876f603ee323dd5dc3 100644 --- a/devops/gc/deploy/templates/deployment.yaml +++ b/devops/gc/deploy/templates/deployment.yaml @@ -56,7 +56,9 @@ spec: requests: cpu: {{ .Values.data.requestsCpu | quote }} memory: {{ .Values.data.requestsMemory | quote }} + {{- if .Values.global.limitsEnabled }} limits: cpu: {{ .Values.data.limitsCpu | quote }} memory: {{ .Values.data.limitsMemory | quote }} + {{- end }} serviceAccountName: {{ .Values.data.serviceAccountName | quote }} diff --git a/devops/gc/deploy/values.yaml b/devops/gc/deploy/values.yaml index ba923d9733dd6f257aef2bfe4f5522b6fd27caf0..96f0648927b09fdf48f165b4ce272180f4882862 100644 --- a/devops/gc/deploy/values.yaml +++ b/devops/gc/deploy/values.yaml @@ -5,6 +5,7 @@ global: domain: "" onPremEnabled: false + limitsEnabled: true data: # Configmap