Skip to content

Commit

Permalink
[incubator/fluentd-cloudwatch] add affinity/nodeselector (helm#10850)
Browse files Browse the repository at this point in the history
Signed-off-by: ArchiFleKs <[email protected]>
  • Loading branch information
ArchiFleKs authored and k8s-ci-robot committed Jan 31, 2019
1 parent ac99818 commit eba953c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion incubator/fluentd-cloudwatch/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: fluentd-cloudwatch
version: 0.6.4
version: 0.7.0
appVersion: v0.12.43-cloudwatch
description: A Fluentd CloudWatch Helm chart for Kubernetes.
home: https://www.fluentd.org/
Expand Down
2 changes: 2 additions & 0 deletions incubator/fluentd-cloudwatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ The following table lists the configurable parameters of the Fluentd Cloudwatch
| `tolerations` | Add tolerations | `[]` |
| `extraVars` | Add pod environment variables (must be specified as a single line object) | `[]` |
| `updateStrategy` | Define daemonset update strategy | `OnDelete` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `affinity` | Node affinity for pod assignment | `{}` |

Starting with fluentd-kubernetes-daemonset v0.12.43-cloudwatch, the container runs as user fluentd. To be able to write pos files to the host system, you'll need to run fluentd as root. Add the following extraVars value to run as root.

Expand Down
10 changes: 9 additions & 1 deletion incubator/fluentd-cloudwatch/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,13 @@ spec:
tolerations:
{{ toYaml .Values.tolerations | indent 6 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
updateStrategy:
{{ toYaml .Values.updateStrategy | indent 4 }}
{{ toYaml .Values.updateStrategy | indent 4 }}
17 changes: 17 additions & 0 deletions incubator/fluentd-cloudwatch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ resources:

# hostNetwork: false

## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
# kubernetes.io/role: node
# Ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#affinity-v1-core
# Expects input structure as per specification for example:
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: foo.bar.com/role
# operator: In
# values:
# - master
affinity: {}
## Add tolerations if specified
tolerations: []
# - key: node-role.kubernetes.io/master
Expand Down

0 comments on commit eba953c

Please sign in to comment.