Skip to content

Commit

Permalink
[stable/kube-state-metrics] add affinity configuration
Browse files Browse the repository at this point in the history
Extend values.yaml to allow definition of affinity for
kube-state-metrics pods.

fixes helm#12818

Signed-off-by: Lukas Grossar <lukas.grossar@adfinis-sygroup.ch>
  • Loading branch information
Lukas Grossar committed May 7, 2019
1 parent 9fa86cb commit e9ba536
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- metric
- monitoring
- prometheus
version: 1.3.0
version: 1.4.0
appVersion: 1.6.0
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
1 change: 1 addition & 0 deletions stable/kube-state-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ $ helm install stable/kube-state-metrics
| `securityContext.runAsUser` | User ID for the container | `65534` |
| `priorityClassName` | Name of Priority Class to assign pods | `nil` |
| `nodeSelector` | Node labels for pod assignment | {} |
| `affinity` | Affinity settings for pod assignment | {} |
| `tolerations` | Tolerations for pod assignment | [] |
| `podAnnotations` | Annotations to be added to the pod | {} |
| `resources` | kube-state-metrics resource requests and limits | {} |
Expand Down
4 changes: 4 additions & 0 deletions stable/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ spec:
timeoutSeconds: 5
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions stable/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ securityContext:
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
nodeSelector: {}

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

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

0 comments on commit e9ba536

Please sign in to comment.