From a595e3f4c5e453d98fc0ba6aeeae0f30ec89384c Mon Sep 17 00:00:00 2001 From: Adnan Abdulhussein Date: Thu, 3 Nov 2016 13:55:36 -0700 Subject: [PATCH] Add configurable resource reqs/limits to MariaDB (#179) --- stable/mariadb/Chart.yaml | 2 +- stable/mariadb/README.md | 1 + stable/mariadb/templates/deployment.yaml | 2 ++ stable/mariadb/values.yaml | 8 ++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stable/mariadb/Chart.yaml b/stable/mariadb/Chart.yaml index 688f95461d..e13496b4b2 100644 --- a/stable/mariadb/Chart.yaml +++ b/stable/mariadb/Chart.yaml @@ -1,5 +1,5 @@ name: mariadb -version: 0.5.2 +version: 0.5.3 description: Chart for MariaDB keywords: - mariadb diff --git a/stable/mariadb/README.md b/stable/mariadb/README.md index 7606f5fa71..2b2eb6809e 100644 --- a/stable/mariadb/README.md +++ b/stable/mariadb/README.md @@ -57,6 +57,7 @@ The following tables lists the configurable parameters of the MariaDB chart and | `persistence.storageClass` | Storage class of backing PVC | `generic` | | `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | | `persistence.size` | Size of data volume | `8Gi` | +| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `250m` | | `config` | Multi-line string for my.cnf configuration | `nil` | The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. diff --git a/stable/mariadb/templates/deployment.yaml b/stable/mariadb/templates/deployment.yaml index 482938975d..1fbfd0ea43 100644 --- a/stable/mariadb/templates/deployment.yaml +++ b/stable/mariadb/templates/deployment.yaml @@ -68,6 +68,8 @@ spec: - ping initialDelaySeconds: 5 timeoutSeconds: 1 + resources: +{{ toYaml .Values.resources | indent 10 }} volumeMounts: - name: data mountPath: /bitnami/mariadb diff --git a/stable/mariadb/values.yaml b/stable/mariadb/values.yaml index d47c352a0e..98d2006c7d 100644 --- a/stable/mariadb/values.yaml +++ b/stable/mariadb/values.yaml @@ -41,3 +41,11 @@ persistence: # config: |- # [mysqld] # innodb_buffer_pool_size=2G + +## Configure resource requests and limits +## ref: http://kubernetes.io/docs/user-guide/compute-resources/ +## +resources: + requests: + memory: 256Mi + cpu: 250m