diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index cee622b1dd737b2d301a931d0c7f0299f7091276..b24cc6e74011f6ed9b228cff61c7188a216300aa 100644 --- a/devops/gc/deploy/README.md +++ b/devops/gc/deploy/README.md @@ -32,6 +32,7 @@ You need to set variables in **values.yaml** file using any code editor. Some of |------|-------------|------|---------|---------| **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 @@ -55,8 +56,8 @@ You need to set variables in **values.yaml** file using any code editor. Some of |------|-------------|------|---------|----------| **data.requestsCpu** | amount of requested CPU | string | `20m` | yes **data.requestsMemory** | amount of requested memory| string | `550Mi` | 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.serviceAccountName** | name of your service account | string | `search` | yes **data.imagePullPolicy** | when to pull image | string | `IfNotPresent` | yes **data.image** | service image | string | - | yes diff --git a/devops/gc/deploy/templates/deployment.yaml b/devops/gc/deploy/templates/deployment.yaml index 012c91984629bf16c9f6730a8f9edb9eeb95f193..19099e3c38b789a3e5e17ff2792097c67ca3deb6 100644 --- a/devops/gc/deploy/templates/deployment.yaml +++ b/devops/gc/deploy/templates/deployment.yaml @@ -50,7 +50,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 a805d3c7d38135902992124abe4d437980e9fab6..a89a67ccff59d9f6c7bb6464461196d3be3c0b9d 100644 --- a/devops/gc/deploy/values.yaml +++ b/devops/gc/deploy/values.yaml @@ -1,6 +1,7 @@ global: domain: "" onPremEnabled: false + limitsEnabled: true data: # Configmaps