Skip to content

Commit

Permalink
Split up and consistify mysql resource limits/requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gtaylor committed Nov 3, 2016
1 parent 6c56194 commit 8a198c1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion stable/mysql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mysql
version: 0.1.2
version: 0.2.0
description: Chart for MySQL
keywords:
- mysql
Expand Down
1 change: 1 addition & 0 deletions stable/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The following tables lists the configurable parameters of the MySQL chart and th
| `persistence.size` | Size of persistent volume claim | 8Gi RW |
| `persistence.storageClass` | Type of persistent volume claim | generic |
| `persistence.accessMode` | ReadWriteOnce or ReadOnly | ReadWriteOnce |
| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `100m` |

Some of the parameters above map to the env variables defined in the [MySQL DockerHub image](https://hub.docker.com/_/mysql/).

Expand Down
7 changes: 1 addition & 6 deletions stable/mysql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ spec:
image: "mysql:{{ .Values.imageTag }}"
imagePullPolicy: Always
resources:
requests:
cpu: "{{.Values.cpu}}"
memory: "{{.Values.memory}}"
limits:
cpu: "{{.Values.cpu}}"
memory: "{{.Values.memory}}"
{{ toYaml .Values.resources | indent 10 }}
env:
{{- if .Values.mysqlAllowEmptyPassword }}
- name: MYSQL_ALLOW_EMPTY_PASSWORD
Expand Down
10 changes: 8 additions & 2 deletions stable/mysql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
## ref: https://hub.docker.com/r/library/mysql/tags/
##
imageTag: "5.7.14"
cpu: 100m
memory: 256Mi

## Specify password for root user
##
Expand All @@ -29,3 +27,11 @@ persistence:
storageClass: generic
accessMode: ReadWriteOnce
size: 8Gi

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
requests:
memory: 256Mi
cpu: 100m

0 comments on commit 8a198c1

Please sign in to comment.