diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index 1f9fa7731011ee99f5ecd2a22e8fcf908c932fc1..d60aa33b4cdfaedd3e6ff4f71948bf705439dab2 100644 --- a/devops/gc/deploy/README.md +++ b/devops/gc/deploy/README.md @@ -32,6 +32,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 @@ -51,8 +52,8 @@ First you need to set variables in **values.yaml** file using any code editor. S |------|-------------|------|---------|---------| **data.requestsCpu** | amount of requested CPU | string | 220m | yes **data.requestsMemory** | amount of requested memory| string | 1.7G | yes -**data.limitsCpu** | CPU limit | string | 1 | yes -**data.limitsMemory** | memory limit | string | 1.5G | yes +**data.limitsCpu** | CPU limit | string | 1 | only if `global.limitsEnabled` is true +**data.limitsMemory** | memory limit | string | 1.5G | only if `global.limitsEnabled` is true **data.bootstrapImage** | bootstrap image | string | - | yes **data.bootstrapServiceAccountName** | bootstrap service account name | string | - | yes **data.image** | service image | string | - | yes diff --git a/devops/gc/deploy/templates/deployment.yaml b/devops/gc/deploy/templates/deployment.yaml index 852f4d9f0a82ead63e0942aa3786e3291adbb221..5b52d0702e2ee1d2edd6d316203b34ca4a116770 100644 --- a/devops/gc/deploy/templates/deployment.yaml +++ b/devops/gc/deploy/templates/deployment.yaml @@ -45,7 +45,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 9c3d5fcef0fe10b0fd104b8e42ca01d1ef455a1f..024c7b84139d8635b11556b05a2428c23fe5f3a3 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