diff --git a/charts/redis/templates/deployment.yaml b/charts/redis/templates/deployment.yaml index 778a97c76092f8193ca59bc15eadb6e1287ea641..174acbe0722b24c3ba328479d5d10e59eda154d0 100644 --- a/charts/redis/templates/deployment.yaml +++ b/charts/redis/templates/deployment.yaml @@ -48,7 +48,9 @@ spec: - name: {{ .Release.Name }}-config emptyDir: medium: "Memory" + {{- if .Values.global.emptyDirLimits -}} sizeLimit: 10M + {{- end -}} - name: {{ .Release.Name }} projected: defaultMode: 0644 @@ -72,7 +74,9 @@ spec: claimName: {{ .disk.persistentVolumeClaim }} {{- else }} emptyDir: + {{- if .Values.global.emptyDirLimits -}} sizeLimit: 10G + {{- end -}} {{- end }} {{- end }} {{- end -}} diff --git a/doc/advanced/README.md b/doc/advanced/README.md index aa5a4115ce5ab1245fb6fbb87b0c38a2910b11bc..98f0f1c77528ea943f7bd773f3253a4f42347868 100644 --- a/doc/advanced/README.md +++ b/doc/advanced/README.md @@ -1,3 +1,5 @@ # Advanced Configuration +Controlling [feature gates](feature-gates/README.md) + Using an [external database](external-db/README.md) diff --git a/doc/advanced/feature-gates/README.md b/doc/advanced/feature-gates/README.md new file mode 100644 index 0000000000000000000000000000000000000000..88a8cddad70eb21abfe29d3e9dd363791f125320 --- /dev/null +++ b/doc/advanced/feature-gates/README.md @@ -0,0 +1,10 @@ +# Feature Gates + +[emptyDirLimits](#emptydirlimits) + +## emptyDirLimits + +We have attempted to be concious of resources wherever possible. To this end, some charts make use of [`emptyDir` volume mounts][emptyDir], which can be backed by the node disk, or via `tmpfs`. In an effort to curtail excessive consumption of either of these resources, we've also implemented the `sizeLimit` feature of the `emptyDir`. The downside to this usage is that `sizeLimit` is not available without a feature flag before Kubernetes `1.8.x`. Starting in Kubernetes `1.7.x`, this is an Alpha feature, and can be enabled individually with the `LocalStorageCapacityIsolation` feature gate. + +[emptyDir]: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir +[emptyDirVolumeSource]: https://v1-8.docs.kubernetes.io/docs/api-reference/v1.8/#emptydirvolumesource-v1-core diff --git a/values.yaml b/values.yaml index 244f818900ed5412afdf2b65b5e20bfccb942aa4..c5f46d0ebd898ba5ddfecbaca81003aa0ccacdf9 100644 --- a/values.yaml +++ b/values.yaml @@ -25,3 +25,12 @@ gitlab: enabled: false gitlab-shell: enabled: false + +## Global configuration items +global: + ## Configuration + # domain: Top-Level Domain for deployment + ## Feature gating + # emptyDir.sizeLimit is alpha in Kubernetes v1.7.x, standard in v1.8.x + # When available, it is used to limit the size of ephemeral data + emptyDirLimits: true