diff --git a/devops/gc/deploy/README.md b/devops/gc/deploy/README.md index 6ac2f31db4642c3ae1fd8bad648e6ccbe7391050..04e546fa66fb5deb702d90b591466ebc2f757f5f 100644 --- a/devops/gc/deploy/README.md +++ b/devops/gc/deploy/README.md @@ -33,6 +33,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 | `10m` | yes **data.requestsMemory** | amount of requested memory| string | `512Mi` | 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.serviceAccountName** | name of your service account | string | `notification` | 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 a2700e0769fd9b8e4ce7af845035718434ed2d6b..3f22bdecc4f23ea6fa6f454681564bda82509520 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 2169af86ec8f95e24674853e158ac90a3c343277..f87091d7cb84c91de42d0bfdd80345b0730a6243 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