From b2c9f8514d7f2b35a57eb3edb5bd9826026878bf Mon Sep 17 00:00:00 2001 From: Matt McNaughton Date: Fri, 18 May 2018 09:24:51 -0400 Subject: [PATCH] Fix cockroachdb not abiding by resources reqs (#5629) The containers in the stateful set were ignoring the resource requests when specified in `values.yaml`. Comment out the resources requests in `values.yaml`, so we only set requests if the user specifically enables them. I verified this is working by running `kubectl describe pod POD | grep cpu` on one of the created pods on the fix branch. It returned `cpu: "100m"`. On the master branch, the same command returned nothing. --- stable/cockroachdb/Chart.yaml | 2 +- .../cockroachdb/templates/cockroachdb-statefulset.yaml | 2 +- stable/cockroachdb/values.yaml | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/stable/cockroachdb/Chart.yaml b/stable/cockroachdb/Chart.yaml index 811871c1e7..fe5bf5138f 100755 --- a/stable/cockroachdb/Chart.yaml +++ b/stable/cockroachdb/Chart.yaml @@ -1,6 +1,6 @@ name: cockroachdb home: https://www.cockroachlabs.com -version: 1.1.0 +version: 1.1.1 appVersion: 2.0.0 description: CockroachDB is a scalable, survivable, strongly-consistent SQL database. icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png diff --git a/stable/cockroachdb/templates/cockroachdb-statefulset.yaml b/stable/cockroachdb/templates/cockroachdb-statefulset.yaml index fc581c4fe6..e6d2b88a1f 100644 --- a/stable/cockroachdb/templates/cockroachdb-statefulset.yaml +++ b/stable/cockroachdb/templates/cockroachdb-statefulset.yaml @@ -249,7 +249,7 @@ spec: periodSeconds: 5 failureThreshold: 2 resources: -{{ toYaml .Values.resources | indent 10 }} +{{ toYaml .Values.Resources | indent 10 }} env: - name: STATEFULSET_NAME value: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}" diff --git a/stable/cockroachdb/values.yaml b/stable/cockroachdb/values.yaml index 5d52bae8cf..7221d6bd34 100644 --- a/stable/cockroachdb/values.yaml +++ b/stable/cockroachdb/values.yaml @@ -12,10 +12,12 @@ MaxUnavailable: 1 Component: "cockroachdb" GrpcPort: 26257 HttpPort: 8080 -Resources: - requests: - cpu: "100m" - memory: "512Mi" +# Uncomment the following resources definitions or pass them from command line +# to control the cpu and memory resources allocated by the Kubernetes cluster +Resources: {} + # requests: + # cpu: "100m" + # memory: "512Mi" Storage: "1Gi" ## Persistent Volume Storage Class for database data ## If defined, storageClassName: