diff --git a/stable/mysql/Chart.yaml b/stable/mysql/Chart.yaml index 626c146332..acb1a0ea7b 100644 --- a/stable/mysql/Chart.yaml +++ b/stable/mysql/Chart.yaml @@ -1,5 +1,5 @@ name: mysql -version: 0.1.2 +version: 0.2.0 description: Chart for MySQL keywords: - mysql diff --git a/stable/mysql/README.md b/stable/mysql/README.md index c035968d11..b9139155b3 100644 --- a/stable/mysql/README.md +++ b/stable/mysql/README.md @@ -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/). diff --git a/stable/mysql/templates/deployment.yaml b/stable/mysql/templates/deployment.yaml index a979070d88..01bcf02c11 100644 --- a/stable/mysql/templates/deployment.yaml +++ b/stable/mysql/templates/deployment.yaml @@ -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 diff --git a/stable/mysql/values.yaml b/stable/mysql/values.yaml index 0f4a3c6ec2..1c18658560 100644 --- a/stable/mysql/values.yaml +++ b/stable/mysql/values.yaml @@ -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 ## @@ -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