From d731236dbbc7bd4d470a7fa6db1bdc4f93644a22 Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Fri, 23 Feb 2018 18:03:44 +0000 Subject: [PATCH] [incubator/chartmuseum]: Add support for nodeSelector, tolerations, affinity (#3835) Add support for specifying pod node selector, pod tolerations, and pod affinity via values.yaml --- incubator/chartmuseum/Chart.yaml | 2 +- incubator/chartmuseum/README.md | 3 +++ .../chartmuseum/templates/deployment.yaml | 19 +++++++++++++++++-- incubator/chartmuseum/values.yaml | 7 +++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/incubator/chartmuseum/Chart.yaml b/incubator/chartmuseum/Chart.yaml index 99faad6a18..76b78681d7 100644 --- a/incubator/chartmuseum/Chart.yaml +++ b/incubator/chartmuseum/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Helm Chart Repository with support for Amazon S3 and Google Cloud Storage name: chartmuseum -version: 0.3.4 +version: 0.3.5 appVersion: 0.3.1 home: https://github.com/chartmuseum/chartmuseum icon: https://raw.githubusercontent.com/chartmuseum/chartmuseum/master/logo.png diff --git a/incubator/chartmuseum/README.md b/incubator/chartmuseum/README.md index 1663d7c667..7431867522 100644 --- a/incubator/chartmuseum/README.md +++ b/incubator/chartmuseum/README.md @@ -37,6 +37,9 @@ their default values. See values.yaml for all available options. | `resources.limits.memory` | Container maximum memory | `128Mi` | | `resources.requests.cpu` | Container requested CPU | `80m` | | `resources.requests.memory` | Container requested memory | `64Mi` | +| `nodeSelector` | Map of node labels for pod assignment | `{}` | +| `tolerations` | List of node taints to tolerate | `[]` | +| `affinity` | Map of node/pod affinities | `{}` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/incubator/chartmuseum/templates/deployment.yaml b/incubator/chartmuseum/templates/deployment.yaml index b57154be75..ac8387f873 100644 --- a/incubator/chartmuseum/templates/deployment.yaml +++ b/incubator/chartmuseum/templates/deployment.yaml @@ -67,8 +67,23 @@ spec: - mountPath: /storage name: storage-volume {{- end }} + {{- with .Values.resources }} resources: -{{ toYaml .Values.resources | indent 10 }} +{{ toYaml . | indent 10 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + volumes: - name: storage-volume {{- if .Values.persistence.Enabled }} @@ -76,4 +91,4 @@ spec: claimName: {{ .Values.persistence.ExistingClaim | default (include "common.fullname" .) }} {{- else }} emptyDir: {} - {{- end -}} \ No newline at end of file + {{- end -}} diff --git a/incubator/chartmuseum/values.yaml b/incubator/chartmuseum/values.yaml index 74917e59bf..4497be9691 100644 --- a/incubator/chartmuseum/values.yaml +++ b/incubator/chartmuseum/values.yaml @@ -71,6 +71,13 @@ resources: requests: cpu: 80m memory: 64Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + persistence: Enabled: false AccessMode: ReadWriteOnce