Skip to content

Commit

Permalink
Add toleration and affinity knobs for heapster (helm#8961)
Browse files Browse the repository at this point in the history
* Add toleration and affinity knobs for heapster

Signed-off-by: Joe Hohertz <[email protected]>

* Adjust indent per suggestion

Co-Authored-By: jhohertz <[email protected]>
Signed-off-by: Joe Hohertz <[email protected]>
  • Loading branch information
jhohertz authored and k8s-ci-robot committed Nov 7, 2018
1 parent b66ea7a commit 29eea15
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/heapster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Heapster enables Container Cluster Monitoring and Performance Analysis.
name: heapster
version: 0.3.1
version: 0.3.2
appVersion: 1.5.2
home: https://github.com/kubernetes/heapster
sources:
Expand Down
2 changes: 2 additions & 0 deletions stable/heapster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The default configuration values for this chart are listed in `values.yaml`.
| `eventer.enabled` | If enabled, start eventer | false |
| `podAnnotations` | Pod Annotations to be added to the heapster Pod | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `affinity` | Affinity for pod assignment | `{}` |

The table below is only applicable if `resizer.enabled` is `true`. More information on resizer can be found [here](https://github.com/kubernetes/contrib/blob/master/addon-resizer/README.md).

Expand Down
8 changes: 8 additions & 0 deletions stable/heapster/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ spec:
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
Expand Down
9 changes: 9 additions & 0 deletions stable/heapster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ podAnnotations: {}
##
nodeSelector: {}

## Tolerations for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []

## Affinity for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}

service:
type: ClusterIP
externalPort: 8082
Expand Down

0 comments on commit 29eea15

Please sign in to comment.