From a14c8a25d160a130edcf45c7dd81cdabc94f2db3 Mon Sep 17 00:00:00 2001 From: Maxime VISONNEAU Date: Tue, 27 Mar 2018 21:11:03 +0100 Subject: [PATCH] Added the possibility to specify affinity options to kube2iam chart (#4203) --- stable/kube2iam/Chart.yaml | 2 +- stable/kube2iam/README.md | 1 + stable/kube2iam/templates/daemonset.yaml | 4 ++++ stable/kube2iam/values.yaml | 7 ++++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/stable/kube2iam/Chart.yaml b/stable/kube2iam/Chart.yaml index bc12773f94..f9383395c0 100644 --- a/stable/kube2iam/Chart.yaml +++ b/stable/kube2iam/Chart.yaml @@ -1,5 +1,5 @@ name: kube2iam -version: 0.8.2 +version: 0.8.3 description: Provide IAM credentials to pods based on annotations. keywords: - kube2iam diff --git a/stable/kube2iam/README.md b/stable/kube2iam/README.md index 67614bd9f0..b8ab34394f 100644 --- a/stable/kube2iam/README.md +++ b/stable/kube2iam/README.md @@ -41,6 +41,7 @@ The following table lists the configurable parameters of the kube2iam chart and Parameter | Description | Default --- | --- | --- +`affinity` | affinity configuration for pod assignment | `{}` `extraArgs` | Additional container arguments | `{}` `host.ip` | IP address of host | `$(HOST_IP)` `host.iptables` | Add iptables rule | `false` diff --git a/stable/kube2iam/templates/daemonset.yaml b/stable/kube2iam/templates/daemonset.yaml index cbc8a2892d..76a2e64ebf 100644 --- a/stable/kube2iam/templates/daemonset.yaml +++ b/stable/kube2iam/templates/daemonset.yaml @@ -85,6 +85,10 @@ spec: {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} {{- end }} serviceAccountName: {{ if .Values.rbac.create }}{{ template "kube2iam.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} tolerations: diff --git a/stable/kube2iam/values.yaml b/stable/kube2iam/values.yaml index e8707a98d1..b8777c5411 100644 --- a/stable/kube2iam/values.yaml +++ b/stable/kube2iam/values.yaml @@ -22,10 +22,15 @@ aws: region: "" ## Node labels for pod assignment -## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ ## nodeSelector: {} +## Affinity configuration for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ +## +affinity: {} + ## Annotations to be added to pods ## podAnnotations: {}