[incubator/etcd] Add pod assignment configuration options (#3542)

* [incubator/etcd] Add pod assignment configuration options

- update statefulset template to add affinity, nodeSelector and tolerations
- add sane default values
- update README
- bump chart version

* Change case of values to match existing style
This commit is contained in:
Ryan Luckie
2018-02-21 07:33:39 -08:00
committed by k8s-ci-robot
parent ee28a003e6
commit f72cb2dc59
4 changed files with 37 additions and 15 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
name: etcd
home: https://github.com/coreos/etcd
version: 0.3.6
version: 0.3.7
description: Distributed reliable key-value store for the most critical data of a
distributed system.
icon: https://raw.githubusercontent.com/coreos/etcd/master/logos/etcd-horizontal-color.png
+17 -14
View File
@@ -35,20 +35,23 @@ $ helm install --name my-release incubator/etcd
The following tables lists the configurable parameters of the etcd chart and their default values.
| Parameter | Description | Default |
| ----------------------- | ---------------------------------- | ---------------------------------------------------------- |
| `Name` | Spark master name | `etcd` |
| `Image` | Container image name | `k8s.gcr.io/etcd-amd64` |
| `ImageTag` | Container image tag | `2.2.5` |
| `ImagePullPolicy` | Container pull policy | `Always` |
| `Replicas` | k8s statefulset replicas | `3` |
| `Component` | k8s selector key | `etcd` |
| `Cpu` | container requested cpu | `100m` |
| `Memory` | container requested memory | `512Mi` |
| `ClientPort` | k8s service port | `2379` |
| `PeerPorts` | Container listening port | `2380` |
| `Storage` | Persistent volume size | `1Gi` |
| `StorageClass` | Persistent volume storage class | `anything` |
| Parameter | Description | Default |
| ----------------------- | ------------------------------------ | -------------------------------------------------- |
| `Name` | Spark master name | `etcd` |
| `Image` | Container image name | `k8s.gcr.io/etcd-amd64` |
| `ImageTag` | Container image tag | `2.2.5` |
| `ImagePullPolicy` | Container pull policy | `Always` |
| `Replicas` | k8s statefulset replicas | `3` |
| `Component` | k8s selector key | `etcd` |
| `Cpu` | container requested cpu | `100m` |
| `Memory` | container requested memory | `512Mi` |
| `ClientPort` | k8s service port | `2379` |
| `PeerPorts` | Container listening port | `2380` |
| `Storage` | Persistent volume size | `1Gi` |
| `StorageClass` | Persistent volume storage class | `anything` |
| `Affinity` | Affinity settings for pod assignment | `{}` |
| `NodeSelector` | Node labels for pod assignment | `{}` |
| `Tolerations` | Toleration labels for pod assignment | `[]` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
+12
View File
@@ -19,6 +19,18 @@ spec:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Release.Name }}-{{ .Values.Component }}"
spec:
{{- if .Values.Affinity }}
affinity:
{{ toYaml .Values.Affinity | indent 8 }}
{{- end }}
{{- if .Values.NodeSelector }}
nodeSelector:
{{ toYaml .Values.NodeSelector | indent 8 }}
{{- end }}
{{- if .Values.Tolerations }}
tolerations:
{{ toYaml .Values.Tolerations | indent 8 }}
{{- end }}
containers:
- name: {{ template "etcd.fullname" . }}
image: "{{ .Values.Image }}:{{ .Values.ImageTag }}"
+7
View File
@@ -22,3 +22,10 @@ Storage: "1Gi"
## GKE, AWS & OpenStack)
##
# storageClass: "-"
## Node labels and tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
NodeSelector: {}
Tolerations: []
Affinity: {}